@webwriter/deep-learning-model 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/README.md +3 -3
  2. package/components/model-editor.ts +22 -7
  3. package/custom-elements.json +24 -0
  4. package/dist/widgets/webwriter-feature-engineering.js +1381 -859
  5. package/dist/widgets/webwriter-model-designing.js +1500 -880
  6. package/dist/widgets/webwriter-model-evaluation.js +515 -524
  7. package/dist/widgets/webwriter-model-prediction.js +503 -512
  8. package/dist/widgets/webwriter-model-training.js +633 -559
  9. package/lib/layers/index.ts +77 -15
  10. package/lib/tflib.ts +9 -5
  11. package/localization/ar.xlf +28 -7
  12. package/localization/bg.xlf +28 -7
  13. package/localization/cs.xlf +28 -7
  14. package/localization/da.xlf +28 -7
  15. package/localization/de.xlf +28 -7
  16. package/localization/el.xlf +28 -7
  17. package/localization/es.xlf +28 -7
  18. package/localization/et.xlf +28 -7
  19. package/localization/fi.xlf +28 -7
  20. package/localization/fr.xlf +28 -7
  21. package/localization/generated/ar.ts +1 -0
  22. package/localization/generated/bg.ts +1 -0
  23. package/localization/generated/cs.ts +1 -0
  24. package/localization/generated/da.ts +1 -0
  25. package/localization/generated/de.ts +1 -0
  26. package/localization/generated/el.ts +1 -0
  27. package/localization/generated/es.ts +1 -0
  28. package/localization/generated/et.ts +1 -0
  29. package/localization/generated/fi.ts +1 -0
  30. package/localization/generated/fr.ts +1 -0
  31. package/localization/generated/hu.ts +1 -0
  32. package/localization/generated/id.ts +1 -0
  33. package/localization/generated/it.ts +1 -0
  34. package/localization/generated/ja.ts +1 -0
  35. package/localization/generated/ko.ts +1 -0
  36. package/localization/generated/lt.ts +1 -0
  37. package/localization/generated/lv.ts +1 -0
  38. package/localization/generated/nb.ts +1 -0
  39. package/localization/generated/nl.ts +1 -0
  40. package/localization/generated/pl.ts +1 -0
  41. package/localization/generated/pt-BR.ts +1 -0
  42. package/localization/generated/pt-PT.ts +1 -0
  43. package/localization/generated/ro.ts +1 -0
  44. package/localization/generated/ru.ts +1 -0
  45. package/localization/generated/sk.ts +1 -0
  46. package/localization/generated/sl.ts +1 -0
  47. package/localization/generated/sv.ts +1 -0
  48. package/localization/generated/tr.ts +1 -0
  49. package/localization/generated/uk.ts +1 -0
  50. package/localization/generated/zh-hans.ts +1 -0
  51. package/localization/generated/zh-hant.ts +1 -0
  52. package/localization/hu.xlf +28 -7
  53. package/localization/id.xlf +28 -7
  54. package/localization/it.xlf +28 -7
  55. package/localization/ja.xlf +28 -7
  56. package/localization/ko.xlf +28 -7
  57. package/localization/lt.xlf +28 -7
  58. package/localization/lv.xlf +28 -7
  59. package/localization/nb.xlf +28 -7
  60. package/localization/nl.xlf +28 -7
  61. package/localization/pkg/ar.xliff +1 -1
  62. package/localization/pkg/bg.xliff +1 -1
  63. package/localization/pkg/cs.xliff +1 -1
  64. package/localization/pkg/da.xliff +1 -1
  65. package/localization/pkg/de.xliff +1 -1
  66. package/localization/pkg/el.xliff +1 -1
  67. package/localization/pkg/es.xliff +1 -1
  68. package/localization/pkg/et.xliff +1 -1
  69. package/localization/pkg/fi.xliff +1 -1
  70. package/localization/pkg/fr.xliff +1 -1
  71. package/localization/pkg/hu.xliff +1 -1
  72. package/localization/pkg/id.xliff +1 -1
  73. package/localization/pkg/it.xliff +1 -1
  74. package/localization/pkg/ja.xliff +1 -1
  75. package/localization/pkg/ko.xliff +1 -1
  76. package/localization/pkg/lt.xliff +1 -1
  77. package/localization/pkg/lv.xliff +1 -1
  78. package/localization/pkg/nb.xliff +1 -1
  79. package/localization/pkg/nl.xliff +1 -1
  80. package/localization/pkg/pl.xliff +1 -1
  81. package/localization/pkg/pt-BR.xliff +1 -1
  82. package/localization/pkg/pt-PT.xliff +1 -1
  83. package/localization/pkg/ro.xliff +1 -1
  84. package/localization/pkg/ru.xliff +1 -1
  85. package/localization/pkg/sk.xliff +1 -1
  86. package/localization/pkg/sl.xliff +1 -1
  87. package/localization/pkg/sv.xliff +1 -1
  88. package/localization/pkg/tr.xliff +1 -1
  89. package/localization/pkg/uk.xliff +1 -1
  90. package/localization/pkg/zh-hans.xliff +2 -2
  91. package/localization/pkg/zh-hant.xliff +2 -2
  92. package/localization/pl.xlf +28 -7
  93. package/localization/pt-BR.xlf +28 -7
  94. package/localization/pt-PT.xlf +28 -7
  95. package/localization/ro.xlf +28 -7
  96. package/localization/ru.xlf +28 -7
  97. package/localization/sk.xlf +28 -7
  98. package/localization/sl.xlf +28 -7
  99. package/localization/snippets/ar.xliff +1 -1
  100. package/localization/snippets/bg.xliff +1 -1
  101. package/localization/snippets/cs.xliff +1 -1
  102. package/localization/snippets/da.xliff +1 -1
  103. package/localization/snippets/de.xliff +1 -1
  104. package/localization/snippets/el.xliff +1 -1
  105. package/localization/snippets/es.xliff +1 -1
  106. package/localization/snippets/et.xliff +1 -1
  107. package/localization/snippets/fi.xliff +1 -1
  108. package/localization/snippets/fr.xliff +1 -1
  109. package/localization/snippets/hu.xliff +1 -1
  110. package/localization/snippets/id.xliff +1 -1
  111. package/localization/snippets/it.xliff +1 -1
  112. package/localization/snippets/ja.xliff +1 -1
  113. package/localization/snippets/ko.xliff +1 -1
  114. package/localization/snippets/lt.xliff +1 -1
  115. package/localization/snippets/lv.xliff +1 -1
  116. package/localization/snippets/nb.xliff +1 -1
  117. package/localization/snippets/nl.xliff +1 -1
  118. package/localization/snippets/pl.xliff +1 -1
  119. package/localization/snippets/pt-BR.xliff +1 -1
  120. package/localization/snippets/pt-PT.xliff +1 -1
  121. package/localization/snippets/ro.xliff +1 -1
  122. package/localization/snippets/ru.xliff +1 -1
  123. package/localization/snippets/sk.xliff +1 -1
  124. package/localization/snippets/sl.xliff +1 -1
  125. package/localization/snippets/sv.xliff +1 -1
  126. package/localization/snippets/tr.xliff +1 -1
  127. package/localization/snippets/uk.xliff +1 -1
  128. package/localization/snippets/zh-hans.xliff +2 -2
  129. package/localization/snippets/zh-hant.xliff +2 -2
  130. package/localization/sv.xlf +28 -7
  131. package/localization/tr.xlf +28 -7
  132. package/localization/uk.xlf +28 -7
  133. package/localization/zh-hans.xlf +28 -7
  134. package/localization/zh-hant.xlf +28 -7
  135. package/package.json +2 -2
  136. package/snippets/MNIST.html +1 -1
  137. package/widgets/webwriter-model-designing.ts +25 -2
  138. package/widgets/webwriter-model-training.ts +45 -20
@@ -1374,18 +1374,18 @@ function squeezeShape(shape, axis) {
1374
1374
  const keptDims = [];
1375
1375
  const isEmptyArray = axis != null && Array.isArray(axis) && axis.length === 0;
1376
1376
  const axes = axis == null || isEmptyArray ? null : parseAxisParam(axis, shape).sort();
1377
- let j4 = 0;
1377
+ let j3 = 0;
1378
1378
  for (let i10 = 0; i10 < shape.length; ++i10) {
1379
1379
  if (axes != null) {
1380
- if (axes[j4] === i10 && shape[i10] !== 1) {
1380
+ if (axes[j3] === i10 && shape[i10] !== 1) {
1381
1381
  throw new Error(`Can't squeeze axis ${i10} since its dim '${shape[i10]}' is not 1`);
1382
1382
  }
1383
- if ((axes[j4] == null || axes[j4] > i10) && shape[i10] === 1) {
1383
+ if ((axes[j3] == null || axes[j3] > i10) && shape[i10] === 1) {
1384
1384
  newShape.push(shape[i10]);
1385
1385
  keptDims.push(i10);
1386
1386
  }
1387
- if (axes[j4] <= i10) {
1388
- j4++;
1387
+ if (axes[j3] <= i10) {
1388
+ j3++;
1389
1389
  }
1390
1390
  }
1391
1391
  if (shape[i10] !== 1) {
@@ -3351,7 +3351,7 @@ function getFilteredNodesXToY(tape, xs, y5) {
3351
3351
  for (const inputName in nodeInputs) {
3352
3352
  const input2 = nodeInputs[inputName];
3353
3353
  let anyInputFromX = false;
3354
- for (let j4 = 0; j4 < xs.length; j4++) {
3354
+ for (let j3 = 0; j3 < xs.length; j3++) {
3355
3355
  if (tensorsFromX[input2.id]) {
3356
3356
  node.outputs.forEach((output) => tensorsFromX[output.id] = true);
3357
3357
  anyInputFromX = true;
@@ -3370,8 +3370,8 @@ function getFilteredNodesXToY(tape, xs, y5) {
3370
3370
  for (let i10 = tape.length - 1; i10 >= 0; i10--) {
3371
3371
  const node = tape[i10];
3372
3372
  const nodeInputs = node.inputs;
3373
- for (let j4 = 0; j4 < node.outputs.length; j4++) {
3374
- if (tensorsLeadToY[node.outputs[j4].id]) {
3373
+ for (let j3 = 0; j3 < node.outputs.length; j3++) {
3374
+ if (tensorsLeadToY[node.outputs[j3].id]) {
3375
3375
  for (const inputName in nodeInputs) {
3376
3376
  tensorsLeadToY[nodeInputs[inputName].id] = true;
3377
3377
  nodesToY[node.id] = true;
@@ -3468,8 +3468,8 @@ function computeMaxSizePerColumn(vals, shape, dtype, strides) {
3468
3468
  if (rank > 1) {
3469
3469
  for (let row = 0; row < n12 / numCols; row++) {
3470
3470
  const offset3 = row * numCols;
3471
- for (let j4 = 0; j4 < numCols; j4++) {
3472
- padPerCol[j4] = Math.max(padPerCol[j4], valToString(valuesOrTuples[offset3 + j4], 0, dtype).length);
3471
+ for (let j3 = 0; j3 < numCols; j3++) {
3472
+ padPerCol[j3] = Math.max(padPerCol[j3], valToString(valuesOrTuples[offset3 + j3], 0, dtype).length);
3473
3473
  }
3474
3474
  }
3475
3475
  }
@@ -7599,10 +7599,10 @@ function basicLSTMCell_(forgetBias, lstmKernel, lstmBias, data, c8, h7) {
7599
7599
  const sliceCols = res.shape[1] / 4;
7600
7600
  const sliceSize = [batchSize, sliceCols];
7601
7601
  const i10 = slice(res, [0, 0], sliceSize);
7602
- const j4 = slice(res, [0, sliceCols], sliceSize);
7602
+ const j3 = slice(res, [0, sliceCols], sliceSize);
7603
7603
  const f6 = slice(res, [0, sliceCols * 2], sliceSize);
7604
7604
  const o16 = slice(res, [0, sliceCols * 3], sliceSize);
7605
- const newC = add2(mul(sigmoid(i10), tanh2(j4)), mul($c, sigmoid(add2($forgetBias, f6))));
7605
+ const newC = add2(mul(sigmoid(i10), tanh2(j3)), mul($c, sigmoid(add2($forgetBias, f6))));
7606
7606
  const newH = mul(tanh2(newC), sigmoid(o16));
7607
7607
  return [newC, newH];
7608
7608
  }
@@ -10909,22 +10909,22 @@ var require_xorshift7 = __commonJS({
10909
10909
  return v4;
10910
10910
  };
10911
10911
  function init(me3, seed2) {
10912
- var j4, w4, X2 = [];
10912
+ var j3, w4, X2 = [];
10913
10913
  if (seed2 === (seed2 | 0)) {
10914
10914
  w4 = X2[0] = seed2;
10915
10915
  } else {
10916
10916
  seed2 = "" + seed2;
10917
- for (j4 = 0; j4 < seed2.length; ++j4) {
10918
- X2[j4 & 7] = X2[j4 & 7] << 15 ^ seed2.charCodeAt(j4) + X2[j4 + 1 & 7] << 13;
10917
+ for (j3 = 0; j3 < seed2.length; ++j3) {
10918
+ X2[j3 & 7] = X2[j3 & 7] << 15 ^ seed2.charCodeAt(j3) + X2[j3 + 1 & 7] << 13;
10919
10919
  }
10920
10920
  }
10921
10921
  while (X2.length < 8) X2.push(0);
10922
- for (j4 = 0; j4 < 8 && X2[j4] === 0; ++j4) ;
10923
- if (j4 == 8) w4 = X2[7] = -1;
10924
- else w4 = X2[j4];
10922
+ for (j3 = 0; j3 < 8 && X2[j3] === 0; ++j3) ;
10923
+ if (j3 == 8) w4 = X2[7] = -1;
10924
+ else w4 = X2[j3];
10925
10925
  me3.x = X2;
10926
10926
  me3.i = 0;
10927
- for (j4 = 256; j4 > 0; --j4) {
10927
+ for (j3 = 256; j3 > 0; --j3) {
10928
10928
  me3.next();
10929
10929
  }
10930
10930
  }
@@ -10995,7 +10995,7 @@ var require_xor4096 = __commonJS({
10995
10995
  return v4 + (w4 ^ w4 >>> 16) | 0;
10996
10996
  };
10997
10997
  function init(me3, seed2) {
10998
- var t9, v4, i10, j4, w4, X2 = [], limit = 128;
10998
+ var t9, v4, i10, j3, w4, X2 = [], limit = 128;
10999
10999
  if (seed2 === (seed2 | 0)) {
11000
11000
  v4 = seed2;
11001
11001
  seed2 = null;
@@ -11004,16 +11004,16 @@ var require_xor4096 = __commonJS({
11004
11004
  v4 = 0;
11005
11005
  limit = Math.max(limit, seed2.length);
11006
11006
  }
11007
- for (i10 = 0, j4 = -32; j4 < limit; ++j4) {
11008
- if (seed2) v4 ^= seed2.charCodeAt((j4 + 32) % seed2.length);
11009
- if (j4 === 0) w4 = v4;
11007
+ for (i10 = 0, j3 = -32; j3 < limit; ++j3) {
11008
+ if (seed2) v4 ^= seed2.charCodeAt((j3 + 32) % seed2.length);
11009
+ if (j3 === 0) w4 = v4;
11010
11010
  v4 ^= v4 << 10;
11011
11011
  v4 ^= v4 >>> 15;
11012
11012
  v4 ^= v4 << 4;
11013
11013
  v4 ^= v4 >>> 13;
11014
- if (j4 >= 0) {
11014
+ if (j3 >= 0) {
11015
11015
  w4 = w4 + 1640531527 | 0;
11016
- t9 = X2[j4 & 127] ^= v4 + w4;
11016
+ t9 = X2[j3 & 127] ^= v4 + w4;
11017
11017
  i10 = 0 == t9 ? i10 + 1 : 0;
11018
11018
  }
11019
11019
  }
@@ -11021,7 +11021,7 @@ var require_xor4096 = __commonJS({
11021
11021
  X2[(seed2 && seed2.length || 0) & 127] = -1;
11022
11022
  }
11023
11023
  i10 = 127;
11024
- for (j4 = 4 * 128; j4 > 0; --j4) {
11024
+ for (j3 = 4 * 128; j3 > 0; --j3) {
11025
11025
  v4 = X2[i10 + 34 & 127];
11026
11026
  t9 = X2[i10 = i10 + 1 & 127];
11027
11027
  v4 ^= v4 << 13;
@@ -11225,7 +11225,7 @@ var require_seedrandom = __commonJS({
11225
11225
  );
11226
11226
  }
11227
11227
  function ARC4(key) {
11228
- var t9, keylen = key.length, me2 = this, i10 = 0, j4 = me2.i = me2.j = 0, s7 = me2.S = [];
11228
+ var t9, keylen = key.length, me2 = this, i10 = 0, j3 = me2.i = me2.j = 0, s7 = me2.S = [];
11229
11229
  if (!keylen) {
11230
11230
  key = [keylen++];
11231
11231
  }
@@ -11233,17 +11233,17 @@ var require_seedrandom = __commonJS({
11233
11233
  s7[i10] = i10++;
11234
11234
  }
11235
11235
  for (i10 = 0; i10 < width; i10++) {
11236
- s7[i10] = s7[j4 = mask & j4 + key[i10 % keylen] + (t9 = s7[i10])];
11237
- s7[j4] = t9;
11236
+ s7[i10] = s7[j3 = mask & j3 + key[i10 % keylen] + (t9 = s7[i10])];
11237
+ s7[j3] = t9;
11238
11238
  }
11239
11239
  (me2.g = function(count2) {
11240
- var t10, r12 = 0, i11 = me2.i, j5 = me2.j, s8 = me2.S;
11240
+ var t10, r12 = 0, i11 = me2.i, j4 = me2.j, s8 = me2.S;
11241
11241
  while (count2--) {
11242
11242
  t10 = s8[i11 = mask & i11 + 1];
11243
- r12 = r12 * width + s8[mask & (s8[i11] = s8[j5 = mask & j5 + t10]) + (s8[j5] = t10)];
11243
+ r12 = r12 * width + s8[mask & (s8[i11] = s8[j4 = mask & j4 + t10]) + (s8[j4] = t10)];
11244
11244
  }
11245
11245
  me2.i = i11;
11246
- me2.j = j5;
11246
+ me2.j = j4;
11247
11247
  return r12;
11248
11248
  })(width);
11249
11249
  }
@@ -11267,9 +11267,9 @@ var require_seedrandom = __commonJS({
11267
11267
  return result.length ? result : typ == "string" ? obj : obj + "\0";
11268
11268
  }
11269
11269
  function mixkey(seed, key) {
11270
- var stringseed = seed + "", smear, j4 = 0;
11271
- while (j4 < stringseed.length) {
11272
- key[mask & j4] = mask & (smear ^= key[mask & j4] * 19) + stringseed.charCodeAt(j4++);
11270
+ var stringseed = seed + "", smear, j3 = 0;
11271
+ while (j3 < stringseed.length) {
11272
+ key[mask & j3] = mask & (smear ^= key[mask & j3] * 19) + stringseed.charCodeAt(j3++);
11273
11273
  }
11274
11274
  return tostring(key);
11275
11275
  }
@@ -14093,8 +14093,8 @@ function nonMaxSuppressionImpl_(boxes, scores, maxOutputSize, iouThreshold, scor
14093
14093
  break;
14094
14094
  }
14095
14095
  let ignoreCandidate = false;
14096
- for (let j4 = selectedIndices.length - 1; j4 >= suppressBeginIndex; --j4) {
14097
- const iou = intersectionOverUnion(boxes, boxIndex, selectedIndices[j4]);
14096
+ for (let j3 = selectedIndices.length - 1; j3 >= suppressBeginIndex; --j3) {
14097
+ const iou = intersectionOverUnion(boxes, boxIndex, selectedIndices[j3]);
14098
14098
  if (iou >= iouThreshold) {
14099
14099
  ignoreCandidate = true;
14100
14100
  break;
@@ -14129,9 +14129,9 @@ function nonMaxSuppressionImpl_(boxes, scores, maxOutputSize, iouThreshold, scor
14129
14129
  }
14130
14130
  return result;
14131
14131
  }
14132
- function intersectionOverUnion(boxes, i10, j4) {
14132
+ function intersectionOverUnion(boxes, i10, j3) {
14133
14133
  const iCoord = boxes.subarray(i10 * 4, i10 * 4 + 4);
14134
- const jCoord = boxes.subarray(j4 * 4, j4 * 4 + 4);
14134
+ const jCoord = boxes.subarray(j3 * 4, j3 * 4 + 4);
14135
14135
  const yminI = Math.min(iCoord[0], iCoord[2]);
14136
14136
  const xminI = Math.min(iCoord[1], iCoord[3]);
14137
14137
  const ymaxI = Math.max(iCoord[0], iCoord[2]);
@@ -14536,8 +14536,8 @@ function bandPart_(a6, numLower, numUpper) {
14536
14536
  $numUpper = where(less(numUpper, 0), N4, minimum(numUpper, N4));
14537
14537
  }
14538
14538
  const i10 = reshape(range(0, M4, 1, "int32"), [-1, 1]);
14539
- const j4 = range(0, N4, 1, "int32");
14540
- const ij = sub(i10, j4);
14539
+ const j3 = range(0, N4, 1, "int32");
14540
+ const ij = sub(i10, j3);
14541
14541
  const inBand = logicalAnd(lessEqual(ij, $numLower), greaterEqual(ij, neg($numUpper)));
14542
14542
  const zero = zeros([M4, N4], $a2.dtype);
14543
14543
  return reshape(stack(unstack(reshape($a2, [-1, M4, N4])).map((mat) => where(inBand, mat, zero))), shape);
@@ -14586,8 +14586,8 @@ function gramSchmidt_(xs) {
14586
14586
  ys.push(ENGINE.tidy(() => {
14587
14587
  let x4 = xs1d[i10];
14588
14588
  if (i10 > 0) {
14589
- for (let j4 = 0; j4 < i10; ++j4) {
14590
- const proj = mul(sum2(mul(ys[j4], x4)), ys[j4]);
14589
+ for (let j3 = 0; j3 < i10; ++j3) {
14590
+ const proj = mul(sum2(mul(ys[j3], x4)), ys[j3]);
14591
14591
  x4 = sub(x4, proj);
14592
14592
  }
14593
14593
  }
@@ -14652,14 +14652,14 @@ function qr2d(x4, fullMatrices = false) {
14652
14652
  const one2D = tensor2d([[1]], [1, 1]);
14653
14653
  let w4 = clone(one2D);
14654
14654
  const iters = m5 >= n12 ? n12 : m5;
14655
- for (let j4 = 0; j4 < iters; ++j4) {
14655
+ for (let j3 = 0; j3 < iters; ++j3) {
14656
14656
  const rTemp = r12;
14657
14657
  const wTemp = w4;
14658
14658
  const qTemp = q2;
14659
14659
  [w4, r12, q2] = ENGINE.tidy(() => {
14660
- const rjEnd1 = slice(r12, [j4, j4], [m5 - j4, 1]);
14660
+ const rjEnd1 = slice(r12, [j3, j3], [m5 - j3, 1]);
14661
14661
  const normX = norm(rjEnd1);
14662
- const rjj = slice(r12, [j4, j4], [1, 1]);
14662
+ const rjj = slice(r12, [j3, j3], [1, 1]);
14663
14663
  const s7 = where(greater(rjj, 0), tensor2d([[-1]]), tensor2d([[1]]));
14664
14664
  const u1 = sub(rjj, mul(s7, normX));
14665
14665
  const wPre = div(rjEnd1, u1);
@@ -14672,22 +14672,22 @@ function qr2d(x4, fullMatrices = false) {
14672
14672
  ], 0);
14673
14673
  }
14674
14674
  const tau = neg(div(matMul(s7, u1), normX));
14675
- const rjEndAll = slice(r12, [j4, 0], [m5 - j4, n12]);
14675
+ const rjEndAll = slice(r12, [j3, 0], [m5 - j3, n12]);
14676
14676
  const tauTimesW = mul(tau, w4);
14677
14677
  const wT = transpose(w4);
14678
- if (j4 === 0) {
14678
+ if (j3 === 0) {
14679
14679
  r12 = sub(rjEndAll, matMul(tauTimesW, matMul(wT, rjEndAll)));
14680
14680
  } else {
14681
14681
  const rTimesTau = sub(rjEndAll, matMul(tauTimesW, matMul(wT, rjEndAll)));
14682
- r12 = concat([slice(r12, [0, 0], [j4, n12]), rTimesTau], 0);
14682
+ r12 = concat([slice(r12, [0, 0], [j3, n12]), rTimesTau], 0);
14683
14683
  }
14684
14684
  const tawTimesWT = transpose(tauTimesW);
14685
- const qAllJEnd = slice(q2, [0, j4], [m5, q2.shape[1] - j4]);
14686
- if (j4 === 0) {
14685
+ const qAllJEnd = slice(q2, [0, j3], [m5, q2.shape[1] - j3]);
14686
+ if (j3 === 0) {
14687
14687
  q2 = sub(qAllJEnd, matMul(matMul(qAllJEnd, w4), tawTimesWT));
14688
14688
  } else {
14689
14689
  const qTimesTau = sub(qAllJEnd, matMul(matMul(qAllJEnd, w4), tawTimesWT));
14690
- q2 = concat([slice(q2, [0, 0], [m5, j4]), qTimesTau], 1);
14690
+ q2 = concat([slice(q2, [0, 0], [m5, j3]), qTimesTau], 1);
14691
14691
  }
14692
14692
  return [w4, r12, q2];
14693
14693
  });
@@ -17410,11 +17410,11 @@ async function toPixels(img, canvas) {
17410
17410
  rgba[d5] = value * multiplier;
17411
17411
  }
17412
17412
  }
17413
- const j4 = i10 * 4;
17414
- bytes[j4 + 0] = Math.round(rgba[0]);
17415
- bytes[j4 + 1] = Math.round(rgba[1]);
17416
- bytes[j4 + 2] = Math.round(rgba[2]);
17417
- bytes[j4 + 3] = Math.round(rgba[3]);
17413
+ const j3 = i10 * 4;
17414
+ bytes[j3 + 0] = Math.round(rgba[0]);
17415
+ bytes[j3 + 1] = Math.round(rgba[1]);
17416
+ bytes[j3 + 2] = Math.round(rgba[2]);
17417
+ bytes[j3 + 3] = Math.round(rgba[3]);
17418
17418
  }
17419
17419
  if (canvas != null) {
17420
17420
  if (!hasToPixelsWarned) {
@@ -18537,8 +18537,8 @@ function decodeEinsumEquation(equation, numTensors) {
18537
18537
  throw new Error(`Found duplicate axes in input component ${inputTerms[i10]}. Support for duplicate axes in input is not implemented yet.`);
18538
18538
  }
18539
18539
  idDims[i10] = [];
18540
- for (let j4 = 0; j4 < inputTerms[i10].length; ++j4) {
18541
- idDims[i10].push(allDims.indexOf(inputTerms[i10][j4]));
18540
+ for (let j3 = 0; j3 < inputTerms[i10].length; ++j3) {
18541
+ idDims[i10].push(allDims.indexOf(inputTerms[i10][j3]));
18542
18542
  }
18543
18543
  }
18544
18544
  const numDims = allDims.length;
@@ -18568,11 +18568,11 @@ function checkEinsumDimSizes(nDims, idDims, tensors) {
18568
18568
  const dimSizes = new Array(nDims);
18569
18569
  for (let i10 = 0; i10 < tensors.length; ++i10) {
18570
18570
  const shape = tensors[i10].shape;
18571
- for (let j4 = 0; j4 < idDims[i10].length; ++j4) {
18572
- if (dimSizes[idDims[i10][j4]] === void 0) {
18573
- dimSizes[idDims[i10][j4]] = shape[j4];
18571
+ for (let j3 = 0; j3 < idDims[i10].length; ++j3) {
18572
+ if (dimSizes[idDims[i10][j3]] === void 0) {
18573
+ dimSizes[idDims[i10][j3]] = shape[j3];
18574
18574
  } else {
18575
- assert(dimSizes[idDims[i10][j4]] === shape[j4], () => `Expected dimension ${dimSizes[idDims[i10][j4]]} at axis ${j4} of input shaped ${JSON.stringify(shape)}, but got dimension ${shape[j4]}`);
18575
+ assert(dimSizes[idDims[i10][j3]] === shape[j3], () => `Expected dimension ${dimSizes[idDims[i10][j3]]} at axis ${j3} of input shaped ${JSON.stringify(shape)}, but got dimension ${shape[j3]}`);
18576
18576
  }
18577
18577
  }
18578
18578
  }
@@ -20059,8 +20059,8 @@ function arrayRange(start, stop) {
20059
20059
  function arrayConcat(arrays) {
20060
20060
  const result = [];
20061
20061
  for (let i10 = 0; i10 < arrays.length; ++i10) {
20062
- for (let j4 = 0; j4 < arrays[i10].length; ++j4) {
20063
- result.push(arrays[i10][j4]);
20062
+ for (let j3 = 0; j3 < arrays[i10].length; ++j3) {
20063
+ result.push(arrays[i10][j3]);
20064
20064
  }
20065
20065
  }
20066
20066
  return result;
@@ -21575,8 +21575,8 @@ var init_Tile_grad = __esm({
21575
21575
  }
21576
21576
  } else if (x4.rank === 2) {
21577
21577
  for (let i10 = 0; i10 < reps[0]; ++i10) {
21578
- for (let j4 = 0; j4 < reps[1]; ++j4) {
21579
- xGrad = add2(xGrad, slice(dy, [i10 * x4.shape[0], j4 * x4.shape[1]], [
21578
+ for (let j3 = 0; j3 < reps[1]; ++j3) {
21579
+ xGrad = add2(xGrad, slice(dy, [i10 * x4.shape[0], j3 * x4.shape[1]], [
21580
21580
  x4.shape[0],
21581
21581
  x4.shape[1]
21582
21582
  ]));
@@ -21584,20 +21584,20 @@ var init_Tile_grad = __esm({
21584
21584
  }
21585
21585
  } else if (x4.rank === 3) {
21586
21586
  for (let i10 = 0; i10 < reps[0]; ++i10) {
21587
- for (let j4 = 0; j4 < reps[1]; ++j4) {
21587
+ for (let j3 = 0; j3 < reps[1]; ++j3) {
21588
21588
  for (let k4 = 0; k4 < reps[2]; ++k4) {
21589
- xGrad = add2(xGrad, slice(dy, [i10 * x4.shape[0], j4 * x4.shape[1], k4 * x4.shape[2]], [x4.shape[0], x4.shape[1], x4.shape[2]]));
21589
+ xGrad = add2(xGrad, slice(dy, [i10 * x4.shape[0], j3 * x4.shape[1], k4 * x4.shape[2]], [x4.shape[0], x4.shape[1], x4.shape[2]]));
21590
21590
  }
21591
21591
  }
21592
21592
  }
21593
21593
  } else if (x4.rank === 4) {
21594
21594
  for (let i10 = 0; i10 < reps[0]; ++i10) {
21595
- for (let j4 = 0; j4 < reps[1]; ++j4) {
21595
+ for (let j3 = 0; j3 < reps[1]; ++j3) {
21596
21596
  for (let k4 = 0; k4 < reps[2]; ++k4) {
21597
21597
  for (let l8 = 0; l8 < reps[3]; ++l8) {
21598
21598
  xGrad = add2(xGrad, slice(dy, [
21599
21599
  i10 * x4.shape[0],
21600
- j4 * x4.shape[1],
21600
+ j3 * x4.shape[1],
21601
21601
  k4 * x4.shape[2],
21602
21602
  l8 * x4.shape[3]
21603
21603
  ], [x4.shape[0], x4.shape[1], x4.shape[2], x4.shape[3]]));
@@ -28447,10 +28447,10 @@ var init_container = __esm({
28447
28447
  continue;
28448
28448
  }
28449
28449
  const inputShapes2 = [];
28450
- for (let j4 = 0; j4 < node.inboundLayers.length; j4++) {
28451
- const inboundLayer = node.inboundLayers[j4];
28452
- const nodeIndex2 = node.nodeIndices[j4];
28453
- const tensorIndex = node.tensorIndices[j4];
28450
+ for (let j3 = 0; j3 < node.inboundLayers.length; j3++) {
28451
+ const inboundLayer = node.inboundLayers[j3];
28452
+ const nodeIndex2 = node.nodeIndices[j3];
28453
+ const tensorIndex = node.tensorIndices[j3];
28454
28454
  const shapeKey = `${inboundLayer.name}_${nodeIndex2}_${tensorIndex}`;
28455
28455
  const inputShape2 = layersToOutputShapes[shapeKey];
28456
28456
  inputShapes2.push(inputShape2);
@@ -28458,9 +28458,9 @@ var init_container = __esm({
28458
28458
  const outputShape = layer.computeOutputShape(singletonOrArray(inputShapes2));
28459
28459
  const outputShapes2 = normalizeShapeList(outputShape);
28460
28460
  const nodeIndex = layer.inboundNodes.indexOf(node);
28461
- for (let j4 = 0; j4 < outputShapes2.length; j4++) {
28462
- const shapeKey = `${layer.name}_${nodeIndex}_${j4}`;
28463
- layersToOutputShapes[shapeKey] = outputShapes2[j4];
28461
+ for (let j3 = 0; j3 < outputShapes2.length; j3++) {
28462
+ const shapeKey = `${layer.name}_${nodeIndex}_${j3}`;
28463
+ layersToOutputShapes[shapeKey] = outputShapes2[j3];
28464
28464
  }
28465
28465
  }
28466
28466
  }
@@ -29362,12 +29362,12 @@ function standardizeInputData(data, names2, shapes, checkBatchAxis = true, excep
29362
29362
  if (array2.shape.length !== shapes[i10].length) {
29363
29363
  throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names2[i10]} to have ${shapes[i10].length} dimension(s). but got array with shape ${array2.shape}`);
29364
29364
  }
29365
- for (let j4 = 0; j4 < shapes[i10].length; ++j4) {
29366
- if (j4 === 0 && !checkBatchAxis) {
29365
+ for (let j3 = 0; j3 < shapes[i10].length; ++j3) {
29366
+ if (j3 === 0 && !checkBatchAxis) {
29367
29367
  continue;
29368
29368
  }
29369
- const dim = array2.shape[j4];
29370
- const refDim = shapes[i10][j4];
29369
+ const dim = array2.shape[j3];
29370
+ const refDim = shapes[i10][j3];
29371
29371
  if (refDim != null && refDim >= 0 && dim !== refDim) {
29372
29372
  throw new ValueError(`${exceptionPrefix} expected a batch of elements where each example has shape [${shapes[i10].slice(1, shapes[i10].length)}] (i.e.,tensor shape [*,${shapes[i10].slice(1, shapes[i10].length)}]) but the ${exceptionPrefix} received an input with ${array2.shape[0]} examples, each with shape [${array2.shape.slice(1, array2.shape.length)}] (tensor shape [${array2.shape}])`);
29373
29373
  }
@@ -29412,9 +29412,9 @@ function checkLossAndTargetCompatibility(targets, lossFns, outputShapes) {
29412
29412
  if (keyLosses.indexOf(loss) !== -1) {
29413
29413
  const slicedYShape = y5.shape.slice(1);
29414
29414
  const slicedShape = shape.slice(1);
29415
- for (let j4 = 0; j4 < slicedYShape.length; ++j4) {
29416
- const targetDim = slicedYShape[j4];
29417
- const outDim = slicedShape[j4];
29415
+ for (let j3 = 0; j3 < slicedYShape.length; ++j3) {
29416
+ const targetDim = slicedYShape[j3];
29417
+ const outDim = slicedShape[j3];
29418
29418
  if (outDim != null && targetDim !== outDim) {
29419
29419
  throw new ValueError(`A target Tensor with shape ${y5.shape} was passed for an output of shape ${shape}, while using a loss function that expects targets to have the same shape as the output.`);
29420
29420
  }
@@ -29444,12 +29444,12 @@ function checkInputData(data, names2, shapes, checkBatchAxis = true, exceptionPr
29444
29444
  if (array2.shape.length !== shapes[i10].length) {
29445
29445
  throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names2[i10]} to have ${shapes[i10].length} dimension(s), but got array with shape ${JSON.stringify(array2.shape)}`);
29446
29446
  }
29447
- for (let j4 = 0; j4 < shapes[i10].length; ++j4) {
29448
- if (j4 === 0 && !checkBatchAxis) {
29447
+ for (let j3 = 0; j3 < shapes[i10].length; ++j3) {
29448
+ if (j3 === 0 && !checkBatchAxis) {
29449
29449
  continue;
29450
29450
  }
29451
- const dim = array2.shape[j4];
29452
- const refDim = shapes[i10][j4];
29451
+ const dim = array2.shape[j3];
29452
+ const refDim = shapes[i10][j3];
29453
29453
  if (refDim != null) {
29454
29454
  if (refDim !== dim) {
29455
29455
  throw new ValueError(`Error when checking ${exceptionPrefix}: expected ${names2[i10]} to have shape ${JSON.stringify(shapes[i10])} but got array with shape ${JSON.stringify(array2.shape)}.`);
@@ -35032,15 +35032,15 @@ var init_merge = __esm({
35032
35032
  const outputShape = shape1.slice(0, shape1.length - shape2.length);
35033
35033
  for (let k4 = 0; k4 < shape2.length; ++k4) {
35034
35034
  const i10 = shape1[shape1.length - shape2.length + k4];
35035
- const j4 = shape2[k4];
35036
- if (i10 == null || j4 == null || i10 < 0 || j4 < 0) {
35035
+ const j3 = shape2[k4];
35036
+ if (i10 == null || j3 == null || i10 < 0 || j3 < 0) {
35037
35037
  outputShape.push(null);
35038
35038
  } else if (i10 === 1) {
35039
- outputShape.push(j4);
35040
- } else if (j4 === 1) {
35039
+ outputShape.push(j3);
35040
+ } else if (j3 === 1) {
35041
35041
  outputShape.push(i10);
35042
35042
  } else {
35043
- if (i10 !== j4) {
35043
+ if (i10 !== j3) {
35044
35044
  throw new ValueError("Operands could not be broadcast together with shapes " + JSON.stringify(shape1) + " " + JSON.stringify(shape2));
35045
35045
  }
35046
35046
  outputShape.push(i10);
@@ -51937,8 +51937,8 @@ function bincountReduceImpl(xBuf, weightsBuf, size3, binaryOutput = false) {
51937
51937
  const numCols = xBuf.shape[1];
51938
51938
  const outBuf = buffer([numRows, size3], weightsBuf.dtype);
51939
51939
  for (let i10 = 0; i10 < numRows; i10++) {
51940
- for (let j4 = 0; j4 < numCols; j4++) {
51941
- const value = xBuf.get(i10, j4);
51940
+ for (let j3 = 0; j3 < numCols; j3++) {
51941
+ const value = xBuf.get(i10, j3);
51942
51942
  if (value < 0) {
51943
51943
  throw new Error("Input x must be non-negative!");
51944
51944
  }
@@ -51949,7 +51949,7 @@ function bincountReduceImpl(xBuf, weightsBuf, size3, binaryOutput = false) {
51949
51949
  outBuf.set(1, i10, value);
51950
51950
  } else {
51951
51951
  if (weightsBuf.size > 0) {
51952
- outBuf.set(outBuf.get(i10, value) + weightsBuf.get(i10, j4), i10, value);
51952
+ outBuf.set(outBuf.get(i10, value) + weightsBuf.get(i10, j3), i10, value);
51953
51953
  } else {
51954
51954
  outBuf.set(outBuf.get(i10, value) + 1, i10, value);
51955
51955
  }
@@ -52170,9 +52170,9 @@ function gatherNdImpl(indicesData, paramsBuf, dtype, numSlices, sliceRank, slice
52170
52170
  for (let i10 = 0; i10 < numSlices; i10++) {
52171
52171
  const index = [];
52172
52172
  let flattenIndex = 0;
52173
- for (let j4 = 0; j4 < sliceRank; j4++) {
52174
- const dim = indicesData[i10 * sliceRank + j4];
52175
- flattenIndex += dim * strides[j4];
52173
+ for (let j3 = 0; j3 < sliceRank; j3++) {
52174
+ const dim = indicesData[i10 * sliceRank + j3];
52175
+ flattenIndex += dim * strides[j3];
52176
52176
  index.push(dim);
52177
52177
  }
52178
52178
  if (flattenIndex < 0 || flattenIndex >= paramsSize / sliceSize) {
@@ -52320,8 +52320,8 @@ function maxImpl(aVals, reduceSize, outShape, dtype) {
52320
52320
  for (let i10 = 0; i10 < vals.length; ++i10) {
52321
52321
  const offset3 = i10 * reduceSize;
52322
52322
  let max6 = aVals[offset3];
52323
- for (let j4 = 0; j4 < reduceSize; ++j4) {
52324
- const value = aVals[offset3 + j4];
52323
+ for (let j3 = 0; j3 < reduceSize; ++j3) {
52324
+ const value = aVals[offset3 + j3];
52325
52325
  if (Number.isNaN(value) || value > max6) {
52326
52326
  max6 = value;
52327
52327
  }
@@ -52500,8 +52500,8 @@ function prodImpl(xShape, xDtype, xVals, reductionAxes) {
52500
52500
  for (let i10 = 0; i10 < outVals.length; ++i10) {
52501
52501
  const offset3 = i10 * reduceSize;
52502
52502
  let prod4 = 1;
52503
- for (let j4 = 0; j4 < reduceSize; ++j4) {
52504
- prod4 *= xVals[offset3 + j4];
52503
+ for (let j3 = 0; j3 < reduceSize; ++j3) {
52504
+ prod4 *= xVals[offset3 + j3];
52505
52505
  }
52506
52506
  outVals[i10] = prod4;
52507
52507
  }
@@ -52598,8 +52598,8 @@ function makeSplits(indices, indicesShape, paramsNestedSplits, numParamsDenseVal
52598
52598
  if (outDim >= 0) {
52599
52599
  const outSplitsOutDim = outSplits[outDim];
52600
52600
  const delta = outSplitsOutDim[outSplitsOutDim.length - 1] - splits[start];
52601
- for (let j4 = start; j4 < limit; ++j4) {
52602
- outSplits[outDim].push(splits[j4 + 1] + delta);
52601
+ for (let j3 = start; j3 < limit; ++j3) {
52602
+ outSplits[outDim].push(splits[j3 + 1] + delta);
52603
52603
  }
52604
52604
  }
52605
52605
  start = splits[start];
@@ -52618,7 +52618,7 @@ function getSplits(outSplits) {
52618
52618
  const numSplits = outSplits[i10].length;
52619
52619
  const splits = util_exports.getArrayFromDType("int32", numSplits);
52620
52620
  splitsOut.push(splits);
52621
- outSplits[i10].forEach((value, j4) => splits[j4] = value);
52621
+ outSplits[i10].forEach((value, j3) => splits[j3] = value);
52622
52622
  }
52623
52623
  return splitsOut;
52624
52624
  }
@@ -52638,8 +52638,8 @@ function writeValueSlices(paramsDenseValues, paramsDenseValuesShape, valueSlices
52638
52638
  let outPos = 0;
52639
52639
  for (const slice4 of valueSlices) {
52640
52640
  for (let i10 = slice4[0]; i10 < slice4[1]; ++i10) {
52641
- for (let j4 = 0; j4 < valueSize; ++j4) {
52642
- values[outPos * valuesM + j4] = paramsDenseValues[i10 * denseM + j4];
52641
+ for (let j3 = 0; j3 < valueSize; ++j3) {
52642
+ values[outPos * valuesM + j3] = paramsDenseValues[i10 * denseM + j3];
52643
52643
  }
52644
52644
  ++outPos;
52645
52645
  }
@@ -52911,11 +52911,11 @@ var init_RaggedTensorToTensor_impl = __esm({
52911
52911
  if (parentOutputIndexCurrent === -1) {
52912
52912
  realLength = 0;
52913
52913
  }
52914
- for (let j4 = 0; j4 < realLength; ++j4) {
52914
+ for (let j3 = 0; j3 < realLength; ++j3) {
52915
52915
  result.push(parentOutputIndexCurrent);
52916
52916
  parentOutputIndexCurrent += outputIndexMultiplier;
52917
52917
  }
52918
- for (let j4 = 0; j4 < rowLength - realLength; ++j4) {
52918
+ for (let j3 = 0; j3 < rowLength - realLength; ++j3) {
52919
52919
  result.push(-1);
52920
52920
  }
52921
52921
  }
@@ -53166,10 +53166,10 @@ function scatterImpl(indices, updates, shape, outputSize, sliceSize, numUpdates,
53166
53166
  for (let i10 = 0; i10 < numUpdates; i10++) {
53167
53167
  const index = [];
53168
53168
  let flattenIndex = 0;
53169
- for (let j4 = 0; j4 < sliceRank; j4++) {
53170
- const dim = indicesData[i10 * sliceRank + j4];
53169
+ for (let j3 = 0; j3 < sliceRank; j3++) {
53170
+ const dim = indicesData[i10 * sliceRank + j3];
53171
53171
  index.push(dim);
53172
- flattenIndex += dim * strides[j4];
53172
+ flattenIndex += dim * strides[j3];
53173
53173
  }
53174
53174
  if (flattenIndex < 0 || flattenIndex >= outputSize / sliceSize) {
53175
53175
  throw new Error(`Invalid indices: ${index} does not index into ${shape}`);
@@ -53224,7 +53224,7 @@ function sliceImpl(vals, begin, size3, shape, dtype) {
53224
53224
  const outBuf = buffer(size3, dtype);
53225
53225
  for (let i10 = 0; i10 < outBuf.size; ++i10) {
53226
53226
  const outLoc = outBuf.indexToLoc(i10);
53227
- const inLoc = outLoc.map((idx, j4) => idx + begin[j4]);
53227
+ const inLoc = outLoc.map((idx, j3) => idx + begin[j3]);
53228
53228
  outBuf.set(inBuf.get(...inLoc), ...outLoc);
53229
53229
  }
53230
53230
  if (dtype === "string") {
@@ -53325,8 +53325,8 @@ function sparseFillEmptyRowsImpl(indices, indicesShape, indicesDType, values, va
53325
53325
  const offset3 = filledCount[row];
53326
53326
  const outputI = (row === 0 ? 0 : csrOffset[row - 1]) + offset3;
53327
53327
  filledCount[row]++;
53328
- for (let j4 = 0; j4 < rank; ++j4) {
53329
- outputIndices[outputI * rank + j4] = indices[i10 * rank + j4];
53328
+ for (let j3 = 0; j3 < rank; ++j3) {
53329
+ outputIndices[outputI * rank + j3] = indices[i10 * rank + j3];
53330
53330
  }
53331
53331
  outputValues[outputI] = values[i10];
53332
53332
  reverseIndexMap[i10] = outputI;
@@ -53413,12 +53413,12 @@ function sparseReshapeImpl(inputIndices, inputIndicesShape, inputDType, inputSha
53413
53413
  const newIndices = util_exports.getArrayFromDType(inputDType, nnz * outputRank);
53414
53414
  for (let i10 = 0; i10 < nnz; ++i10) {
53415
53415
  let id3 = 0;
53416
- for (let j4 = 0; j4 < inputRank; ++j4) {
53417
- id3 += inputIndices[i10 * inputRank + j4] * inputStrides[j4];
53416
+ for (let j3 = 0; j3 < inputRank; ++j3) {
53417
+ id3 += inputIndices[i10 * inputRank + j3] * inputStrides[j3];
53418
53418
  }
53419
- for (let j4 = 0; j4 < outputRank; ++j4) {
53420
- newIndices[i10 * outputRank + j4] = Math.trunc(id3 / outputStrides[j4]);
53421
- id3 %= outputStrides[j4];
53419
+ for (let j3 = 0; j3 < outputRank; ++j3) {
53420
+ newIndices[i10 * outputRank + j3] = Math.trunc(id3 / outputStrides[j3]);
53421
+ id3 %= outputStrides[j3];
53422
53422
  }
53423
53423
  }
53424
53424
  return [newIndices, [nnz, outputRank], outputShape];
@@ -53478,13 +53478,13 @@ function sparseSegmentReductionImpl(input2, inputShape, inputDType, indices, seg
53478
53478
  if (index < 0 || index >= inputFlat[0]) {
53479
53479
  throw new Error(backend_util_exports.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(i10, indices[i10], inputFlat[0]));
53480
53480
  }
53481
- for (let j4 = 0; j4 < numCol; j4++) {
53482
- output[outIndex * numCol + j4] += input2[index * numCol + j4];
53481
+ for (let j3 = 0; j3 < numCol; j3++) {
53482
+ output[outIndex * numCol + j3] += input2[index * numCol + j3];
53483
53483
  }
53484
53484
  }
53485
53485
  if (isMean) {
53486
- for (let j4 = 0; j4 < numCol; j4++) {
53487
- output[outIndex * numCol + j4] /= end - start;
53486
+ for (let j3 = 0; j3 < numCol; j3++) {
53487
+ output[outIndex * numCol + j3] /= end - start;
53488
53488
  }
53489
53489
  }
53490
53490
  start = end;
@@ -53569,8 +53569,8 @@ function stridedSliceImpl(outShape, xBuf, strides, begin) {
53569
53569
  for (let i10 = 0; i10 < outBuf.size; i10++) {
53570
53570
  const loc = outBuf.indexToLoc(i10);
53571
53571
  const newLoc = new Array(loc.length);
53572
- for (let j4 = 0; j4 < newLoc.length; j4++) {
53573
- newLoc[j4] = loc[j4] * strides[j4] + begin[j4];
53572
+ for (let j3 = 0; j3 < newLoc.length; j3++) {
53573
+ newLoc[j3] = loc[j3] * strides[j3] + begin[j3];
53574
53574
  }
53575
53575
  outBuf.set(xBuf.get(...newLoc), ...loc);
53576
53576
  }
@@ -53775,9 +53775,9 @@ function stringSplitImpl(input2, delimiter, skipEmpty) {
53775
53775
  const shape = [batchSize, maxNumEntries];
53776
53776
  let c8 = 0;
53777
53777
  for (let i10 = 0; i10 < batchSize; ++i10) {
53778
- for (let j4 = 0; j4 < numIndices[i10]; ++j4) {
53778
+ for (let j3 = 0; j3 < numIndices[i10]; ++j3) {
53779
53779
  indices[c8 * 2] = i10;
53780
- indices[c8 * 2 + 1] = j4;
53780
+ indices[c8 * 2 + 1] = j3;
53781
53781
  values[c8] = tokens[c8];
53782
53782
  ++c8;
53783
53783
  }
@@ -53834,8 +53834,8 @@ function tileImpl(xBuf, reps) {
53834
53834
  for (let i10 = 0; i10 < result.values.length; ++i10) {
53835
53835
  const newLoc = result.indexToLoc(i10);
53836
53836
  const originalLoc = new Array(xBuf.rank);
53837
- for (let j4 = 0; j4 < originalLoc.length; j4++) {
53838
- originalLoc[j4] = newLoc[j4] % xBuf.shape[j4];
53837
+ for (let j3 = 0; j3 < originalLoc.length; j3++) {
53838
+ originalLoc[j3] = newLoc[j3] % xBuf.shape[j3];
53839
53839
  }
53840
53840
  const originalIndex = xBuf.locToIndex(originalLoc);
53841
53841
  result.values[i10] = xBuf.values[originalIndex];
@@ -53863,33 +53863,33 @@ function select(array2, k4, left = 0, right = array2.length - 1) {
53863
53863
  }
53864
53864
  const t9 = array2[k4];
53865
53865
  let i10 = left;
53866
- let j4 = right;
53866
+ let j3 = right;
53867
53867
  util_exports.swap(array2, left, k4);
53868
53868
  if (comparePair(array2[right], t9) > 0) {
53869
53869
  util_exports.swap(array2, left, right);
53870
53870
  }
53871
- while (i10 < j4) {
53872
- util_exports.swap(array2, i10, j4);
53871
+ while (i10 < j3) {
53872
+ util_exports.swap(array2, i10, j3);
53873
53873
  i10++;
53874
- j4--;
53874
+ j3--;
53875
53875
  while (comparePair(array2[i10], t9) < 0) {
53876
53876
  i10 = i10 + 1;
53877
53877
  }
53878
- while (comparePair(array2[j4], t9) > 0) {
53879
- j4 = j4 - 1;
53878
+ while (comparePair(array2[j3], t9) > 0) {
53879
+ j3 = j3 - 1;
53880
53880
  }
53881
53881
  }
53882
53882
  if (comparePair(array2[left], t9) === 0) {
53883
- util_exports.swap(array2, left, j4);
53883
+ util_exports.swap(array2, left, j3);
53884
53884
  } else {
53885
- j4 = j4 + 1;
53886
- util_exports.swap(array2, j4, right);
53885
+ j3 = j3 + 1;
53886
+ util_exports.swap(array2, j3, right);
53887
53887
  }
53888
- if (j4 <= k4) {
53889
- left = j4 + 1;
53888
+ if (j3 <= k4) {
53889
+ left = j3 + 1;
53890
53890
  }
53891
- if (k4 <= j4) {
53892
- right = j4 - 1;
53891
+ if (k4 <= j3) {
53892
+ right = j3 - 1;
53893
53893
  }
53894
53894
  }
53895
53895
  }
@@ -54340,7 +54340,7 @@ function batchMatMul(args) {
54340
54340
  for (let k02 = 0; k02 < sharedDim; k02 += blockSize) {
54341
54341
  const kBlock = Math.min(k02 + blockSize, sharedDim);
54342
54342
  for (let i10 = i0; i10 < iBlock; i10++) {
54343
- for (let j4 = j0; j4 < jBlock; j4++) {
54343
+ for (let j3 = j0; j3 < jBlock; j3++) {
54344
54344
  let sum5 = 0;
54345
54345
  for (let k4 = k02; k4 < kBlock; k4++) {
54346
54346
  const aVal = (
@@ -54349,11 +54349,11 @@ function batchMatMul(args) {
54349
54349
  );
54350
54350
  const bVal = (
54351
54351
  // tslint:disable-next-line: max-line-length
54352
- b3dValues[k4 * bInnerStep + j4 * bOuterStep + batchIndexB * bBatch]
54352
+ b3dValues[k4 * bInnerStep + j3 * bOuterStep + batchIndexB * bBatch]
54353
54353
  );
54354
54354
  sum5 += aVal * bVal;
54355
54355
  }
54356
- resVals[bi2 * size3 + (i10 * rightDim + j4)] += sum5;
54356
+ resVals[bi2 * size3 + (i10 * rightDim + j3)] += sum5;
54357
54357
  }
54358
54358
  }
54359
54359
  }
@@ -54459,8 +54459,8 @@ function addN2(args) {
54459
54459
  const outVals = outBuf.values;
54460
54460
  for (let i10 = 0; i10 < tensors.length; i10++) {
54461
54461
  const currVals = vals[i10];
54462
- for (let j4 = 0; j4 < outVals.length; j4++) {
54463
- outVals[j4] += currVals[j4];
54462
+ for (let j3 = 0; j3 < outVals.length; j3++) {
54463
+ outVals[j3] += currVals[j3];
54464
54464
  }
54465
54465
  }
54466
54466
  return backend2.makeTensorInfo(outBuf.shape, outBuf.dtype, outBuf.values);
@@ -54500,8 +54500,8 @@ function all2(args) {
54500
54500
  for (let i10 = 0; i10 < vals.length; ++i10) {
54501
54501
  const offset3 = i10 * reduceSize;
54502
54502
  let all4 = aVals[offset3];
54503
- for (let j4 = 0; j4 < reduceSize; ++j4) {
54504
- const value = aVals[offset3 + j4];
54503
+ for (let j3 = 0; j3 < reduceSize; ++j3) {
54504
+ const value = aVals[offset3 + j3];
54505
54505
  all4 = all4 && value;
54506
54506
  }
54507
54507
  vals[i10] = all4;
@@ -54555,8 +54555,8 @@ function any2(args) {
54555
54555
  for (let i10 = 0; i10 < vals.length; ++i10) {
54556
54556
  const offset3 = i10 * reduceSize;
54557
54557
  let anyVal = aVals[offset3];
54558
- for (let j4 = 0; j4 < reduceSize; ++j4) {
54559
- const value = aVals[offset3 + j4];
54558
+ for (let j3 = 0; j3 < reduceSize; ++j3) {
54559
+ const value = aVals[offset3 + j3];
54560
54560
  anyVal = anyVal || value;
54561
54561
  }
54562
54562
  vals[i10] = anyVal;
@@ -54614,11 +54614,11 @@ function argMax2(args) {
54614
54614
  const offset3 = i10 * reduceSize;
54615
54615
  let max6 = aVals[offset3];
54616
54616
  let maxIndex = 0;
54617
- for (let j4 = 0; j4 < reduceSize; ++j4) {
54618
- const value = aVals[offset3 + j4];
54617
+ for (let j3 = 0; j3 < reduceSize; ++j3) {
54618
+ const value = aVals[offset3 + j3];
54619
54619
  if (value > max6) {
54620
54620
  max6 = value;
54621
- maxIndex = j4;
54621
+ maxIndex = j3;
54622
54622
  }
54623
54623
  }
54624
54624
  vals[i10] = maxIndex;
@@ -54666,11 +54666,11 @@ function argMin2(args) {
54666
54666
  const offset3 = i10 * reduceSize;
54667
54667
  let min6 = aVals[offset3];
54668
54668
  let minIndex = 0;
54669
- for (let j4 = 0; j4 < reduceSize; ++j4) {
54670
- const value = aVals[offset3 + j4];
54669
+ for (let j3 = 0; j3 < reduceSize; ++j3) {
54670
+ const value = aVals[offset3 + j3];
54671
54671
  if (value < min6) {
54672
54672
  min6 = value;
54673
- minIndex = j4;
54673
+ minIndex = j3;
54674
54674
  }
54675
54675
  }
54676
54676
  vals[i10] = minIndex;
@@ -56100,14 +56100,14 @@ function cumprod2(args) {
56100
56100
  const vals = util_exports.makeOnesTypedArray(util_exports.sizeFromShape($x.shape), resultDtype);
56101
56101
  const aVals = backend2.data.get($x.dataId).values;
56102
56102
  const finalDim = $x.shape[$x.shape.length - 1];
56103
- const indexAdjuster = reverse4 ? (i10, j4) => i10 + finalDim - j4 - 1 : (i10, j4) => i10 + j4;
56103
+ const indexAdjuster = reverse4 ? (i10, j3) => i10 + finalDim - j3 - 1 : (i10, j3) => i10 + j3;
56104
56104
  for (let i10 = 0; i10 < aVals.length; i10 += finalDim) {
56105
- for (let j4 = 0; j4 < finalDim; j4++) {
56106
- const idx = indexAdjuster(i10, j4);
56107
- if (j4 === 0) {
56105
+ for (let j3 = 0; j3 < finalDim; j3++) {
56106
+ const idx = indexAdjuster(i10, j3);
56107
+ if (j3 === 0) {
56108
56108
  vals[idx] = exclusive ? 1 : aVals[idx];
56109
56109
  } else {
56110
- const prevIdx = indexAdjuster(i10, j4 - 1);
56110
+ const prevIdx = indexAdjuster(i10, j3 - 1);
56111
56111
  vals[idx] = exclusive ? aVals[prevIdx] * vals[prevIdx] : aVals[idx] * vals[prevIdx];
56112
56112
  }
56113
56113
  }
@@ -56155,14 +56155,14 @@ function cumsum2(args) {
56155
56155
  const vals = util_exports.makeZerosTypedArray(util_exports.sizeFromShape($x.shape), resultDtype);
56156
56156
  const aVals = backend2.data.get($x.dataId).values;
56157
56157
  const finalDim = $x.shape[$x.shape.length - 1];
56158
- const indexAdjuster = reverse4 ? (i10, j4) => i10 + finalDim - j4 - 1 : (i10, j4) => i10 + j4;
56158
+ const indexAdjuster = reverse4 ? (i10, j3) => i10 + finalDim - j3 - 1 : (i10, j3) => i10 + j3;
56159
56159
  for (let i10 = 0; i10 < aVals.length; i10 += finalDim) {
56160
- for (let j4 = 0; j4 < finalDim; j4++) {
56161
- const idx = indexAdjuster(i10, j4);
56162
- if (j4 === 0) {
56160
+ for (let j3 = 0; j3 < finalDim; j3++) {
56161
+ const idx = indexAdjuster(i10, j3);
56162
+ if (j3 === 0) {
56163
56163
  vals[idx] = exclusive ? 0 : aVals[idx];
56164
56164
  } else {
56165
- const prevIdx = indexAdjuster(i10, j4 - 1);
56165
+ const prevIdx = indexAdjuster(i10, j3 - 1);
56166
56166
  vals[idx] = exclusive ? aVals[prevIdx] + vals[prevIdx] : aVals[idx] + vals[prevIdx];
56167
56167
  }
56168
56168
  }
@@ -56722,11 +56722,11 @@ function draw2(args) {
56722
56722
  rgba[d5] = value * multiplier;
56723
56723
  }
56724
56724
  }
56725
- const j4 = i10 * 4;
56726
- bytes[j4 + 0] = Math.round(rgba[0]);
56727
- bytes[j4 + 1] = Math.round(rgba[1]);
56728
- bytes[j4 + 2] = Math.round(rgba[2]);
56729
- bytes[j4 + 3] = Math.round(rgba[3]);
56725
+ const j3 = i10 * 4;
56726
+ bytes[j3 + 0] = Math.round(rgba[0]);
56727
+ bytes[j3 + 1] = Math.round(rgba[1]);
56728
+ bytes[j3 + 2] = Math.round(rgba[2]);
56729
+ bytes[j3 + 3] = Math.round(rgba[3]);
56730
56730
  }
56731
56731
  canvas.width = width;
56732
56732
  canvas.height = height;
@@ -56777,8 +56777,8 @@ function sum3(args) {
56777
56777
  for (let i10 = 0; i10 < vals.length; ++i10) {
56778
56778
  const offset3 = i10 * reduceSize;
56779
56779
  let sum5 = 0;
56780
- for (let j4 = 0; j4 < reduceSize; ++j4) {
56781
- sum5 += aVals[offset3 + j4];
56780
+ for (let j3 = 0; j3 < reduceSize; ++j3) {
56781
+ sum5 += aVals[offset3 + j3];
56782
56782
  }
56783
56783
  vals[i10] = sum5;
56784
56784
  }
@@ -58090,8 +58090,8 @@ function min4(args) {
58090
58090
  for (let i10 = 0; i10 < vals.length; ++i10) {
58091
58091
  const offset3 = i10 * reduceSize;
58092
58092
  let min6 = aVals[offset3];
58093
- for (let j4 = 0; j4 < reduceSize; ++j4) {
58094
- const value = aVals[offset3 + j4];
58093
+ for (let j3 = 0; j3 < reduceSize; ++j3) {
58094
+ const value = aVals[offset3 + j3];
58095
58095
  if (Number.isNaN(value) || value < min6) {
58096
58096
  min6 = value;
58097
58097
  }
@@ -59224,7 +59224,7 @@ function select2(args) {
59224
59224
  let index = 0;
59225
59225
  const offset3 = conditionRank === 0 || conditionRank > 1 || t9.shape.length === 1 ? 1 : util_exports.sizeFromShape(t9.shape.slice(1));
59226
59226
  for (let i10 = 0; i10 < values.length; i10++) {
59227
- for (let j4 = 0; j4 < offset3; j4++) {
59227
+ for (let j3 = 0; j3 < offset3; j3++) {
59228
59228
  if (values[i10] === 1) {
59229
59229
  newValues[index++] = tValues[i10];
59230
59230
  } else {
@@ -72890,12 +72890,12 @@ var init_gather_nd_gpu = __esm({
72890
72890
  const dtype = getCoordsDataType(shape.length);
72891
72891
  let mainLoop = `
72892
72892
  int index;`;
72893
- for (let j4 = 0; j4 < this.sliceDim; j4++) {
72893
+ for (let j3 = 0; j3 < this.sliceDim; j3++) {
72894
72894
  mainLoop += `
72895
- index = round(getIndices(coords[0], ${j4}));
72895
+ index = round(getIndices(coords[0], ${j3}));
72896
72896
  out_of_bounds = out_of_bounds || index < 0;
72897
- out_of_bounds = out_of_bounds || index >= ${this.paramsShape[j4]};
72898
- flattenIndex += index * ${this.strides[j4]};`;
72897
+ out_of_bounds = out_of_bounds || index >= ${this.paramsShape[j3]};
72898
+ flattenIndex += index * ${this.strides[j3]};`;
72899
72899
  }
72900
72900
  this.userCode = `
72901
72901
  void main() {
@@ -74955,7 +74955,7 @@ var init_pad_packed_gpu = __esm({
74955
74955
  ];
74956
74956
  const paddingArea = rank === 1 ? "rc < start || rc >= end" : "any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))";
74957
74957
  let mainLoop = "";
74958
- for (let i10 = 0, j4 = rank === 1 ? 2 : 4; i10 < j4; i10++) {
74958
+ for (let i10 = 0, j3 = rank === 1 ? 2 : 4; i10 < j3; i10++) {
74959
74959
  mainLoop += `
74960
74960
  ${componentSetup[i10]}
74961
74961
  if (${paddingArea}) {
@@ -78913,10 +78913,12 @@ var init_dist7 = __esm({
78913
78913
  });
78914
78914
 
78915
78915
  // lib/tflib.ts
78916
- async function getTF() {
78917
- if (window.TF == null)
78918
- window.TF = await Promise.resolve().then(() => (init_dist7(), dist_exports4));
78919
- return window.TF;
78916
+ function getTF() {
78917
+ const w4 = window;
78918
+ if (w4.__TFPromise == null) {
78919
+ w4.__TFPromise = w4.TF != null ? Promise.resolve(w4.TF) : Promise.resolve().then(() => (init_dist7(), dist_exports4)).then((tf16) => w4.TF = tf16);
78920
+ }
78921
+ return w4.__TFPromise;
78920
78922
  }
78921
78923
  var init_tflib = __esm({
78922
78924
  "lib/tflib.ts"() {
@@ -79809,6 +79811,8 @@ var init_layers = __esm({
79809
79811
  maxModelParams;
79810
79812
  /** The max layer params from the model design widget. */
79811
79813
  maxLayerParams;
79814
+ /** Called with the new selection state whenever a layer or connection is selected or unselected. */
79815
+ onSelectionChanged = null;
79812
79816
  constructor(container, editMode = "edit", maxModelParams, maxLayerParams) {
79813
79817
  let that = this;
79814
79818
  this.editMode = editMode;
@@ -79844,6 +79848,52 @@ var init_layers = __esm({
79844
79848
  this.editor.on("nodeRemoved", function(id3) {
79845
79849
  delete that.layers[id3];
79846
79850
  });
79851
+ const notifySelectionChanged = function() {
79852
+ setTimeout(function() {
79853
+ if (that.onSelectionChanged)
79854
+ that.onSelectionChanged(that.hasSelection());
79855
+ });
79856
+ };
79857
+ this.editor.on("nodeSelected", notifySelectionChanged);
79858
+ this.editor.on("nodeUnselected", notifySelectionChanged);
79859
+ this.editor.on("connectionSelected", notifySelectionChanged);
79860
+ this.editor.on("connectionUnselected", notifySelectionChanged);
79861
+ this.editor.on("nodeRemoved", notifySelectionChanged);
79862
+ this.editor.on("connectionRemoved", notifySelectionChanged);
79863
+ const nativeElementFromPoint = document.elementFromPoint.bind(document);
79864
+ container.addEventListener("touchend", function() {
79865
+ const root = container.getRootNode();
79866
+ if (root === document || typeof root.elementFromPoint !== "function")
79867
+ return;
79868
+ document.elementFromPoint = function(x4, y5) {
79869
+ let el = root.elementFromPoint(x4, y5);
79870
+ while (el && el.shadowRoot && el.shadowRoot.elementFromPoint) {
79871
+ const inner = el.shadowRoot.elementFromPoint(x4, y5);
79872
+ if (inner == null || inner === el)
79873
+ break;
79874
+ el = inner;
79875
+ }
79876
+ return el ?? nativeElementFromPoint(x4, y5);
79877
+ };
79878
+ setTimeout(function() {
79879
+ document.elementFromPoint = nativeElementFromPoint;
79880
+ });
79881
+ }, true);
79882
+ }
79883
+ /**
79884
+ * Removes the currently selected node (layer) or connection from the editor.
79885
+ */
79886
+ removeSelectedNode() {
79887
+ let editor = this.editor;
79888
+ if (editor.node_selected != null)
79889
+ editor.removeNodeId(editor.node_selected.id);
79890
+ else if (editor.connection_selected != null)
79891
+ editor.removeConnection();
79892
+ }
79893
+ /** Whether something is currently selected in the editor. */
79894
+ hasSelection() {
79895
+ let editor = this.editor;
79896
+ return editor.node_selected != null || editor.connection_selected != null;
79847
79897
  }
79848
79898
  /** Returns the average position of the layer nodes. Used to center the view. */
79849
79899
  getAveragePosition() {
@@ -80191,7 +80241,7 @@ var init_layers = __esm({
80191
80241
  * @returns the html element that wraps the entire layer.
80192
80242
  */
80193
80243
  getNodeElement() {
80194
- return this.elem.parentElement.parentElement;
80244
+ return this.elem?.parentElement?.parentElement;
80195
80245
  }
80196
80246
  /**
80197
80247
  * @param input Typically named "input_1", "input_2", ...
@@ -80304,26 +80354,33 @@ var init_layers = __esm({
80304
80354
  for (let i10 in inputs) {
80305
80355
  let input2 = inputs[i10];
80306
80356
  let inputName = i10;
80307
- if (input2.connections.length == 0 || this.getNodeInputElement(inputName).innerText == "") {
80308
- if (this.getNodeInputElement(inputName) == null)
80357
+ let inputElem = this.getNodeInputElement(inputName);
80358
+ if (input2.connections.length == 0 || inputElem == null || inputElem.innerText == "") {
80359
+ if (inputElem == null)
80309
80360
  this.addInput();
80310
80361
  setTimeout(function() {
80311
- that.getNodeInputElement(inputName).classList.remove("invalid");
80312
- that.getNodeInputElement(inputName).classList.remove("valid");
80362
+ let elem = that.getNodeInputElement(inputName);
80363
+ if (elem == null)
80364
+ return;
80365
+ elem.classList.remove("invalid");
80366
+ elem.classList.remove("valid");
80313
80367
  });
80314
80368
  continue;
80315
80369
  }
80316
80370
  let layer = this.editor.getLayerFromNodeId(parseInt(input2.connections[0].node));
80317
80371
  let output = input2.connections[0].input;
80318
- if (layer.getNodeOutputElement(output).innerText != this.getNodeInputElement(i10).innerText) {
80319
- this.getNodeInputElement(i10).classList.add("invalid");
80320
- this.getNodeInputElement(i10).classList.remove("valid");
80321
- this.getNodeInputElement(i10).title = "data has wrong dimensions";
80372
+ let outputElem = layer?.getNodeOutputElement(output);
80373
+ if (outputElem == null)
80374
+ continue;
80375
+ if (outputElem.innerText != inputElem.innerText) {
80376
+ inputElem.classList.add("invalid");
80377
+ inputElem.classList.remove("valid");
80378
+ inputElem.title = "data has wrong dimensions";
80322
80379
  return false;
80323
80380
  } else {
80324
- this.getNodeInputElement(i10).classList.remove("invalid");
80325
- this.getNodeInputElement(i10).classList.add("valid");
80326
- this.getNodeInputElement(i10).title = "";
80381
+ inputElem.classList.remove("invalid");
80382
+ inputElem.classList.add("valid");
80383
+ inputElem.title = "";
80327
80384
  }
80328
80385
  }
80329
80386
  return true;
@@ -80370,12 +80427,15 @@ var init_layers = __esm({
80370
80427
  */
80371
80428
  showValid() {
80372
80429
  let valid = this.valid();
80430
+ let elem = this.getNodeElement();
80431
+ if (elem == null)
80432
+ return;
80373
80433
  if (!valid) {
80374
- this.getNodeElement().classList.add("invalid");
80434
+ elem.classList.add("invalid");
80375
80435
  if (this.hasCyclicReference)
80376
- this.getNodeElement().setAttribute("title", msg("Has a cyclic reference."));
80436
+ elem.setAttribute("title", msg("Has a cyclic reference."));
80377
80437
  } else {
80378
- this.getNodeElement().classList.remove("invalid");
80438
+ elem.classList.remove("invalid");
80379
80439
  }
80380
80440
  }
80381
80441
  /**
@@ -80490,6 +80550,7 @@ var init_ar = __esm({
80490
80550
  "s32f2fa78e3267c4e": `\u0627\u0644\u062E\u0635\u0627\u0626\u0635 \u0641\u0642\u0637`,
80491
80551
  "s334f9922638204ab": `\u0645\u062C\u0645\u0648\u0639\u0629 \u0627\u0644\u0628\u064A\u0627\u0646\u0627\u062A \u0627\u0644\u0645\u0633\u062A\u062E\u062F\u0645\u0629`,
80492
80552
  "s34af392b321cbfa6": `\u062A\u062D\u0631\u064A\u0631 \u0643\u0644 \u0634\u064A\u0621`,
80553
+ "s38c7b3d048d88c07": `\u062D\u0630\u0641 \u0627\u0644\u0645\u062D\u062F\u062F`,
80493
80554
  "s38ddf839c081bbaf": str`
80494
80555
  ${0} الضباب
80495
80556
  `,
@@ -80649,6 +80710,7 @@ var init_bg = __esm({
80649
80710
  "s32f2fa78e3267c4e": `\u0441\u0430\u043C\u043E \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430`,
80650
80711
  "s334f9922638204ab": `\u0418\u0437\u043F\u043E\u043B\u0437\u0432\u0430\u043D\u0435 \u043D\u0430 \u043D\u0430\u0431\u043E\u0440 \u043E\u0442 \u0434\u0430\u043D\u043D\u0438`,
80651
80712
  "s34af392b321cbfa6": `\u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u0439 \u0432\u0441\u0438\u0447\u043A\u043E`,
80713
+ "s38c7b3d048d88c07": `\u0418\u0437\u0442\u0440\u0438\u0439 \u0438\u0437\u0431\u0440\u0430\u043D\u043E\u0442\u043E`,
80652
80714
  "s38ddf839c081bbaf": str`
80653
80715
  ${0} th измерение
80654
80716
  `,
@@ -80807,6 +80869,7 @@ var init_cs = __esm({
80807
80869
  "s32f2fa78e3267c4e": `pouze vlastnosti`,
80808
80870
  "s334f9922638204ab": `Dataset pou\u017E\xEDvaj\xEDc\xED`,
80809
80871
  "s34af392b321cbfa6": `upravit v\u0161e`,
80872
+ "s38c7b3d048d88c07": `Odstranit vybran\xE9`,
80810
80873
  "s38ddf839c081bbaf": str`
80811
80874
  ${0} th dim
80812
80875
  `,
@@ -80966,6 +81029,7 @@ var init_da = __esm({
80966
81029
  "s32f2fa78e3267c4e": `kun egenskaber`,
80967
81030
  "s334f9922638204ab": `Dataset ved hj\xE6lp af`,
80968
81031
  "s34af392b321cbfa6": `rediger alt`,
81032
+ "s38c7b3d048d88c07": `Slet det valgte`,
80969
81033
  "s38ddf839c081bbaf": str`
80970
81034
  ${0} th dim
80971
81035
  `,
@@ -81124,6 +81188,7 @@ var init_de = __esm({
81124
81188
  "s32f2fa78e3267c4e": `nur Eigenschaften`,
81125
81189
  "s334f9922638204ab": `Datensatz unter Verwendung von`,
81126
81190
  "s34af392b321cbfa6": `alles bearbeiten`,
81191
+ "s38c7b3d048d88c07": `Ausgew\xE4hltes l\xF6schen`,
81127
81192
  "s38ddf839c081bbaf": str`
81128
81193
  ${0} Dim.
81129
81194
  `,
@@ -81282,6 +81347,7 @@ var init_el = __esm({
81282
81347
  "s32f2fa78e3267c4e": `\u03B9\u03B4\u03B9\u03CC\u03C4\u03B7\u03C4\u03B5\u03C2 \u03BC\u03CC\u03BD\u03BF`,
81283
81348
  "s334f9922638204ab": `\u03A7\u03C1\u03AE\u03C3\u03B7 \u03C3\u03C5\u03BD\u03CC\u03BB\u03BF\u03C5 \u03B4\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03C9\u03BD`,
81284
81349
  "s34af392b321cbfa6": `\u03B5\u03C0\u03B5\u03BE\u03B5\u03C1\u03B3\u03B1\u03C3\u03AF\u03B1 \u03CC\u03BB\u03C9\u03BD`,
81350
+ "s38c7b3d048d88c07": `\u0394\u03B9\u03B1\u03B3\u03C1\u03B1\u03C6\u03AE \u03B5\u03C0\u03B9\u03BB\u03B5\u03B3\u03BC\u03AD\u03BD\u03C9\u03BD`,
81285
81351
  "s38ddf839c081bbaf": str`
81286
81352
  ${0} η διάσταση
81287
81353
  `,
@@ -81442,6 +81508,7 @@ var init_es = __esm({
81442
81508
  "s32f2fa78e3267c4e": `solo propiedades`,
81443
81509
  "s334f9922638204ab": `Conjunto de datos utilizando`,
81444
81510
  "s34af392b321cbfa6": `editar todo`,
81511
+ "s38c7b3d048d88c07": `Eliminar los elementos seleccionados`,
81445
81512
  "s38ddf839c081bbaf": str`
81446
81513
  ${0} la dimensión
81447
81514
  `,
@@ -81601,6 +81668,7 @@ var init_et = __esm({
81601
81668
  "s32f2fa78e3267c4e": `ainult omadused`,
81602
81669
  "s334f9922638204ab": `Andmekogum kasutades`,
81603
81670
  "s34af392b321cbfa6": `k\xF5ike muuta`,
81671
+ "s38c7b3d048d88c07": `Kustuta valitud`,
81604
81672
  "s38ddf839c081bbaf": str`
81605
81673
  ${0} th dim
81606
81674
  `,
@@ -81760,6 +81828,7 @@ var init_fi = __esm({
81760
81828
  "s32f2fa78e3267c4e": `vain ominaisuudet`,
81761
81829
  "s334f9922638204ab": `K\xE4ytt\xE4m\xE4si tietojoukko`,
81762
81830
  "s34af392b321cbfa6": `muokkaa kaikkea`,
81831
+ "s38c7b3d048d88c07": `Poista valitut`,
81763
81832
  "s38ddf839c081bbaf": str`
81764
81833
  ${0} th dim
81765
81834
  `,
@@ -81918,6 +81987,7 @@ var init_fr = __esm({
81918
81987
  "s32f2fa78e3267c4e": `propri\xE9t\xE9s uniquement`,
81919
81988
  "s334f9922638204ab": `Ensemble de donn\xE9es utilisant`,
81920
81989
  "s34af392b321cbfa6": `modifier tout`,
81990
+ "s38c7b3d048d88c07": `Supprimer la s\xE9lection`,
81921
81991
  "s38ddf839c081bbaf": str`
81922
81992
  ${0} th dim
81923
81993
  `,
@@ -82077,6 +82147,7 @@ var init_hu = __esm({
82077
82147
  "s32f2fa78e3267c4e": `csak tulajdons\xE1gok`,
82078
82148
  "s334f9922638204ab": `Adatk\xE9szlet haszn\xE1lata`,
82079
82149
  "s34af392b321cbfa6": `mindent szerkeszteni`,
82150
+ "s38c7b3d048d88c07": `A kijel\xF6ltek t\xF6rl\xE9se`,
82080
82151
  "s38ddf839c081bbaf": str`
82081
82152
  ${0} th dim
82082
82153
  `,
@@ -82235,6 +82306,7 @@ var init_id = __esm({
82235
82306
  "s32f2fa78e3267c4e": `hanya properti`,
82236
82307
  "s334f9922638204ab": `Dataset yang menggunakan`,
82237
82308
  "s34af392b321cbfa6": `edit semuanya`,
82309
+ "s38c7b3d048d88c07": `Hapus yang dipilih`,
82238
82310
  "s38ddf839c081bbaf": str`
82239
82311
  ${0} dimensi ke-th
82240
82312
  `,
@@ -82394,6 +82466,7 @@ var init_it = __esm({
82394
82466
  "s32f2fa78e3267c4e": `solo propriet\xE0`,
82395
82467
  "s334f9922638204ab": `Set di dati utilizzando`,
82396
82468
  "s34af392b321cbfa6": `modifica tutto`,
82469
+ "s38c7b3d048d88c07": `Elimina selezionati`,
82397
82470
  "s38ddf839c081bbaf": str`
82398
82471
  ${0} la dimensione
82399
82472
  `,
@@ -82553,6 +82626,7 @@ var init_ja = __esm({
82553
82626
  "s32f2fa78e3267c4e": `\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u307F`,
82554
82627
  "s334f9922638204ab": `\u4F7F\u7528\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8`,
82555
82628
  "s34af392b321cbfa6": `\u3059\u3079\u3066\u3092\u7DE8\u96C6\u3059\u308B`,
82629
+ "s38c7b3d048d88c07": `\u9078\u629E\u3057\u305F\u9805\u76EE\u3092\u524A\u9664`,
82556
82630
  "s38ddf839c081bbaf": str`
82557
82631
  ${0} 第
82558
82632
  `,
@@ -82711,6 +82785,7 @@ var init_ko = __esm({
82711
82785
  "s32f2fa78e3267c4e": `\uC18D\uC131\uB9CC`,
82712
82786
  "s334f9922638204ab": `\uB370\uC774\uD130\uC14B \uC0AC\uC6A9`,
82713
82787
  "s34af392b321cbfa6": `\uBAA8\uB4E0 \uAC83\uC744 \uC218\uC815\uD558\uB2E4`,
82788
+ "s38c7b3d048d88c07": `\uC120\uD0DD\uD55C \uD56D\uBAA9 \uC0AD\uC81C`,
82714
82789
  "s38ddf839c081bbaf": str`
82715
82790
  ${0} th 차원
82716
82791
  `,
@@ -82869,6 +82944,7 @@ var init_lt = __esm({
82869
82944
  "s32f2fa78e3267c4e": `tik savyb\u0117s`,
82870
82945
  "s334f9922638204ab": `Duomen\u0173 rinkinys, naudojantis`,
82871
82946
  "s34af392b321cbfa6": `redaguoti visk\u0105`,
82947
+ "s38c7b3d048d88c07": `I\u0161trinti pa\u017Eym\u0117tus`,
82872
82948
  "s38ddf839c081bbaf": str`
82873
82949
  ${0} th dim
82874
82950
  `,
@@ -83027,6 +83103,7 @@ var init_lv = __esm({
83027
83103
  "s32f2fa78e3267c4e": `tikai \u012Bpa\u0161\u012Bbas`,
83028
83104
  "s334f9922638204ab": `Datu kopa, izmantojot`,
83029
83105
  "s34af392b321cbfa6": `redi\u0123\u0113t visu`,
83106
+ "s38c7b3d048d88c07": `Dz\u0113st atlas\u012Bto`,
83030
83107
  "s38ddf839c081bbaf": str`
83031
83108
  ${0} th dim
83032
83109
  `,
@@ -83185,6 +83262,7 @@ var init_nb = __esm({
83185
83262
  "s32f2fa78e3267c4e": `egenskaper kun`,
83186
83263
  "s334f9922638204ab": `Dataset ved bruk av`,
83187
83264
  "s34af392b321cbfa6": `rediger alt`,
83265
+ "s38c7b3d048d88c07": `Slett det valgte`,
83188
83266
  "s38ddf839c081bbaf": str`
83189
83267
  ${0} th dim
83190
83268
  `,
@@ -83343,6 +83421,7 @@ var init_nl = __esm({
83343
83421
  "s32f2fa78e3267c4e": `alleen eigenschappen`,
83344
83422
  "s334f9922638204ab": `Gebruikte dataset`,
83345
83423
  "s34af392b321cbfa6": `alles bewerken`,
83424
+ "s38c7b3d048d88c07": `Geselecteerde items verwijderen`,
83346
83425
  "s38ddf839c081bbaf": str`
83347
83426
  ${0} th dim
83348
83427
  `,
@@ -83501,6 +83580,7 @@ var init_pl = __esm({
83501
83580
  "s32f2fa78e3267c4e": `tylko w\u0142a\u015Bciwo\u015Bci`,
83502
83581
  "s334f9922638204ab": `Zbi\xF3r danych wykorzystuj\u0105cy`,
83503
83582
  "s34af392b321cbfa6": `edytuj wszystko`,
83583
+ "s38c7b3d048d88c07": `Usu\u0144 zaznaczone`,
83504
83584
  "s38ddf839c081bbaf": str`
83505
83585
  ${0} th dim
83506
83586
  `,
@@ -83660,6 +83740,7 @@ var init_pt_BR = __esm({
83660
83740
  "s32f2fa78e3267c4e": `apenas propriedades`,
83661
83741
  "s334f9922638204ab": `Conjunto de dados utilizando`,
83662
83742
  "s34af392b321cbfa6": `editar tudo`,
83743
+ "s38c7b3d048d88c07": `Excluir os itens selecionados`,
83663
83744
  "s38ddf839c081bbaf": str`
83664
83745
  ${0} a dimensão
83665
83746
  `,
@@ -83819,6 +83900,7 @@ var init_pt_PT = __esm({
83819
83900
  "s32f2fa78e3267c4e": `apenas propriedades`,
83820
83901
  "s334f9922638204ab": `Conjunto de dados utilizando`,
83821
83902
  "s34af392b321cbfa6": `editar tudo`,
83903
+ "s38c7b3d048d88c07": `Apagar os elementos selecionados`,
83822
83904
  "s38ddf839c081bbaf": str`
83823
83905
  ${0} a dimensão
83824
83906
  `,
@@ -83978,6 +84060,7 @@ var init_ro = __esm({
83978
84060
  "s32f2fa78e3267c4e": `numai propriet\u0103\u021Bi`,
83979
84061
  "s334f9922638204ab": `Set de date utilizat`,
83980
84062
  "s34af392b321cbfa6": `editeaz\u0103 totul`,
84063
+ "s38c7b3d048d88c07": `\u0218terge elementele selectate`,
83981
84064
  "s38ddf839c081bbaf": str`
83982
84065
  ${0} dim
83983
84066
  `,
@@ -84137,6 +84220,7 @@ var init_ru = __esm({
84137
84220
  "s32f2fa78e3267c4e": `\u0442\u043E\u043B\u044C\u043A\u043E \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430`,
84138
84221
  "s334f9922638204ab": `\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435 \u043D\u0430\u0431\u043E\u0440\u0430 \u0434\u0430\u043D\u043D\u044B\u0445`,
84139
84222
  "s34af392b321cbfa6": `\u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0435`,
84223
+ "s38c7b3d048d88c07": `\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u0435`,
84140
84224
  "s38ddf839c081bbaf": str`
84141
84225
  ${0} th измерение
84142
84226
  `,
@@ -84296,6 +84380,7 @@ var init_sk = __esm({
84296
84380
  "s32f2fa78e3267c4e": `len vlastnosti`,
84297
84381
  "s334f9922638204ab": `Dataset pou\u017E\xEDvaj\xFAci`,
84298
84382
  "s34af392b321cbfa6": `upravi\u0165 v\u0161etko`,
84383
+ "s38c7b3d048d88c07": `Odstr\xE1ni\u0165 vybran\xE9`,
84299
84384
  "s38ddf839c081bbaf": str`
84300
84385
  ${0} th dim
84301
84386
  `,
@@ -84455,6 +84540,7 @@ var init_sl = __esm({
84455
84540
  "s32f2fa78e3267c4e": `samo lastnosti`,
84456
84541
  "s334f9922638204ab": `Podatkovna zbirka, ki uporablja`,
84457
84542
  "s34af392b321cbfa6": `uredi vse`,
84543
+ "s38c7b3d048d88c07": `Izbri\u0161i izbrano`,
84458
84544
  "s38ddf839c081bbaf": str`
84459
84545
  ${0} th dim
84460
84546
  `,
@@ -84614,6 +84700,7 @@ var init_sv = __esm({
84614
84700
  "s32f2fa78e3267c4e": `endast egenskaper`,
84615
84701
  "s334f9922638204ab": `Dataset som anv\xE4nder`,
84616
84702
  "s34af392b321cbfa6": `redigera allt`,
84703
+ "s38c7b3d048d88c07": `Ta bort det markerade`,
84617
84704
  "s38ddf839c081bbaf": str`
84618
84705
  ${0} th dim
84619
84706
  `,
@@ -84772,6 +84859,7 @@ var init_tr = __esm({
84772
84859
  "s32f2fa78e3267c4e": `sadece \xF6zellikler`,
84773
84860
  "s334f9922638204ab": `Kullan\u0131lan veri k\xFCmesi`,
84774
84861
  "s34af392b321cbfa6": `her \u015Feyi d\xFCzenle`,
84862
+ "s38c7b3d048d88c07": `Se\xE7ilenleri sil`,
84775
84863
  "s38ddf839c081bbaf": str`
84776
84864
  ${0} th dim
84777
84865
  `,
@@ -84930,6 +85018,7 @@ var init_uk = __esm({
84930
85018
  "s32f2fa78e3267c4e": `\u0442\u0456\u043B\u044C\u043A\u0438 \u0432\u043B\u0430\u0441\u0442\u0438\u0432\u043E\u0441\u0442\u0456`,
84931
85019
  "s334f9922638204ab": `\u041D\u0430\u0431\u0456\u0440 \u0434\u0430\u043D\u0438\u0445, \u0449\u043E \u0432\u0438\u043A\u043E\u0440\u0438\u0441\u0442\u043E\u0432\u0443\u0454\u0442\u044C\u0441\u044F`,
84932
85020
  "s34af392b321cbfa6": `\u0440\u0435\u0434\u0430\u0433\u0443\u0432\u0430\u0442\u0438 \u0432\u0441\u0435`,
85021
+ "s38c7b3d048d88c07": `\u0412\u0438\u0434\u0430\u043B\u0438\u0442\u0438 \u0432\u0438\u0431\u0440\u0430\u043D\u0435`,
84933
85022
  "s38ddf839c081bbaf": str`
84934
85023
  ${0} th dim
84935
85024
  `,
@@ -85139,6 +85228,7 @@ var init_zh_hans = __esm({
85139
85228
  "s6c5b5757b7756775": `Center View`,
85140
85229
  "s22fde937cb709859": `Zoom In`,
85141
85230
  "sb05582ce916894da": `Zoom Out`,
85231
+ "s38c7b3d048d88c07": `Delete selected`,
85142
85232
  "sdab07807ff1b6b12": `Model Design Widget hidden from students.`,
85143
85233
  "s026fba1543d336b2": `Feature Source`,
85144
85234
  "s32f2fa78e3267c4e": `properties only`,
@@ -85280,6 +85370,7 @@ var init_zh_hant = __esm({
85280
85370
  "s6c5b5757b7756775": `Center View`,
85281
85371
  "s22fde937cb709859": `Zoom In`,
85282
85372
  "sb05582ce916894da": `Zoom Out`,
85373
+ "s38c7b3d048d88c07": `Delete selected`,
85283
85374
  "sdab07807ff1b6b12": `Model Design Widget hidden from students.`,
85284
85375
  "s026fba1543d336b2": `Feature Source`,
85285
85376
  "s32f2fa78e3267c4e": `properties only`,
@@ -85998,13 +86089,13 @@ var N = (t9, i10) => {
85998
86089
  }
85999
86090
  return [V(t9, l8 + (t9[s7] || "<?>") + (2 === i10 ? "</svg>" : 3 === i10 ? "</math>" : "")), e13];
86000
86091
  };
86001
- var S2 = class _S {
86092
+ var S2 = class _S2 {
86002
86093
  constructor({ strings: t9, _$litType$: i10 }, e13) {
86003
86094
  let r12;
86004
86095
  this.parts = [];
86005
86096
  let l8 = 0, a6 = 0;
86006
86097
  const u6 = t9.length - 1, d5 = this.parts, [f6, v4] = N(t9, i10);
86007
- if (this.el = _S.createElement(f6, e13), P.currentNode = this.el.content, 2 === i10 || 3 === i10) {
86098
+ if (this.el = _S2.createElement(f6, e13), P.currentNode = this.el.content, 2 === i10 || 3 === i10) {
86008
86099
  const t10 = this.el.content.firstChild;
86009
86100
  t10.replaceWith(...t10.childNodes);
86010
86101
  }
@@ -86069,7 +86160,7 @@ var R = class {
86069
86160
  for (const s7 of this._$AV) void 0 !== s7 && (void 0 !== s7.strings ? (s7._$AI(t9, s7, i10), i10 += s7.strings.length - 2) : s7._$AI(t9[i10])), i10++;
86070
86161
  }
86071
86162
  };
86072
- var k = class _k {
86163
+ var k = class _k2 {
86073
86164
  get _$AU() {
86074
86165
  return this._$AM?._$AU ?? this._$Cv;
86075
86166
  }
@@ -86115,7 +86206,7 @@ var k = class _k {
86115
86206
  u2(this._$AH) || (this._$AH = [], this._$AR());
86116
86207
  const i10 = this._$AH;
86117
86208
  let s7, e13 = 0;
86118
- for (const h7 of t9) e13 === i10.length ? i10.push(s7 = new _k(this.O(c3()), this.O(c3()), this, this.options)) : s7 = i10[e13], s7._$AI(h7), e13++;
86209
+ for (const h7 of t9) e13 === i10.length ? i10.push(s7 = new _k2(this.O(c3()), this.O(c3()), this, this.options)) : s7 = i10[e13], s7._$AI(h7), e13++;
86119
86210
  e13 < i10.length && (this._$AR(s7 && s7._$AB.nextSibling, e13), i10.length = e13);
86120
86211
  }
86121
86212
  _$AR(t9 = this._$AA.nextSibling, s7) {
@@ -86195,7 +86286,7 @@ var Z = class {
86195
86286
  };
86196
86287
  var j2 = { M: h2, P: o3, A: n3, C: 1, L: N, R, D: d2, V: M, I: k, H, N: L, U: z, B: I, F: Z };
86197
86288
  var B = t2.litHtmlPolyfillSupport;
86198
- B?.(S2, k), (t2.litHtmlVersions ??= []).push("3.3.2");
86289
+ B?.(S2, k), (t2.litHtmlVersions ??= []).push("3.3.3");
86199
86290
  var D = (t9, i10, s7) => {
86200
86291
  const e13 = s7?.renderBefore ?? i10;
86201
86292
  let h7 = e13._$litPart$;
@@ -87609,9 +87700,14 @@ var LocalizeController = class {
87609
87700
  }
87610
87701
  getTranslationData(lang) {
87611
87702
  var _a3, _b;
87612
- const locale = new Intl.Locale(lang.replace(/_/g, "-"));
87613
- const language = locale === null || locale === void 0 ? void 0 : locale.language.toLowerCase();
87614
- const region = (_b = (_a3 = locale === null || locale === void 0 ? void 0 : locale.region) === null || _a3 === void 0 ? void 0 : _a3.toLowerCase()) !== null && _b !== void 0 ? _b : "";
87703
+ let locale;
87704
+ try {
87705
+ locale = new Intl.Locale(lang.replace(/_/g, "-"));
87706
+ } catch (_c) {
87707
+ return { locale: void 0, language: "", region: "", primary: void 0, secondary: void 0 };
87708
+ }
87709
+ const language = locale.language.toLowerCase();
87710
+ const region = (_b = (_a3 = locale.region) === null || _a3 === void 0 ? void 0 : _a3.toLowerCase()) !== null && _b !== void 0 ? _b : "";
87615
87711
  const primary = translations.get(`${language}-${region}`);
87616
87712
  const secondary = translations.get(language);
87617
87713
  return { locale, language, region, primary, secondary };
@@ -88198,10 +88294,6 @@ var oppositeSideMap = {
88198
88294
  bottom: "top",
88199
88295
  top: "bottom"
88200
88296
  };
88201
- var oppositeAlignmentMap = {
88202
- start: "end",
88203
- end: "start"
88204
- };
88205
88297
  function clamp(start, value, end) {
88206
88298
  return max(start, min(value, end));
88207
88299
  }
@@ -88220,9 +88312,9 @@ function getOppositeAxis(axis) {
88220
88312
  function getAxisLength(axis) {
88221
88313
  return axis === "y" ? "height" : "width";
88222
88314
  }
88223
- var yAxisSides = /* @__PURE__ */ new Set(["top", "bottom"]);
88224
88315
  function getSideAxis(placement) {
88225
- return yAxisSides.has(getSide(placement)) ? "y" : "x";
88316
+ const firstChar = placement[0];
88317
+ return firstChar === "t" || firstChar === "b" ? "y" : "x";
88226
88318
  }
88227
88319
  function getAlignmentAxis(placement) {
88228
88320
  return getOppositeAxis(getSideAxis(placement));
@@ -88245,7 +88337,7 @@ function getExpandedPlacements(placement) {
88245
88337
  return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
88246
88338
  }
88247
88339
  function getOppositeAlignmentPlacement(placement) {
88248
- return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
88340
+ return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
88249
88341
  }
88250
88342
  var lrPlacement = ["left", "right"];
88251
88343
  var rlPlacement = ["right", "left"];
@@ -88276,7 +88368,8 @@ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
88276
88368
  return list;
88277
88369
  }
88278
88370
  function getOppositePlacement(placement) {
88279
- return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
88371
+ const side = getSide(placement);
88372
+ return oppositeSideMap[side] + placement.slice(side.length);
88280
88373
  }
88281
88374
  function expandPaddingObject(padding) {
88282
88375
  return {
@@ -88370,6 +88463,63 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
88370
88463
  }
88371
88464
  return coords2;
88372
88465
  }
88466
+ async function detectOverflow(state, options) {
88467
+ var _await$platform$isEle;
88468
+ if (options === void 0) {
88469
+ options = {};
88470
+ }
88471
+ const {
88472
+ x: x4,
88473
+ y: y5,
88474
+ platform: platform2,
88475
+ rects,
88476
+ elements,
88477
+ strategy
88478
+ } = state;
88479
+ const {
88480
+ boundary = "clippingAncestors",
88481
+ rootBoundary = "viewport",
88482
+ elementContext = "floating",
88483
+ altBoundary = false,
88484
+ padding = 0
88485
+ } = evaluate(options, state);
88486
+ const paddingObject = getPaddingObject(padding);
88487
+ const altContext = elementContext === "floating" ? "reference" : "floating";
88488
+ const element = elements[altBoundary ? altContext : elementContext];
88489
+ const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
88490
+ element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),
88491
+ boundary,
88492
+ rootBoundary,
88493
+ strategy
88494
+ }));
88495
+ const rect = elementContext === "floating" ? {
88496
+ x: x4,
88497
+ y: y5,
88498
+ width: rects.floating.width,
88499
+ height: rects.floating.height
88500
+ } : rects.reference;
88501
+ const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
88502
+ const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
88503
+ x: 1,
88504
+ y: 1
88505
+ } : {
88506
+ x: 1,
88507
+ y: 1
88508
+ };
88509
+ const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
88510
+ elements,
88511
+ rect,
88512
+ offsetParent,
88513
+ strategy
88514
+ }) : rect);
88515
+ return {
88516
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
88517
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
88518
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
88519
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
88520
+ };
88521
+ }
88522
+ var MAX_RESET_COUNT = 50;
88373
88523
  var computePosition = async (reference, floating, config) => {
88374
88524
  const {
88375
88525
  placement = "bottom",
@@ -88377,7 +88527,10 @@ var computePosition = async (reference, floating, config) => {
88377
88527
  middleware = [],
88378
88528
  platform: platform2
88379
88529
  } = config;
88380
- const validMiddleware = middleware.filter(Boolean);
88530
+ const platformWithDetectOverflow = platform2.detectOverflow ? platform2 : {
88531
+ ...platform2,
88532
+ detectOverflow
88533
+ };
88381
88534
  const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));
88382
88535
  let rects = await platform2.getElementRects({
88383
88536
  reference,
@@ -88389,13 +88542,17 @@ var computePosition = async (reference, floating, config) => {
88389
88542
  y: y5
88390
88543
  } = computeCoordsFromPlacement(rects, placement, rtl);
88391
88544
  let statefulPlacement = placement;
88392
- let middlewareData = {};
88393
88545
  let resetCount = 0;
88394
- for (let i10 = 0; i10 < validMiddleware.length; i10++) {
88546
+ const middlewareData = {};
88547
+ for (let i10 = 0; i10 < middleware.length; i10++) {
88548
+ const currentMiddleware = middleware[i10];
88549
+ if (!currentMiddleware) {
88550
+ continue;
88551
+ }
88395
88552
  const {
88396
88553
  name,
88397
88554
  fn
88398
- } = validMiddleware[i10];
88555
+ } = currentMiddleware;
88399
88556
  const {
88400
88557
  x: nextX,
88401
88558
  y: nextY,
@@ -88409,7 +88566,7 @@ var computePosition = async (reference, floating, config) => {
88409
88566
  strategy,
88410
88567
  middlewareData,
88411
88568
  rects,
88412
- platform: platform2,
88569
+ platform: platformWithDetectOverflow,
88413
88570
  elements: {
88414
88571
  reference,
88415
88572
  floating
@@ -88417,14 +88574,11 @@ var computePosition = async (reference, floating, config) => {
88417
88574
  });
88418
88575
  x4 = nextX != null ? nextX : x4;
88419
88576
  y5 = nextY != null ? nextY : y5;
88420
- middlewareData = {
88421
- ...middlewareData,
88422
- [name]: {
88423
- ...middlewareData[name],
88424
- ...data
88425
- }
88577
+ middlewareData[name] = {
88578
+ ...middlewareData[name],
88579
+ ...data
88426
88580
  };
88427
- if (reset && resetCount <= 50) {
88581
+ if (reset && resetCount < MAX_RESET_COUNT) {
88428
88582
  resetCount++;
88429
88583
  if (typeof reset === "object") {
88430
88584
  if (reset.placement) {
@@ -88453,62 +88607,6 @@ var computePosition = async (reference, floating, config) => {
88453
88607
  middlewareData
88454
88608
  };
88455
88609
  };
88456
- async function detectOverflow(state, options) {
88457
- var _await$platform$isEle;
88458
- if (options === void 0) {
88459
- options = {};
88460
- }
88461
- const {
88462
- x: x4,
88463
- y: y5,
88464
- platform: platform2,
88465
- rects,
88466
- elements,
88467
- strategy
88468
- } = state;
88469
- const {
88470
- boundary = "clippingAncestors",
88471
- rootBoundary = "viewport",
88472
- elementContext = "floating",
88473
- altBoundary = false,
88474
- padding = 0
88475
- } = evaluate(options, state);
88476
- const paddingObject = getPaddingObject(padding);
88477
- const altContext = elementContext === "floating" ? "reference" : "floating";
88478
- const element = elements[altBoundary ? altContext : elementContext];
88479
- const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
88480
- element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),
88481
- boundary,
88482
- rootBoundary,
88483
- strategy
88484
- }));
88485
- const rect = elementContext === "floating" ? {
88486
- x: x4,
88487
- y: y5,
88488
- width: rects.floating.width,
88489
- height: rects.floating.height
88490
- } : rects.reference;
88491
- const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
88492
- const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
88493
- x: 1,
88494
- y: 1
88495
- } : {
88496
- x: 1,
88497
- y: 1
88498
- };
88499
- const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
88500
- elements,
88501
- rect,
88502
- offsetParent,
88503
- strategy
88504
- }) : rect);
88505
- return {
88506
- top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
88507
- bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
88508
- left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
88509
- right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
88510
- };
88511
- }
88512
88610
  var arrow = (options) => ({
88513
88611
  name: "arrow",
88514
88612
  options,
@@ -88610,7 +88708,7 @@ var flip = function(options) {
88610
88708
  fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
88611
88709
  }
88612
88710
  const placements2 = [initialPlacement, ...fallbackPlacements];
88613
- const overflow = await detectOverflow(state, detectOverflowOptions);
88711
+ const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
88614
88712
  const overflows = [];
88615
88713
  let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
88616
88714
  if (checkMainAxis) {
@@ -88759,7 +88857,8 @@ var shift = function(options) {
88759
88857
  const {
88760
88858
  x: x4,
88761
88859
  y: y5,
88762
- placement
88860
+ placement,
88861
+ platform: platform2
88763
88862
  } = state;
88764
88863
  const {
88765
88864
  mainAxis: checkMainAxis = true,
@@ -88782,7 +88881,7 @@ var shift = function(options) {
88782
88881
  x: x4,
88783
88882
  y: y5
88784
88883
  };
88785
- const overflow = await detectOverflow(state, detectOverflowOptions);
88884
+ const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
88786
88885
  const crossAxis = getSideAxis(getSide(placement));
88787
88886
  const mainAxis = getOppositeAxis(crossAxis);
88788
88887
  let mainAxisCoord = coords2[mainAxis];
@@ -88840,7 +88939,7 @@ var size = function(options) {
88840
88939
  },
88841
88940
  ...detectOverflowOptions
88842
88941
  } = evaluate(options, state);
88843
- const overflow = await detectOverflow(state, detectOverflowOptions);
88942
+ const overflow = await platform2.detectOverflow(state, detectOverflowOptions);
88844
88943
  const side = getSide(placement);
88845
88944
  const alignment = getAlignment(placement);
88846
88945
  const isYAxis = getSideAxis(placement) === "y";
@@ -88941,7 +89040,6 @@ function isShadowRoot(value) {
88941
89040
  }
88942
89041
  return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
88943
89042
  }
88944
- var invalidOverflowDisplayValues = /* @__PURE__ */ new Set(["inline", "contents"]);
88945
89043
  function isOverflowElement(element) {
88946
89044
  const {
88947
89045
  overflow,
@@ -88949,29 +89047,31 @@ function isOverflowElement(element) {
88949
89047
  overflowY,
88950
89048
  display
88951
89049
  } = getComputedStyle2(element);
88952
- return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);
89050
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== "inline" && display !== "contents";
88953
89051
  }
88954
- var tableElements = /* @__PURE__ */ new Set(["table", "td", "th"]);
88955
89052
  function isTableElement(element) {
88956
- return tableElements.has(getNodeName(element));
89053
+ return /^(table|td|th)$/.test(getNodeName(element));
88957
89054
  }
88958
- var topLayerSelectors = [":popover-open", ":modal"];
88959
89055
  function isTopLayer(element) {
88960
- return topLayerSelectors.some((selector) => {
88961
- try {
88962
- return element.matches(selector);
88963
- } catch (_e2) {
88964
- return false;
89056
+ try {
89057
+ if (element.matches(":popover-open")) {
89058
+ return true;
88965
89059
  }
88966
- });
89060
+ } catch (_e2) {
89061
+ }
89062
+ try {
89063
+ return element.matches(":modal");
89064
+ } catch (_e2) {
89065
+ return false;
89066
+ }
88967
89067
  }
88968
- var transformProperties = ["transform", "translate", "scale", "rotate", "perspective"];
88969
- var willChangeValues = ["transform", "translate", "scale", "rotate", "perspective", "filter"];
88970
- var containValues = ["paint", "layout", "strict", "content"];
89068
+ var willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
89069
+ var containRe = /paint|layout|strict|content/;
89070
+ var isNotNone = (value) => !!value && value !== "none";
89071
+ var isWebKitValue;
88971
89072
  function isContainingBlock(elementOrCss) {
88972
- const webkit = isWebKit();
88973
89073
  const css = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
88974
- return transformProperties.some((value) => css[value] ? css[value] !== "none" : false) || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || willChangeValues.some((value) => (css.willChange || "").includes(value)) || containValues.some((value) => (css.contain || "").includes(value));
89074
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || "") || containRe.test(css.contain || "");
88975
89075
  }
88976
89076
  function getContainingBlock(element) {
88977
89077
  let currentNode = getParentNode(element);
@@ -88986,12 +89086,13 @@ function getContainingBlock(element) {
88986
89086
  return null;
88987
89087
  }
88988
89088
  function isWebKit() {
88989
- if (typeof CSS === "undefined" || !CSS.supports) return false;
88990
- return CSS.supports("-webkit-backdrop-filter", "none");
89089
+ if (isWebKitValue == null) {
89090
+ isWebKitValue = typeof CSS !== "undefined" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none");
89091
+ }
89092
+ return isWebKitValue;
88991
89093
  }
88992
- var lastTraversableNodeNames = /* @__PURE__ */ new Set(["html", "body", "#document"]);
88993
89094
  function isLastTraversableNode(node) {
88994
- return lastTraversableNodeNames.has(getNodeName(node));
89095
+ return /^(html|body|#document)$/.test(getNodeName(node));
88995
89096
  }
88996
89097
  function getComputedStyle2(element) {
88997
89098
  return getWindow(element).getComputedStyle(element);
@@ -89045,8 +89146,9 @@ function getOverflowAncestors(node, list, traverseIframes) {
89045
89146
  if (isBody) {
89046
89147
  const frameElement = getFrameElement(win);
89047
89148
  return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
89149
+ } else {
89150
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
89048
89151
  }
89049
- return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
89050
89152
  }
89051
89153
  function getFrameElement(win) {
89052
89154
  return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
@@ -89210,7 +89312,7 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
89210
89312
  if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
89211
89313
  scroll = getNodeScroll(offsetParent);
89212
89314
  }
89213
- if (isHTMLElement(offsetParent)) {
89315
+ if (isOffsetParentAnElement) {
89214
89316
  const offsetRect = getBoundingClientRect(offsetParent);
89215
89317
  scale2 = getScale(offsetParent);
89216
89318
  offsets.x = offsetRect.x + offsetParent.clientLeft;
@@ -89284,7 +89386,6 @@ function getViewportRect(element, strategy) {
89284
89386
  y: y5
89285
89387
  };
89286
89388
  }
89287
- var absoluteOrFixed = /* @__PURE__ */ new Set(["absolute", "fixed"]);
89288
89389
  function getInnerBoundingClientRect(element, strategy) {
89289
89390
  const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
89290
89391
  const top = clientRect.top + element.clientTop;
@@ -89342,7 +89443,7 @@ function getClippingElementAncestors(element, cache) {
89342
89443
  if (!currentNodeIsContaining && computedStyle.position === "fixed") {
89343
89444
  currentContainingBlockComputedStyle = null;
89344
89445
  }
89345
- const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
89446
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === "absolute" || currentContainingBlockComputedStyle.position === "fixed") || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
89346
89447
  if (shouldDropCurrentNode) {
89347
89448
  result = result.filter((ancestor) => ancestor !== currentNode);
89348
89449
  } else {
@@ -89362,20 +89463,23 @@ function getClippingRect(_ref) {
89362
89463
  } = _ref;
89363
89464
  const elementClippingAncestors = boundary === "clippingAncestors" ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
89364
89465
  const clippingAncestors = [...elementClippingAncestors, rootBoundary];
89365
- const firstClippingAncestor = clippingAncestors[0];
89366
- const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
89367
- const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
89368
- accRect.top = max(rect.top, accRect.top);
89369
- accRect.right = min(rect.right, accRect.right);
89370
- accRect.bottom = min(rect.bottom, accRect.bottom);
89371
- accRect.left = max(rect.left, accRect.left);
89372
- return accRect;
89373
- }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
89466
+ const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
89467
+ let top = firstRect.top;
89468
+ let right = firstRect.right;
89469
+ let bottom = firstRect.bottom;
89470
+ let left = firstRect.left;
89471
+ for (let i10 = 1; i10 < clippingAncestors.length; i10++) {
89472
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i10], strategy);
89473
+ top = max(rect.top, top);
89474
+ right = min(rect.right, right);
89475
+ bottom = min(rect.bottom, bottom);
89476
+ left = max(rect.left, left);
89477
+ }
89374
89478
  return {
89375
- width: clippingRect.right - clippingRect.left,
89376
- height: clippingRect.bottom - clippingRect.top,
89377
- x: clippingRect.left,
89378
- y: clippingRect.top
89479
+ width: right - left,
89480
+ height: bottom - top,
89481
+ x: left,
89482
+ y: top
89379
89483
  };
89380
89484
  }
89381
89485
  function getDimensions(element) {
@@ -89584,7 +89688,7 @@ function autoUpdate(reference, floating, update2, options) {
89584
89688
  animationFrame = false
89585
89689
  } = options;
89586
89690
  const referenceEl = unwrapElement(reference);
89587
- const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : [];
89691
+ const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
89588
89692
  ancestors.forEach((ancestor) => {
89589
89693
  ancestorScroll && ancestor.addEventListener("scroll", update2, {
89590
89694
  passive: true
@@ -89597,7 +89701,7 @@ function autoUpdate(reference, floating, update2, options) {
89597
89701
  if (elementResize) {
89598
89702
  resizeObserver = new ResizeObserver((_ref) => {
89599
89703
  let [firstEntry] = _ref;
89600
- if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
89704
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
89601
89705
  resizeObserver.unobserve(floating);
89602
89706
  cancelAnimationFrame(reobserveFrame);
89603
89707
  reobserveFrame = requestAnimationFrame(() => {
@@ -89610,7 +89714,9 @@ function autoUpdate(reference, floating, update2, options) {
89610
89714
  if (referenceEl && !animationFrame) {
89611
89715
  resizeObserver.observe(referenceEl);
89612
89716
  }
89613
- resizeObserver.observe(floating);
89717
+ if (floating) {
89718
+ resizeObserver.observe(floating);
89719
+ }
89614
89720
  }
89615
89721
  let frameId;
89616
89722
  let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
@@ -96911,8 +97017,8 @@ self.QrCreator = H2;
96911
97017
  h7 = c8.size / e13;
96912
97018
  a6.beginPath();
96913
97019
  for (r12 = 0; r12 < e13; r12 += 1) for (b5 = 0; b5 < e13; b5 += 1) {
96914
- var g4 = a6, x4 = c8.left + b5 * h7, u6 = c8.top + r12 * h7, p7 = r12, q2 = b5, f6 = d5.a, k4 = x4 + h7, m5 = u6 + h7, D3 = p7 - 1, E4 = p7 + 1, n12 = q2 - 1, l8 = q2 + 1, y6 = Math.floor(Math.min(0.5, Math.max(0, c8.R)) * h7), v5 = f6(p7, q2), I4 = f6(D3, n12), w5 = f6(D3, q2);
96915
- D3 = f6(D3, l8);
97020
+ var g4 = a6, x4 = c8.left + b5 * h7, u6 = c8.top + r12 * h7, p7 = r12, q2 = b5, f6 = d5.a, k4 = x4 + h7, m5 = u6 + h7, D4 = p7 - 1, E4 = p7 + 1, n12 = q2 - 1, l8 = q2 + 1, y6 = Math.floor(Math.min(0.5, Math.max(0, c8.R)) * h7), v5 = f6(p7, q2), I4 = f6(D4, n12), w5 = f6(D4, q2);
97021
+ D4 = f6(D4, l8);
96916
97022
  var F2 = f6(p7, l8);
96917
97023
  l8 = f6(E4, l8);
96918
97024
  q2 = f6(
@@ -96925,7 +97031,7 @@ self.QrCreator = H2;
96925
97031
  u6 = Math.round(u6);
96926
97032
  k4 = Math.round(k4);
96927
97033
  m5 = Math.round(m5);
96928
- v5 ? C4(g4, x4, u6, k4, m5, y6, !w5 && !p7, !w5 && !F2, !q2 && !F2, !q2 && !p7) : z4(g4, x4, u6, k4, m5, y6, w5 && p7 && I4, w5 && F2 && D3, q2 && F2 && l8, q2 && p7 && E4);
97034
+ v5 ? C4(g4, x4, u6, k4, m5, y6, !w5 && !p7, !w5 && !F2, !q2 && !F2, !q2 && !p7) : z4(g4, x4, u6, k4, m5, y6, w5 && p7 && I4, w5 && F2 && D4, q2 && F2 && l8, q2 && p7 && E4);
96929
97035
  }
96930
97036
  A4(a6, c8);
96931
97037
  a6.fill();
@@ -99309,10 +99415,10 @@ var n9 = e6(class extends f3 {
99309
99415
  }
99310
99416
  update(i10, [s7]) {
99311
99417
  const e13 = s7 !== this.G;
99312
- return e13 && void 0 !== this.G && this.rt(void 0), (e13 || this.lt !== this.ct) && (this.G = s7, this.ht = i10.options?.host, this.rt(this.ct = i10.element)), A;
99418
+ return e13 && this.rt(void 0), (e13 || this.lt !== this.ct) && (this.G = s7, this.ht = i10.options?.host, this.rt(this.ct = i10.element)), A;
99313
99419
  }
99314
99420
  rt(t9) {
99315
- if (this.isConnected || (t9 = void 0), "function" == typeof this.G) {
99421
+ if (void 0 !== this.G) if (this.isConnected || (t9 = void 0), "function" == typeof this.G) {
99316
99422
  const i10 = this.ht ?? globalThis;
99317
99423
  let s7 = o11.get(i10);
99318
99424
  void 0 === s7 && (s7 = /* @__PURE__ */ new WeakMap(), o11.set(i10, s7)), void 0 !== s7.get(this.G) && this.G.call(this.ht, void 0), s7.set(this.G, t9), void 0 !== t9 && this.G.call(this.ht, t9);
@@ -107983,8 +108089,8 @@ var __runInitializers = (array2, flags, self2, value) => {
107983
108089
  };
107984
108090
  var __decorateElement = (array2, flags, name, decorators, target, extra) => {
107985
108091
  var fn, it2, done, ctx, access, k23 = flags & 7, s42 = !!(flags & 8), p32 = !!(flags & 16);
107986
- var j22 = k23 > 3 ? array2.length + 1 : k23 ? s42 ? 1 : 2 : 0, key = __decoratorStrings[k23 + 5];
107987
- var initializers = k23 > 3 && (array2[j22 - 1] = []), extraInitializers = array2[j22] || (array2[j22] = []);
108092
+ var j3 = k23 > 3 ? array2.length + 1 : k23 ? s42 ? 1 : 2 : 0, key = __decoratorStrings[k23 + 5];
108093
+ var initializers = k23 > 3 && (array2[j3 - 1] = []), extraInitializers = array2[j3] || (array2[j3] = []);
107988
108094
  var desc = k23 && (!p32 && !s42 && (target = target.prototype), k23 < 5 && (k23 > 3 || !p32) && __getOwnPropDesc3(k23 < 4 ? target : { get [name]() {
107989
108095
  return __privateGet2(this, extra);
107990
108096
  }, set [name](x22) {
@@ -108190,13 +108296,15 @@ var y3 = class extends HTMLElement {
108190
108296
  const i52 = this.constructor, e52 = i52._$Eh.get(t32);
108191
108297
  if (void 0 !== e52 && this._$Em !== e52) {
108192
108298
  const t42 = i52.getPropertyOptions(e52), h32 = "function" == typeof t42.converter ? { fromAttribute: t42.converter } : void 0 !== t42.converter?.fromAttribute ? t42.converter : u4;
108193
- this._$Em = e52, this[e52] = h32.fromAttribute(s42, t42.type) ?? this._$Ej?.get(e52) ?? null, this._$Em = null;
108299
+ this._$Em = e52;
108300
+ const r52 = h32.fromAttribute(s42, t42.type);
108301
+ this[e52] = r52 ?? this._$Ej?.get(e52) ?? r52, this._$Em = null;
108194
108302
  }
108195
108303
  }
108196
- requestUpdate(t32, s42, i52) {
108304
+ requestUpdate(t32, s42, i52, e52 = false, h32) {
108197
108305
  if (void 0 !== t32) {
108198
- const e52 = this.constructor, h32 = this[t32];
108199
- if (i52 ??= e52.getPropertyOptions(t32), !((i52.hasChanged ?? f4)(h32, s42) || i52.useDefault && i52.reflect && h32 === this._$Ej?.get(t32) && !this.hasAttribute(e52._$Eu(t32, i52)))) return;
108306
+ const r52 = this.constructor;
108307
+ if (false === e52 && (h32 = this[t32]), i52 ??= r52.getPropertyOptions(t32), !((i52.hasChanged ?? f4)(h32, s42) || i52.useDefault && i52.reflect && h32 === this._$Ej?.get(t32) && !this.hasAttribute(r52._$Eu(t32, i52)))) return;
108200
108308
  this.C(t32, s42, i52);
108201
108309
  }
108202
108310
  false === this.isUpdatePending && (this._$ES = this._$EP());
@@ -108264,96 +108372,97 @@ var y3 = class extends HTMLElement {
108264
108372
  firstUpdated(t32) {
108265
108373
  }
108266
108374
  };
108267
- y3.elementStyles = [], y3.shadowRootOptions = { mode: "open" }, y3[d3("elementProperties")] = /* @__PURE__ */ new Map(), y3[d3("finalized")] = /* @__PURE__ */ new Map(), p4?.({ ReactiveElement: y3 }), (a4.reactiveElementVersions ??= []).push("2.1.0");
108375
+ y3.elementStyles = [], y3.shadowRootOptions = { mode: "open" }, y3[d3("elementProperties")] = /* @__PURE__ */ new Map(), y3[d3("finalized")] = /* @__PURE__ */ new Map(), p4?.({ ReactiveElement: y3 }), (a4.reactiveElementVersions ??= []).push("2.1.2");
108268
108376
  var t22 = globalThis;
108269
- var i32 = t22.trustedTypes;
108270
- var s22 = i32 ? i32.createPolicy("lit-html", { createHTML: (t32) => t32 }) : void 0;
108271
- var e32 = "$lit$";
108272
- var h22 = `lit$${Math.random().toFixed(9).slice(2)}$`;
108273
- var o32 = "?" + h22;
108274
- var n32 = `<${o32}>`;
108275
- var r32 = document;
108276
- var l22 = () => r32.createComment("");
108277
- var c32 = (t32) => null === t32 || "object" != typeof t32 && "function" != typeof t32;
108278
- var a22 = Array.isArray;
108279
- var u22 = (t32) => a22(t32) || "function" == typeof t32?.[Symbol.iterator];
108280
- var d22 = "[ \n\f\r]";
108281
- var f22 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
108282
- var v2 = /-->/g;
108283
- var _2 = />/g;
108284
- var m3 = RegExp(`>|${d22}(?:([^\\s"'>=/]+)(${d22}*=${d22}*(?:[^
108377
+ var i32 = (t32) => t32;
108378
+ var s22 = t22.trustedTypes;
108379
+ var e32 = s22 ? s22.createPolicy("lit-html", { createHTML: (t32) => t32 }) : void 0;
108380
+ var h22 = "$lit$";
108381
+ var o32 = `lit$${Math.random().toFixed(9).slice(2)}$`;
108382
+ var n32 = "?" + o32;
108383
+ var r32 = `<${n32}>`;
108384
+ var l22 = document;
108385
+ var c32 = () => l22.createComment("");
108386
+ var a22 = (t32) => null === t32 || "object" != typeof t32 && "function" != typeof t32;
108387
+ var u22 = Array.isArray;
108388
+ var d22 = (t32) => u22(t32) || "function" == typeof t32?.[Symbol.iterator];
108389
+ var f22 = "[ \n\f\r]";
108390
+ var v2 = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g;
108391
+ var _2 = /-->/g;
108392
+ var m3 = />/g;
108393
+ var p22 = RegExp(`>|${f22}(?:([^\\s"'>=/]+)(${f22}*=${f22}*(?:[^
108285
108394
  \f\r"'\`<>=]|("|')|))|$)`, "g");
108286
- var p22 = /'/g;
108287
- var g2 = /"/g;
108288
- var $3 = /^(?:script|style|textarea|title)$/i;
108289
- var y22 = (t32) => (i52, ...s42) => ({ _$litType$: t32, strings: i52, values: s42 });
108290
- var x2 = y22(1);
108291
- var b22 = y22(2);
108292
- var w2 = y22(3);
108293
- var T2 = Symbol.for("lit-noChange");
108294
- var E2 = Symbol.for("lit-nothing");
108295
- var A2 = /* @__PURE__ */ new WeakMap();
108296
- var C2 = r32.createTreeWalker(r32, 129);
108297
- function P2(t32, i52) {
108298
- if (!a22(t32) || !t32.hasOwnProperty("raw")) throw Error("invalid template strings array");
108299
- return void 0 !== s22 ? s22.createHTML(i52) : i52;
108300
- }
108301
- var V2 = (t32, i52) => {
108302
- const s42 = t32.length - 1, o62 = [];
108303
- let r52, l32 = 2 === i52 ? "<svg>" : 3 === i52 ? "<math>" : "", c42 = f22;
108395
+ var g2 = /'/g;
108396
+ var $3 = /"/g;
108397
+ var y22 = /^(?:script|style|textarea|title)$/i;
108398
+ var x2 = (t32) => (i52, ...s42) => ({ _$litType$: t32, strings: i52, values: s42 });
108399
+ var b22 = x2(1);
108400
+ var w2 = x2(2);
108401
+ var T2 = x2(3);
108402
+ var E2 = Symbol.for("lit-noChange");
108403
+ var A2 = Symbol.for("lit-nothing");
108404
+ var C2 = /* @__PURE__ */ new WeakMap();
108405
+ var P2 = l22.createTreeWalker(l22, 129);
108406
+ function V2(t32, i52) {
108407
+ if (!u22(t32) || !t32.hasOwnProperty("raw")) throw Error("invalid template strings array");
108408
+ return void 0 !== e32 ? e32.createHTML(i52) : i52;
108409
+ }
108410
+ var N2 = (t32, i52) => {
108411
+ const s42 = t32.length - 1, e52 = [];
108412
+ let n52, l32 = 2 === i52 ? "<svg>" : 3 === i52 ? "<math>" : "", c42 = v2;
108304
108413
  for (let i62 = 0; i62 < s42; i62++) {
108305
108414
  const s52 = t32[i62];
108306
- let a33, u32, d32 = -1, y32 = 0;
108307
- for (; y32 < s52.length && (c42.lastIndex = y32, u32 = c42.exec(s52), null !== u32); ) y32 = c42.lastIndex, c42 === f22 ? "!--" === u32[1] ? c42 = v2 : void 0 !== u32[1] ? c42 = _2 : void 0 !== u32[2] ? ($3.test(u32[2]) && (r52 = RegExp("</" + u32[2], "g")), c42 = m3) : void 0 !== u32[3] && (c42 = m3) : c42 === m3 ? ">" === u32[0] ? (c42 = r52 ?? f22, d32 = -1) : void 0 === u32[1] ? d32 = -2 : (d32 = c42.lastIndex - u32[2].length, a33 = u32[1], c42 = void 0 === u32[3] ? m3 : '"' === u32[3] ? g2 : p22) : c42 === g2 || c42 === p22 ? c42 = m3 : c42 === v2 || c42 === _2 ? c42 = f22 : (c42 = m3, r52 = void 0);
108308
- const x22 = c42 === m3 && t32[i62 + 1].startsWith("/>") ? " " : "";
108309
- l32 += c42 === f22 ? s52 + n32 : d32 >= 0 ? (o62.push(a33), s52.slice(0, d32) + e32 + s52.slice(d32) + h22 + x22) : s52 + h22 + (-2 === d32 ? i62 : x22);
108415
+ let a33, u32, d32 = -1, f32 = 0;
108416
+ for (; f32 < s52.length && (c42.lastIndex = f32, u32 = c42.exec(s52), null !== u32); ) f32 = c42.lastIndex, c42 === v2 ? "!--" === u32[1] ? c42 = _2 : void 0 !== u32[1] ? c42 = m3 : void 0 !== u32[2] ? (y22.test(u32[2]) && (n52 = RegExp("</" + u32[2], "g")), c42 = p22) : void 0 !== u32[3] && (c42 = p22) : c42 === p22 ? ">" === u32[0] ? (c42 = n52 ?? v2, d32 = -1) : void 0 === u32[1] ? d32 = -2 : (d32 = c42.lastIndex - u32[2].length, a33 = u32[1], c42 = void 0 === u32[3] ? p22 : '"' === u32[3] ? $3 : g2) : c42 === $3 || c42 === g2 ? c42 = p22 : c42 === _2 || c42 === m3 ? c42 = v2 : (c42 = p22, n52 = void 0);
108417
+ const x22 = c42 === p22 && t32[i62 + 1].startsWith("/>") ? " " : "";
108418
+ l32 += c42 === v2 ? s52 + r32 : d32 >= 0 ? (e52.push(a33), s52.slice(0, d32) + h22 + s52.slice(d32) + o32 + x22) : s52 + o32 + (-2 === d32 ? i62 : x22);
108310
108419
  }
108311
- return [P2(t32, l32 + (t32[s42] || "<?>") + (2 === i52 ? "</svg>" : 3 === i52 ? "</math>" : "")), o62];
108420
+ return [V2(t32, l32 + (t32[s42] || "<?>") + (2 === i52 ? "</svg>" : 3 === i52 ? "</math>" : "")), e52];
108312
108421
  };
108313
- var N2 = class _N {
108314
- constructor({ strings: t32, _$litType$: s42 }, n52) {
108422
+ var S22 = class _S {
108423
+ constructor({ strings: t32, _$litType$: i52 }, e52) {
108315
108424
  let r52;
108316
108425
  this.parts = [];
108317
- let c42 = 0, a33 = 0;
108318
- const u32 = t32.length - 1, d32 = this.parts, [f32, v22] = V2(t32, s42);
108319
- if (this.el = _N.createElement(f32, n52), C2.currentNode = this.el.content, 2 === s42 || 3 === s42) {
108426
+ let l32 = 0, a33 = 0;
108427
+ const u32 = t32.length - 1, d32 = this.parts, [f32, v22] = N2(t32, i52);
108428
+ if (this.el = _S.createElement(f32, e52), P2.currentNode = this.el.content, 2 === i52 || 3 === i52) {
108320
108429
  const t42 = this.el.content.firstChild;
108321
108430
  t42.replaceWith(...t42.childNodes);
108322
108431
  }
108323
- for (; null !== (r52 = C2.nextNode()) && d32.length < u32; ) {
108432
+ for (; null !== (r52 = P2.nextNode()) && d32.length < u32; ) {
108324
108433
  if (1 === r52.nodeType) {
108325
- if (r52.hasAttributes()) for (const t42 of r52.getAttributeNames()) if (t42.endsWith(e32)) {
108326
- const i52 = v22[a33++], s52 = r52.getAttribute(t42).split(h22), e52 = /([.?@])?(.*)/.exec(i52);
108327
- d32.push({ type: 1, index: c42, name: e52[2], strings: s52, ctor: "." === e52[1] ? H3 : "?" === e52[1] ? I2 : "@" === e52[1] ? L2 : k2 }), r52.removeAttribute(t42);
108328
- } else t42.startsWith(h22) && (d32.push({ type: 6, index: c42 }), r52.removeAttribute(t42));
108329
- if ($3.test(r52.tagName)) {
108330
- const t42 = r52.textContent.split(h22), s52 = t42.length - 1;
108331
- if (s52 > 0) {
108332
- r52.textContent = i32 ? i32.emptyScript : "";
108333
- for (let i52 = 0; i52 < s52; i52++) r52.append(t42[i52], l22()), C2.nextNode(), d32.push({ type: 2, index: ++c42 });
108334
- r52.append(t42[s52], l22());
108335
- }
108336
- }
108337
- } else if (8 === r52.nodeType) if (r52.data === o32) d32.push({ type: 2, index: c42 });
108434
+ if (r52.hasAttributes()) for (const t42 of r52.getAttributeNames()) if (t42.endsWith(h22)) {
108435
+ const i62 = v22[a33++], s42 = r52.getAttribute(t42).split(o32), e62 = /([.?@])?(.*)/.exec(i62);
108436
+ d32.push({ type: 1, index: l32, name: e62[2], strings: s42, ctor: "." === e62[1] ? I2 : "?" === e62[1] ? L2 : "@" === e62[1] ? z2 : H3 }), r52.removeAttribute(t42);
108437
+ } else t42.startsWith(o32) && (d32.push({ type: 6, index: l32 }), r52.removeAttribute(t42));
108438
+ if (y22.test(r52.tagName)) {
108439
+ const t42 = r52.textContent.split(o32), i62 = t42.length - 1;
108440
+ if (i62 > 0) {
108441
+ r52.textContent = s22 ? s22.emptyScript : "";
108442
+ for (let s42 = 0; s42 < i62; s42++) r52.append(t42[s42], c32()), P2.nextNode(), d32.push({ type: 2, index: ++l32 });
108443
+ r52.append(t42[i62], c32());
108444
+ }
108445
+ }
108446
+ } else if (8 === r52.nodeType) if (r52.data === n32) d32.push({ type: 2, index: l32 });
108338
108447
  else {
108339
108448
  let t42 = -1;
108340
- for (; -1 !== (t42 = r52.data.indexOf(h22, t42 + 1)); ) d32.push({ type: 7, index: c42 }), t42 += h22.length - 1;
108449
+ for (; -1 !== (t42 = r52.data.indexOf(o32, t42 + 1)); ) d32.push({ type: 7, index: l32 }), t42 += o32.length - 1;
108341
108450
  }
108342
- c42++;
108451
+ l32++;
108343
108452
  }
108344
108453
  }
108345
108454
  static createElement(t32, i52) {
108346
- const s42 = r32.createElement("template");
108455
+ const s42 = l22.createElement("template");
108347
108456
  return s42.innerHTML = t32, s42;
108348
108457
  }
108349
108458
  };
108350
- function S22(t32, i52, s42 = t32, e52) {
108351
- if (i52 === T2) return i52;
108459
+ function M2(t32, i52, s42 = t32, e52) {
108460
+ if (i52 === E2) return i52;
108352
108461
  let h32 = void 0 !== e52 ? s42._$Co?.[e52] : s42._$Cl;
108353
- const o62 = c32(i52) ? void 0 : i52._$litDirective$;
108354
- return h32?.constructor !== o62 && (h32?._$AO?.(false), void 0 === o62 ? h32 = void 0 : (h32 = new o62(t32), h32._$AT(t32, s42, e52)), void 0 !== e52 ? (s42._$Co ??= [])[e52] = h32 : s42._$Cl = h32), void 0 !== h32 && (i52 = S22(t32, h32._$AS(t32, i52.values), h32, e52)), i52;
108462
+ const o62 = a22(i52) ? void 0 : i52._$litDirective$;
108463
+ return h32?.constructor !== o62 && (h32?._$AO?.(false), void 0 === o62 ? h32 = void 0 : (h32 = new o62(t32), h32._$AT(t32, s42, e52)), void 0 !== e52 ? (s42._$Co ??= [])[e52] = h32 : s42._$Cl = h32), void 0 !== h32 && (i52 = M2(t32, h32._$AS(t32, i52.values), h32, e52)), i52;
108355
108464
  }
108356
- var M2 = class {
108465
+ var R2 = class {
108357
108466
  constructor(t32, i52) {
108358
108467
  this._$AV = [], this._$AN = void 0, this._$AD = t32, this._$AM = i52;
108359
108468
  }
@@ -108364,29 +108473,29 @@ var M2 = class {
108364
108473
  return this._$AM._$AU;
108365
108474
  }
108366
108475
  u(t32) {
108367
- const { el: { content: i52 }, parts: s42 } = this._$AD, e52 = (t32?.creationScope ?? r32).importNode(i52, true);
108368
- C2.currentNode = e52;
108369
- let h32 = C2.nextNode(), o62 = 0, n52 = 0, l32 = s42[0];
108370
- for (; void 0 !== l32; ) {
108371
- if (o62 === l32.index) {
108476
+ const { el: { content: i52 }, parts: s42 } = this._$AD, e52 = (t32?.creationScope ?? l22).importNode(i52, true);
108477
+ P2.currentNode = e52;
108478
+ let h32 = P2.nextNode(), o62 = 0, n52 = 0, r52 = s42[0];
108479
+ for (; void 0 !== r52; ) {
108480
+ if (o62 === r52.index) {
108372
108481
  let i62;
108373
- 2 === l32.type ? i62 = new R2(h32, h32.nextSibling, this, t32) : 1 === l32.type ? i62 = new l32.ctor(h32, l32.name, l32.strings, this, t32) : 6 === l32.type && (i62 = new z2(h32, this, t32)), this._$AV.push(i62), l32 = s42[++n52];
108482
+ 2 === r52.type ? i62 = new k2(h32, h32.nextSibling, this, t32) : 1 === r52.type ? i62 = new r52.ctor(h32, r52.name, r52.strings, this, t32) : 6 === r52.type && (i62 = new Z2(h32, this, t32)), this._$AV.push(i62), r52 = s42[++n52];
108374
108483
  }
108375
- o62 !== l32?.index && (h32 = C2.nextNode(), o62++);
108484
+ o62 !== r52?.index && (h32 = P2.nextNode(), o62++);
108376
108485
  }
108377
- return C2.currentNode = r32, e52;
108486
+ return P2.currentNode = l22, e52;
108378
108487
  }
108379
108488
  p(t32) {
108380
108489
  let i52 = 0;
108381
108490
  for (const s42 of this._$AV) void 0 !== s42 && (void 0 !== s42.strings ? (s42._$AI(t32, s42, i52), i52 += s42.strings.length - 2) : s42._$AI(t32[i52])), i52++;
108382
108491
  }
108383
108492
  };
108384
- var R2 = class _R {
108493
+ var k2 = class _k {
108385
108494
  get _$AU() {
108386
108495
  return this._$AM?._$AU ?? this._$Cv;
108387
108496
  }
108388
108497
  constructor(t32, i52, s42, e52) {
108389
- this.type = 2, this._$AH = E2, this._$AN = void 0, this._$AA = t32, this._$AB = i52, this._$AM = s42, this.options = e52, this._$Cv = e52?.isConnected ?? true;
108498
+ this.type = 2, this._$AH = A2, this._$AN = void 0, this._$AA = t32, this._$AB = i52, this._$AM = s42, this.options = e52, this._$Cv = e52?.isConnected ?? true;
108390
108499
  }
108391
108500
  get parentNode() {
108392
108501
  let t32 = this._$AA.parentNode;
@@ -108400,7 +108509,7 @@ var R2 = class _R {
108400
108509
  return this._$AB;
108401
108510
  }
108402
108511
  _$AI(t32, i52 = this) {
108403
- t32 = S22(this, t32, i52), c32(t32) ? t32 === E2 || null == t32 || "" === t32 ? (this._$AH !== E2 && this._$AR(), this._$AH = E2) : t32 !== this._$AH && t32 !== T2 && this._(t32) : void 0 !== t32._$litType$ ? this.$(t32) : void 0 !== t32.nodeType ? this.T(t32) : u22(t32) ? this.k(t32) : this._(t32);
108512
+ t32 = M2(this, t32, i52), a22(t32) ? t32 === A2 || null == t32 || "" === t32 ? (this._$AH !== A2 && this._$AR(), this._$AH = A2) : t32 !== this._$AH && t32 !== E2 && this._(t32) : void 0 !== t32._$litType$ ? this.$(t32) : void 0 !== t32.nodeType ? this.T(t32) : d22(t32) ? this.k(t32) : this._(t32);
108404
108513
  }
108405
108514
  O(t32) {
108406
108515
  return this._$AA.parentNode.insertBefore(t32, this._$AB);
@@ -108409,38 +108518,38 @@ var R2 = class _R {
108409
108518
  this._$AH !== t32 && (this._$AR(), this._$AH = this.O(t32));
108410
108519
  }
108411
108520
  _(t32) {
108412
- this._$AH !== E2 && c32(this._$AH) ? this._$AA.nextSibling.data = t32 : this.T(r32.createTextNode(t32)), this._$AH = t32;
108521
+ this._$AH !== A2 && a22(this._$AH) ? this._$AA.nextSibling.data = t32 : this.T(l22.createTextNode(t32)), this._$AH = t32;
108413
108522
  }
108414
108523
  $(t32) {
108415
- const { values: i52, _$litType$: s42 } = t32, e52 = "number" == typeof s42 ? this._$AC(t32) : (void 0 === s42.el && (s42.el = N2.createElement(P2(s42.h, s42.h[0]), this.options)), s42);
108524
+ const { values: i52, _$litType$: s42 } = t32, e52 = "number" == typeof s42 ? this._$AC(t32) : (void 0 === s42.el && (s42.el = S22.createElement(V2(s42.h, s42.h[0]), this.options)), s42);
108416
108525
  if (this._$AH?._$AD === e52) this._$AH.p(i52);
108417
108526
  else {
108418
- const t42 = new M2(e52, this), s52 = t42.u(this.options);
108527
+ const t42 = new R2(e52, this), s52 = t42.u(this.options);
108419
108528
  t42.p(i52), this.T(s52), this._$AH = t42;
108420
108529
  }
108421
108530
  }
108422
108531
  _$AC(t32) {
108423
- let i52 = A2.get(t32.strings);
108424
- return void 0 === i52 && A2.set(t32.strings, i52 = new N2(t32)), i52;
108532
+ let i52 = C2.get(t32.strings);
108533
+ return void 0 === i52 && C2.set(t32.strings, i52 = new S22(t32)), i52;
108425
108534
  }
108426
108535
  k(t32) {
108427
- a22(this._$AH) || (this._$AH = [], this._$AR());
108536
+ u22(this._$AH) || (this._$AH = [], this._$AR());
108428
108537
  const i52 = this._$AH;
108429
108538
  let s42, e52 = 0;
108430
- for (const h32 of t32) e52 === i52.length ? i52.push(s42 = new _R(this.O(l22()), this.O(l22()), this, this.options)) : s42 = i52[e52], s42._$AI(h32), e52++;
108539
+ for (const h32 of t32) e52 === i52.length ? i52.push(s42 = new _k(this.O(c32()), this.O(c32()), this, this.options)) : s42 = i52[e52], s42._$AI(h32), e52++;
108431
108540
  e52 < i52.length && (this._$AR(s42 && s42._$AB.nextSibling, e52), i52.length = e52);
108432
108541
  }
108433
- _$AR(t32 = this._$AA.nextSibling, i52) {
108434
- for (this._$AP?.(false, true, i52); t32 && t32 !== this._$AB; ) {
108435
- const i62 = t32.nextSibling;
108436
- t32.remove(), t32 = i62;
108542
+ _$AR(t32 = this._$AA.nextSibling, s42) {
108543
+ for (this._$AP?.(false, true, s42); t32 !== this._$AB; ) {
108544
+ const s52 = i32(t32).nextSibling;
108545
+ i32(t32).remove(), t32 = s52;
108437
108546
  }
108438
108547
  }
108439
108548
  setConnected(t32) {
108440
108549
  void 0 === this._$AM && (this._$Cv = t32, this._$AP?.(t32));
108441
108550
  }
108442
108551
  };
108443
- var k2 = class {
108552
+ var H3 = class {
108444
108553
  get tagName() {
108445
108554
  return this.element.tagName;
108446
108555
  }
@@ -108448,53 +108557,53 @@ var k2 = class {
108448
108557
  return this._$AM._$AU;
108449
108558
  }
108450
108559
  constructor(t32, i52, s42, e52, h32) {
108451
- this.type = 1, this._$AH = E2, this._$AN = void 0, this.element = t32, this.name = i52, this._$AM = e52, this.options = h32, s42.length > 2 || "" !== s42[0] || "" !== s42[1] ? (this._$AH = Array(s42.length - 1).fill(new String()), this.strings = s42) : this._$AH = E2;
108560
+ this.type = 1, this._$AH = A2, this._$AN = void 0, this.element = t32, this.name = i52, this._$AM = e52, this.options = h32, s42.length > 2 || "" !== s42[0] || "" !== s42[1] ? (this._$AH = Array(s42.length - 1).fill(new String()), this.strings = s42) : this._$AH = A2;
108452
108561
  }
108453
108562
  _$AI(t32, i52 = this, s42, e52) {
108454
108563
  const h32 = this.strings;
108455
108564
  let o62 = false;
108456
- if (void 0 === h32) t32 = S22(this, t32, i52, 0), o62 = !c32(t32) || t32 !== this._$AH && t32 !== T2, o62 && (this._$AH = t32);
108565
+ if (void 0 === h32) t32 = M2(this, t32, i52, 0), o62 = !a22(t32) || t32 !== this._$AH && t32 !== E2, o62 && (this._$AH = t32);
108457
108566
  else {
108458
108567
  const e62 = t32;
108459
108568
  let n52, r52;
108460
- for (t32 = h32[0], n52 = 0; n52 < h32.length - 1; n52++) r52 = S22(this, e62[s42 + n52], i52, n52), r52 === T2 && (r52 = this._$AH[n52]), o62 ||= !c32(r52) || r52 !== this._$AH[n52], r52 === E2 ? t32 = E2 : t32 !== E2 && (t32 += (r52 ?? "") + h32[n52 + 1]), this._$AH[n52] = r52;
108569
+ for (t32 = h32[0], n52 = 0; n52 < h32.length - 1; n52++) r52 = M2(this, e62[s42 + n52], i52, n52), r52 === E2 && (r52 = this._$AH[n52]), o62 ||= !a22(r52) || r52 !== this._$AH[n52], r52 === A2 ? t32 = A2 : t32 !== A2 && (t32 += (r52 ?? "") + h32[n52 + 1]), this._$AH[n52] = r52;
108461
108570
  }
108462
108571
  o62 && !e52 && this.j(t32);
108463
108572
  }
108464
108573
  j(t32) {
108465
- t32 === E2 ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t32 ?? "");
108574
+ t32 === A2 ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t32 ?? "");
108466
108575
  }
108467
108576
  };
108468
- var H3 = class extends k2 {
108577
+ var I2 = class extends H3 {
108469
108578
  constructor() {
108470
108579
  super(...arguments), this.type = 3;
108471
108580
  }
108472
108581
  j(t32) {
108473
- this.element[this.name] = t32 === E2 ? void 0 : t32;
108582
+ this.element[this.name] = t32 === A2 ? void 0 : t32;
108474
108583
  }
108475
108584
  };
108476
- var I2 = class extends k2 {
108585
+ var L2 = class extends H3 {
108477
108586
  constructor() {
108478
108587
  super(...arguments), this.type = 4;
108479
108588
  }
108480
108589
  j(t32) {
108481
- this.element.toggleAttribute(this.name, !!t32 && t32 !== E2);
108590
+ this.element.toggleAttribute(this.name, !!t32 && t32 !== A2);
108482
108591
  }
108483
108592
  };
108484
- var L2 = class extends k2 {
108593
+ var z2 = class extends H3 {
108485
108594
  constructor(t32, i52, s42, e52, h32) {
108486
108595
  super(t32, i52, s42, e52, h32), this.type = 5;
108487
108596
  }
108488
108597
  _$AI(t32, i52 = this) {
108489
- if ((t32 = S22(this, t32, i52, 0) ?? E2) === T2) return;
108490
- const s42 = this._$AH, e52 = t32 === E2 && s42 !== E2 || t32.capture !== s42.capture || t32.once !== s42.once || t32.passive !== s42.passive, h32 = t32 !== E2 && (s42 === E2 || e52);
108598
+ if ((t32 = M2(this, t32, i52, 0) ?? A2) === E2) return;
108599
+ const s42 = this._$AH, e52 = t32 === A2 && s42 !== A2 || t32.capture !== s42.capture || t32.once !== s42.once || t32.passive !== s42.passive, h32 = t32 !== A2 && (s42 === A2 || e52);
108491
108600
  e52 && this.element.removeEventListener(this.name, this, s42), h32 && this.element.addEventListener(this.name, this, t32), this._$AH = t32;
108492
108601
  }
108493
108602
  handleEvent(t32) {
108494
108603
  "function" == typeof this._$AH ? this._$AH.call(this.options?.host ?? this.element, t32) : this._$AH.handleEvent(t32);
108495
108604
  }
108496
108605
  };
108497
- var z2 = class {
108606
+ var Z2 = class {
108498
108607
  constructor(t32, i52, s42) {
108499
108608
  this.element = t32, this.type = 6, this._$AN = void 0, this._$AM = i52, this.options = s42;
108500
108609
  }
@@ -108502,17 +108611,17 @@ var z2 = class {
108502
108611
  return this._$AM._$AU;
108503
108612
  }
108504
108613
  _$AI(t32) {
108505
- S22(this, t32);
108614
+ M2(this, t32);
108506
108615
  }
108507
108616
  };
108508
- var j3 = t22.litHtmlPolyfillSupport;
108509
- j3?.(N2, R2), (t22.litHtmlVersions ??= []).push("3.3.0");
108510
- var B2 = (t32, i52, s42) => {
108617
+ var B2 = t22.litHtmlPolyfillSupport;
108618
+ B2?.(S22, k2), (t22.litHtmlVersions ??= []).push("3.3.2");
108619
+ var D2 = (t32, i52, s42) => {
108511
108620
  const e52 = s42?.renderBefore ?? i52;
108512
108621
  let h32 = e52._$litPart$;
108513
108622
  if (void 0 === h32) {
108514
108623
  const t42 = s42?.renderBefore ?? null;
108515
- e52._$litPart$ = h32 = new R2(i52.insertBefore(l22(), t42), t42, void 0, s42 ?? {});
108624
+ e52._$litPart$ = h32 = new k2(i52.insertBefore(c32(), t42), t42, void 0, s42 ?? {});
108516
108625
  }
108517
108626
  return h32._$AI(t32), h32;
108518
108627
  };
@@ -108527,7 +108636,7 @@ var i42 = class extends y3 {
108527
108636
  }
108528
108637
  update(t32) {
108529
108638
  const r52 = this.render();
108530
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t32), this._$Do = B2(r52, this.renderRoot, this.renderOptions);
108639
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t32), this._$Do = D2(r52, this.renderRoot, this.renderOptions);
108531
108640
  }
108532
108641
  connectedCallback() {
108533
108642
  super.connectedCallback(), this._$Do?.setConnected(true);
@@ -108536,13 +108645,13 @@ var i42 = class extends y3 {
108536
108645
  super.disconnectedCallback(), this._$Do?.setConnected(false);
108537
108646
  }
108538
108647
  render() {
108539
- return T2;
108648
+ return E2;
108540
108649
  }
108541
108650
  };
108542
108651
  i42._$litElement$ = true, i42["finalized"] = true, s32.litElementHydrateSupport?.({ LitElement: i42 });
108543
108652
  var o42 = s32.litElementPolyfillSupport;
108544
108653
  o42?.({ LitElement: i42 });
108545
- (s32.litElementVersions ??= []).push("4.2.0");
108654
+ (s32.litElementVersions ??= []).push("4.2.2");
108546
108655
  var o52 = { attribute: true, type: String, converter: u4, reflect: false, hasChanged: f4 };
108547
108656
  var r42 = (t32 = o52, e52, r52) => {
108548
108657
  const { kind: n52, metadata: i52 } = r52;
@@ -108551,7 +108660,7 @@ var r42 = (t32 = o52, e52, r52) => {
108551
108660
  const { name: o62 } = r52;
108552
108661
  return { set(r62) {
108553
108662
  const n62 = e52.get.call(this);
108554
- e52.set.call(this, r62), this.requestUpdate(o62, n62, t32);
108663
+ e52.set.call(this, r62), this.requestUpdate(o62, n62, t32, true, r62);
108555
108664
  }, init(e62) {
108556
108665
  return void 0 !== e62 && this.C(o62, void 0, t32, e62), e62;
108557
108666
  } };
@@ -108560,7 +108669,7 @@ var r42 = (t32 = o52, e52, r52) => {
108560
108669
  const { name: o62 } = r52;
108561
108670
  return function(r62) {
108562
108671
  const n62 = this[o62];
108563
- e52.call(this, r62), this.requestUpdate(o62, n62, t32);
108672
+ e52.call(this, r62), this.requestUpdate(o62, n62, t32, true, r62);
108564
108673
  };
108565
108674
  }
108566
108675
  throw Error("Unsupported decorator location: " + n52);
@@ -108686,13 +108795,19 @@ var LitElementWw = class extends (_a = ScopedElementsMixin2(i42), _contentEditab
108686
108795
  constructor() {
108687
108796
  super(...arguments);
108688
108797
  __runInitializers(_init, 5, this);
108689
- __publicField2(this, "options");
108690
- __publicField2(this, "actions", {});
108691
108798
  __publicField2(this, "localize");
108692
108799
  __privateAdd2(this, _contentEditable, __runInitializers(_init, 8, this)), __runInitializers(_init, 11, this);
108693
108800
  __privateAdd2(this, _lang, "");
108694
108801
  __publicField2(this, "_inTransaction", false);
108695
108802
  }
108803
+ /** Declare attributes as options. Used by WebWriter to auto-generate input fields to modify these attributes. As the name suggests, this is mostly suited to simple attributes (boolean, string, etc.). As this is a getter, you can dynamically change options depending on the state of the widget. */
108804
+ get dynamicOptions() {
108805
+ return {};
108806
+ }
108807
+ /** Declare methods as actions. Used by WebWriter to treat all DOM changes triggered by the method as a single change (as a transaction). As this is a getter, you can dynamically change actions depending on the state of the widget. */
108808
+ get dynamicActions() {
108809
+ return {};
108810
+ }
108696
108811
  get lang() {
108697
108812
  return (__privateGet2(this, _lang) || this.parentElement?.closest("[lang]")?.lang) ?? "";
108698
108813
  }
@@ -109132,7 +109247,7 @@ var O = { window: "undefined" == typeof window ? null : window, document: "undef
109132
109247
  function F() {
109133
109248
  return O.window;
109134
109249
  }
109135
- var D2 = class {
109250
+ var D3 = class {
109136
109251
  };
109137
109252
  var _3 = {};
109138
109253
  var N3 = "___SYMBOL___ROOT___";
@@ -109140,7 +109255,7 @@ function W(t9, e13 = E3) {
109140
109255
  return O.document.createElementNS(e13, t9);
109141
109256
  }
109142
109257
  function B3(t9, e13 = false) {
109143
- if (t9 instanceof D2) return t9;
109258
+ if (t9 instanceof D3) return t9;
109144
109259
  if ("object" == typeof t9) return U(t9);
109145
109260
  if (null == t9) return new _3[N3]();
109146
109261
  if ("string" == typeof t9 && "<" !== t9.charAt(0)) return U(O.document.querySelector(t9));
@@ -109152,7 +109267,7 @@ function G2(t9, e13) {
109152
109267
  }
109153
109268
  function V3(t9) {
109154
109269
  if (!t9) return null;
109155
- if (t9.instance instanceof D2) return t9.instance;
109270
+ if (t9.instance instanceof D3) return t9.instance;
109156
109271
  if ("#document-fragment" === t9.nodeName) return new _3.Fragment(t9);
109157
109272
  let e13 = P3(t9.nodeName || "Dom");
109158
109273
  return "LinearGradient" === e13 || "RadialGradient" === e13 ? e13 = "Gradient" : _3[e13] || (e13 = "Dom"), new _3[e13](t9);
@@ -109161,9 +109276,9 @@ var U = V3;
109161
109276
  function q(t9, e13 = t9.name, i10 = false) {
109162
109277
  return _3[e13] = t9, i10 && (_3[N3] = t9), S4(Object.getOwnPropertyNames(t9.prototype)), t9;
109163
109278
  }
109164
- var Z2 = 1e3;
109279
+ var Z3 = 1e3;
109165
109280
  function $4(t9) {
109166
- return "Svgjs" + P3(t9) + Z2++;
109281
+ return "Svgjs" + P3(t9) + Z3++;
109167
109282
  }
109168
109283
  function J(t9) {
109169
109284
  for (let e13 = t9.children.length - 1; e13 >= 0; e13--) J(t9.children[e13]);
@@ -109753,7 +109868,7 @@ function Xt(t9, e13, i10, a6) {
109753
109868
  }
109754
109869
  }));
109755
109870
  }
109756
- var Rt = class extends D2 {
109871
+ var Rt = class extends D3 {
109757
109872
  addEventListener() {
109758
109873
  }
109759
109874
  dispatch(t9, e13, i10) {
@@ -114023,7 +114138,7 @@ var ta = (function() {
114023
114138
  if (d5 || s7 || r12 || (f6 = Math.ceil((x4 - o16) / (b5 + o16))) > 16 && v3.getPrimeFactors(f6).length < 2 && f6++, !d5 && i10.forceNiceScale && 0 === h7.yValueDecimal && f6 > x4 && (f6 = x4, b5 = Math.round(x4 / f6)), f6 > a6 && (!d5 && !c8 || i10.forceNiceScale)) {
114024
114139
  var z4 = v3.getPrimeFactors(f6), X2 = z4.length - 1, R4 = f6;
114025
114140
  t: for (var E4 = 0; E4 < X2; E4++) for (var Y2 = 0; Y2 <= X2 - E4; Y2++) {
114026
- for (var H5 = Math.min(Y2 + E4, X2), O2 = R4, F2 = 1, D3 = Y2; D3 <= H5; D3++) F2 *= z4[D3];
114141
+ for (var H5 = Math.min(Y2 + E4, X2), O2 = R4, F2 = 1, D4 = Y2; D4 <= H5; D4++) F2 *= z4[D4];
114027
114142
  if ((O2 /= F2) < a6) {
114028
114143
  R4 = O2;
114029
114144
  break t;
@@ -117238,7 +117353,7 @@ var Ba = (function() {
117238
117353
  return e14 - t11 / M4[l8] + 2 * (a6.isReversed ? t11 / M4[l8] : 0);
117239
117354
  }, Y2 = d5, H5 = S5.config.chart.stacked && !S5.globals.comboCharts || S5.config.chart.stacked && S5.globals.comboCharts && (!this.w.config.chart.stackOnlyBar || "bar" === (null === (e13 = this.w.config.series[o16]) || void 0 === e13 ? void 0 : e13.type) || "column" === (null === (i10 = this.w.config.series[o16]) || void 0 === i10 ? void 0 : i10.type)), O2 = S5.config.stroke.curve;
117240
117355
  Array.isArray(O2) && (O2 = Array.isArray(b5) ? O2[b5[h7]] : O2[h7]);
117241
- for (var F2, D3 = 0, _4 = 0; _4 < n12 && 0 !== r12[h7].length; _4++) {
117356
+ for (var F2, D4 = 0, _4 = 0; _4 < n12 && 0 !== r12[h7].length; _4++) {
117242
117357
  var N4 = void 0 === r12[h7][_4 + 1] || null === r12[h7][_4 + 1];
117243
117358
  if (S5.globals.isXNumeric) {
117244
117359
  var W2 = S5.globals.seriesX[o16][_4 + 1];
@@ -117255,8 +117370,8 @@ var Ba = (function() {
117255
117370
  } else m5 = this.zeroY;
117256
117371
  else m5 = this.zeroY;
117257
117372
  N4 ? d5 = E4(R4, m5) : (d5 = E4(r12[h7][_4 + 1], m5), "rangeArea" === s7 && (Y2 = E4(C4[h7][_4 + 1], m5))), y5.push(null === r12[h7][_4 + 1] ? null : c8), !N4 || "smooth" !== S5.config.stroke.curve && "monotoneCubic" !== S5.config.stroke.curve ? (w4.push(d5), k4.push(Y2)) : (w4.push(null), k4.push(null));
117258
- var B4 = this.lineHelpers.calculatePoints({ series: r12, x: c8, y: d5, realIndex: o16, i: h7, j: _4, prevY: P4 }), G3 = this._createPaths({ type: s7, series: r12, i: h7, realIndex: o16, j: _4, x: c8, y: d5, y2: Y2, xArrj: y5, yArrj: w4, y2Arrj: k4, pX: u6, pY: g4, pathState: D3, segmentStartX: F2, linePath: I4, areaPath: T4, linePaths: f6, areaPaths: x4, curve: O2, isRangeStart: A4 });
117259
- x4 = G3.areaPaths, f6 = G3.linePaths, u6 = G3.pX, g4 = G3.pY, D3 = G3.pathState, F2 = G3.segmentStartX, T4 = G3.areaPath, I4 = G3.linePath, !this.appendPathFrom || S5.globals.hasNullValues || "monotoneCubic" === O2 && "rangeArea" === s7 || (z4 += L4.line(c8, this.areaBottomY), X2 += L4.line(c8, this.areaBottomY)), this.handleNullDataPoints(r12, B4, h7, _4, o16), this._handleMarkersAndLabels({ type: s7, pointsPos: B4, i: h7, j: _4, realIndex: o16, isRangeStart: A4 });
117373
+ var B4 = this.lineHelpers.calculatePoints({ series: r12, x: c8, y: d5, realIndex: o16, i: h7, j: _4, prevY: P4 }), G3 = this._createPaths({ type: s7, series: r12, i: h7, realIndex: o16, j: _4, x: c8, y: d5, y2: Y2, xArrj: y5, yArrj: w4, y2Arrj: k4, pX: u6, pY: g4, pathState: D4, segmentStartX: F2, linePath: I4, areaPath: T4, linePaths: f6, areaPaths: x4, curve: O2, isRangeStart: A4 });
117374
+ x4 = G3.areaPaths, f6 = G3.linePaths, u6 = G3.pX, g4 = G3.pY, D4 = G3.pathState, F2 = G3.segmentStartX, T4 = G3.areaPath, I4 = G3.linePath, !this.appendPathFrom || S5.globals.hasNullValues || "monotoneCubic" === O2 && "rangeArea" === s7 || (z4 += L4.line(c8, this.areaBottomY), X2 += L4.line(c8, this.areaBottomY)), this.handleNullDataPoints(r12, B4, h7, _4, o16), this._handleMarkersAndLabels({ type: s7, pointsPos: B4, i: h7, j: _4, realIndex: o16, isRangeStart: A4 });
117260
117375
  }
117261
117376
  return { yArrj: w4, xArrj: y5, pathFromArea: X2, areaPaths: x4, pathFromLine: z4, linePaths: f6, linePath: I4, areaPath: T4 };
117262
117377
  } }, { key: "_handleMarkersAndLabels", value: function(t10) {
@@ -117363,8 +117478,8 @@ var Ba = (function() {
117363
117478
  break;
117364
117479
  }
117365
117480
  if (p7 = 1, r12 < i10[a6].length - 2) {
117366
- var D3 = F2(y5, n12, o16);
117367
- x4 += D3, b5 += D3;
117481
+ var D4 = F2(y5, n12, o16);
117482
+ x4 += D4, b5 += D4;
117368
117483
  break;
117369
117484
  }
117370
117485
  case 1:
@@ -119248,14 +119363,31 @@ var AiWidgetsTraining = class extends LitElementWw {
119248
119363
  async buildModel() {
119249
119364
  this.hideError();
119250
119365
  let design = this.modelSelect.getRefElement();
119251
- if (design.currentCanvas.controler.getNumberOfParameters() > design.maxModelParameters) {
119252
- this.showError("The Neural Network is to large. Reduce the overall number of parameters.");
119366
+ let featureWidget = this.featureSelect.getRefElement();
119367
+ let dataset = featureWidget?.getDataset()?.tensorDataset;
119368
+ if (dataset == null) {
119369
+ this.showError("The feature data is not ready yet. Please wait a moment and try again.");
119370
+ return null;
119371
+ }
119372
+ let model2 = null;
119373
+ try {
119374
+ model2 = design.getModel();
119375
+ } catch (e13) {
119376
+ console.warn("Live model export failed, using saved state.", e13);
119377
+ }
119378
+ let missingSelection = !model2 || model2.length == 0 || model2.some((l8) => (l8.type == "input" || l8.type == "output") && (l8.select == null || l8.select == ""));
119379
+ if (missingSelection && design.state)
119380
+ model2 = JSON.parse(design.state);
119381
+ if (model2 == null || model2.length == 0) {
119382
+ this.showError("No model design available.");
119253
119383
  return null;
119254
119384
  }
119255
- let model2 = design.getModel();
119256
- let dataset = this.featureSelect.getRefElement().getDataset().tensorDataset;
119257
119385
  let editor = new Editor14(document.createElement("div"), "read", design.maxModelParameters, design.maxLayerParameters);
119258
119386
  await editor.import(model2, dataset);
119387
+ if (editor.getNumberOfParameters() > design.maxModelParameters) {
119388
+ this.showError("The Neural Network is to large. Reduce the overall number of parameters.");
119389
+ return null;
119390
+ }
119259
119391
  for (let layer of model2) {
119260
119392
  if (!layer.valid) {
119261
119393
  this.showError("A layer has an Invalid configuration.");
@@ -119376,22 +119508,28 @@ var AiWidgetsTraining = class extends LitElementWw {
119376
119508
  this.hideError();
119377
119509
  if (this.currentTraining)
119378
119510
  this.currentTraining.dispose();
119379
- await tf15.setBackend(this.currentBackend);
119380
- await tf15.ready();
119381
- let { model: model2, losses: losses2 } = await this.buildModel();
119382
- if (model2 == null || losses2 == null)
119383
- return;
119384
- this.setHyperParamsActive(false);
119385
- this.currentTraining = model2;
119386
- let optimizer = this.shadowRoot.getElementById("optimizer").value;
119387
- let lr = parseFloat(this.lr.value);
119388
- let momentum = parseFloat(this.momentum.value);
119389
- model2.compile({
119390
- optimizer: optimizer != "momentum" ? tf15.train[optimizer](lr) : tf15.train["momentum"](lr, momentum),
119391
- loss: losses2,
119392
- metrics: ["accuracy", tf15.metrics.r2Score, tf15.metrics.precision, tf15.metrics.recall]
119393
- });
119394
- model2.summary();
119511
+ try {
119512
+ await tf15.setBackend(this.currentBackend);
119513
+ await tf15.ready();
119514
+ let built = await this.buildModel();
119515
+ if (built == null || built.model == null || built.losses == null)
119516
+ return;
119517
+ let { model: model2, losses: losses2 } = built;
119518
+ this.setHyperParamsActive(false);
119519
+ this.currentTraining = model2;
119520
+ let optimizer = this.shadowRoot.getElementById("optimizer").value;
119521
+ let lr = parseFloat(this.lr.value);
119522
+ let momentum = parseFloat(this.momentum.value);
119523
+ model2.compile({
119524
+ optimizer: optimizer != "momentum" ? tf15.train[optimizer](lr) : tf15.train["momentum"](lr, momentum),
119525
+ loss: losses2,
119526
+ metrics: ["accuracy", tf15.metrics.r2Score, tf15.metrics.precision, tf15.metrics.recall]
119527
+ });
119528
+ model2.summary();
119529
+ } catch (e13) {
119530
+ console.error(e13);
119531
+ this.showError("Could not build the model. Please check the model design and feature data.");
119532
+ }
119395
119533
  }
119396
119534
  /**
119397
119535
  * Runs the tf training loop and keeps the UI up-to-date
@@ -119407,6 +119545,8 @@ var AiWidgetsTraining = class extends LitElementWw {
119407
119545
  if (this.currentTraining == null) {
119408
119546
  await this.initModel();
119409
119547
  }
119548
+ if (this.currentTraining == null)
119549
+ return;
119410
119550
  this.trainingMetricsDiv.style.display = "";
119411
119551
  this.startTrainingBtn.innerText = msg("Stop Training");
119412
119552
  if (this.currentTraining != null && !this.isTraining) {
@@ -121264,86 +121404,27 @@ lit-html/directives/style-map.js:
121264
121404
  *)
121265
121405
 
121266
121406
  @lit/reactive-element/reactive-element.js:
121267
- (**
121268
- * @license
121269
- * Copyright 2017 Google LLC
121270
- * SPDX-License-Identifier: BSD-3-Clause
121271
- *)
121272
-
121273
121407
  lit-html/lit-html.js:
121274
- (**
121275
- * @license
121276
- * Copyright 2017 Google LLC
121277
- * SPDX-License-Identifier: BSD-3-Clause
121278
- *)
121279
-
121280
121408
  lit-element/lit-element.js:
121281
- (**
121282
- * @license
121283
- * Copyright 2017 Google LLC
121284
- * SPDX-License-Identifier: BSD-3-Clause
121285
- *)
121286
-
121287
- lit-html/is-server.js:
121288
- (**
121289
- * @license
121290
- * Copyright 2022 Google LLC
121291
- * SPDX-License-Identifier: BSD-3-Clause
121292
- *)
121293
-
121294
121409
  @lit/reactive-element/decorators/custom-element.js:
121295
- (**
121296
- * @license
121297
- * Copyright 2017 Google LLC
121298
- * SPDX-License-Identifier: BSD-3-Clause
121299
- *)
121300
-
121301
121410
  @lit/reactive-element/decorators/property.js:
121302
- (**
121303
- * @license
121304
- * Copyright 2017 Google LLC
121305
- * SPDX-License-Identifier: BSD-3-Clause
121306
- *)
121307
-
121308
121411
  @lit/reactive-element/decorators/state.js:
121309
- (**
121310
- * @license
121311
- * Copyright 2017 Google LLC
121312
- * SPDX-License-Identifier: BSD-3-Clause
121313
- *)
121314
-
121315
121412
  @lit/reactive-element/decorators/event-options.js:
121316
- (**
121317
- * @license
121318
- * Copyright 2017 Google LLC
121319
- * SPDX-License-Identifier: BSD-3-Clause
121320
- *)
121321
-
121322
121413
  @lit/reactive-element/decorators/base.js:
121323
- (**
121324
- * @license
121325
- * Copyright 2017 Google LLC
121326
- * SPDX-License-Identifier: BSD-3-Clause
121327
- *)
121328
-
121329
121414
  @lit/reactive-element/decorators/query.js:
121330
- (**
121331
- * @license
121332
- * Copyright 2017 Google LLC
121333
- * SPDX-License-Identifier: BSD-3-Clause
121334
- *)
121335
-
121336
121415
  @lit/reactive-element/decorators/query-all.js:
121416
+ @lit/reactive-element/decorators/query-async.js:
121417
+ @lit/reactive-element/decorators/query-assigned-nodes.js:
121337
121418
  (**
121338
121419
  * @license
121339
121420
  * Copyright 2017 Google LLC
121340
121421
  * SPDX-License-Identifier: BSD-3-Clause
121341
121422
  *)
121342
121423
 
121343
- @lit/reactive-element/decorators/query-async.js:
121424
+ lit-html/is-server.js:
121344
121425
  (**
121345
121426
  * @license
121346
- * Copyright 2017 Google LLC
121427
+ * Copyright 2022 Google LLC
121347
121428
  * SPDX-License-Identifier: BSD-3-Clause
121348
121429
  *)
121349
121430
 
@@ -121353,13 +121434,6 @@ lit-html/directives/style-map.js:
121353
121434
  * Copyright 2021 Google LLC
121354
121435
  * SPDX-License-Identifier: BSD-3-Clause
121355
121436
  *)
121356
-
121357
- @lit/reactive-element/decorators/query-assigned-nodes.js:
121358
- (**
121359
- * @license
121360
- * Copyright 2017 Google LLC
121361
- * SPDX-License-Identifier: BSD-3-Clause
121362
- *)
121363
121437
  *)
121364
121438
 
121365
121439
  apexcharts/dist/apexcharts.esm.js: