@magicfeedback/popup-sdk 1.8.5 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -0
- package/dist/assets/assets/style.css +416 -61
- package/dist/{chunk-AV2TTQXB.mjs → chunk-GXEPYT33.mjs} +417 -62
- package/dist/chunk-GXEPYT33.mjs.map +1 -0
- package/dist/{chunk-EBJZDVC6.mjs → chunk-TSORXOQG.mjs} +417 -62
- package/dist/chunk-TSORXOQG.mjs.map +1 -0
- package/dist/index.d.mts +42 -1
- package/dist/index.d.ts +42 -1
- package/dist/index.js +1672 -946
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +56 -9
- package/dist/index.mjs.map +1 -1
- package/dist/react-native.d.mts +35 -0
- package/dist/react-native.d.ts +35 -0
- package/dist/react-native.js +475 -69
- package/dist/react-native.js.map +1 -1
- package/dist/react-native.mjs +56 -9
- package/dist/react-native.mjs.map +1 -1
- package/dist/{renderPopup-3CZ6WTXF.mjs → renderPopup-424HR5LF.mjs} +1211 -887
- package/dist/renderPopup-424HR5LF.mjs.map +1 -0
- package/dist/{renderPopup-E2OLIXIQ.mjs → renderPopup-WLOFOCDR.mjs} +9 -5
- package/dist/renderPopup-WLOFOCDR.mjs.map +1 -0
- package/package.json +5 -3
- package/dist/chunk-AV2TTQXB.mjs.map +0 -1
- package/dist/chunk-EBJZDVC6.mjs.map +0 -1
- package/dist/renderPopup-3CZ6WTXF.mjs.map +0 -1
- package/dist/renderPopup-E2OLIXIQ.mjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -572,7 +572,7 @@ var init_style = __esm({
|
|
|
572
572
|
style_default = `/**
|
|
573
573
|
* NO EDITAR A MANO \u2014 generado por scripts/vendor-survey-css.mjs
|
|
574
574
|
*
|
|
575
|
-
* Copia de @magicfeedback/native@2.2.
|
|
575
|
+
* Copia de @magicfeedback/native@2.2.31 \u2192 dist/styles/magicfeedback-default.css
|
|
576
576
|
* (la hoja can\xF3nica del paquete, la que apunta su campo "style"), con estos cambios locales:
|
|
577
577
|
*
|
|
578
578
|
* 1. Sin el @import de Google Fonts (Nunito): no queremos una petici\xF3n externa desde la
|
|
@@ -583,7 +583,9 @@ var init_style = __esm({
|
|
|
583
583
|
* repintar\xEDa su web.
|
|
584
584
|
* 4. El grupo .magicfeedback-radio se cualifica como div.magicfeedback-radio (la clase acaba
|
|
585
585
|
* tambi\xE9n en el <input> del boolean).
|
|
586
|
-
* 5.
|
|
586
|
+
* 5. Todo :hover va dentro de @media (hover: hover): en t\xE1ctil WebKit deja el hover pegado
|
|
587
|
+
* en el \xFAltimo punto tocado y la opci\xF3n de la p\xE1gina siguiente parec\xEDa seleccionada.
|
|
588
|
+
* 6. Al final, un bloque de reglas propias del popup (fuente en los controles y padding del
|
|
587
589
|
* radio nativo).
|
|
588
590
|
*
|
|
589
591
|
* Las variables --mf-* se dejan en :root a prop\xF3sito: el modal del priority-list se portea a
|
|
@@ -821,9 +823,11 @@ var init_style = __esm({
|
|
|
821
823
|
text-underline-offset: 2px;
|
|
822
824
|
}
|
|
823
825
|
|
|
824
|
-
|
|
825
|
-
.magicfeedback-
|
|
826
|
-
|
|
826
|
+
@media (hover: hover) {
|
|
827
|
+
.magicfeedback-info-message a:hover,
|
|
828
|
+
.magicfeedback-start-message a:hover {
|
|
829
|
+
color: var(--mf-primary-hover);
|
|
830
|
+
}
|
|
827
831
|
}
|
|
828
832
|
|
|
829
833
|
.magicfeedback-info-message ul,
|
|
@@ -1049,10 +1053,12 @@ div.magicfeedback-radio {
|
|
|
1049
1053
|
transition: var(--mf-transition-fast);
|
|
1050
1054
|
}
|
|
1051
1055
|
|
|
1052
|
-
|
|
1053
|
-
.magicfeedback-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
+
@media (hover: hover) {
|
|
1057
|
+
.magicfeedback-checkbox-container:hover,
|
|
1058
|
+
.magicfeedback-radio-container:hover {
|
|
1059
|
+
background-color: var(--mf-bg-hover);
|
|
1060
|
+
border-color: var(--mf-primary);
|
|
1061
|
+
}
|
|
1056
1062
|
}
|
|
1057
1063
|
|
|
1058
1064
|
.magicfeedback-checkbox-container:has(input:checked),
|
|
@@ -1119,9 +1125,11 @@ div.magicfeedback-radio {
|
|
|
1119
1125
|
height: inherit;
|
|
1120
1126
|
}
|
|
1121
1127
|
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1128
|
+
@media (hover: hover) {
|
|
1129
|
+
.magicfeedback-boolean-option label:hover {
|
|
1130
|
+
background-color: var(--mf-bg-hover);
|
|
1131
|
+
border-color: var(--mf-primary);
|
|
1132
|
+
}
|
|
1125
1133
|
}
|
|
1126
1134
|
|
|
1127
1135
|
.magicfeedback-boolean-option input[type="radio"]:checked + label {
|
|
@@ -1192,9 +1200,11 @@ div.magicfeedback-radio {
|
|
|
1192
1200
|
border: 2px solid transparent;
|
|
1193
1201
|
}
|
|
1194
1202
|
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1203
|
+
@media (hover: hover) {
|
|
1204
|
+
.magicfeedback-rating-option-label-container img:hover {
|
|
1205
|
+
transform: scale(1.1);
|
|
1206
|
+
border-color: var(--mf-primary);
|
|
1207
|
+
}
|
|
1198
1208
|
}
|
|
1199
1209
|
|
|
1200
1210
|
.magicfeedback-rating-option-label-container input[type="radio"]:checked + img {
|
|
@@ -1346,9 +1356,11 @@ div.magicfeedback-radio {
|
|
|
1346
1356
|
font-size: 0.8rem;
|
|
1347
1357
|
}
|
|
1348
1358
|
|
|
1349
|
-
|
|
1350
|
-
.magicfeedback-rating-number-option-row
|
|
1351
|
-
|
|
1359
|
+
@media (hover: hover) {
|
|
1360
|
+
.magicfeedback-rating-number-option-row .magicfeedback-rating-number-option-label-container:hover .magicfeedback-rating-number-value,
|
|
1361
|
+
.magicfeedback-rating-number-option-row-reverse .magicfeedback-rating-number-option-label-container:hover .magicfeedback-rating-number-value {
|
|
1362
|
+
background: var(--mf-primary-light);
|
|
1363
|
+
}
|
|
1352
1364
|
}
|
|
1353
1365
|
|
|
1354
1366
|
.magicfeedback-rating-number-option-row .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value,
|
|
@@ -1385,8 +1397,10 @@ div.magicfeedback-radio {
|
|
|
1385
1397
|
font-size: var(--mf-font-size-sm);
|
|
1386
1398
|
}
|
|
1387
1399
|
|
|
1388
|
-
|
|
1389
|
-
|
|
1400
|
+
@media (hover: hover) {
|
|
1401
|
+
.magicfeedback-rating-number-option--extra .magicfeedback-rating-number-option-label-container:hover .magicfeedback-rating-number-value {
|
|
1402
|
+
background: var(--mf-primary-light);
|
|
1403
|
+
}
|
|
1390
1404
|
}
|
|
1391
1405
|
|
|
1392
1406
|
.magicfeedback-rating-number-option--extra .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value {
|
|
@@ -1419,9 +1433,11 @@ div.magicfeedback-radio {
|
|
|
1419
1433
|
color: var(--mf-primary);
|
|
1420
1434
|
}
|
|
1421
1435
|
|
|
1422
|
-
|
|
1423
|
-
.magicfeedback-rating-number-option-column
|
|
1424
|
-
|
|
1436
|
+
@media (hover: hover) {
|
|
1437
|
+
.magicfeedback-rating-number-option-column .magicfeedback-rating-number-option-label-container:hover .magicfeedback-rating-number-value,
|
|
1438
|
+
.magicfeedback-rating-number-option-column-reverse .magicfeedback-rating-number-option-label-container:hover .magicfeedback-rating-number-value {
|
|
1439
|
+
background: var(--mf-primary-light);
|
|
1440
|
+
}
|
|
1425
1441
|
}
|
|
1426
1442
|
|
|
1427
1443
|
.magicfeedback-rating-number-option-column .magicfeedback-rating-number-option-label-container input[type="radio"]:checked + .magicfeedback-rating-number-value,
|
|
@@ -1475,10 +1491,12 @@ div.magicfeedback-radio {
|
|
|
1475
1491
|
transition: var(--mf-transition-fast);
|
|
1476
1492
|
}
|
|
1477
1493
|
|
|
1478
|
-
|
|
1479
|
-
.magicfeedback-rating-star-option:not(:checked) > .rating__star:hover
|
|
1480
|
-
|
|
1481
|
-
|
|
1494
|
+
@media (hover: hover) {
|
|
1495
|
+
.magicfeedback-rating-star-option:not(:checked) > .rating__star:hover,
|
|
1496
|
+
.magicfeedback-rating-star-option:not(:checked) > .rating__star:hover ~ span {
|
|
1497
|
+
color: #fbbf24;
|
|
1498
|
+
transform: scale(1.1);
|
|
1499
|
+
}
|
|
1482
1500
|
}
|
|
1483
1501
|
|
|
1484
1502
|
.magicfeedback-rating-star-selected {
|
|
@@ -1519,9 +1537,11 @@ div.magicfeedback-radio {
|
|
|
1519
1537
|
transition: var(--mf-transition-fast);
|
|
1520
1538
|
}
|
|
1521
1539
|
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1540
|
+
@media (hover: hover) {
|
|
1541
|
+
.magicfeedback-image-option-label-container:hover img {
|
|
1542
|
+
border-color: var(--mf-primary);
|
|
1543
|
+
box-shadow: var(--mf-shadow-md);
|
|
1544
|
+
}
|
|
1525
1545
|
}
|
|
1526
1546
|
|
|
1527
1547
|
.magicfeedback-image-option-label-container input:checked + img {
|
|
@@ -1536,6 +1556,9 @@ div.magicfeedback-radio {
|
|
|
1536
1556
|
width: 100%;
|
|
1537
1557
|
overflow-x: auto;
|
|
1538
1558
|
border-radius: var(--mf-radius-md);
|
|
1559
|
+
/* the layout follows the space the survey gets (a pop-in, a sidebar),
|
|
1560
|
+
not the size of the window */
|
|
1561
|
+
container-type: inline-size;
|
|
1539
1562
|
}
|
|
1540
1563
|
|
|
1541
1564
|
.magicfeedback-multi-question-matrix-table {
|
|
@@ -1562,9 +1585,11 @@ div.magicfeedback-radio {
|
|
|
1562
1585
|
background-color: var(--mf-bg-secondary);
|
|
1563
1586
|
}
|
|
1564
1587
|
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1588
|
+
@media (hover: hover) {
|
|
1589
|
+
.magicfeedback-multi-question-matrix-row-tr:hover {
|
|
1590
|
+
background-color: var(--mf-bg-hover);
|
|
1591
|
+
box-shadow: var(--mf-shadow-sm);
|
|
1592
|
+
}
|
|
1568
1593
|
}
|
|
1569
1594
|
|
|
1570
1595
|
.magicfeedback-multi-question-matrix-table td {
|
|
@@ -1585,6 +1610,296 @@ div.magicfeedback-radio {
|
|
|
1585
1610
|
accent-color: var(--mf-primary);
|
|
1586
1611
|
}
|
|
1587
1612
|
|
|
1613
|
+
.magicfeedback-multi-question-matrix-question {
|
|
1614
|
+
min-width: 200px;
|
|
1615
|
+
padding: 10px;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
/* the column header names the option in a table; the per-cell label is for
|
|
1619
|
+
screen readers until the rows stack */
|
|
1620
|
+
.magicfeedback-multi-question-matrix-option-label {
|
|
1621
|
+
position: absolute;
|
|
1622
|
+
width: 1px;
|
|
1623
|
+
height: 1px;
|
|
1624
|
+
overflow: hidden;
|
|
1625
|
+
clip: rect(0, 0, 0, 0);
|
|
1626
|
+
white-space: nowrap;
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
/* narrow container: every row becomes its own question with the options
|
|
1630
|
+
stacked underneath, instead of a table cut off at the side */
|
|
1631
|
+
@container (max-width: 599px) {
|
|
1632
|
+
.magicfeedback-multi-question-matrix-table,
|
|
1633
|
+
.magicfeedback-multi-question-matrix-table tbody,
|
|
1634
|
+
.magicfeedback-multi-question-matrix-table tr,
|
|
1635
|
+
.magicfeedback-multi-question-matrix-table td {
|
|
1636
|
+
display: block;
|
|
1637
|
+
width: 100%;
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
.magicfeedback-multi-question-matrix-table thead {
|
|
1641
|
+
display: none;
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
.magicfeedback-multi-question-matrix-row-tr,
|
|
1645
|
+
.magicfeedback-multi-question-matrix-row-tr:nth-child(even) {
|
|
1646
|
+
margin-bottom: var(--mf-space-lg);
|
|
1647
|
+
background: transparent;
|
|
1648
|
+
box-shadow: none;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
@media (hover: hover) {
|
|
1652
|
+
.magicfeedback-multi-question-matrix-row-tr:hover {
|
|
1653
|
+
margin-bottom: var(--mf-space-lg);
|
|
1654
|
+
background: transparent;
|
|
1655
|
+
box-shadow: none;
|
|
1656
|
+
}
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
.magicfeedback-multi-question-matrix-table td.magicfeedback-multi-question-matrix-question {
|
|
1660
|
+
min-width: 0;
|
|
1661
|
+
padding: 0 0 var(--mf-space-sm);
|
|
1662
|
+
text-align: start;
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
.magicfeedback-multi-question-matrix-question .magicfeedback-multi-question-matrix-label {
|
|
1666
|
+
font-weight: 600;
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
.magicfeedback-multi-question-matrix-table td.magicfeedback-multi-question-matrix-option {
|
|
1670
|
+
display: flex;
|
|
1671
|
+
align-items: center;
|
|
1672
|
+
gap: var(--mf-space-sm);
|
|
1673
|
+
margin-bottom: var(--mf-space-sm);
|
|
1674
|
+
padding: 0 var(--mf-space-md);
|
|
1675
|
+
text-align: start;
|
|
1676
|
+
background: var(--mf-bg-secondary);
|
|
1677
|
+
border: 2px solid var(--mf-border);
|
|
1678
|
+
border-radius: var(--mf-radius-md);
|
|
1679
|
+
cursor: pointer;
|
|
1680
|
+
transition: var(--mf-transition-fast);
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
@media (hover: hover) {
|
|
1684
|
+
.magicfeedback-multi-question-matrix-option:hover {
|
|
1685
|
+
border-color: var(--mf-primary-border);
|
|
1686
|
+
}
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
.magicfeedback-multi-question-matrix-option:has(input:checked) {
|
|
1690
|
+
border-color: var(--mf-primary);
|
|
1691
|
+
background: var(--mf-primary-light);
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
.magicfeedback-multi-question-matrix-table .magicfeedback-multi-question-matrix-option input[type="radio"] {
|
|
1695
|
+
flex-shrink: 0;
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
/* the whole card is the click target */
|
|
1699
|
+
.magicfeedback-multi-question-matrix-option-label {
|
|
1700
|
+
position: static;
|
|
1701
|
+
flex: 1;
|
|
1702
|
+
width: auto;
|
|
1703
|
+
height: auto;
|
|
1704
|
+
padding: var(--mf-space-md) 0;
|
|
1705
|
+
overflow: visible;
|
|
1706
|
+
clip: auto;
|
|
1707
|
+
white-space: normal;
|
|
1708
|
+
font-size: var(--mf-font-size-base);
|
|
1709
|
+
color: var(--mf-text-primary);
|
|
1710
|
+
cursor: pointer;
|
|
1711
|
+
}
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
/* ========================================
|
|
1715
|
+
MAXDIFF (BEST\u2013WORST)
|
|
1716
|
+
======================================== */
|
|
1717
|
+
.magicfeedback-max-diff {
|
|
1718
|
+
/* "least" gets its own hue, apart from the brand color "most" uses; dark
|
|
1719
|
+
enough to read as header text and to hold the white center dot */
|
|
1720
|
+
--mf-max-diff-worst: #b45309;
|
|
1721
|
+
width: 100%;
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
.magicfeedback-max-diff-container {
|
|
1725
|
+
width: 100%;
|
|
1726
|
+
/* the layout follows the space the survey gets (a pop-in, a sidebar),
|
|
1727
|
+
not the size of the window */
|
|
1728
|
+
container-type: inline-size;
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
.magicfeedback-max-diff-progress {
|
|
1732
|
+
display: flex;
|
|
1733
|
+
align-items: center;
|
|
1734
|
+
gap: var(--mf-space-md);
|
|
1735
|
+
margin-bottom: var(--mf-space-lg);
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
.magicfeedback-max-diff-progress-label {
|
|
1739
|
+
font-size: 0.8125rem;
|
|
1740
|
+
font-weight: var(--mf-font-weight-bold);
|
|
1741
|
+
letter-spacing: 0.04em;
|
|
1742
|
+
text-transform: uppercase;
|
|
1743
|
+
white-space: nowrap;
|
|
1744
|
+
color: var(--mf-text-secondary);
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
.magicfeedback-max-diff-progress-track {
|
|
1748
|
+
flex: 1;
|
|
1749
|
+
height: 6px;
|
|
1750
|
+
overflow: hidden;
|
|
1751
|
+
border-radius: var(--mf-radius-full);
|
|
1752
|
+
background: var(--mf-border);
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
.magicfeedback-max-diff-progress-fill {
|
|
1756
|
+
display: block;
|
|
1757
|
+
height: 100%;
|
|
1758
|
+
border-radius: var(--mf-radius-full);
|
|
1759
|
+
background: var(--mf-primary);
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
.magicfeedback-max-diff-table {
|
|
1763
|
+
width: 100%;
|
|
1764
|
+
border-collapse: collapse;
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
.magicfeedback-max-diff-head,
|
|
1768
|
+
.magicfeedback-max-diff-head-spacer {
|
|
1769
|
+
border-bottom: 1px solid var(--mf-border);
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
.magicfeedback-max-diff-head {
|
|
1773
|
+
width: 11rem;
|
|
1774
|
+
padding: 0 var(--mf-space-sm) var(--mf-space-sm);
|
|
1775
|
+
font-size: 0.8125rem;
|
|
1776
|
+
font-weight: var(--mf-font-weight-extrabold);
|
|
1777
|
+
letter-spacing: 0.04em;
|
|
1778
|
+
text-transform: uppercase;
|
|
1779
|
+
text-align: center;
|
|
1780
|
+
vertical-align: bottom;
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
.magicfeedback-max-diff-head-best {
|
|
1784
|
+
color: var(--mf-primary);
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
.magicfeedback-max-diff-head-worst {
|
|
1788
|
+
color: var(--mf-max-diff-worst);
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
.magicfeedback-max-diff-head-label {
|
|
1792
|
+
display: inline-flex;
|
|
1793
|
+
align-items: center;
|
|
1794
|
+
gap: 6px;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
.magicfeedback-max-diff-row {
|
|
1798
|
+
transition: background-color 0.15s ease;
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
.magicfeedback-max-diff-row > * {
|
|
1802
|
+
border-bottom: 1px solid var(--mf-border);
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
.magicfeedback-max-diff-row:has(.magicfeedback-max-diff-best:checked) {
|
|
1806
|
+
background-color: color-mix(in srgb, var(--mf-primary) 8%, transparent);
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
.magicfeedback-max-diff-row:has(.magicfeedback-max-diff-worst:checked) {
|
|
1810
|
+
background-color: color-mix(in srgb, var(--mf-max-diff-worst) 8%, transparent);
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
.magicfeedback-max-diff-item {
|
|
1814
|
+
padding: var(--mf-space-md) var(--mf-space-sm);
|
|
1815
|
+
font-size: 1.0625rem;
|
|
1816
|
+
font-weight: var(--mf-font-weight-semibold);
|
|
1817
|
+
line-height: 1.4;
|
|
1818
|
+
text-align: center;
|
|
1819
|
+
color: var(--mf-text-primary);
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
.magicfeedback-max-diff-row:has(input:checked) .magicfeedback-max-diff-item {
|
|
1823
|
+
font-weight: var(--mf-font-weight-extrabold);
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
.magicfeedback-max-diff-cell {
|
|
1827
|
+
padding: 0;
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
/* the whole cell is the click target */
|
|
1831
|
+
.magicfeedback-max-diff-pick {
|
|
1832
|
+
display: flex;
|
|
1833
|
+
align-items: center;
|
|
1834
|
+
justify-content: center;
|
|
1835
|
+
min-height: 64px;
|
|
1836
|
+
cursor: pointer;
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
.magicfeedback-max-diff-input {
|
|
1840
|
+
appearance: none;
|
|
1841
|
+
-webkit-appearance: none;
|
|
1842
|
+
flex-shrink: 0;
|
|
1843
|
+
width: 26px;
|
|
1844
|
+
height: 26px;
|
|
1845
|
+
margin: 0;
|
|
1846
|
+
border: 2px solid color-mix(in srgb, var(--mf-text-secondary) 80%, white);
|
|
1847
|
+
border-radius: var(--mf-radius-full);
|
|
1848
|
+
background: var(--mf-bg-secondary);
|
|
1849
|
+
cursor: pointer;
|
|
1850
|
+
transition: var(--mf-transition-fast);
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
@media (hover: hover) {
|
|
1854
|
+
.magicfeedback-max-diff-pick:hover .magicfeedback-max-diff-input {
|
|
1855
|
+
transform: scale(1.08);
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
|
|
1859
|
+
.magicfeedback-max-diff-best:checked {
|
|
1860
|
+
border-color: var(--mf-primary);
|
|
1861
|
+
background: radial-gradient(circle, #FFFFFF 0 4px, var(--mf-primary) 4.5px);
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
.magicfeedback-max-diff-worst:checked {
|
|
1865
|
+
border-color: var(--mf-max-diff-worst);
|
|
1866
|
+
background: radial-gradient(circle, #FFFFFF 0 4px, var(--mf-max-diff-worst) 4.5px);
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
.magicfeedback-max-diff-input:focus-visible {
|
|
1870
|
+
outline: 3px solid var(--mf-primary-border);
|
|
1871
|
+
outline-offset: 3px;
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
/* narrow container: same table, slimmer pick columns and the header icon
|
|
1875
|
+
stacked over its label */
|
|
1876
|
+
@container (max-width: 599px) {
|
|
1877
|
+
.magicfeedback-max-diff-head {
|
|
1878
|
+
width: 4.75rem;
|
|
1879
|
+
padding-inline: 2px;
|
|
1880
|
+
font-size: 0.6875rem;
|
|
1881
|
+
}
|
|
1882
|
+
|
|
1883
|
+
.magicfeedback-max-diff-head-label {
|
|
1884
|
+
flex-direction: column;
|
|
1885
|
+
gap: 2px;
|
|
1886
|
+
}
|
|
1887
|
+
|
|
1888
|
+
.magicfeedback-max-diff-item {
|
|
1889
|
+
padding-inline: 4px;
|
|
1890
|
+
font-size: var(--mf-font-size-base);
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
.magicfeedback-max-diff-pick {
|
|
1894
|
+
min-height: 68px;
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
.magicfeedback-max-diff-input {
|
|
1898
|
+
width: 28px;
|
|
1899
|
+
height: 28px;
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1588
1903
|
/* ========================================
|
|
1589
1904
|
PRIORITY LIST
|
|
1590
1905
|
======================================== */
|
|
@@ -1600,9 +1915,11 @@ div.magicfeedback-radio {
|
|
|
1600
1915
|
transition: var(--mf-transition-fast);
|
|
1601
1916
|
}
|
|
1602
1917
|
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1918
|
+
@media (hover: hover) {
|
|
1919
|
+
.magicfeedback-priority-list-item:hover {
|
|
1920
|
+
box-shadow: var(--mf-shadow-sm);
|
|
1921
|
+
border-color: var(--mf-primary);
|
|
1922
|
+
}
|
|
1606
1923
|
}
|
|
1607
1924
|
|
|
1608
1925
|
.magicfeedback-priority-list-item-label {
|
|
@@ -1623,10 +1940,12 @@ div.magicfeedback-radio {
|
|
|
1623
1940
|
user-select: none;
|
|
1624
1941
|
}
|
|
1625
1942
|
|
|
1626
|
-
|
|
1627
|
-
.magicfeedback-priority-list-arrow-
|
|
1628
|
-
|
|
1629
|
-
|
|
1943
|
+
@media (hover: hover) {
|
|
1944
|
+
.magicfeedback-priority-list-arrow-up:hover,
|
|
1945
|
+
.magicfeedback-priority-list-arrow-down:hover {
|
|
1946
|
+
color: var(--mf-primary);
|
|
1947
|
+
transform: scale(1.2);
|
|
1948
|
+
}
|
|
1630
1949
|
}
|
|
1631
1950
|
|
|
1632
1951
|
/* ========================================
|
|
@@ -1733,10 +2052,12 @@ div.magicfeedback-radio {
|
|
|
1733
2052
|
box-shadow: var(--mf-shadow-md);
|
|
1734
2053
|
}
|
|
1735
2054
|
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
2055
|
+
@media (hover: hover) {
|
|
2056
|
+
.magicfeedback-submit:hover {
|
|
2057
|
+
background-color: var(--mf-primary-hover);
|
|
2058
|
+
box-shadow: var(--mf-shadow-lg);
|
|
2059
|
+
transform: translateY(-2px);
|
|
2060
|
+
}
|
|
1740
2061
|
}
|
|
1741
2062
|
|
|
1742
2063
|
.magicfeedback-submit:active {
|
|
@@ -1762,9 +2083,20 @@ div.magicfeedback-radio {
|
|
|
1762
2083
|
transition: var(--mf-transition-fast);
|
|
1763
2084
|
}
|
|
1764
2085
|
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
2086
|
+
@media (hover: hover) {
|
|
2087
|
+
.magicfeedback-back:hover {
|
|
2088
|
+
border-color: var(--mf-primary);
|
|
2089
|
+
background-color: var(--mf-bg-hover);
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
|
|
2093
|
+
/* hidden on the first page; keep the submit button on the right */
|
|
2094
|
+
.magicfeedback-back[hidden] {
|
|
2095
|
+
display: none;
|
|
2096
|
+
}
|
|
2097
|
+
|
|
2098
|
+
.magicfeedback-action-container .magicfeedback-submit {
|
|
2099
|
+
margin-left: auto;
|
|
1768
2100
|
}
|
|
1769
2101
|
|
|
1770
2102
|
/* ========================================
|
|
@@ -1784,8 +2116,10 @@ div.magicfeedback-radio {
|
|
|
1784
2116
|
transition: var(--mf-transition-fast);
|
|
1785
2117
|
}
|
|
1786
2118
|
|
|
1787
|
-
|
|
1788
|
-
|
|
2119
|
+
@media (hover: hover) {
|
|
2120
|
+
.magicfeedback-skip-container:hover {
|
|
2121
|
+
color: var(--mf-primary);
|
|
2122
|
+
}
|
|
1789
2123
|
}
|
|
1790
2124
|
|
|
1791
2125
|
.magicfeedback-skip-container input[type="checkbox"] {
|
|
@@ -1926,9 +2260,11 @@ div.magicfeedback-radio {
|
|
|
1926
2260
|
box-shadow: var(--mf-shadow-sm);
|
|
1927
2261
|
}
|
|
1928
2262
|
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
2263
|
+
@media (hover: hover) {
|
|
2264
|
+
.magicfeedback-button:hover {
|
|
2265
|
+
background: var(--mf-bg-hover);
|
|
2266
|
+
border-color: var(--mf-primary);
|
|
2267
|
+
}
|
|
1932
2268
|
}
|
|
1933
2269
|
|
|
1934
2270
|
.magicfeedback-button:active {
|
|
@@ -1942,8 +2278,10 @@ div.magicfeedback-radio {
|
|
|
1942
2278
|
box-shadow: var(--mf-shadow-md);
|
|
1943
2279
|
}
|
|
1944
2280
|
|
|
1945
|
-
|
|
1946
|
-
|
|
2281
|
+
@media (hover: hover) {
|
|
2282
|
+
.magicfeedback-button-primary:hover {
|
|
2283
|
+
background: var(--mf-primary-hover);
|
|
2284
|
+
}
|
|
1947
2285
|
}
|
|
1948
2286
|
|
|
1949
2287
|
.magicfeedback-button-primary:active {
|
|
@@ -1969,8 +2307,10 @@ div.magicfeedback-radio {
|
|
|
1969
2307
|
box-shadow: var(--mf-shadow-md);
|
|
1970
2308
|
}
|
|
1971
2309
|
|
|
1972
|
-
|
|
1973
|
-
|
|
2310
|
+
@media (hover: hover) {
|
|
2311
|
+
.magicfeedback-start-message-button:hover {
|
|
2312
|
+
background: var(--mf-primary-hover);
|
|
2313
|
+
}
|
|
1974
2314
|
}
|
|
1975
2315
|
|
|
1976
2316
|
/* ========================================
|
|
@@ -2106,12 +2446,18 @@ div.magicfeedback-radio {
|
|
|
2106
2446
|
color: #666;
|
|
2107
2447
|
}
|
|
2108
2448
|
|
|
2109
|
-
.magicfeedback-modal-close:hover,
|
|
2110
2449
|
.magicfeedback-modal-close:focus {
|
|
2111
2450
|
color: #000;
|
|
2112
2451
|
outline: none;
|
|
2113
2452
|
}
|
|
2114
2453
|
|
|
2454
|
+
@media (hover: hover) {
|
|
2455
|
+
.magicfeedback-modal-close:hover {
|
|
2456
|
+
color: #000;
|
|
2457
|
+
outline: none;
|
|
2458
|
+
}
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2115
2461
|
/* ========================================
|
|
2116
2462
|
FILE / IMAGE UPLOAD
|
|
2117
2463
|
======================================== */
|
|
@@ -2155,9 +2501,11 @@ div.magicfeedback-radio {
|
|
|
2155
2501
|
transition: var(--mf-transition);
|
|
2156
2502
|
}
|
|
2157
2503
|
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2504
|
+
@media (hover: hover) {
|
|
2505
|
+
.magicfeedback-upload-dropzone:hover {
|
|
2506
|
+
border-color: var(--mf-primary);
|
|
2507
|
+
background-color: var(--mf-bg-hover);
|
|
2508
|
+
}
|
|
2161
2509
|
}
|
|
2162
2510
|
|
|
2163
2511
|
.magicfeedback-upload-dropzone:focus-within {
|
|
@@ -2295,13 +2643,20 @@ div.magicfeedback-radio {
|
|
|
2295
2643
|
transition: var(--mf-transition-fast);
|
|
2296
2644
|
}
|
|
2297
2645
|
|
|
2298
|
-
.magicfeedback-upload-remove:hover,
|
|
2299
2646
|
.magicfeedback-upload-remove:focus-visible {
|
|
2300
2647
|
color: var(--mf-error);
|
|
2301
2648
|
background-color: var(--mf-primary-light);
|
|
2302
2649
|
outline: none;
|
|
2303
2650
|
}
|
|
2304
2651
|
|
|
2652
|
+
@media (hover: hover) {
|
|
2653
|
+
.magicfeedback-upload-remove:hover {
|
|
2654
|
+
color: var(--mf-error);
|
|
2655
|
+
background-color: var(--mf-primary-light);
|
|
2656
|
+
outline: none;
|
|
2657
|
+
}
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2305
2660
|
.magicfeedback-upload-remove svg {
|
|
2306
2661
|
width: 16px;
|
|
2307
2662
|
height: 16px;
|
|
@@ -2461,8 +2816,8 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2461
2816
|
!(function(e, t) {
|
|
2462
2817
|
"object" == typeof exports && "object" == typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.magicfeedback = t() : e.magicfeedback = t();
|
|
2463
2818
|
})(self, (() => {
|
|
2464
|
-
return e = {
|
|
2465
|
-
var i = "undefined" != typeof self ? self : this,
|
|
2819
|
+
return e = { 6911: function(e2, t2) {
|
|
2820
|
+
var i = "undefined" != typeof self ? self : this, n = (function() {
|
|
2466
2821
|
function e3() {
|
|
2467
2822
|
this.fetch = false, this.DOMException = i.DOMException;
|
|
2468
2823
|
}
|
|
@@ -2470,7 +2825,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2470
2825
|
})();
|
|
2471
2826
|
!(function(e3) {
|
|
2472
2827
|
!(function(t3) {
|
|
2473
|
-
var i2 = "URLSearchParams" in e3,
|
|
2828
|
+
var i2 = "URLSearchParams" in e3, n2 = "Symbol" in e3 && "iterator" in Symbol, r2 = "FileReader" in e3 && "Blob" in e3 && (function() {
|
|
2474
2829
|
try {
|
|
2475
2830
|
return new Blob(), true;
|
|
2476
2831
|
} catch (e4) {
|
|
@@ -2492,7 +2847,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2492
2847
|
var t5 = e4.shift();
|
|
2493
2848
|
return { done: void 0 === t5, value: t5 };
|
|
2494
2849
|
} };
|
|
2495
|
-
return
|
|
2850
|
+
return n2 && (t4[Symbol.iterator] = function() {
|
|
2496
2851
|
return t4;
|
|
2497
2852
|
}), t4;
|
|
2498
2853
|
}
|
|
@@ -2530,8 +2885,8 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2530
2885
|
function y() {
|
|
2531
2886
|
return this.bodyUsed = false, this._initBody = function(e4) {
|
|
2532
2887
|
var t4;
|
|
2533
|
-
this._bodyInit = e4, e4 ? "string" == typeof e4 ? this._bodyText = e4 :
|
|
2534
|
-
},
|
|
2888
|
+
this._bodyInit = e4, e4 ? "string" == typeof e4 ? this._bodyText = e4 : r2 && Blob.prototype.isPrototypeOf(e4) ? this._bodyBlob = e4 : o && FormData.prototype.isPrototypeOf(e4) ? this._bodyFormData = e4 : i2 && URLSearchParams.prototype.isPrototypeOf(e4) ? this._bodyText = e4.toString() : a && r2 && (t4 = e4) && DataView.prototype.isPrototypeOf(t4) ? (this._bodyArrayBuffer = g(e4.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : a && (ArrayBuffer.prototype.isPrototypeOf(e4) || l(e4)) ? this._bodyArrayBuffer = g(e4) : this._bodyText = e4 = Object.prototype.toString.call(e4) : this._bodyText = "", this.headers.get("content-type") || ("string" == typeof e4 ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : i2 && URLSearchParams.prototype.isPrototypeOf(e4) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
|
|
2889
|
+
}, r2 && (this.blob = function() {
|
|
2535
2890
|
var e4 = m(this);
|
|
2536
2891
|
if (e4) return e4;
|
|
2537
2892
|
if (this._bodyBlob) return Promise.resolve(this._bodyBlob);
|
|
@@ -2541,11 +2896,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2541
2896
|
}, this.arrayBuffer = function() {
|
|
2542
2897
|
return this._bodyArrayBuffer ? m(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(f);
|
|
2543
2898
|
}), this.text = function() {
|
|
2544
|
-
var e4, t4, i3,
|
|
2545
|
-
if (
|
|
2899
|
+
var e4, t4, i3, n3 = m(this);
|
|
2900
|
+
if (n3) return n3;
|
|
2546
2901
|
if (this._bodyBlob) return e4 = this._bodyBlob, i3 = h(t4 = new FileReader()), t4.readAsText(e4), i3;
|
|
2547
2902
|
if (this._bodyArrayBuffer) return Promise.resolve((function(e5) {
|
|
2548
|
-
for (var t5 = new Uint8Array(e5), i4 = new Array(t5.length),
|
|
2903
|
+
for (var t5 = new Uint8Array(e5), i4 = new Array(t5.length), n4 = 0; n4 < t5.length; n4++) i4[n4] = String.fromCharCode(t5[n4]);
|
|
2549
2904
|
return i4.join("");
|
|
2550
2905
|
})(this._bodyArrayBuffer));
|
|
2551
2906
|
if (this._bodyFormData) throw new Error("could not read FormData body as text");
|
|
@@ -2585,41 +2940,41 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2585
2940
|
return this.forEach((function(t4, i3) {
|
|
2586
2941
|
e4.push([i3, t4]);
|
|
2587
2942
|
})), u(e4);
|
|
2588
|
-
},
|
|
2943
|
+
}, n2 && (p.prototype[Symbol.iterator] = p.prototype.entries);
|
|
2589
2944
|
var v = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"];
|
|
2590
2945
|
function b(e4, t4) {
|
|
2591
|
-
var i3,
|
|
2946
|
+
var i3, n3, r3 = (t4 = t4 || {}).body;
|
|
2592
2947
|
if (e4 instanceof b) {
|
|
2593
2948
|
if (e4.bodyUsed) throw new TypeError("Already read");
|
|
2594
|
-
this.url = e4.url, this.credentials = e4.credentials, t4.headers || (this.headers = new p(e4.headers)), this.method = e4.method, this.mode = e4.mode, this.signal = e4.signal,
|
|
2949
|
+
this.url = e4.url, this.credentials = e4.credentials, t4.headers || (this.headers = new p(e4.headers)), this.method = e4.method, this.mode = e4.mode, this.signal = e4.signal, r3 || null == e4._bodyInit || (r3 = e4._bodyInit, e4.bodyUsed = true);
|
|
2595
2950
|
} else this.url = String(e4);
|
|
2596
|
-
if (this.credentials = t4.credentials || this.credentials || "same-origin", !t4.headers && this.headers || (this.headers = new p(t4.headers)), this.method = (
|
|
2597
|
-
this._initBody(
|
|
2951
|
+
if (this.credentials = t4.credentials || this.credentials || "same-origin", !t4.headers && this.headers || (this.headers = new p(t4.headers)), this.method = (n3 = (i3 = t4.method || this.method || "GET").toUpperCase(), v.indexOf(n3) > -1 ? n3 : i3), this.mode = t4.mode || this.mode || null, this.signal = t4.signal || this.signal, this.referrer = null, ("GET" === this.method || "HEAD" === this.method) && r3) throw new TypeError("Body not allowed for GET or HEAD requests");
|
|
2952
|
+
this._initBody(r3);
|
|
2598
2953
|
}
|
|
2599
2954
|
function E(e4) {
|
|
2600
2955
|
var t4 = new FormData();
|
|
2601
2956
|
return e4.trim().split("&").forEach((function(e5) {
|
|
2602
2957
|
if (e5) {
|
|
2603
|
-
var i3 = e5.split("="),
|
|
2604
|
-
t4.append(decodeURIComponent(
|
|
2958
|
+
var i3 = e5.split("="), n3 = i3.shift().replace(/\+/g, " "), r3 = i3.join("=").replace(/\+/g, " ");
|
|
2959
|
+
t4.append(decodeURIComponent(n3), decodeURIComponent(r3));
|
|
2605
2960
|
}
|
|
2606
2961
|
})), t4;
|
|
2607
2962
|
}
|
|
2608
|
-
function
|
|
2963
|
+
function A(e4, t4) {
|
|
2609
2964
|
t4 || (t4 = {}), this.type = "default", this.status = void 0 === t4.status ? 200 : t4.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in t4 ? t4.statusText : "OK", this.headers = new p(t4.headers), this.url = t4.url || "", this._initBody(e4);
|
|
2610
2965
|
}
|
|
2611
2966
|
b.prototype.clone = function() {
|
|
2612
2967
|
return new b(this, { body: this._bodyInit });
|
|
2613
|
-
}, y.call(b.prototype), y.call(
|
|
2614
|
-
return new
|
|
2615
|
-
},
|
|
2616
|
-
var e4 = new
|
|
2968
|
+
}, y.call(b.prototype), y.call(A.prototype), A.prototype.clone = function() {
|
|
2969
|
+
return new A(this._bodyInit, { status: this.status, statusText: this.statusText, headers: new p(this.headers), url: this.url });
|
|
2970
|
+
}, A.error = function() {
|
|
2971
|
+
var e4 = new A(null, { status: 0, statusText: "" });
|
|
2617
2972
|
return e4.type = "error", e4;
|
|
2618
2973
|
};
|
|
2619
|
-
var
|
|
2620
|
-
|
|
2621
|
-
if (-1 ===
|
|
2622
|
-
return new
|
|
2974
|
+
var k = [301, 302, 303, 307, 308];
|
|
2975
|
+
A.redirect = function(e4, t4) {
|
|
2976
|
+
if (-1 === k.indexOf(t4)) throw new RangeError("Invalid status code");
|
|
2977
|
+
return new A(null, { status: t4, headers: { location: e4 } });
|
|
2623
2978
|
}, t3.DOMException = e3.DOMException;
|
|
2624
2979
|
try {
|
|
2625
2980
|
new t3.DOMException();
|
|
@@ -2631,7 +2986,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2631
2986
|
}, t3.DOMException.prototype = Object.create(Error.prototype), t3.DOMException.prototype.constructor = t3.DOMException;
|
|
2632
2987
|
}
|
|
2633
2988
|
function T(e4, i3) {
|
|
2634
|
-
return new Promise((function(
|
|
2989
|
+
return new Promise((function(n3, o2) {
|
|
2635
2990
|
var a2 = new b(e4, i3);
|
|
2636
2991
|
if (a2.signal && a2.signal.aborted) return o2(new t3.DOMException("Aborted", "AbortError"));
|
|
2637
2992
|
var s2 = new XMLHttpRequest();
|
|
@@ -2640,106 +2995,107 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2640
2995
|
}
|
|
2641
2996
|
s2.onload = function() {
|
|
2642
2997
|
var e5, t4, i4 = { status: s2.status, statusText: s2.statusText, headers: (e5 = s2.getAllResponseHeaders() || "", t4 = new p(), e5.replace(/\r?\n[\t ]+/g, " ").split(/\r?\n/).forEach((function(e6) {
|
|
2643
|
-
var i5 = e6.split(":"),
|
|
2644
|
-
if (
|
|
2645
|
-
var
|
|
2646
|
-
t4.append(
|
|
2998
|
+
var i5 = e6.split(":"), n4 = i5.shift().trim();
|
|
2999
|
+
if (n4) {
|
|
3000
|
+
var r4 = i5.join(":").trim();
|
|
3001
|
+
t4.append(n4, r4);
|
|
2647
3002
|
}
|
|
2648
3003
|
})), t4) };
|
|
2649
3004
|
i4.url = "responseURL" in s2 ? s2.responseURL : i4.headers.get("X-Request-URL");
|
|
2650
|
-
var
|
|
2651
|
-
|
|
3005
|
+
var r3 = "response" in s2 ? s2.response : s2.responseText;
|
|
3006
|
+
n3(new A(r3, i4));
|
|
2652
3007
|
}, s2.onerror = function() {
|
|
2653
3008
|
o2(new TypeError("Network request failed"));
|
|
2654
3009
|
}, s2.ontimeout = function() {
|
|
2655
3010
|
o2(new TypeError("Network request failed"));
|
|
2656
3011
|
}, s2.onabort = function() {
|
|
2657
3012
|
o2(new t3.DOMException("Aborted", "AbortError"));
|
|
2658
|
-
}, s2.open(a2.method, a2.url, true), "include" === a2.credentials ? s2.withCredentials = true : "omit" === a2.credentials && (s2.withCredentials = false), "responseType" in s2 &&
|
|
3013
|
+
}, s2.open(a2.method, a2.url, true), "include" === a2.credentials ? s2.withCredentials = true : "omit" === a2.credentials && (s2.withCredentials = false), "responseType" in s2 && r2 && (s2.responseType = "blob"), a2.headers.forEach((function(e5, t4) {
|
|
2659
3014
|
s2.setRequestHeader(t4, e5);
|
|
2660
3015
|
})), a2.signal && (a2.signal.addEventListener("abort", l2), s2.onreadystatechange = function() {
|
|
2661
3016
|
4 === s2.readyState && a2.signal.removeEventListener("abort", l2);
|
|
2662
3017
|
}), s2.send(void 0 === a2._bodyInit ? null : a2._bodyInit);
|
|
2663
3018
|
}));
|
|
2664
3019
|
}
|
|
2665
|
-
T.polyfill = true, e3.fetch || (e3.fetch = T, e3.Headers = p, e3.Request = b, e3.Response =
|
|
3020
|
+
T.polyfill = true, e3.fetch || (e3.fetch = T, e3.Headers = p, e3.Request = b, e3.Response = A), t3.Headers = p, t3.Request = b, t3.Response = A, t3.fetch = T, Object.defineProperty(t3, "__esModule", { value: true });
|
|
2666
3021
|
})({});
|
|
2667
|
-
})(
|
|
2668
|
-
var
|
|
2669
|
-
(t2 =
|
|
2670
|
-
},
|
|
3022
|
+
})(n), n.fetch.ponyfill = true, delete n.fetch.polyfill;
|
|
3023
|
+
var r = n;
|
|
3024
|
+
(t2 = r.fetch).default = r.fetch, t2.fetch = r.fetch, t2.Headers = r.Headers, t2.Request = r.Request, t2.Response = r.Response, e2.exports = t2;
|
|
3025
|
+
}, 431: (e2, t2) => {
|
|
2671
3026
|
"use strict";
|
|
2672
3027
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.HOST_API_URL_DEV = t2.HOST_API_URL = void 0, t2.HOST_API_URL = "https://api.deepdots.com/", t2.HOST_API_URL_DEV = "https://api-dev.deepdots.com/";
|
|
2673
|
-
},
|
|
3028
|
+
}, 2474: function(e2, t2, i) {
|
|
2674
3029
|
"use strict";
|
|
2675
|
-
var
|
|
3030
|
+
var n = this && this.__importDefault || function(e3) {
|
|
2676
3031
|
return e3 && e3.__esModule ? e3 : { default: e3 };
|
|
2677
3032
|
};
|
|
2678
3033
|
Object.defineProperty(t2, "__esModule", { value: true });
|
|
2679
|
-
const
|
|
3034
|
+
const r = n(i(5969));
|
|
2680
3035
|
let o = null;
|
|
2681
|
-
o || (o = (0,
|
|
2682
|
-
},
|
|
3036
|
+
o || (o = (0, r.default)()), t2.default = o;
|
|
3037
|
+
}, 5969: function(e2, t2, i) {
|
|
2683
3038
|
"use strict";
|
|
2684
|
-
var
|
|
2685
|
-
return new (i2 || (i2 = Promise))((function(
|
|
3039
|
+
var n = this && this.__awaiter || function(e3, t3, i2, n2) {
|
|
3040
|
+
return new (i2 || (i2 = Promise))((function(r2, o2) {
|
|
2686
3041
|
function a2(e4) {
|
|
2687
3042
|
try {
|
|
2688
|
-
l2(
|
|
3043
|
+
l2(n2.next(e4));
|
|
2689
3044
|
} catch (e5) {
|
|
2690
3045
|
o2(e5);
|
|
2691
3046
|
}
|
|
2692
3047
|
}
|
|
2693
3048
|
function s2(e4) {
|
|
2694
3049
|
try {
|
|
2695
|
-
l2(
|
|
3050
|
+
l2(n2.throw(e4));
|
|
2696
3051
|
} catch (e5) {
|
|
2697
3052
|
o2(e5);
|
|
2698
3053
|
}
|
|
2699
3054
|
}
|
|
2700
3055
|
function l2(e4) {
|
|
2701
3056
|
var t4;
|
|
2702
|
-
e4.done ?
|
|
3057
|
+
e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
2703
3058
|
e5(t4);
|
|
2704
3059
|
}))).then(a2, s2);
|
|
2705
3060
|
}
|
|
2706
|
-
l2((
|
|
3061
|
+
l2((n2 = n2.apply(e3, t3 || [])).next());
|
|
2707
3062
|
}));
|
|
2708
3063
|
};
|
|
2709
3064
|
Object.defineProperty(t2, "__esModule", { value: true });
|
|
2710
|
-
const
|
|
3065
|
+
const r = i(139), o = i(7350), a = i(8587), s = i(1874), l = i(6891), d = i(431), c = i(6029);
|
|
2711
3066
|
t2.default = function() {
|
|
2712
3067
|
const e3 = new a.Config();
|
|
2713
3068
|
let t3 = new s.Log(e3);
|
|
2714
3069
|
return { init: function(i2) {
|
|
2715
|
-
"boolean" == typeof (null == i2 ? void 0 : i2.debug) && e3.set("debug", i2.debug), "boolean" == typeof (null == i2 ? void 0 : i2.dryRun) && e3.set("dryRun", i2.dryRun), e3.set("url", (null == i2 ? void 0 : i2.env) && "dev" === (null == i2 ? void 0 : i2.env) ? d.HOST_API_URL_DEV : d.HOST_API_URL), e3.set("env", null == i2 ? void 0 : i2.env), t3.log("Initialized Magicfeedback", e3);
|
|
2716
|
-
}, send: function(i2,
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
3070
|
+
"boolean" == typeof (null == i2 ? void 0 : i2.debug) && e3.set("debug", i2.debug), "boolean" == typeof (null == i2 ? void 0 : i2.dryRun) && e3.set("dryRun", i2.dryRun), (null == i2 ? void 0 : i2.lang) && e3.set("lang", (0, c.normalizeSurveyLang)(i2.lang)), e3.set("url", (null == i2 ? void 0 : i2.env) && "dev" === (null == i2 ? void 0 : i2.env) ? d.HOST_API_URL_DEV : d.HOST_API_URL), e3.set("env", null == i2 ? void 0 : i2.env), t3.log("Initialized Magicfeedback", e3);
|
|
3071
|
+
}, send: function(i2, r2, o2, a2 = true, s2, d2) {
|
|
3072
|
+
var u;
|
|
3073
|
+
return n(this, void 0, void 0, (function* () {
|
|
3074
|
+
i2 || t3.err("No appID provided"), r2 || t3.err("No publicKey provided"), o2 || t3.err("No feedback provided"), o2.answers || o2.profile || o2.metrics || o2.metadata || t3.err("No feedback data provided");
|
|
3075
|
+
const n2 = e3.get("url"), p = { integration: i2, publicKey: r2, privateKey: d2, completed: a2, id: s2, feedback: o2, lang: null !== (u = (0, c.detectSurveyLang)(e3.get("lang"))) && void 0 !== u ? u : void 0 };
|
|
2720
3076
|
try {
|
|
2721
3077
|
if (e3.get("dryRun")) return t3.log("Dry run enabled: skipping native feedback submit"), `dry-run-${Date.now()}`;
|
|
2722
|
-
const i3 = yield (0, l.sendFeedback)(
|
|
3078
|
+
const i3 = yield (0, l.sendFeedback)(n2, p, t3);
|
|
2723
3079
|
return t3.log("sent native feedback"), i3;
|
|
2724
3080
|
} catch (e4) {
|
|
2725
3081
|
return t3.err("error native feedback", e4), false;
|
|
2726
3082
|
}
|
|
2727
3083
|
}));
|
|
2728
|
-
}, form: function(i2,
|
|
2729
|
-
return i2 || t3.err("No appID provided"),
|
|
2730
|
-
}, agentForm: function(i2,
|
|
2731
|
-
return i2 || t3.err("No integrationId provided"),
|
|
3084
|
+
}, form: function(i2, n2, o2, a2) {
|
|
3085
|
+
return i2 || t3.err("No appID provided"), n2 || t3.err("No publicKey provided"), new r.Form(e3, i2, n2, o2, a2);
|
|
3086
|
+
}, agentForm: function(i2, n2, r2) {
|
|
3087
|
+
return i2 || t3.err("No integrationId provided"), n2 || t3.err("No publicKey provided"), new o.AgentForm(e3, i2, n2, r2);
|
|
2732
3088
|
}, session: function(i2) {
|
|
2733
|
-
return i2 || t3.err("No sessionId provided"), new
|
|
3089
|
+
return i2 || t3.err("No sessionId provided"), new r.Form(e3, i2);
|
|
2734
3090
|
}, previewPage: function(i2, o2, a2) {
|
|
2735
|
-
return
|
|
3091
|
+
return n(this, void 0, void 0, (function* () {
|
|
2736
3092
|
i2 || t3.err("No selector provided"), o2 && o2.page || t3.err("No page provided for preview");
|
|
2737
|
-
const
|
|
3093
|
+
const n2 = (null == o2 ? void 0 : o2.appId) || `preview-${Date.now()}`, s2 = new r.Form(e3, n2);
|
|
2738
3094
|
return yield s2.previewPage(i2, o2, a2), s2;
|
|
2739
3095
|
}));
|
|
2740
3096
|
} };
|
|
2741
3097
|
};
|
|
2742
|
-
},
|
|
3098
|
+
}, 1701: (e2, t2) => {
|
|
2743
3099
|
"use strict";
|
|
2744
3100
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.History = void 0, t2.History = class {
|
|
2745
3101
|
constructor() {
|
|
@@ -2770,42 +3126,42 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2770
3126
|
return this.items[e3];
|
|
2771
3127
|
}
|
|
2772
3128
|
};
|
|
2773
|
-
},
|
|
3129
|
+
}, 7350: function(e2, t2, i) {
|
|
2774
3130
|
"use strict";
|
|
2775
|
-
var
|
|
2776
|
-
return new (i2 || (i2 = Promise))((function(
|
|
3131
|
+
var n = this && this.__awaiter || function(e3, t3, i2, n2) {
|
|
3132
|
+
return new (i2 || (i2 = Promise))((function(r2, o2) {
|
|
2777
3133
|
function a2(e4) {
|
|
2778
3134
|
try {
|
|
2779
|
-
l2(
|
|
3135
|
+
l2(n2.next(e4));
|
|
2780
3136
|
} catch (e5) {
|
|
2781
3137
|
o2(e5);
|
|
2782
3138
|
}
|
|
2783
3139
|
}
|
|
2784
3140
|
function s2(e4) {
|
|
2785
3141
|
try {
|
|
2786
|
-
l2(
|
|
3142
|
+
l2(n2.throw(e4));
|
|
2787
3143
|
} catch (e5) {
|
|
2788
3144
|
o2(e5);
|
|
2789
3145
|
}
|
|
2790
3146
|
}
|
|
2791
3147
|
function l2(e4) {
|
|
2792
3148
|
var t4;
|
|
2793
|
-
e4.done ?
|
|
3149
|
+
e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
2794
3150
|
e5(t4);
|
|
2795
3151
|
}))).then(a2, s2);
|
|
2796
3152
|
}
|
|
2797
|
-
l2((
|
|
3153
|
+
l2((n2 = n2.apply(e3, t3 || [])).next());
|
|
2798
3154
|
}));
|
|
2799
3155
|
};
|
|
2800
3156
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.AgentForm = void 0;
|
|
2801
|
-
const
|
|
3157
|
+
const r = i(1874), o = i(9), a = i(8019), s = i(3963), l = i(1817), d = i(459), c = i(1853), u = i(3903), p = i(7031), m = i(93), h = i(2139);
|
|
2802
3158
|
t2.AgentForm = class {
|
|
2803
|
-
constructor(e3, t3, i2,
|
|
2804
|
-
this.config = e3, this.log = new
|
|
3159
|
+
constructor(e3, t3, i2, n2) {
|
|
3160
|
+
this.config = e3, this.log = new r.Log(e3), this.url = e3.get("url"), this.integrationId = t3, this.publicKey = i2, this.privateKey = n2, this.formOptionsConfig = { addButton: true, addSuccessScreen: true, questionFormat: "standard", answerDelimiter: s.DEFAULT_ANSWER_DELIMITER, resume: true, allowBack: false, emptyAnswerText: "" }, this.selector = "", this.language = "en", this.product = { customIcons: false }, this.sessionId = "", this.conversation = [], this.askedRefs = [], this.currentTurn = 1, this.maxTurns = 0, this.currentQuestion = null, this.questionHistory = [], this.busy = false, this.rateLimitTimer = null, this.progress = 0, this.total = 0, this.completed = false, this.timeToCompleted = 0;
|
|
2805
3161
|
}
|
|
2806
3162
|
generate(e3, t3 = {}) {
|
|
2807
3163
|
var i2;
|
|
2808
|
-
return
|
|
3164
|
+
return n(this, void 0, void 0, (function* () {
|
|
2809
3165
|
this.formOptionsConfig = Object.assign(Object.assign({}, this.formOptionsConfig), t3), this.selector = e3, t3.lang && (this.language = t3.lang), t3.primaryColor && (this.primaryColor = t3.primaryColor), this.config.get("dryRun") && this.log.log("dryRun has no effect in agent mode: the server drives the conversation");
|
|
2810
3166
|
try {
|
|
2811
3167
|
const e4 = false !== this.formOptionsConfig.resume ? this.restore() : null;
|
|
@@ -2824,7 +3180,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2824
3180
|
}));
|
|
2825
3181
|
}
|
|
2826
3182
|
next() {
|
|
2827
|
-
return
|
|
3183
|
+
return n(this, void 0, void 0, (function* () {
|
|
2828
3184
|
return this.runTurn();
|
|
2829
3185
|
}));
|
|
2830
3186
|
}
|
|
@@ -2843,27 +3199,27 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2843
3199
|
}
|
|
2844
3200
|
runTurn() {
|
|
2845
3201
|
var e3;
|
|
2846
|
-
return
|
|
3202
|
+
return n(this, void 0, void 0, (function* () {
|
|
2847
3203
|
if (this.busy || this.completed || !this.currentQuestion) return;
|
|
2848
|
-
this.busy = true, this.setSubmitDisabled(true), this.clearError();
|
|
3204
|
+
(0, h.cancelAutoAdvance)(document.getElementById(this.questionsId())), this.busy = true, this.setSubmitDisabled(true), this.clearError();
|
|
2849
3205
|
const t3 = this.currentQuestion;
|
|
2850
3206
|
try {
|
|
2851
|
-
const i2 = document.getElementById(this.formId()),
|
|
3207
|
+
const i2 = document.getElementById(this.formId()), n2 = document.getElementById(this.questionsId());
|
|
2852
3208
|
if (!i2) throw new Error("Agent form not found");
|
|
2853
|
-
yield (0, c.awaitUploadReady)(
|
|
2854
|
-
const
|
|
2855
|
-
let o2 = (0, s.encodeAnswer)(
|
|
3209
|
+
yield (0, c.awaitUploadReady)(n2);
|
|
3210
|
+
const r2 = (0, l.scrapeInputs)(i2);
|
|
3211
|
+
let o2 = (0, s.encodeAnswer)(r2, t3, this.formOptionsConfig.answerDelimiter);
|
|
2856
3212
|
if ("" === o2) {
|
|
2857
3213
|
if (t3.require) return void this.showError(this.formOptionsConfig.requiredMessage || (0, p.t)(this.language, "message.required"));
|
|
2858
3214
|
o2 = this.formOptionsConfig.emptyAnswerText || "";
|
|
2859
3215
|
}
|
|
2860
3216
|
this.formOptionsConfig.beforeSubmitEvent && (yield this.formOptionsConfig.beforeSubmitEvent({ loading: true, progress: this.progress, total: this.total }));
|
|
2861
|
-
const d2 = { role: "user", content: o2, questionType: t3.type, questionRef: t3.ref }, u2 = this.currentTurn + 1,
|
|
2862
|
-
this.conversation.push(d2), this.currentTurn = null !== (e3 =
|
|
2863
|
-
const
|
|
2864
|
-
if ("END" ===
|
|
3217
|
+
const d2 = { role: "user", content: o2, questionType: t3.type, questionRef: t3.ref }, u2 = this.currentTurn + 1, m2 = yield (0, a.nextAgentTurn)(this.url, { publicKey: this.publicKey, privateKey: this.privateKey, integrationId: this.integrationId, sessionId: this.sessionId, conversation: [...this.conversation], currentTurn: u2, lastAnswer: o2, lastQuestionRef: t3.ref, askedRefs: [...this.askedRefs] }, this.log);
|
|
3218
|
+
this.conversation.push(d2), this.currentTurn = null !== (e3 = m2.currentTurn) && void 0 !== e3 ? e3 : u2, m2.maxTurns && (this.maxTurns = m2.maxTurns), this.total = Math.max(this.maxTurns - 1, 0);
|
|
3219
|
+
const h2 = (0, s.toAgentStep)(m2, this.adapterContext());
|
|
3220
|
+
if ("END" === h2.kind) return void (yield this.renderEnd(h2));
|
|
2865
3221
|
if (this.maxTurns > 0 && this.currentTurn > this.maxTurns + 1) return void (yield this.renderEnd({ kind: "END", reason: "MAX_TURNS", currentTurn: this.currentTurn, maxTurns: this.maxTurns }));
|
|
2866
|
-
this.acceptQuestion(
|
|
3222
|
+
this.acceptQuestion(h2), this.renderStep(), this.persist(), this.formOptionsConfig.onAgentTurnEvent && (yield this.formOptionsConfig.onAgentTurnEvent({ turn: this.currentTurn, maxTurns: this.maxTurns, question: h2.question, isFromBase: h2.isFromBase, topic: h2.topic, coverageGaps: h2.coverageGaps, coverageSummary: h2.coverageSummary, conversation: this.getConversation() })), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ response: this.sessionId, loading: false, progress: this.progress, total: this.total, completed: false, error: null }));
|
|
2867
3223
|
} catch (e4) {
|
|
2868
3224
|
yield this.handleTurnError(e4);
|
|
2869
3225
|
} finally {
|
|
@@ -2872,7 +3228,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2872
3228
|
}));
|
|
2873
3229
|
}
|
|
2874
3230
|
handleTurnError(e3) {
|
|
2875
|
-
return
|
|
3231
|
+
return n(this, void 0, void 0, (function* () {
|
|
2876
3232
|
this.log.err(`An error occurred during the agent turn ${this.integrationId}:`, e3), e3 instanceof o.AgentApiError && "RATE_LIMITED" === e3.kind ? this.startRateLimitCountdown(e3.retryAfterMs || 6e4) : this.showError(this.errorMessageFor(e3)), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ loading: false, progress: this.progress, total: this.total, completed: false, error: e3 }));
|
|
2877
3233
|
}));
|
|
2878
3234
|
}
|
|
@@ -2898,22 +3254,22 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2898
3254
|
}
|
|
2899
3255
|
renderStep() {
|
|
2900
3256
|
const e3 = document.getElementById(this.questionsId());
|
|
2901
|
-
e3 && this.currentQuestion && (e3.innerHTML = "", (0, u.renderQuestions)([this.currentQuestion], this.formOptionsConfig.questionFormat, this.language, this.product, (() => this.runTurn())).forEach(((t3) => e3.appendChild(t3))));
|
|
3257
|
+
e3 && this.currentQuestion && (e3.innerHTML = "", (0, u.renderQuestions)([this.currentQuestion], this.formOptionsConfig.questionFormat, this.language, this.product, (() => this.runTurn())).forEach(((t3) => e3.appendChild(t3))), (0, m.armGhostTapGuard)(e3));
|
|
2902
3258
|
}
|
|
2903
3259
|
renderEnd(e3) {
|
|
2904
|
-
return
|
|
3260
|
+
return n(this, void 0, void 0, (function* () {
|
|
2905
3261
|
this.completed = true, this.currentQuestion = null, this.busy = false, this.timeToCompleted = this.timeToCompleted ? Date.now() - this.timeToCompleted : 0, this.clearRateLimitTimer(), this.clearPersisted();
|
|
2906
3262
|
const t3 = document.getElementById("magicfeedback-container-" + this.integrationId);
|
|
2907
3263
|
if (t3 && false !== this.formOptionsConfig.addSuccessScreen) {
|
|
2908
3264
|
t3.innerHTML = "";
|
|
2909
|
-
const i2 = "BLOCKED" === e3.reason ? this.formOptionsConfig.blockedMessage || (0, p.t)(this.language, "message.blocked") : this.formOptionsConfig.successMessage || (0, p.t)(this.language, "message.success"),
|
|
2910
|
-
|
|
3265
|
+
const i2 = "BLOCKED" === e3.reason ? this.formOptionsConfig.blockedMessage || (0, p.t)(this.language, "message.blocked") : this.formOptionsConfig.successMessage || (0, p.t)(this.language, "message.success"), n2 = (0, u.renderSuccess)(i2);
|
|
3266
|
+
n2.classList.add("magicfeedback-success-message"), n2.classList.add("magicfeedback-agent-end"), "BLOCKED" === e3.reason && n2.classList.add("magicfeedback-agent-end--blocked"), t3.appendChild(n2);
|
|
2911
3267
|
}
|
|
2912
3268
|
this.formOptionsConfig.onFinishEvent && (yield this.formOptionsConfig.onFinishEvent({ sessionId: this.sessionId, reason: e3.reason, turns: this.currentTurn, maxTurns: this.maxTurns, conversation: this.getConversation(), coverageSummary: e3.coverageSummary, timeToCompleted: this.timeToCompleted })), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ response: this.sessionId, loading: false, progress: this.progress, total: this.total, completed: true, error: null }));
|
|
2913
3269
|
}));
|
|
2914
3270
|
}
|
|
2915
3271
|
back() {
|
|
2916
|
-
return
|
|
3272
|
+
return n(this, void 0, void 0, (function* () {
|
|
2917
3273
|
this.busy || this.completed || this.formOptionsConfig.allowBack && (this.questionHistory.length < 2 || (this.questionHistory.pop(), this.conversation.pop(), this.conversation.pop(), this.currentQuestion = this.questionHistory[this.questionHistory.length - 1], this.currentTurn = Math.max(this.currentTurn - 1, 1), this.progress = Math.max(this.currentTurn - 1, 0), this.clearError(), this.renderStep(), this.persist(), this.formOptionsConfig.onBackEvent && (yield this.formOptionsConfig.onBackEvent({ progress: this.progress, total: this.total }))));
|
|
2918
3274
|
}));
|
|
2919
3275
|
}
|
|
@@ -2940,7 +3296,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2940
3296
|
return { integrationId: this.integrationId, sessionId: this.sessionId, language: this.language, log: this.log };
|
|
2941
3297
|
}
|
|
2942
3298
|
startWithRetry() {
|
|
2943
|
-
return
|
|
3299
|
+
return n(this, void 0, void 0, (function* () {
|
|
2944
3300
|
const e3 = { publicKey: this.publicKey, privateKey: this.privateKey, integrationId: this.integrationId };
|
|
2945
3301
|
try {
|
|
2946
3302
|
return yield (0, a.startAgentSurvey)(this.url, e3, this.log);
|
|
@@ -2965,11 +3321,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
2965
3321
|
startRateLimitCountdown(e3) {
|
|
2966
3322
|
this.clearRateLimitTimer(), this.setSubmitDisabled(true);
|
|
2967
3323
|
let t3 = Math.ceil(e3 / 1e3);
|
|
2968
|
-
const i2 = this.formOptionsConfig.rateLimitMessage || (0, p.t)(this.language, "message.rateLimit"),
|
|
3324
|
+
const i2 = this.formOptionsConfig.rateLimitMessage || (0, p.t)(this.language, "message.rateLimit"), n2 = () => {
|
|
2969
3325
|
if (t3 <= 0) return this.clearRateLimitTimer(), this.clearError(), void this.setSubmitDisabled(false);
|
|
2970
3326
|
this.showError(i2.replace("{seconds}", String(t3))), t3 -= 1;
|
|
2971
3327
|
};
|
|
2972
|
-
|
|
3328
|
+
n2(), this.rateLimitTimer = setInterval(n2, 1e3);
|
|
2973
3329
|
}
|
|
2974
3330
|
clearRateLimitTimer() {
|
|
2975
3331
|
this.rateLimitTimer && (clearInterval(this.rateLimitTimer), this.rateLimitTimer = null);
|
|
@@ -3007,7 +3363,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3007
3363
|
(null === (t3 = null == e3 ? void 0 : e3.lang) || void 0 === t3 ? void 0 : t3.length) && (this.language = e3.lang[0]), (null == e3 ? void 0 : e3.product) && (this.product = e3.product), (null === (i2 = null == e3 ? void 0 : e3.style) || void 0 === i2 ? void 0 : i2.primaryColor) && (this.primaryColor = e3.style.primaryColor);
|
|
3008
3364
|
}
|
|
3009
3365
|
};
|
|
3010
|
-
},
|
|
3366
|
+
}, 8587: (e2, t2) => {
|
|
3011
3367
|
"use strict";
|
|
3012
3368
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.Config = void 0, t2.Config = class {
|
|
3013
3369
|
constructor() {
|
|
@@ -3020,70 +3376,79 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3020
3376
|
this.variables[e3] = t3;
|
|
3021
3377
|
}
|
|
3022
3378
|
};
|
|
3023
|
-
},
|
|
3379
|
+
}, 139: function(e2, t2, i) {
|
|
3024
3380
|
"use strict";
|
|
3025
|
-
var
|
|
3026
|
-
return new (i2 || (i2 = Promise))((function(
|
|
3381
|
+
var n = this && this.__awaiter || function(e3, t3, i2, n2) {
|
|
3382
|
+
return new (i2 || (i2 = Promise))((function(r2, o2) {
|
|
3027
3383
|
function a2(e4) {
|
|
3028
3384
|
try {
|
|
3029
|
-
l2(
|
|
3385
|
+
l2(n2.next(e4));
|
|
3030
3386
|
} catch (e5) {
|
|
3031
3387
|
o2(e5);
|
|
3032
3388
|
}
|
|
3033
3389
|
}
|
|
3034
3390
|
function s2(e4) {
|
|
3035
3391
|
try {
|
|
3036
|
-
l2(
|
|
3392
|
+
l2(n2.throw(e4));
|
|
3037
3393
|
} catch (e5) {
|
|
3038
3394
|
o2(e5);
|
|
3039
3395
|
}
|
|
3040
3396
|
}
|
|
3041
3397
|
function l2(e4) {
|
|
3042
3398
|
var t4;
|
|
3043
|
-
e4.done ?
|
|
3399
|
+
e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
3044
3400
|
e5(t4);
|
|
3045
3401
|
}))).then(a2, s2);
|
|
3046
3402
|
}
|
|
3047
|
-
l2((
|
|
3403
|
+
l2((n2 = n2.apply(e3, t3 || [])).next());
|
|
3048
3404
|
}));
|
|
3049
3405
|
};
|
|
3050
3406
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.Form = void 0;
|
|
3051
|
-
const
|
|
3407
|
+
const r = i(1140), o = i(7350), a = i(1874), s = i(6891), l = i(3903), d = i(1853), c = i(459), u = i(1817), p = i(2531), m = i(198), h = i(4245), f = i(1701), g = i(1814), y = i(7031), v = i(6029), b = i(93), E = i(9033), A = i(2139);
|
|
3052
3408
|
t2.Form = class {
|
|
3053
|
-
constructor(e3, t3, i2,
|
|
3054
|
-
this.config = e3, this.log = new a.Log(e3), this.formOptionsConfig = { addButton: true, addSuccessScreen: true, getMetaData: true, customMetaData: [], questionFormat: "standard" }, this.selector = "", this.appId = t3, this.publicKey = i2 || "", this.url = e3.get("url"), this.id = "", this.formData = null, this.feedback = { text: "", answers: [], profile: null !=
|
|
3409
|
+
constructor(e3, t3, i2, n2, r2) {
|
|
3410
|
+
this.config = e3, this.log = new a.Log(e3), this.formOptionsConfig = { addButton: true, addSuccessScreen: true, getMetaData: true, customMetaData: [], questionFormat: "standard" }, this.selector = "", this.appId = t3, this.publicKey = i2 || "", this.url = e3.get("url"), this.id = "", this.formData = null, this.activeLang = null, this.feedback = { text: "", answers: [], profile: null != n2 ? n2 : [], metrics: [], metadata: null != r2 ? r2 : [] }, this.history = new f.History(), this.agentForm = null, this.graph = new p.PageGraph([]), this.progress = 0, this.total = 0, this.completed = false, this.sending = false, this.timeToCompleted = 0;
|
|
3055
3411
|
}
|
|
3056
3412
|
generate(e3, t3) {
|
|
3057
|
-
var i2,
|
|
3058
|
-
return
|
|
3413
|
+
var i2, r2, a2, l2, d2, c2, u2;
|
|
3414
|
+
return n(this, void 0, void 0, (function* () {
|
|
3059
3415
|
try {
|
|
3060
3416
|
this.formOptionsConfig = Object.assign(Object.assign({}, this.formOptionsConfig), t3), this.selector = e3;
|
|
3061
|
-
let
|
|
3062
|
-
|
|
3063
|
-
if (
|
|
3064
|
-
if (
|
|
3065
|
-
if (
|
|
3417
|
+
let n2 = this.formData;
|
|
3418
|
+
const p2 = (0, v.detectSurveyLang)((null == t3 ? void 0 : t3.lang) || this.config.get("lang"));
|
|
3419
|
+
if (void 0 !== this.formData && this.formData || (n2 = "" !== this.publicKey ? yield (0, s.getForm)(this.url, this.appId, this.publicKey, this.log, p2) : yield (0, s.getSessionForm)(this.url, this.appId, this.log, p2)), void 0 === n2 || !n2) throw new Error(`No data for app ${this.appId}`);
|
|
3420
|
+
if (null === (i2 = n2.error) || void 0 === i2 ? void 0 : i2.message) throw new Error(n2.error.message);
|
|
3421
|
+
if ("AGENT" === n2.mode) return this.agentForm = new o.AgentForm(this.config, this.appId, this.publicKey), this.agentForm.applyIntegrationContext(n2), void (yield this.agentForm.generate(e3, t3));
|
|
3422
|
+
if (n2.questions = (null === (r2 = n2.questions) || void 0 === r2 ? void 0 : r2.filter(((e4) => "ACTIVE" === e4.status))) || [], n2.pages = (null === (a2 = n2.pages) || void 0 === a2 ? void 0 : a2.filter(((e4) => "ACTIVE" === e4.status))) || [], null === (l2 = n2.pages) || void 0 === l2 || l2.forEach(((e4) => {
|
|
3066
3423
|
var t4;
|
|
3067
3424
|
return e4.integrationQuestions = null === (t4 = e4.integrationQuestions) || void 0 === t4 ? void 0 : t4.filter(((e5) => "ACTIVE" === e5.status));
|
|
3068
|
-
})), this.formData =
|
|
3425
|
+
})), this.formData = n2, this.activeLang = this.resolveActiveLang(p2), !this.formData.savedAt) {
|
|
3426
|
+
this.formData.savedAt = /* @__PURE__ */ new Date();
|
|
3427
|
+
try {
|
|
3428
|
+
localStorage.setItem(`magicfeedback-${this.appId}-${this.lang()}`, JSON.stringify(this.formData));
|
|
3429
|
+
} catch (e4) {
|
|
3430
|
+
this.log.log("Could not cache the form data", e4);
|
|
3431
|
+
}
|
|
3432
|
+
}
|
|
3433
|
+
if (void 0 === this.formData.questions || !this.formData.questions) throw new Error(`No questions for app ${this.appId}`);
|
|
3069
3434
|
this.formData.pages && 0 !== (null === (d2 = this.formData.pages) || void 0 === d2 ? void 0 : d2.length) || this.formatPages(), null === (c2 = this.formData.questions) || void 0 === c2 || c2.sort(((e4, t4) => e4.position - t4.position)), this.formData.pages = this.formData.pages.filter(((e4) => {
|
|
3070
3435
|
var t4;
|
|
3071
3436
|
return (null === (t4 = e4.integrationQuestions) || void 0 === t4 ? void 0 : t4.length) > 0;
|
|
3072
|
-
})), this.formOptionsConfig.getMetaData && this.getMetaData(), (null === (u2 = this.formData.style) || void 0 === u2 ? void 0 : u2.startMessage) ? yield this.generateWelcomeMessage(this.formData.style.startMessage) : this.
|
|
3437
|
+
})), this.formOptionsConfig.getMetaData && this.getMetaData(), (null === (u2 = this.formData.style) || void 0 === u2 ? void 0 : u2.startMessage) ? yield this.generateWelcomeMessage(this.formData.style.startMessage) : this.generateForm("open");
|
|
3073
3438
|
} catch (e4) {
|
|
3074
3439
|
return this.log.err(e4), void (this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, error: e4 })));
|
|
3075
3440
|
}
|
|
3076
3441
|
}));
|
|
3077
3442
|
}
|
|
3078
3443
|
previewPage(e3, t3, i2 = {}) {
|
|
3079
|
-
var
|
|
3080
|
-
return
|
|
3444
|
+
var r2, o2, a2, s2, l2, d2, c2, u2, p2;
|
|
3445
|
+
return n(this, void 0, void 0, (function* () {
|
|
3081
3446
|
try {
|
|
3082
3447
|
if (!t3 || !t3.page) throw new Error("[MagicFeedback] No page provided for preview");
|
|
3083
3448
|
if (!t3.page.integrationQuestions || 0 === t3.page.integrationQuestions.length) throw new Error("[MagicFeedback] No questions provided for preview");
|
|
3084
3449
|
this.config.set("dryRun", true), this.formOptionsConfig = Object.assign(Object.assign(Object.assign({}, this.formOptionsConfig), { getMetaData: false }), i2), this.selector = e3;
|
|
3085
|
-
const
|
|
3086
|
-
this.formData = { id: null !== (l2 = t3.appId) && void 0 !== l2 ? l2 : this.appId, identity: null !== (d2 = t3.identity) && void 0 !== d2 ? d2 : "MAGICFORM", lang: [null !== (c2 = t3.lang) && void 0 !== c2 ? c2 : "en"], product: null !== (u2 = t3.product) && void 0 !== u2 ? u2 : { customIcons: false }, style: null !== (p2 = t3.style) && void 0 !== p2 ? p2 : {}, questions:
|
|
3450
|
+
const n2 = (t3.page.integrationQuestions || []).filter(((e4) => !e4.status || "ACTIVE" === e4.status)).sort(((e4, t4) => e4.position - t4.position)), h2 = new m.Page(null !== (r2 = t3.page.id) && void 0 !== r2 ? r2 : "1", null !== (o2 = t3.page.position) && void 0 !== o2 ? o2 : 1, null !== (a2 = t3.appId) && void 0 !== a2 ? a2 : this.appId, n2, null !== (s2 = t3.page.integrationPageRoutes) && void 0 !== s2 ? s2 : []);
|
|
3451
|
+
this.formData = { id: null !== (l2 = t3.appId) && void 0 !== l2 ? l2 : this.appId, identity: null !== (d2 = t3.identity) && void 0 !== d2 ? d2 : "MAGICFORM", lang: [null !== (c2 = t3.lang) && void 0 !== c2 ? c2 : "en"], product: null !== (u2 = t3.product) && void 0 !== u2 ? u2 : { customIcons: false }, style: null !== (p2 = t3.style) && void 0 !== p2 ? p2 : {}, questions: n2, pages: [h2] }, yield this.generateForm();
|
|
3087
3452
|
} catch (e4) {
|
|
3088
3453
|
return this.log.err(e4), void (this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, error: e4 })));
|
|
3089
3454
|
}
|
|
@@ -3095,8 +3460,8 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3095
3460
|
case "MAGICSURVEY":
|
|
3096
3461
|
this.formData.pages = [], null === (e3 = this.formData.questions) || void 0 === e3 || e3.forEach(((e4) => {
|
|
3097
3462
|
var t4, i2;
|
|
3098
|
-
const
|
|
3099
|
-
null === (i2 = null === (t4 = this.formData) || void 0 === t4 ? void 0 : t4.pages) || void 0 === i2 || i2.push(
|
|
3463
|
+
const n2 = new h.PageRoute(e4.id, e4.ref, h.OperatorType.NOEQUAL, [], h.TransitionType.PAGE, (e4.position + 1).toString(), e4.position.toString()), r2 = new m.Page(e4.position.toString(), e4.position, this.appId, [e4], [n2]);
|
|
3464
|
+
null === (i2 = null === (t4 = this.formData) || void 0 === t4 ? void 0 : t4.pages) || void 0 === i2 || i2.push(r2);
|
|
3100
3465
|
}));
|
|
3101
3466
|
break;
|
|
3102
3467
|
case "MAGICFORM":
|
|
@@ -3106,46 +3471,61 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3106
3471
|
}
|
|
3107
3472
|
generateContainer() {
|
|
3108
3473
|
var e3, t3;
|
|
3109
|
-
const i2 = (0, c.generateContainer)(this.selector, this.appId),
|
|
3110
|
-
return
|
|
3474
|
+
const i2 = (0, c.generateContainer)(this.selector, this.appId), n2 = null === (t3 = null === (e3 = this.formData) || void 0 === e3 ? void 0 : e3.style) || void 0 === t3 ? void 0 : t3.primaryColor;
|
|
3475
|
+
return n2 && (0, c.applyPrimaryColor)(i2, n2), (0, c.applyDirection)(i2, this.lang()), i2;
|
|
3111
3476
|
}
|
|
3112
|
-
generateForm() {
|
|
3113
|
-
var
|
|
3114
|
-
return
|
|
3477
|
+
generateForm(e3 = "open") {
|
|
3478
|
+
var t3, i2, r2;
|
|
3479
|
+
return n(this, void 0, void 0, (function* () {
|
|
3115
3480
|
try {
|
|
3116
3481
|
if (!this.formData || !this.formData.pages || 0 === this.formData.pages.length) throw new Error("No form data");
|
|
3117
3482
|
this.graph = new p.PageGraph(this.formData.pages.sort(((e4, t4) => e4.position - t4.position)));
|
|
3118
|
-
let
|
|
3483
|
+
let n2 = this.generateContainer();
|
|
3119
3484
|
const o2 = document.createElement("form");
|
|
3120
3485
|
o2.classList.add("magicfeedback-form"), o2.id = "magicfeedback-" + this.appId, o2.addEventListener("submit", ((e4) => e4.preventDefault()));
|
|
3121
3486
|
const a2 = document.createElement("div");
|
|
3122
3487
|
a2.classList.add("magicfeedback-questions"), a2.id = "magicfeedback-questions-" + this.appId;
|
|
3123
3488
|
const s2 = this.graph.getFirstPage();
|
|
3124
3489
|
if (!s2) throw new Error("No page found");
|
|
3125
|
-
if (this.total = this.graph.findMaxDepth(), s2.elements = (0, l.renderQuestions)(s2.questions, this.formOptionsConfig.questionFormat,
|
|
3126
|
-
const e4 = (0, l.renderActions)(null === (
|
|
3127
|
-
o2.appendChild(e4);
|
|
3490
|
+
if (this.total = this.graph.findMaxDepth(), s2.elements = (0, l.renderQuestions)(s2.questions, this.formOptionsConfig.questionFormat, this.lang(), null === (t3 = this.formData) || void 0 === t3 ? void 0 : t3.product, (() => this.autoSend())), null === (i2 = s2.elements) || void 0 === i2 || i2.forEach(((e4) => a2.appendChild(e4))), o2.appendChild(a2), (0, b.armGhostTapGuard)(a2), this.history.enqueue(s2), n2.appendChild(o2), this.progress = this.total - this.graph.findMaxDepth(s2), this.formOptionsConfig.addButton) {
|
|
3491
|
+
const e4 = (0, l.renderActions)(null === (r2 = this.formData) || void 0 === r2 ? void 0 : r2.identity, (() => this.back()), this.formOptionsConfig.sendButtonText || (0, y.t)(this.lang(), "action.send"), this.formOptionsConfig.backButtonText || (0, y.t)(this.lang(), "action.back"), this.formOptionsConfig.nextButtonText || (0, y.t)(this.lang(), "action.next"));
|
|
3492
|
+
o2.appendChild(e4), this.syncBackButton();
|
|
3128
3493
|
}
|
|
3129
3494
|
this.formOptionsConfig.addButton && o2.addEventListener("submit", ((e4) => {
|
|
3130
3495
|
e4.preventDefault(), this.send();
|
|
3131
|
-
})), this.timeToCompleted = Date.now(), this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, progress: this.progress, total: this.total, formData: this.formData, formOptionsConfig: this.formOptionsConfig }));
|
|
3496
|
+
})), this.timeToCompleted = Date.now(), this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, progress: this.progress, total: this.total, formData: this.formData, lang: this.lang(), formOptionsConfig: this.formOptionsConfig })), this.autofocusAfterRender(e3);
|
|
3132
3497
|
} catch (e4) {
|
|
3133
3498
|
return this.log.err(e4), void (this.formOptionsConfig.onLoadedEvent && this.formOptionsConfig.onLoadedEvent({ loading: false, error: e4 }));
|
|
3134
3499
|
}
|
|
3135
3500
|
}));
|
|
3136
3501
|
}
|
|
3137
3502
|
startForm() {
|
|
3138
|
-
this.generateForm();
|
|
3503
|
+
this.generateForm("navigation");
|
|
3504
|
+
}
|
|
3505
|
+
focusFirstQuestion() {
|
|
3506
|
+
return "undefined" != typeof document && (0, E.focusFirstTextQuestion)(document.getElementById("magicfeedback-questions-" + this.appId));
|
|
3507
|
+
}
|
|
3508
|
+
autofocusAfterRender(e3) {
|
|
3509
|
+
const t3 = this.formOptionsConfig.autofocus;
|
|
3510
|
+
t3 && ("open" === e3 && "always" !== t3 || this.focusFirstQuestion());
|
|
3139
3511
|
}
|
|
3140
3512
|
lang() {
|
|
3141
3513
|
var e3;
|
|
3142
|
-
return (null === (e3 = this.formData) || void 0 === e3 ? void 0 : e3.lang) && this.formData.lang[0] || "en";
|
|
3514
|
+
return this.activeLang || (null === (e3 = this.formData) || void 0 === e3 ? void 0 : e3.lang) && this.formData.lang[0] || "en";
|
|
3515
|
+
}
|
|
3516
|
+
getLang() {
|
|
3517
|
+
return this.lang();
|
|
3518
|
+
}
|
|
3519
|
+
resolveActiveLang(e3) {
|
|
3520
|
+
var t3, i2;
|
|
3521
|
+
const n2 = (null === (t3 = this.formData) || void 0 === t3 ? void 0 : t3.lang) || [];
|
|
3522
|
+
return (null === (i2 = this.formData) || void 0 === i2 ? void 0 : i2.servedLang) ? this.formData.servedLang : e3 && n2.includes(e3) ? e3 : n2[0] || null;
|
|
3143
3523
|
}
|
|
3144
3524
|
generateWelcomeMessage(e3) {
|
|
3145
|
-
return
|
|
3525
|
+
return n(this, void 0, void 0, (function* () {
|
|
3146
3526
|
try {
|
|
3147
3527
|
const t3 = this.generateContainer(), i2 = (0, l.renderStartMessage)(e3, this.formOptionsConfig.addButton, this.formOptionsConfig.startButtonText || (0, y.t)(this.lang(), "action.start"), (() => this.startForm()));
|
|
3148
|
-
t3.appendChild(i2), this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, formData: this.formData }));
|
|
3528
|
+
t3.appendChild(i2), this.formOptionsConfig.onLoadedEvent && (yield this.formOptionsConfig.onLoadedEvent({ loading: false, formData: this.formData, lang: this.lang() }));
|
|
3149
3529
|
} catch (e4) {
|
|
3150
3530
|
return this.log.err(e4), void (this.formOptionsConfig.onLoadedEvent && this.formOptionsConfig.onLoadedEvent({ loading: false, error: e4 }));
|
|
3151
3531
|
}
|
|
@@ -3160,9 +3540,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3160
3540
|
})), this.feedback.metadata.push({ key: "navigator-user", value: [navigator.userAgent] }), this.feedback.metadata.push({ key: "navigator-language", value: [navigator.language] }), this.feedback.metadata.push({ key: "navigator-platform", value: [navigator.platform] }), this.feedback.metadata.push({ key: "navigator-appVersion", value: [navigator.appVersion] }), this.feedback.metadata.push({ key: "navigator-appName", value: [navigator.appName] }), this.feedback.metadata.push({ key: "navigator-product", value: [navigator.product] }), this.feedback.metadata.push({ key: "screen-width", value: [window.screen.width.toString()] }), this.feedback.metadata.push({ key: "screen-height", value: [window.screen.height.toString()] }), this.appId && "" === this.publicKey && this.feedback.metadata.push({ key: "MAGICFEEDBACK_SESSION", value: [this.appId] });
|
|
3161
3541
|
}
|
|
3162
3542
|
send(e3, t3, i2, o2) {
|
|
3163
|
-
|
|
3543
|
+
var a2, s2;
|
|
3544
|
+
return n(this, void 0, void 0, (function* () {
|
|
3164
3545
|
if (this.agentForm) return this.agentForm.next();
|
|
3165
|
-
const
|
|
3546
|
+
const n2 = document.getElementById("magicfeedback-questions-" + this.appId);
|
|
3547
|
+
(0, A.cancelAutoAdvance)(n2), this.sending = true;
|
|
3166
3548
|
try {
|
|
3167
3549
|
if (i2 && (this.feedback.profile = [...this.feedback.profile, ...i2]), t3 && (this.feedback.metrics = [...this.feedback.metrics, ...t3]), e3 && (this.feedback.metadata = [...this.feedback.metadata, ...e3]), o2) {
|
|
3168
3550
|
this.feedback.answers = [...this.feedback.answers, ...o2], this.formOptionsConfig.beforeSubmitEvent && (yield this.formOptionsConfig.beforeSubmitEvent({ loading: true, progress: this.progress, total: this.total }));
|
|
@@ -3170,133 +3552,169 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3170
3552
|
if (!e4) throw new Error("No response");
|
|
3171
3553
|
return this.id = e4, void (this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ loading: false, progress: this.progress, total: this.total })));
|
|
3172
3554
|
}
|
|
3173
|
-
yield (0, d.awaitUploadReady)(
|
|
3174
|
-
const
|
|
3175
|
-
if (!
|
|
3176
|
-
for (const e4 of
|
|
3555
|
+
yield (0, d.awaitUploadReady)(n2), this.answer(), this.formOptionsConfig.beforeSubmitEvent && (yield this.formOptionsConfig.beforeSubmitEvent({ loading: true, progress: this.progress, total: this.total }));
|
|
3556
|
+
const l2 = this.history.back();
|
|
3557
|
+
if (!l2) throw new Error("No page found");
|
|
3558
|
+
for (const e4 of l2.questions.filter(((e5) => e5.require && ![r.FEEDBACKAPPANSWERTYPE.CONSENT, r.FEEDBACKAPPANSWERTYPE.INFO_PAGE].includes(e5.type)))) {
|
|
3177
3559
|
const t4 = e4.assets, i3 = this.feedback.answers.filter(((t5) => t5.key.includes(e4.ref) && !t5.key.includes("extra-option")));
|
|
3178
3560
|
if (0 === i3.length || i3.find(((e5) => 0 === e5.value.length))) throw this.log.err(`The question ${e4.ref} is required`), new Error("No response");
|
|
3179
3561
|
if (null == t4 ? void 0 : t4.minOptions) {
|
|
3180
|
-
let
|
|
3181
|
-
if ((null == t4 ? void 0 : t4.exclusiveAnswers) && (
|
|
3562
|
+
let n3 = [];
|
|
3563
|
+
if ((null == t4 ? void 0 : t4.exclusiveAnswers) && (n3 = null == t4 ? void 0 : t4.exclusiveAnswers), !i3[0].value.find(((e5) => n3.includes(e5))) && i3[0].value.length < (null == t4 ? void 0 : t4.minOptions)) throw this.log.err(`The question ${e4.ref} requires at least ${null == t4 ? void 0 : t4.minOptions} options`), new Error("No response");
|
|
3564
|
+
}
|
|
3565
|
+
if (e4.type === r.FEEDBACKAPPANSWERTYPE.MAX_DIFF) {
|
|
3566
|
+
const t5 = null !== (s2 = null === (a2 = e4.assets) || void 0 === a2 ? void 0 : a2.setIndex) && void 0 !== s2 ? s2 : 1, i4 = this.parseMaxDiffAnswer(this.feedback.answers.find(((t6) => t6.key === e4.ref))).find(((e5) => e5.set === t5));
|
|
3567
|
+
if (!(null == i4 ? void 0 : i4.best) || !(null == i4 ? void 0 : i4.worst)) throw this.log.err(`The MaxDiff question ${e4.ref} requires the most and the least important`), new Error("No response");
|
|
3182
3568
|
}
|
|
3183
|
-
if (e4.type ===
|
|
3569
|
+
if (e4.type === r.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) {
|
|
3184
3570
|
const i4 = this.feedback.answers.find(((t5) => t5.key === e4.ref));
|
|
3185
3571
|
if (!i4) throw this.log.err(`The matrix question ${e4.ref} is required`), new Error("No response");
|
|
3186
|
-
const
|
|
3187
|
-
if (
|
|
3188
|
-
if (
|
|
3189
|
-
const t5 =
|
|
3572
|
+
const n3 = this.parseMatrixAnswerPre(i4), r2 = Array.isArray(null == t4 ? void 0 : t4.options) ? t4.options : [];
|
|
3573
|
+
if (r2.length > 0) {
|
|
3574
|
+
if (r2.find(((e5) => {
|
|
3575
|
+
const t5 = n3.find(((t6) => t6.key === e5));
|
|
3190
3576
|
return !t5 || !Array.isArray(t5.value) || 0 === t5.value.length;
|
|
3191
3577
|
}))) throw this.log.err(`The matrix question ${e4.ref} requires an answer in every row`), new Error("No response");
|
|
3192
|
-
} else if (0 ===
|
|
3578
|
+
} else if (0 === n3.length || n3.some(((e5) => !Array.isArray(e5.value) || 0 === e5.value.length))) throw this.log.err(`The matrix question ${e4.ref} requires an answer in every row`), new Error("No response");
|
|
3193
3579
|
}
|
|
3194
3580
|
}
|
|
3195
|
-
const
|
|
3196
|
-
if (!
|
|
3197
|
-
this.id =
|
|
3581
|
+
const c2 = yield this.pushAnswers(false);
|
|
3582
|
+
if (!c2) throw new Error("No response");
|
|
3583
|
+
this.id = c2, yield this.processNextQuestion(n2);
|
|
3198
3584
|
} catch (e4) {
|
|
3199
3585
|
this.log.err(`An error occurred while submitting the form ${this.appId}:`, e4), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ loading: false, progress: this.progress, total: this.total, error: e4 }));
|
|
3586
|
+
} finally {
|
|
3587
|
+
this.sending = false;
|
|
3200
3588
|
}
|
|
3201
3589
|
}));
|
|
3202
3590
|
}
|
|
3591
|
+
autoSend() {
|
|
3592
|
+
if (!this.sending) return this.send();
|
|
3593
|
+
}
|
|
3203
3594
|
answer() {
|
|
3204
|
-
const e3 =
|
|
3205
|
-
if (!
|
|
3206
|
-
const
|
|
3207
|
-
if (!
|
|
3208
|
-
const
|
|
3209
|
-
let
|
|
3210
|
-
const
|
|
3211
|
-
if (
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
case
|
|
3220
|
-
case
|
|
3221
|
-
case
|
|
3222
|
-
case
|
|
3223
|
-
case
|
|
3224
|
-
case
|
|
3225
|
-
|
|
3595
|
+
const e3 = "magicfeedback-" + this.appId, t3 = document.getElementById(e3);
|
|
3596
|
+
if (!t3) return this.log.err(`Form "${e3}" not found.`), this.feedback.answers = [], [];
|
|
3597
|
+
const i2 = this.history.back();
|
|
3598
|
+
if (!i2) return this.feedback.answers = (0, u.scrapeInputs)(t3), this.feedback.answers;
|
|
3599
|
+
const n2 = [];
|
|
3600
|
+
let o2 = false;
|
|
3601
|
+
const a2 = t3.querySelectorAll(".magicfeedback-input"), l2 = {}, c2 = {}, p2 = {}, m2 = {};
|
|
3602
|
+
if (a2.forEach(((e4) => {
|
|
3603
|
+
var t4, a3;
|
|
3604
|
+
const u2 = e4, h3 = i2.questions.find(((e5) => {
|
|
3605
|
+
var t5;
|
|
3606
|
+
return null === (t5 = u2.name) || void 0 === t5 ? void 0 : t5.includes(e5.ref);
|
|
3607
|
+
})), f2 = u2.type, g2 = u2.classList[0], y2 = { key: u2.name, value: [] }, v2 = "magicfeedback-consent" === g2 ? u2.checked.toString() : u2.value;
|
|
3608
|
+
if (y2.key && "" !== y2.key) if (y2.key.startsWith("extra-option-")) "" !== v2 && (y2.value.push(v2), n2.push(y2));
|
|
3609
|
+
else switch (null == h3 ? void 0 : h3.type) {
|
|
3610
|
+
case r.FEEDBACKAPPANSWERTYPE.EMAIL:
|
|
3611
|
+
case r.FEEDBACKAPPANSWERTYPE.TEXT:
|
|
3612
|
+
case r.FEEDBACKAPPANSWERTYPE.LONGTEXT:
|
|
3613
|
+
case r.FEEDBACKAPPANSWERTYPE.NUMBER:
|
|
3614
|
+
case r.FEEDBACKAPPANSWERTYPE.DATE:
|
|
3615
|
+
case r.FEEDBACKAPPANSWERTYPE.CONTACT:
|
|
3616
|
+
case r.FEEDBACKAPPANSWERTYPE.PASSWORD:
|
|
3617
|
+
"" !== v2 && ("email" === f2 ? (0, s.validateEmail)(v2) ? (this.feedback.profile.push({ key: "email", value: [v2] }), y2.value.push(v2), n2.push(y2)) : (this.log.err("Invalid email"), o2 = true) : (y2.value.push(v2), n2.push(y2)));
|
|
3226
3618
|
break;
|
|
3227
|
-
case
|
|
3228
|
-
|
|
3619
|
+
case r.FEEDBACKAPPANSWERTYPE.RADIO:
|
|
3620
|
+
u2.checked && (y2.value.push(v2), n2.push(y2));
|
|
3229
3621
|
break;
|
|
3230
|
-
case
|
|
3231
|
-
case
|
|
3232
|
-
|
|
3622
|
+
case r.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE:
|
|
3623
|
+
case r.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE:
|
|
3624
|
+
u2.checked && (c2[y2.key] || (c2[y2.key] = []), c2[y2.key].push(v2));
|
|
3233
3625
|
break;
|
|
3234
|
-
case
|
|
3235
|
-
|
|
3626
|
+
case r.FEEDBACKAPPANSWERTYPE.BOOLEAN:
|
|
3627
|
+
u2.checked && (y2.value.push(v2), n2.push(y2));
|
|
3236
3628
|
break;
|
|
3237
|
-
case
|
|
3238
|
-
|
|
3629
|
+
case r.FEEDBACKAPPANSWERTYPE.CONSENT:
|
|
3630
|
+
y2.value.push(u2.checked.toString()), n2.push(y2);
|
|
3239
3631
|
break;
|
|
3240
|
-
case
|
|
3241
|
-
case
|
|
3242
|
-
case
|
|
3243
|
-
|
|
3632
|
+
case r.FEEDBACKAPPANSWERTYPE.RATING_EMOJI:
|
|
3633
|
+
case r.FEEDBACKAPPANSWERTYPE.RATING_NUMBER:
|
|
3634
|
+
case r.FEEDBACKAPPANSWERTYPE.RATING_STAR:
|
|
3635
|
+
u2.checked && (y2.value.push(v2), n2.push(y2));
|
|
3244
3636
|
break;
|
|
3245
|
-
case
|
|
3246
|
-
"" !==
|
|
3637
|
+
case r.FEEDBACKAPPANSWERTYPE.SELECT:
|
|
3638
|
+
"" !== v2 && (y2.value.push(v2), n2.push(y2));
|
|
3247
3639
|
break;
|
|
3248
|
-
case
|
|
3249
|
-
"number" ===
|
|
3640
|
+
case r.FEEDBACKAPPANSWERTYPE.POINT_SYSTEM:
|
|
3641
|
+
"number" === f2 && u2.id && (p2[y2.key] || (p2[y2.key] = []), "" !== v2 && p2[y2.key].push(`${u2.id}:${v2}%`));
|
|
3250
3642
|
break;
|
|
3251
|
-
case
|
|
3252
|
-
"hidden" ===
|
|
3643
|
+
case r.FEEDBACKAPPANSWERTYPE.PRIORITY_LIST:
|
|
3644
|
+
"hidden" === f2 && (l2[y2.key] || (l2[y2.key] = []), l2[y2.key].push(v2));
|
|
3253
3645
|
break;
|
|
3254
|
-
case
|
|
3255
|
-
e4.checked && (
|
|
3646
|
+
case r.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX:
|
|
3647
|
+
e4.checked && (y2.value.push(v2), n2.push(y2));
|
|
3256
3648
|
break;
|
|
3257
|
-
case
|
|
3258
|
-
|
|
3259
|
-
const e5 =
|
|
3260
|
-
|
|
3649
|
+
case r.FEEDBACKAPPANSWERTYPE.MAX_DIFF: {
|
|
3650
|
+
if ("radio" !== f2 || !h3) break;
|
|
3651
|
+
const e5 = y2.key === `${h3.ref}-best` ? "best" : y2.key === `${h3.ref}-worst` ? "worst" : null;
|
|
3652
|
+
if (!e5) break;
|
|
3653
|
+
m2[h3.ref] || (m2[h3.ref] = { set: null !== (a3 = null === (t4 = h3.assets) || void 0 === t4 ? void 0 : t4.setIndex) && void 0 !== a3 ? a3 : 1, shown: [], best: null, worst: null });
|
|
3654
|
+
const i3 = m2[h3.ref];
|
|
3655
|
+
"best" === e5 && i3.shown.push(v2), u2.checked && (i3[e5] = v2);
|
|
3656
|
+
break;
|
|
3657
|
+
}
|
|
3658
|
+
case r.FEEDBACKAPPANSWERTYPE.UPLOAD_IMAGE:
|
|
3659
|
+
case r.FEEDBACKAPPANSWERTYPE.UPLOAD_FILE: {
|
|
3660
|
+
const e5 = (0, d.getUploadValues)(u2);
|
|
3661
|
+
e5.length && (y2.value.push(...e5), n2.push(y2));
|
|
3261
3662
|
break;
|
|
3262
3663
|
}
|
|
3263
3664
|
}
|
|
3264
|
-
})),
|
|
3265
|
-
Object.entries(
|
|
3266
|
-
t4 && 0 !== t4.length &&
|
|
3267
|
-
})), Object.entries(
|
|
3268
|
-
t4 && 0 !== t4.length &&
|
|
3269
|
-
})), Object.entries(
|
|
3665
|
+
})), o2) return [];
|
|
3666
|
+
Object.entries(c2).forEach((([e4, t4]) => {
|
|
3667
|
+
t4 && 0 !== t4.length && n2.push({ key: e4, value: t4 });
|
|
3668
|
+
})), Object.entries(p2).forEach((([e4, t4]) => {
|
|
3669
|
+
t4 && 0 !== t4.length && n2.push({ key: e4, value: t4 });
|
|
3670
|
+
})), Object.entries(l2).forEach((([e4, t4]) => {
|
|
3270
3671
|
if (!t4 || 0 === t4.length) return;
|
|
3271
|
-
const
|
|
3272
|
-
|
|
3672
|
+
const i3 = t4.slice().sort(((e5, t5) => Number(e5.split(".")[0]) - Number(t5.split(".")[0])));
|
|
3673
|
+
n2.push({ key: e4, value: i3 });
|
|
3674
|
+
})), Object.entries(m2).forEach((([e4, t4]) => {
|
|
3675
|
+
(t4.best || t4.worst) && n2.push({ key: e4, value: [JSON.stringify([t4])] });
|
|
3273
3676
|
}));
|
|
3274
3677
|
try {
|
|
3275
|
-
|
|
3276
|
-
const t4 = e4.ref + "-",
|
|
3277
|
-
if (0 ===
|
|
3278
|
-
const
|
|
3279
|
-
for (const e5 of
|
|
3280
|
-
const t5 =
|
|
3281
|
-
-1 !== t5 &&
|
|
3678
|
+
i2.questions.filter(((e4) => e4.type === r.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX)).forEach(((e4) => {
|
|
3679
|
+
const t4 = e4.ref + "-", i3 = n2.filter(((e5) => e5.key.startsWith(t4)));
|
|
3680
|
+
if (0 === i3.length) return;
|
|
3681
|
+
const r2 = i3.map(((e5) => ({ key: e5.key.substring(t4.length), value: e5.value }))), o3 = { key: e4.ref, value: [JSON.stringify(r2)] };
|
|
3682
|
+
for (const e5 of i3) {
|
|
3683
|
+
const t5 = n2.findIndex(((t6) => t6.key === e5.key));
|
|
3684
|
+
-1 !== t5 && n2.splice(t5, 1);
|
|
3282
3685
|
}
|
|
3283
|
-
const a3 =
|
|
3284
|
-
-1 !== a3 ?
|
|
3686
|
+
const a3 = n2.findIndex(((t5) => t5.key === e4.ref));
|
|
3687
|
+
-1 !== a3 ? n2[a3] = o3 : n2.push(o3);
|
|
3285
3688
|
}));
|
|
3286
3689
|
} catch (e4) {
|
|
3287
3690
|
this.log.err("Error agrupando MULTI_QUESTION_MATRIX", e4);
|
|
3288
3691
|
}
|
|
3289
|
-
|
|
3692
|
+
const h2 = this.withEarlierMaxDiffSets((0, v.toBaseAnswers)(n2, i2.questions), i2.questions);
|
|
3693
|
+
return this.feedback.answers = h2, i2.setAnswer(h2), h2;
|
|
3694
|
+
}
|
|
3695
|
+
withEarlierMaxDiffSets(e3, t3) {
|
|
3696
|
+
return e3.map(((e4) => {
|
|
3697
|
+
if (!t3.some(((t4) => t4.ref === e4.key && t4.type === r.FEEDBACKAPPANSWERTYPE.MAX_DIFF))) return e4;
|
|
3698
|
+
const i2 = this.parseMaxDiffAnswer(e4), n2 = [...this.parseMaxDiffAnswer(this.earlierAnswer(e4.key)).filter(((e5) => !i2.some(((t4) => t4.set === e5.set)))), ...i2].sort(((e5, t4) => e5.set - t4.set));
|
|
3699
|
+
return Object.assign(Object.assign({}, e4), { value: [JSON.stringify(n2)] });
|
|
3700
|
+
}));
|
|
3701
|
+
}
|
|
3702
|
+
earlierAnswer(e3) {
|
|
3703
|
+
var t3, i2;
|
|
3704
|
+
for (let n2 = this.history.size() - 2; n2 >= 0; n2--) {
|
|
3705
|
+
const r2 = null === (i2 = null === (t3 = this.history.get(n2)) || void 0 === t3 ? void 0 : t3.answers) || void 0 === i2 ? void 0 : i2.find(((t4) => t4.key === e3));
|
|
3706
|
+
if (r2) return r2;
|
|
3707
|
+
}
|
|
3290
3708
|
}
|
|
3291
3709
|
finish() {
|
|
3292
|
-
return
|
|
3710
|
+
return n(this, void 0, void 0, (function* () {
|
|
3293
3711
|
if (this.completed = true, this.timeToCompleted = Date.now() - this.timeToCompleted, this.feedback.metadata.push({ key: "time-to-complete", value: [this.timeToCompleted.toString()] }), this.formOptionsConfig.addSuccessScreen) {
|
|
3294
3712
|
const e3 = document.getElementById("magicfeedback-container-" + this.appId);
|
|
3295
3713
|
e3.childNodes.length > 0 && e3.removeChild(e3.childNodes[0]);
|
|
3296
3714
|
const t3 = (0, l.renderSuccess)(this.formOptionsConfig.successMessage || (0, y.t)(this.lang(), "message.success"));
|
|
3297
3715
|
e3.appendChild(t3);
|
|
3298
3716
|
}
|
|
3299
|
-
this.
|
|
3717
|
+
this.feedback.answers = [];
|
|
3300
3718
|
try {
|
|
3301
3719
|
const e3 = yield this.pushAnswers(true);
|
|
3302
3720
|
if (!e3) throw this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ loading: false, progress: this.progress, total: this.total, completed: this.completed, error: `An error occurred while submitting the form ${this.appId}:` })), new Error("An error occurred while submitting the form ${this.appId}:");
|
|
@@ -3307,13 +3725,13 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3307
3725
|
}));
|
|
3308
3726
|
}
|
|
3309
3727
|
pushAnswers(e3 = false) {
|
|
3310
|
-
return
|
|
3728
|
+
return n(this, void 0, void 0, (function* () {
|
|
3311
3729
|
try {
|
|
3312
3730
|
if (this.config.get("dryRun")) {
|
|
3313
3731
|
const e4 = this.id || `dry-run-${this.appId}-${Date.now()}`;
|
|
3314
3732
|
return this.log.log(`Dry run enabled: skipping feedback submit for form ${this.appId}`), e4;
|
|
3315
3733
|
}
|
|
3316
|
-
const t3 = this.config.get("url"), i2 = { integration: this.appId, publicKey: this.publicKey, feedback: this.feedback, completed: e3 };
|
|
3734
|
+
const t3 = this.config.get("url"), i2 = { integration: this.appId, publicKey: this.publicKey, feedback: this.feedback, completed: e3, lang: this.lang() };
|
|
3317
3735
|
return yield (0, s.sendFeedback)(t3, this.id ? Object.assign(Object.assign({}, i2), { sessionId: this.id }) : i2, this.log);
|
|
3318
3736
|
} catch (e4) {
|
|
3319
3737
|
return this.log.err(`An error occurred while submitting the form ${this.appId}:`, e4), "";
|
|
@@ -3321,117 +3739,133 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3321
3739
|
}));
|
|
3322
3740
|
}
|
|
3323
3741
|
callFollowUpQuestion(e3) {
|
|
3324
|
-
var t3;
|
|
3325
|
-
return
|
|
3742
|
+
var t3, i2;
|
|
3743
|
+
return n(this, void 0, void 0, (function* () {
|
|
3326
3744
|
if (!(null == e3 ? void 0 : e3.followup)) return null;
|
|
3745
|
+
const n2 = null !== (t3 = this.feedback.answers.find(((t4) => t4.key === e3.ref))) && void 0 !== t3 ? t3 : this.feedback.answers.find(((t4) => t4.key.includes(e3.ref) && !t4.key.includes("extra-option"))), r2 = null === (i2 = null == n2 ? void 0 : n2.value) || void 0 === i2 ? void 0 : i2.find(((e4) => null != e4 && "" !== e4));
|
|
3746
|
+
if (void 0 === r2) return this.log.log(`The question ${e3.ref} has no answer, skipping its follow up`), null;
|
|
3327
3747
|
try {
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
throw this.log.err(`An error occurred while submitting the form ${this.appId}:`, e4), e4;
|
|
3748
|
+
const t4 = this.config.get("url"), i3 = Object.assign(Object.assign(Object.assign({ answer: r2 }, "" !== this.publicKey && { publicKey: this.publicKey }), "" === this.publicKey && { campaignSessionId: this.appId }), { sessionId: this.id, question: e3 });
|
|
3749
|
+
return yield (0, s.getFollowUpQuestion)(t4, i3, this.log);
|
|
3750
|
+
} catch (t4) {
|
|
3751
|
+
return this.log.err(`An error occurred while requesting the follow up of ${e3.ref} in the form ${this.appId}:`, t4), null;
|
|
3333
3752
|
}
|
|
3334
3753
|
}));
|
|
3335
3754
|
}
|
|
3336
3755
|
processNextQuestion(e3) {
|
|
3337
|
-
var t3, i2
|
|
3338
|
-
return
|
|
3339
|
-
const
|
|
3340
|
-
if (!
|
|
3341
|
-
const
|
|
3342
|
-
if (0 === (null ==
|
|
3343
|
-
const
|
|
3344
|
-
for (const e4 of
|
|
3345
|
-
const t4 =
|
|
3756
|
+
var t3, i2;
|
|
3757
|
+
return n(this, void 0, void 0, (function* () {
|
|
3758
|
+
const n2 = this.history.back();
|
|
3759
|
+
if (!n2) throw new Error("No page found");
|
|
3760
|
+
const r2 = n2.isFollowup ? [] : n2.getFollowupQuestions();
|
|
3761
|
+
if (0 === (null == r2 ? void 0 : r2.length)) return void (yield this.renderNextQuestion(e3, n2));
|
|
3762
|
+
const o2 = [];
|
|
3763
|
+
for (const e4 of r2) {
|
|
3764
|
+
const t4 = n2.questions.find(((t5) => t5.ref === e4));
|
|
3346
3765
|
if (t4) {
|
|
3347
3766
|
const e5 = yield this.callFollowUpQuestion(t4);
|
|
3348
|
-
e5 &&
|
|
3767
|
+
e5 && o2.push(e5);
|
|
3349
3768
|
}
|
|
3350
3769
|
}
|
|
3351
|
-
if (0 ===
|
|
3352
|
-
const
|
|
3353
|
-
|
|
3770
|
+
if (0 === o2.length) return void (yield this.renderNextQuestion(e3, n2));
|
|
3771
|
+
const a2 = new m.Page(n2.id, n2.position, this.appId, o2, n2.edges), s2 = new g.PageNode(n2.id, n2.position, n2.edges, a2, o2, true);
|
|
3772
|
+
s2.origin = n2.isFollowup && n2.origin ? n2.origin : n2, s2.elements = (0, l.renderQuestions)(o2, this.formOptionsConfig.questionFormat, this.lang(), null === (t3 = this.formData) || void 0 === t3 ? void 0 : t3.product, (() => this.autoSend())), this.history.enqueue(s2), this.syncBackButton(), this.progress += 0.5, e3.innerHTML = "", null === (i2 = s2.elements) || void 0 === i2 || i2.forEach(((t4) => e3.appendChild(t4))), (0, b.armGhostTapGuard)(e3), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ response: this.id, loading: false, progress: this.progress, total: this.total, followup: s2.isFollowup, completed: this.completed, error: null })), this.autofocusAfterRender("navigation");
|
|
3354
3773
|
}));
|
|
3355
3774
|
}
|
|
3356
3775
|
renderNextQuestion(e3, t3) {
|
|
3357
3776
|
var i2, o2, a2, s2, d2;
|
|
3358
|
-
return
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3777
|
+
return n(this, void 0, void 0, (function* () {
|
|
3778
|
+
const n2 = t3.isFollowup && t3.origin ? t3.origin : t3, c2 = n2 === t3 ? this.feedback.answers : [...null !== (i2 = n2.answers) && void 0 !== i2 ? i2 : [], ...this.feedback.answers];
|
|
3779
|
+
let u2 = this.graph.getNextPage(n2, c2);
|
|
3780
|
+
if (!u2) return void this.finish();
|
|
3781
|
+
const p2 = u2.edges.filter(((e4) => "PRECONDITIONAL" === e4.typeCondition)).sort(((e4, t4) => e4.position < t4.position ? -1 : e4.position > t4.position ? 1 : 0));
|
|
3782
|
+
if ((null == p2 ? void 0 : p2.length) > 0) {
|
|
3783
|
+
const t4 = p2.some(((e4) => e4.transition === h.TransitionType.ALLOW));
|
|
3784
|
+
let i3 = t4;
|
|
3785
|
+
for (const t5 of p2) {
|
|
3786
|
+
let n3;
|
|
3367
3787
|
for (let e4 = this.history.size() - 1; e4 >= 0; e4--) {
|
|
3368
|
-
const
|
|
3369
|
-
if (
|
|
3788
|
+
const i4 = this.history.get(e4);
|
|
3789
|
+
if (i4 && (n3 = null === (o2 = i4.answers) || void 0 === o2 ? void 0 : o2.find(((e5) => e5.key === t5.questionRef)), n3)) break;
|
|
3370
3790
|
}
|
|
3371
|
-
let
|
|
3372
|
-
if (
|
|
3373
|
-
const e4 = null === (
|
|
3374
|
-
if ((null == e4 ? void 0 : e4.type) ===
|
|
3791
|
+
let s3 = false;
|
|
3792
|
+
if (n3) {
|
|
3793
|
+
const e4 = null === (a2 = this.formData) || void 0 === a2 ? void 0 : a2.questions.find(((e5) => e5.ref === t5.questionRef)), i4 = Array.isArray(n3.value) ? n3.value : [n3.value], o3 = Array.isArray(t5.value) ? t5.value : [t5.value];
|
|
3794
|
+
if ((null == e4 ? void 0 : e4.type) === r.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) s3 = this.evaluateMatrixPreconditional(t5, n3);
|
|
3375
3795
|
else switch (t5.typeOperator) {
|
|
3376
3796
|
case "EQUAL":
|
|
3377
3797
|
case "INQ":
|
|
3378
|
-
|
|
3798
|
+
s3 = i4.some(((e5) => o3.includes(e5)));
|
|
3379
3799
|
break;
|
|
3380
3800
|
case "NOEQUAL":
|
|
3381
3801
|
case "NINQ":
|
|
3382
|
-
|
|
3802
|
+
s3 = i4.every(((e5) => !o3.includes(e5)));
|
|
3383
3803
|
break;
|
|
3384
3804
|
case "GREATER":
|
|
3385
|
-
|
|
3805
|
+
s3 = i4.some(((e5) => Number(e5) > Number(o3[0])));
|
|
3386
3806
|
break;
|
|
3387
3807
|
case "LESS":
|
|
3388
|
-
|
|
3808
|
+
s3 = i4.some(((e5) => Number(e5) < Number(o3[0])));
|
|
3389
3809
|
break;
|
|
3390
3810
|
case "GREATEREQUAL":
|
|
3391
|
-
|
|
3811
|
+
s3 = i4.some(((e5) => Number(e5) >= Number(o3[0])));
|
|
3392
3812
|
break;
|
|
3393
3813
|
case "LESSEQUAL":
|
|
3394
|
-
|
|
3814
|
+
s3 = i4.some(((e5) => Number(e5) <= Number(o3[0])));
|
|
3395
3815
|
}
|
|
3396
3816
|
}
|
|
3397
|
-
if (t5.transition === h.TransitionType.ALLOW)
|
|
3398
|
-
else if (t5.transition === h.TransitionType.NEXT &&
|
|
3817
|
+
if (t5.transition === h.TransitionType.ALLOW) s3 || (i3 = false);
|
|
3818
|
+
else if (t5.transition === h.TransitionType.NEXT && s3) return this.feedback.answers = [], void (u2 && (yield this.renderNextQuestion(e3, u2)));
|
|
3399
3819
|
}
|
|
3400
|
-
if (t4 && !
|
|
3820
|
+
if (t4 && !i3) return this.feedback.answers = [], void (u2 && (yield this.renderNextQuestion(e3, u2)));
|
|
3401
3821
|
}
|
|
3402
|
-
|
|
3822
|
+
u2.elements = (0, l.renderQuestions)(u2.questions, this.formOptionsConfig.questionFormat, this.lang(), null === (s2 = this.formData) || void 0 === s2 ? void 0 : s2.product, (() => this.autoSend())), e3.innerHTML = "", null === (d2 = u2.elements) || void 0 === d2 || d2.forEach(((t4) => e3.appendChild(t4))), (0, b.armGhostTapGuard)(e3), this.history.enqueue(u2), this.syncBackButton(), this.progress = this.total - this.graph.findMaxDepth(u2), this.formOptionsConfig.afterSubmitEvent && (yield this.formOptionsConfig.afterSubmitEvent({ response: this.id, loading: false, progress: this.progress, total: this.total, followup: u2.isFollowup, completed: this.completed, error: null })), this.autofocusAfterRender("navigation");
|
|
3403
3823
|
}));
|
|
3404
3824
|
}
|
|
3825
|
+
syncBackButton() {
|
|
3826
|
+
const e3 = document.getElementById("magicfeedback-" + this.appId), t3 = null == e3 ? void 0 : e3.querySelector(".magicfeedback-back");
|
|
3827
|
+
t3 && (t3.hidden = this.history.size() <= 1);
|
|
3828
|
+
}
|
|
3405
3829
|
back() {
|
|
3406
3830
|
var e3;
|
|
3407
|
-
return
|
|
3408
|
-
if (
|
|
3831
|
+
return n(this, void 0, void 0, (function* () {
|
|
3832
|
+
if (this.history.size() <= 1) return;
|
|
3409
3833
|
const t3 = document.getElementById("magicfeedback-questions-" + this.appId);
|
|
3410
|
-
t3 && t3.childNodes.length > 0 && (t3.innerHTML = ""), this.history.rollback();
|
|
3834
|
+
(0, A.cancelAutoAdvance)(t3), t3 && t3.childNodes.length > 0 && (t3.innerHTML = ""), this.history.rollback(), this.syncBackButton();
|
|
3411
3835
|
const i2 = this.history.back();
|
|
3412
|
-
i2 ? (null === (e3 = i2.elements) || void 0 === e3 || e3.forEach(((e4) => t3.appendChild(e4))), this.progress = this.total - this.graph.findMaxDepth(i2)) : this.progress = this.history.size(), this.formOptionsConfig.onBackEvent && (yield this.formOptionsConfig.onBackEvent({ loading: false, progress: this.progress, followup: (null == i2 ? void 0 : i2.isFollowup) || false, error: i2 ? null : "No page found" }));
|
|
3836
|
+
i2 ? (null === (e3 = i2.elements) || void 0 === e3 || e3.forEach(((e4) => t3.appendChild(e4))), (0, b.armGhostTapGuard)(t3), this.progress = this.total - this.graph.findMaxDepth(i2)) : this.progress = this.history.size(), this.formOptionsConfig.onBackEvent && (yield this.formOptionsConfig.onBackEvent({ loading: false, progress: this.progress, followup: (null == i2 ? void 0 : i2.isFollowup) || false, error: i2 ? null : "No page found" })), i2 && this.autofocusAfterRender("navigation");
|
|
3413
3837
|
}));
|
|
3414
3838
|
}
|
|
3415
3839
|
previewQuestion(e3, t3, i2) {
|
|
3416
|
-
var
|
|
3417
|
-
const
|
|
3418
|
-
if (!
|
|
3419
|
-
const
|
|
3420
|
-
if (!
|
|
3421
|
-
const { format:
|
|
3422
|
-
|
|
3423
|
-
let
|
|
3840
|
+
var n2, r2;
|
|
3841
|
+
const o2 = Array.isArray(t3) ? t3 : [t3];
|
|
3842
|
+
if (!o2 || 0 === o2.length) throw new Error("[MagicFeedback] No question provided for preview");
|
|
3843
|
+
const a2 = document.getElementById(e3);
|
|
3844
|
+
if (!a2) throw new Error(`[MagicFeedback] Element with ID '${e3}' not found.`);
|
|
3845
|
+
const { format: s2 = this.formOptionsConfig.questionFormat || "standard", language: d2 = this.lang(), product: u2 = (null === (n2 = this.formData) || void 0 === n2 ? void 0 : n2.product) || { customIcons: false }, style: p2 = (null === (r2 = this.formData) || void 0 === r2 ? void 0 : r2.style) || {}, clearContainer: m2 = true, wrap: h2 = true } = i2 || {};
|
|
3846
|
+
m2 && (a2.innerHTML = ""), (null == p2 ? void 0 : p2.primaryColor) && (0, c.applyPrimaryColor)(a2, p2.primaryColor), (0, c.applyDirection)(a2, d2);
|
|
3847
|
+
let f2 = [];
|
|
3424
3848
|
try {
|
|
3425
|
-
|
|
3849
|
+
f2 = (0, l.renderQuestions)(o2, s2, d2, u2);
|
|
3426
3850
|
} catch (e4) {
|
|
3427
3851
|
throw this.log.err(e4), e4;
|
|
3428
3852
|
}
|
|
3429
|
-
let
|
|
3430
|
-
if (
|
|
3853
|
+
let g2 = a2;
|
|
3854
|
+
if (h2) {
|
|
3431
3855
|
const e4 = document.createElement("div");
|
|
3432
|
-
e4.classList.add("magicfeedback-preview-question"),
|
|
3856
|
+
e4.classList.add("magicfeedback-preview-question"), g2.appendChild(e4), g2 = e4;
|
|
3857
|
+
}
|
|
3858
|
+
return f2.forEach(((e4) => g2.appendChild(e4))), a2;
|
|
3859
|
+
}
|
|
3860
|
+
parseMaxDiffAnswer(e3) {
|
|
3861
|
+
var t3;
|
|
3862
|
+
if (!e3 || "string" != typeof (null === (t3 = e3.value) || void 0 === t3 ? void 0 : t3[0])) return [];
|
|
3863
|
+
try {
|
|
3864
|
+
const t4 = JSON.parse(e3.value[0]);
|
|
3865
|
+
return Array.isArray(t4) ? t4 : [];
|
|
3866
|
+
} catch (e4) {
|
|
3867
|
+
return [];
|
|
3433
3868
|
}
|
|
3434
|
-
return g2.forEach(((e4) => y2.appendChild(e4))), s2;
|
|
3435
3869
|
}
|
|
3436
3870
|
parseMatrixAnswerPre(e3) {
|
|
3437
3871
|
if (!e3 || !e3.value) return [];
|
|
@@ -3444,9 +3878,9 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3444
3878
|
return Array.isArray(e3.value) && e3.value.length > 0 && "object" == typeof e3.value[0] && null !== e3.value[0] && "key" in e3.value[0] ? e3.value : [];
|
|
3445
3879
|
}
|
|
3446
3880
|
evaluateMatrixPreconditional(e3, t3) {
|
|
3447
|
-
const i2 = Array.isArray(e3.value) ? e3.value : [e3.value],
|
|
3448
|
-
if (!
|
|
3449
|
-
const o2 =
|
|
3881
|
+
const i2 = Array.isArray(e3.value) ? e3.value : [e3.value], n2 = new Set(e3.option || []), r2 = this.parseMatrixAnswerPre(t3);
|
|
3882
|
+
if (!r2.length) return false;
|
|
3883
|
+
const o2 = n2.size > 0 ? r2.filter(((e4) => n2.has(e4.key))) : r2;
|
|
3450
3884
|
if (!o2.length) return false;
|
|
3451
3885
|
switch (e3.typeOperator) {
|
|
3452
3886
|
case "EQUAL":
|
|
@@ -3468,17 +3902,17 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3468
3902
|
}
|
|
3469
3903
|
}
|
|
3470
3904
|
};
|
|
3471
|
-
},
|
|
3905
|
+
}, 198: (e2, t2) => {
|
|
3472
3906
|
"use strict";
|
|
3473
3907
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.Page = void 0, t2.Page = class {
|
|
3474
|
-
constructor(e3, t3, i,
|
|
3475
|
-
this.id = e3, this.position = t3, this.generatedAt = (/* @__PURE__ */ new Date()).toISOString(), this.updatedAt = (/* @__PURE__ */ new Date()).toISOString(), this.status = "ACTIVE", this.integrationId = i, this.integrationQuestions =
|
|
3908
|
+
constructor(e3, t3, i, n, r) {
|
|
3909
|
+
this.id = e3, this.position = t3, this.generatedAt = (/* @__PURE__ */ new Date()).toISOString(), this.updatedAt = (/* @__PURE__ */ new Date()).toISOString(), this.status = "ACTIVE", this.integrationId = i, this.integrationQuestions = n, this.integrationPageRoutes = r;
|
|
3476
3910
|
}
|
|
3477
3911
|
};
|
|
3478
|
-
},
|
|
3912
|
+
}, 2531: (e2, t2, i) => {
|
|
3479
3913
|
"use strict";
|
|
3480
3914
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.PageGraph = void 0;
|
|
3481
|
-
const
|
|
3915
|
+
const n = i(1814), r = i(1140), o = i(4245);
|
|
3482
3916
|
t2.PageGraph = class {
|
|
3483
3917
|
constructor(e3) {
|
|
3484
3918
|
this.nodes = /* @__PURE__ */ new Map(), this.buildGraph(e3);
|
|
@@ -3487,10 +3921,10 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3487
3921
|
e3.forEach(((e4) => {
|
|
3488
3922
|
var t3;
|
|
3489
3923
|
e4.integrationPageRoutes && (e4.integrationPageRoutes = (null === (t3 = e4.integrationPageRoutes) || void 0 === t3 ? void 0 : t3.sort(((e5, t4) => {
|
|
3490
|
-
const i3 = new Date((null == e5 ? void 0 : e5.generatedAt) || 0).getTime(),
|
|
3491
|
-
return i3 !==
|
|
3924
|
+
const i3 = new Date((null == e5 ? void 0 : e5.generatedAt) || 0).getTime(), n2 = new Date((null == t4 ? void 0 : t4.generatedAt) || 0).getTime();
|
|
3925
|
+
return i3 !== n2 ? i3 - n2 : "DIRECT" === e5.typeCondition && "DIRECT" !== t4.typeCondition ? 1 : "DIRECT" !== e5.typeCondition && "DIRECT" === t4.typeCondition ? -1 : 0;
|
|
3492
3926
|
}))) || []);
|
|
3493
|
-
const i2 = new
|
|
3927
|
+
const i2 = new n.PageNode(e4.id, e4.position, e4.integrationPageRoutes || [], e4, e4.integrationQuestions);
|
|
3494
3928
|
this.nodes.set(i2.id, i2);
|
|
3495
3929
|
}));
|
|
3496
3930
|
}
|
|
@@ -3514,11 +3948,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3514
3948
|
var i2;
|
|
3515
3949
|
if (!e3) return;
|
|
3516
3950
|
e3.edges.sort(((e4, t4) => "DIRECT" === e4.typeCondition ? 1 : "DIRECT" === t4.typeCondition ? -1 : 0));
|
|
3517
|
-
const
|
|
3518
|
-
const
|
|
3951
|
+
const n2 = e3.edges.find(((i3) => {
|
|
3952
|
+
const n3 = e3.questions.find(((e4) => e4.ref === i3.questionRef)), a = null == t3 ? void 0 : t3.filter(((e4) => e4.key === i3.questionRef));
|
|
3519
3953
|
if ("DIRECT" === i3.typeCondition) return true;
|
|
3520
3954
|
if (!a || 0 === a.length) return false;
|
|
3521
|
-
if ((null ==
|
|
3955
|
+
if ((null == n3 ? void 0 : n3.type) === r.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) return this.evaluateMatrixCondition(i3, a);
|
|
3522
3956
|
const s = Array.isArray(i3.value) ? i3.value : [i3.value];
|
|
3523
3957
|
switch (i3.typeOperator) {
|
|
3524
3958
|
case o.OperatorType.EQUAL:
|
|
@@ -3541,19 +3975,19 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3541
3975
|
return false;
|
|
3542
3976
|
}
|
|
3543
3977
|
}));
|
|
3544
|
-
if (!
|
|
3978
|
+
if (!n2) {
|
|
3545
3979
|
const t4 = this.getNextEdgeByDefault(e3);
|
|
3546
3980
|
if (!t4) return;
|
|
3547
3981
|
return this.getNodeById(t4);
|
|
3548
3982
|
}
|
|
3549
|
-
switch (
|
|
3983
|
+
switch (n2.transition) {
|
|
3550
3984
|
case o.TransitionType.PAGE:
|
|
3551
|
-
if (!
|
|
3552
|
-
return this.getNodeById(
|
|
3985
|
+
if (!n2.transitionDestiny) return;
|
|
3986
|
+
return this.getNodeById(n2.transitionDestiny);
|
|
3553
3987
|
case o.TransitionType.FINISH:
|
|
3554
3988
|
return;
|
|
3555
3989
|
case o.TransitionType.REDIRECT:
|
|
3556
|
-
return void (window.location.href = (null === (i2 =
|
|
3990
|
+
return void (window.location.href = (null === (i2 = n2.transitionDestiny) || void 0 === i2 ? void 0 : i2.includes("?")) ? `${n2.transitionDestiny}&${window.location.search.slice(1)}` : `${n2.transitionDestiny}${window.location.search}`);
|
|
3557
3991
|
default:
|
|
3558
3992
|
return;
|
|
3559
3993
|
}
|
|
@@ -3572,21 +4006,21 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3572
4006
|
}
|
|
3573
4007
|
DFSUtil(e3, t3, i2) {
|
|
3574
4008
|
t3.add(e3);
|
|
3575
|
-
let
|
|
3576
|
-
const
|
|
4009
|
+
let n2 = i2;
|
|
4010
|
+
const r2 = [...e3.edges.filter(((e4) => e4.typeCondition !== o.ConditionType.PRECONDITIONAL)) || []], a = this.getNextEdgeByDefault(e3);
|
|
3577
4011
|
if (a) {
|
|
3578
4012
|
const i3 = this.getNodeById(a);
|
|
3579
|
-
i3 && !t3.has(i3) &&
|
|
4013
|
+
i3 && !t3.has(i3) && r2.push(new o.PageRoute(i3.id, "", o.OperatorType.DEFAULT, [""], o.TransitionType.PAGE, i3.id, e3.id));
|
|
3580
4014
|
}
|
|
3581
|
-
for (const e4 of
|
|
4015
|
+
for (const e4 of r2) {
|
|
3582
4016
|
if (!e4.transitionDestiny) continue;
|
|
3583
|
-
const
|
|
3584
|
-
if (
|
|
3585
|
-
const e5 = i2 + 1, o2 = new Set(t3), a2 = this.DFSUtil(
|
|
3586
|
-
|
|
4017
|
+
const r3 = this.getNodeById(e4.transitionDestiny);
|
|
4018
|
+
if (r3 && !t3.has(r3)) {
|
|
4019
|
+
const e5 = i2 + 1, o2 = new Set(t3), a2 = this.DFSUtil(r3, o2, e5);
|
|
4020
|
+
n2 = Math.max(n2, a2);
|
|
3587
4021
|
}
|
|
3588
4022
|
}
|
|
3589
|
-
return
|
|
4023
|
+
return n2;
|
|
3590
4024
|
}
|
|
3591
4025
|
parseMatrixAnswer(e3) {
|
|
3592
4026
|
if (!e3 || !e3.value) return [];
|
|
@@ -3599,9 +4033,9 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3599
4033
|
return Array.isArray(e3.value) && e3.value.length > 0 && "object" == typeof e3.value[0] && null !== e3.value[0] && "key" in e3.value[0] ? e3.value : [];
|
|
3600
4034
|
}
|
|
3601
4035
|
evaluateMatrixCondition(e3, t3) {
|
|
3602
|
-
const i2 = Array.isArray(e3.value) ? e3.value : [e3.value],
|
|
4036
|
+
const i2 = Array.isArray(e3.value) ? e3.value : [e3.value], n2 = new Set(e3.option || []), r2 = t3[0], a = this.parseMatrixAnswer(r2);
|
|
3603
4037
|
if (!a.length) return false;
|
|
3604
|
-
const s =
|
|
4038
|
+
const s = n2.size > 0 ? a.filter(((e4) => n2.has(e4.key))) : a;
|
|
3605
4039
|
if (!s.length) return false;
|
|
3606
4040
|
switch (e3.typeOperator) {
|
|
3607
4041
|
case o.OperatorType.EQUAL:
|
|
@@ -3623,11 +4057,11 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3623
4057
|
}
|
|
3624
4058
|
}
|
|
3625
4059
|
};
|
|
3626
|
-
},
|
|
4060
|
+
}, 1814: (e2, t2) => {
|
|
3627
4061
|
"use strict";
|
|
3628
4062
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.PageNode = void 0, t2.PageNode = class {
|
|
3629
|
-
constructor(e3, t3, i,
|
|
3630
|
-
this.answers = [], this.id = e3, this.position = t3, this.edges = i, this.data =
|
|
4063
|
+
constructor(e3, t3, i, n, r, o = false) {
|
|
4064
|
+
this.answers = [], this.id = e3, this.position = t3, this.edges = i, this.data = n, this.questions = r.sort(((e4, t4) => e4.position - t4.position)), this.elements = [], this.isFollowup = o;
|
|
3631
4065
|
}
|
|
3632
4066
|
getFollowupQuestions() {
|
|
3633
4067
|
return this.questions.filter(((e3) => e3.followup)).map(((e3) => e3.ref));
|
|
@@ -3639,29 +4073,29 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3639
4073
|
this.answers = e3;
|
|
3640
4074
|
}
|
|
3641
4075
|
};
|
|
3642
|
-
},
|
|
4076
|
+
}, 4245: (e2, t2) => {
|
|
3643
4077
|
"use strict";
|
|
3644
|
-
var i,
|
|
4078
|
+
var i, n, r, o;
|
|
3645
4079
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.PageRoute = t2.StatusType = t2.OperatorType = t2.ConditionType = t2.TransitionType = void 0, (o = t2.TransitionType || (t2.TransitionType = {})).PAGE = "PAGE", o.FINISH = "FINISH", o.REDIRECT = "REDIRECT", o.NEXT = "NEXT", o.ALLOW = "ALLOW", (function(e3) {
|
|
3646
4080
|
e3.LOGICAL = "LOGICAL", e3.DIRECT = "DIRECT", e3.PRECONDITIONAL = "PRECONDITIONAL";
|
|
3647
|
-
})(i = t2.ConditionType || (t2.ConditionType = {})), (
|
|
4081
|
+
})(i = t2.ConditionType || (t2.ConditionType = {})), (r = t2.OperatorType || (t2.OperatorType = {})).EQUAL = "EQUAL", r.NOEQUAL = "NOEQUAL", r.GREATER = "GREATER", r.LESS = "LESS", r.GREATEREQUAL = "GREATEREQUAL", r.LESSEQUAL = "LESSEQUAL", r.INQ = "INQ", r.NINQ = "NINQ", r.DEFAULT = "DEFAULT", (function(e3) {
|
|
3648
4082
|
e3.ACTIVE = "ACTIVE", e3.DEPRECATED = "DEPRECATED", e3.DELETE = "DELETE";
|
|
3649
|
-
})(
|
|
3650
|
-
constructor(e3, t3,
|
|
3651
|
-
this.id = e3, this.questionRef = t3, this.typeCondition = d || i.LOGICAL, this.typeOperator =
|
|
4083
|
+
})(n = t2.StatusType || (t2.StatusType = {})), t2.PageRoute = class {
|
|
4084
|
+
constructor(e3, t3, r2, o2, a, s, l, d, c, u) {
|
|
4085
|
+
this.id = e3, this.questionRef = t3, this.typeCondition = d || i.LOGICAL, this.typeOperator = r2, this.value = o2 || [], this.transition = a, this.transitionDestiny = s, this.status = n.ACTIVE, this.generatedAt = /* @__PURE__ */ new Date(), this.updatedAt = /* @__PURE__ */ new Date(), this.integrationPageId = l, this.position = c || 0, this.option = u || [];
|
|
3652
4086
|
}
|
|
3653
4087
|
};
|
|
3654
|
-
},
|
|
4088
|
+
}, 1140: (e2, t2) => {
|
|
3655
4089
|
"use strict";
|
|
3656
|
-
var i,
|
|
3657
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.AGENT_ANSWER_TYPE_BLOCKED = t2.QuestionType = t2.FEEDBACKAPPANSWERTYPE = void 0, (
|
|
4090
|
+
var i, n;
|
|
4091
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.AGENT_ANSWER_TYPE_BLOCKED = t2.QuestionType = t2.FEEDBACKAPPANSWERTYPE = void 0, (n = t2.FEEDBACKAPPANSWERTYPE || (t2.FEEDBACKAPPANSWERTYPE = {})).CONTACT = "CONTACT", n.MULTIPLECHOISE_IMAGE = "MULTIPLECHOISE_IMAGE", n.EMAIL = "EMAIL", n.RATING_STAR = "RATING_STAR", n.RADIO = "RADIO", n.MULTIPLECHOICE = "MULTIPLECHOICE", n.SELECT = "SELECT", n.TEXT = "TEXT", n.LONGTEXT = "LONGTEXT", n.NUMBER = "NUMBER", n.RATING_EMOJI = "RATING_EMOJI", n.RATING_NUMBER = "RATING_NUMBER", n.DATE = "DATE", n.BOOLEAN = "BOOLEAN", n.PASSWORD = "PASSWORD", n.CONSENT = "CONSENT", n.MULTI_QUESTION_MATRIX = "MULTI_QUESTION_MATRIX", n.POINT_SYSTEM = "POINT_SYSTEM", n.PRIORITY_LIST = "PRIORITY_LIST", n.INFO_PAGE = "INFO_PAGE", n.UPLOAD_FILE = "UPLOAD_FILE", n.UPLOAD_IMAGE = "UPLOAD_IMAGE", n.MAX_DIFF = "MAX_DIFF", t2.QuestionType = class {
|
|
3658
4092
|
}, t2.AGENT_ANSWER_TYPE_BLOCKED = "ABUSIVE_OR_OFFENSIVE", (function(e3) {
|
|
3659
4093
|
e3.FORM = "form", e3.DIV = "div";
|
|
3660
4094
|
})(i || (i = {}));
|
|
3661
|
-
},
|
|
4095
|
+
}, 459: (e2, t2, i) => {
|
|
3662
4096
|
"use strict";
|
|
3663
4097
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.applyDirection = t2.applyPrimaryColor = t2.generateContainer = void 0;
|
|
3664
|
-
const
|
|
4098
|
+
const n = i(7031);
|
|
3665
4099
|
t2.generateContainer = function(e3, t3) {
|
|
3666
4100
|
let i2 = document.getElementById(e3);
|
|
3667
4101
|
if (!i2 && (i2 = document.getElementById("magicfeedback-container-" + t3), !i2)) throw new Error(`Element with ID '${e3}' not found.`);
|
|
@@ -3669,225 +4103,254 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3669
4103
|
}, t2.applyPrimaryColor = function(e3, t3) {
|
|
3670
4104
|
e3.style.setProperty("--mf-primary", t3), e3.style.setProperty("--mf-primary-hover", `color-mix(in srgb, ${t3} 85%, black)`), e3.style.setProperty("--mf-primary-light", `color-mix(in srgb, ${t3} 15%, white)`), e3.style.setProperty("--mf-primary-border", `color-mix(in srgb, ${t3} 35%, transparent)`), e3.style.setProperty("--mf-border-focus", t3);
|
|
3671
4105
|
}, t2.applyDirection = function(e3, t3) {
|
|
3672
|
-
const i2 = (0,
|
|
4106
|
+
const i2 = (0, n.isRtlLanguage)(t3);
|
|
3673
4107
|
e3.setAttribute("dir", i2 ? "rtl" : "ltr"), e3.classList.toggle("magicfeedback-rtl", i2);
|
|
3674
4108
|
};
|
|
3675
|
-
},
|
|
4109
|
+
}, 6658: (e2, t2, i) => {
|
|
3676
4110
|
"use strict";
|
|
3677
4111
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.getUrlParam = t2.getBooleanOptions = t2.parseTitle = void 0;
|
|
3678
|
-
const
|
|
4112
|
+
const n = i(7031);
|
|
3679
4113
|
t2.parseTitle = function(e3, t3) {
|
|
3680
4114
|
return e3 ? "object" == typeof e3 ? e3[t3] || e3.en : e3 : "";
|
|
3681
4115
|
}, t2.getBooleanOptions = function(e3) {
|
|
3682
|
-
return [(0,
|
|
4116
|
+
return [(0, n.t)(e3, "boolean.yes"), (0, n.t)(e3, "boolean.no")];
|
|
3683
4117
|
}, t2.getUrlParam = function(e3) {
|
|
3684
4118
|
return new URLSearchParams(window.location.search).get(e3);
|
|
3685
4119
|
};
|
|
3686
|
-
},
|
|
4120
|
+
}, 1433: (e2, t2, i) => {
|
|
3687
4121
|
"use strict";
|
|
3688
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.createRatingNumberElement = t2.createStarRating = t2.createRatingPlaceholder = void 0;
|
|
3689
|
-
const r = i(
|
|
3690
|
-
function
|
|
3691
|
-
const
|
|
3692
|
-
|
|
3693
|
-
const
|
|
3694
|
-
|
|
3695
|
-
const
|
|
3696
|
-
return
|
|
4122
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.RATING_NUMBER_MIN_CHIP_WIDTH = t2.usesLegacyRatingNumber = t2.createRatingNumberElement = t2.createStarRating = t2.createRatingPlaceholder = void 0;
|
|
4123
|
+
const n = i(7031), r = i(2139);
|
|
4124
|
+
function o(e3, t3, i2 = "ltr") {
|
|
4125
|
+
const n2 = document.createElement("div");
|
|
4126
|
+
n2.classList.add("magicfeedback-rating-placeholder");
|
|
4127
|
+
const r2 = document.createElement("span");
|
|
4128
|
+
r2.textContent = null != e3 ? e3 : "", r2.classList.add("magicfeedback-rating-placeholder-value");
|
|
4129
|
+
const o2 = document.createElement("span");
|
|
4130
|
+
return o2.textContent = null != t3 ? t3 : "", o2.classList.add("magicfeedback-rating-placeholder-value"), "ltr" === i2 ? (e3 && n2.appendChild(r2), t3 && n2.appendChild(o2)) : (t3 && n2.appendChild(o2), e3 && n2.appendChild(r2)), n2;
|
|
3697
4131
|
}
|
|
3698
|
-
t2.createRatingPlaceholder =
|
|
3699
|
-
},
|
|
3700
|
-
const
|
|
3701
|
-
|
|
4132
|
+
t2.createRatingPlaceholder = o, t2.createStarRating = function(e3, t3, i2, n2 = () => {
|
|
4133
|
+
}, a) {
|
|
4134
|
+
const s = "magicfeedback-rating-star-selected", l = document.createElement("div");
|
|
4135
|
+
l.classList.add("magicfeedback-rating-star-container"), l.style.maxWidth = "300px", l.style.margin = "auto", l.dataset.originalSelection = "0";
|
|
3702
4136
|
for (let t4 = 1; t4 <= 5; t4++) {
|
|
3703
4137
|
const i3 = document.createElement("label");
|
|
3704
4138
|
i3.classList.add("magicfeedback-rating-star-option");
|
|
3705
|
-
const
|
|
3706
|
-
|
|
3707
|
-
const e4 =
|
|
3708
|
-
for (let t5 = 0; t5 < e4.length; t5++) t5 + 1 <= Number(
|
|
3709
|
-
|
|
3710
|
-
})), i3.appendChild(
|
|
3711
|
-
const
|
|
3712
|
-
|
|
3713
|
-
const e4 =
|
|
4139
|
+
const o2 = document.createElement("input");
|
|
4140
|
+
o2.id = `rating-${e3}-${t4}`, o2.type = "radio", o2.name = e3, o2.value = t4.toString(), o2.style.position = "absolute", o2.style.opacity = "0", o2.style.width = "0", o2.style.height = "0", o2.classList.add("magicfeedback-input"), a && a === o2.value && (o2.checked = true), o2.addEventListener("change", (() => {
|
|
4141
|
+
const e4 = l.querySelectorAll(".rating__star");
|
|
4142
|
+
for (let t5 = 0; t5 < e4.length; t5++) t5 + 1 <= Number(o2.value) ? e4[t5].classList.contains(s) || e4[t5].classList.add(s) : e4[t5].classList.contains(s) && e4[t5].classList.remove(s);
|
|
4143
|
+
l.dataset.originalSelection = o2.value;
|
|
4144
|
+
})), (0, r.autoAdvanceOn)(o2, n2), i3.appendChild(o2);
|
|
4145
|
+
const d2 = document.createElement("label");
|
|
4146
|
+
d2.htmlFor = `rating-${e3}-${t4}`, d2.classList.add("rating__star"), d2.textContent = "\u2605", d2.style.fontSize = "40px", d2.style.color = "#CCCCCC", d2.style.cursor = "pointer", d2.addEventListener("mouseenter", (() => {
|
|
4147
|
+
const e4 = l.querySelectorAll(".rating__star"), i4 = t4 - 1;
|
|
3714
4148
|
e4.forEach(((e5, t5) => {
|
|
3715
|
-
t5 <= i4 ? e5.classList.contains(
|
|
4149
|
+
t5 <= i4 ? e5.classList.contains(s) || e5.classList.add(s) : e5.classList.contains(s) && e5.classList.remove(s);
|
|
3716
4150
|
}));
|
|
3717
|
-
})),
|
|
3718
|
-
const e4 = Number(
|
|
3719
|
-
|
|
3720
|
-
i4 < e4 ? t5.classList.contains(
|
|
4151
|
+
})), d2.addEventListener("mouseleave", (() => {
|
|
4152
|
+
const e4 = Number(l.dataset.originalSelection || "0");
|
|
4153
|
+
l.querySelectorAll(".rating__star").forEach(((t5, i4) => {
|
|
4154
|
+
i4 < e4 ? t5.classList.contains(s) || t5.classList.add(s) : t5.classList.contains(s) && t5.classList.remove(s);
|
|
3721
4155
|
}));
|
|
3722
|
-
})), i3.appendChild(
|
|
4156
|
+
})), i3.appendChild(d2), l.appendChild(i3);
|
|
3723
4157
|
}
|
|
3724
|
-
const
|
|
3725
|
-
return
|
|
3726
|
-
}, t2.createRatingNumberElement = function(e3,
|
|
3727
|
-
var
|
|
3728
|
-
const
|
|
3729
|
-
|
|
3730
|
-
const
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
4158
|
+
const d = o(t3, i2);
|
|
4159
|
+
return d.childElementCount > 0 && l.appendChild(d), l;
|
|
4160
|
+
}, t2.createRatingNumberElement = function(e3, i2, o2, a, s, l, d, c, u = {}) {
|
|
4161
|
+
var p, m;
|
|
4162
|
+
const h = document.createElement("div");
|
|
4163
|
+
h.classList.add("magicfeedback-rating-number");
|
|
4164
|
+
const f = !!u.legacy, g = f && !!u.isPhone, y = g ? (function(e4) {
|
|
4165
|
+
const t3 = (null == e4 ? void 0 : e4.max) ? Number(e4.max) : 10, i3 = (null == e4 ? void 0 : e4.min) ? Number(e4.min) : 0;
|
|
4166
|
+
return (n2) => {
|
|
4167
|
+
var r2;
|
|
4168
|
+
return (null === (r2 = null == e4 ? void 0 : e4.numberPlaceholders) || void 0 === r2 ? void 0 : r2[n2]) || (n2 === i3 ? null == e4 ? void 0 : e4.minPlaceholder : void 0) || (n2 === t3 ? null == e4 ? void 0 : e4.maxPlaceholder : void 0) || void 0;
|
|
4169
|
+
};
|
|
4170
|
+
})(i2) : null;
|
|
4171
|
+
g && (a = "column", i2 = Object.assign(Object.assign({}, i2), { minPlaceholder: void 0, maxPlaceholder: void 0, numberPlaceholders: void 0 })), f && h.classList.add("magicfeedback-rating-number--legacy");
|
|
4172
|
+
const v = "column" === a, b = "ltr" === o2 ? a : `${a}-reverse`, E = document.createElement("div");
|
|
4173
|
+
E.classList.add("magicfeedback-rating-number-container"), E.classList.add(`magicfeedback-rating-number-container-${o2}`), E.classList.add(`magicfeedback-rating-number-container-${a}`), E.style.display = "flex", E.style.flexDirection = b, E.setAttribute("role", "radiogroup"), E.setAttribute("aria-label", (null == i2 ? void 0 : i2.ariaLabel) || (0, n.t)(c, "rating.ariaLabel"));
|
|
4174
|
+
const A = (null == i2 ? void 0 : i2.max) ? Number(null == i2 ? void 0 : i2.max) : 10, k = (null == i2 ? void 0 : i2.min) ? Number(null == i2 ? void 0 : i2.min) : 0;
|
|
4175
|
+
!v && A - k + 1 > 6 && E.classList.add("magicfeedback-rating-number-container-row--dense");
|
|
4176
|
+
const T = (null == i2 ? void 0 : i2.numberPlaceholders) || null, C = !(!T || !Object.keys(T).length);
|
|
4177
|
+
let x = null;
|
|
4178
|
+
if (!v && ((null == i2 ? void 0 : i2.minPlaceholder) || (null == i2 ? void 0 : i2.maxPlaceholder))) {
|
|
4179
|
+
x = document.createElement("div"), x.classList.add("magicfeedback-rating-number-scale-labels");
|
|
3738
4180
|
const e4 = document.createElement("span");
|
|
3739
|
-
e4.classList.add("magicfeedback-rating-number-scale-label"), e4.textContent = null !== (
|
|
3740
|
-
const
|
|
3741
|
-
|
|
4181
|
+
e4.classList.add("magicfeedback-rating-number-scale-label"), e4.textContent = null !== (p = null == i2 ? void 0 : i2.minPlaceholder) && void 0 !== p ? p : "";
|
|
4182
|
+
const t3 = document.createElement("span");
|
|
4183
|
+
t3.classList.add("magicfeedback-rating-number-scale-label"), t3.textContent = null !== (m = null == i2 ? void 0 : i2.maxPlaceholder) && void 0 !== m ? m : "", "ltr" === o2 ? (x.appendChild(e4), x.appendChild(t3)) : (x.appendChild(t3), x.appendChild(e4));
|
|
3742
4184
|
}
|
|
3743
|
-
let
|
|
3744
|
-
if (
|
|
3745
|
-
const e4 = "ltr" ===
|
|
3746
|
-
if (e4) {
|
|
4185
|
+
let P = null;
|
|
4186
|
+
if (v && !C && E.classList.add("magicfeedback-rating-number-container-column--bare"), (!v || !C) && ((null == i2 ? void 0 : i2.minPlaceholder) || (null == i2 ? void 0 : i2.maxPlaceholder))) {
|
|
4187
|
+
const e4 = "ltr" === o2 ? null == i2 ? void 0 : i2.minPlaceholder : null == i2 ? void 0 : i2.maxPlaceholder, t3 = "ltr" === o2 ? null == i2 ? void 0 : i2.maxPlaceholder : null == i2 ? void 0 : i2.minPlaceholder, n2 = (e5) => {
|
|
3747
4188
|
const t4 = document.createElement("div");
|
|
3748
|
-
t4.classList.add("magicfeedback-rating-number-scale-label-block"), t4.textContent =
|
|
3749
|
-
}
|
|
3750
|
-
|
|
4189
|
+
return t4.classList.add("magicfeedback-rating-number-scale-label-block"), v || (t4.classList.add("magicfeedback-rating-number-scale-label-block--stacked"), t4.style.display = "none"), t4.textContent = e5, t4;
|
|
4190
|
+
};
|
|
4191
|
+
e4 && h.appendChild(n2(e4)), t3 && (P = n2(t3));
|
|
3751
4192
|
}
|
|
3752
|
-
for (let
|
|
3753
|
-
const
|
|
3754
|
-
|
|
3755
|
-
const
|
|
3756
|
-
|
|
3757
|
-
const
|
|
3758
|
-
|
|
3759
|
-
const
|
|
3760
|
-
u2.
|
|
4193
|
+
for (let t3 = k; t3 <= A; t3++) {
|
|
4194
|
+
const n2 = document.createElement("div");
|
|
4195
|
+
n2.classList.add("magicfeedback-rating-number-option"), n2.classList.add(`magicfeedback-rating-number-option-${a}`);
|
|
4196
|
+
const o3 = document.createElement("label");
|
|
4197
|
+
o3.htmlFor = `rating-${e3}-${t3}`, o3.classList.add("magicfeedback-rating-number-option-label-container");
|
|
4198
|
+
const c2 = C && (T[t3] || (t3 === k ? null == i2 ? void 0 : i2.minPlaceholder : void 0) || (t3 === A ? null == i2 ? void 0 : i2.maxPlaceholder : void 0)), u2 = document.createElement("input");
|
|
4199
|
+
u2.id = `rating-${e3}-${t3}`, u2.type = "radio", u2.name = e3, u2.value = t3.toString(), u2.classList.add(s), u2.classList.add("magicfeedback-input");
|
|
4200
|
+
const p2 = null == y ? void 0 : y(t3);
|
|
4201
|
+
u2.setAttribute("aria-label", c2 ? `${t3} \u2014 ${c2}` : p2 ? `${t3} \u2014 ${p2}` : `${t3}`), (0, r.autoAdvanceOn)(u2, l), d && d === u2.value && (u2.checked = true), o3.appendChild(u2);
|
|
3761
4202
|
const m2 = document.createElement("span");
|
|
3762
|
-
|
|
3763
|
-
|
|
4203
|
+
m2.classList.add("magicfeedback-rating-number-value");
|
|
4204
|
+
const h2 = document.createElement("span");
|
|
4205
|
+
if (h2.textContent = p2 ? `${t3} = ${p2}` : t3.toString(), h2.classList.add("magicfeedback-rating-number-value-num"), f && (h2.style.fontWeight = "normal"), m2.appendChild(h2), v) {
|
|
4206
|
+
if (c2) {
|
|
3764
4207
|
const e4 = document.createElement("span");
|
|
3765
|
-
e4.textContent =
|
|
4208
|
+
e4.textContent = c2, e4.classList.add("magicfeedback-rating-number-value-label"), m2.appendChild(e4);
|
|
3766
4209
|
}
|
|
3767
|
-
} else
|
|
3768
|
-
|
|
4210
|
+
} else T && T[t3] && (o3.title = T[t3]);
|
|
4211
|
+
o3.appendChild(m2), n2.appendChild(o3), E.appendChild(n2);
|
|
3769
4212
|
}
|
|
3770
|
-
if (
|
|
3771
|
-
|
|
3772
|
-
i3.classList.
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
4213
|
+
if (h.appendChild(E), P && h.appendChild(P), x && h.appendChild(x), v || f || (function(e4, i3, n2, r2) {
|
|
4214
|
+
if ("undefined" == typeof ResizeObserver) return;
|
|
4215
|
+
const o3 = i3.classList.contains("magicfeedback-rating-number-container-row--dense");
|
|
4216
|
+
let a2 = 0, s2 = false;
|
|
4217
|
+
const l2 = "function" == typeof requestAnimationFrame ? requestAnimationFrame : (e5) => (e5(0), 0);
|
|
4218
|
+
let d2 = 0, c2 = false;
|
|
4219
|
+
new ResizeObserver(((u2) => {
|
|
4220
|
+
var p2;
|
|
4221
|
+
const m2 = null === (p2 = u2[0]) || void 0 === p2 ? void 0 : p2.contentRect.width;
|
|
4222
|
+
m2 && m2 !== d2 && (d2 = m2, c2 || (c2 = true, l2((() => {
|
|
4223
|
+
c2 = false, s2 || (a2 = parseFloat(getComputedStyle(i3).columnGap) || 0);
|
|
4224
|
+
const l3 = n2 * t2.RATING_NUMBER_MIN_CHIP_WIDTH + (n2 - 1) * a2;
|
|
4225
|
+
var u3;
|
|
4226
|
+
(u3 = d2 < l3) !== s2 && (s2 = u3, e4.classList.toggle("magicfeedback-rating-number--stacked", u3), e4.querySelectorAll(":scope > .magicfeedback-rating-number-scale-labels").forEach(((e5) => {
|
|
4227
|
+
e5.style.display = u3 ? "none" : "";
|
|
4228
|
+
})), e4.querySelectorAll(":scope > .magicfeedback-rating-number-scale-label-block--stacked").forEach(((e5) => {
|
|
4229
|
+
e5.style.display = u3 ? "" : "none";
|
|
4230
|
+
})), i3.classList.toggle("magicfeedback-rating-number-container-row", !u3), i3.classList.toggle("magicfeedback-rating-number-container-row--dense", !u3 && o3), i3.classList.toggle("magicfeedback-rating-number-container-column", u3), i3.classList.toggle("magicfeedback-rating-number-container-column--bare", u3), i3.style.flexDirection = u3 ? "ltr" === r2 ? "column" : "column-reverse" : "ltr" === r2 ? "row" : "row-reverse", i3.querySelectorAll(":scope > .magicfeedback-rating-number-option").forEach(((e5) => {
|
|
4231
|
+
e5.classList.toggle("magicfeedback-rating-number-option-row", !u3), e5.classList.toggle("magicfeedback-rating-number-option-column", u3);
|
|
4232
|
+
})));
|
|
4233
|
+
}))));
|
|
4234
|
+
})).observe(e4);
|
|
4235
|
+
})(h, E, A - k + 1, o2), (null == i2 ? void 0 : i2.extraOption) && (null == i2 ? void 0 : i2.extraOptionText)) {
|
|
4236
|
+
const t3 = document.createElement("div");
|
|
4237
|
+
t3.classList.add("magicfeedback-rating-number-extra-row");
|
|
4238
|
+
const n2 = document.createElement("div");
|
|
4239
|
+
n2.classList.add("magicfeedback-rating-number-option"), n2.classList.add("magicfeedback-rating-number-option--extra");
|
|
4240
|
+
const o3 = document.createElement("label");
|
|
4241
|
+
o3.htmlFor = `rating-${e3}-extra`, o3.classList.add("magicfeedback-rating-number-option-label-container");
|
|
4242
|
+
const a2 = document.createElement("input");
|
|
4243
|
+
a2.id = `rating-${e3}-extra`, a2.type = "radio", a2.name = e3, a2.value = "-", a2.classList.add(s), a2.classList.add("magicfeedback-input"), a2.setAttribute("aria-label", null == i2 ? void 0 : i2.extraOptionText), (0, r.autoAdvanceOn)(a2, l);
|
|
3781
4244
|
const d2 = document.createElement("span");
|
|
3782
|
-
d2.
|
|
4245
|
+
d2.classList.add("magicfeedback-rating-number-value");
|
|
4246
|
+
const c2 = document.createElement("span");
|
|
4247
|
+
c2.textContent = null == i2 ? void 0 : i2.extraOptionText, c2.classList.add("magicfeedback-rating-number-value-label"), d2.appendChild(c2), o3.appendChild(a2), o3.appendChild(d2), n2.appendChild(o3), t3.appendChild(n2), h.appendChild(t3);
|
|
3783
4248
|
}
|
|
3784
|
-
return
|
|
3785
|
-
}
|
|
3786
|
-
|
|
4249
|
+
return h;
|
|
4250
|
+
}, t2.usesLegacyRatingNumber = function(e3) {
|
|
4251
|
+
return !!e3 && /matas/i.test(e3);
|
|
4252
|
+
}, t2.RATING_NUMBER_MIN_CHIP_WIDTH = 44;
|
|
4253
|
+
}, 7156: (e2, t2, i) => {
|
|
3787
4254
|
"use strict";
|
|
3788
4255
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.getQuestionRenderer = void 0;
|
|
3789
|
-
const
|
|
4256
|
+
const n = i(1140), r = i(7352), o = i(5826), a = i(6054), s = i(8416), l = i(227), d = i(8707), c = i(511), u = i(6055), p = i(4310), m = i(5429), h = i(8822), f = i(6083), g = i(9102), y = i(6838), v = i(2427), b = i(1732), E = i(5469), A = i(4336), k = i(5963), T = i(4792), C = i(7754), x = /* @__PURE__ */ new Map([[n.FEEDBACKAPPANSWERTYPE.TEXT, s.renderText], [n.FEEDBACKAPPANSWERTYPE.LONGTEXT, o.renderLongText], [n.FEEDBACKAPPANSWERTYPE.NUMBER, a.renderNumber], [n.FEEDBACKAPPANSWERTYPE.RADIO, r.renderChoice], [n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE, r.renderChoice], [n.FEEDBACKAPPANSWERTYPE.BOOLEAN, l.renderBoolean], [n.FEEDBACKAPPANSWERTYPE.SELECT, d.renderSelect], [n.FEEDBACKAPPANSWERTYPE.DATE, c.renderDate], [n.FEEDBACKAPPANSWERTYPE.EMAIL, u.renderEmail], [n.FEEDBACKAPPANSWERTYPE.PASSWORD, p.renderPassword], [n.FEEDBACKAPPANSWERTYPE.CONSENT, m.renderConsent], [n.FEEDBACKAPPANSWERTYPE.RATING_EMOJI, h.renderRatingEmoji], [n.FEEDBACKAPPANSWERTYPE.RATING_NUMBER, f.renderRatingNumber], [n.FEEDBACKAPPANSWERTYPE.RATING_STAR, g.renderRatingStar], [n.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX, y.renderMatrix], [n.FEEDBACKAPPANSWERTYPE.PRIORITY_LIST, v.renderPriorityList], [n.FEEDBACKAPPANSWERTYPE.POINT_SYSTEM, b.renderPointSystem], [n.FEEDBACKAPPANSWERTYPE.UPLOAD_IMAGE, E.renderUploadImage], [n.FEEDBACKAPPANSWERTYPE.UPLOAD_FILE, A.renderUploadFile], [n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE, k.renderMultipleChoiceImage], [n.FEEDBACKAPPANSWERTYPE.INFO_PAGE, T.renderInfoPage], [n.FEEDBACKAPPANSWERTYPE.MAX_DIFF, C.renderMaxDiff]]);
|
|
3790
4257
|
t2.getQuestionRenderer = function(e3) {
|
|
3791
|
-
return
|
|
4258
|
+
return x.get(e3);
|
|
3792
4259
|
};
|
|
3793
|
-
},
|
|
4260
|
+
}, 227: (e2, t2, i) => {
|
|
3794
4261
|
"use strict";
|
|
3795
4262
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderBoolean = void 0;
|
|
3796
|
-
const r = i(
|
|
3797
|
-
t2.renderBoolean = ({ question: e3, language: t3, urlParamValue: i2, send:
|
|
3798
|
-
const { ref:
|
|
3799
|
-
return
|
|
3800
|
-
const
|
|
3801
|
-
|
|
3802
|
-
const
|
|
3803
|
-
|
|
3804
|
-
const
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
})), i2 && i2.toLowerCase() === s2.value.toLowerCase() && (s2.checked = true), r2.appendChild(s2), r2.appendChild(a2), d.appendChild(r2);
|
|
3808
|
-
})), s.appendChild(d), { element: s, elementTypeClass: l };
|
|
4263
|
+
const n = i(6658), r = i(2139);
|
|
4264
|
+
t2.renderBoolean = ({ question: e3, language: t3, urlParamValue: i2, send: o }) => {
|
|
4265
|
+
const { ref: a, assets: s } = e3, l = document.createElement("div"), d = "magicfeedback-radio", c = document.createElement("div");
|
|
4266
|
+
return c.classList.add("magicfeedback-boolean-container"), c.style.display = "flex", c.style.flexDirection = "row", c.style.justifyContent = "space-between", c.style.width = "70%", c.style.margin = "auto", ((null == s ? void 0 : s.addIcon) ? ["\u{1F44D}", "\u{1F44E}"] : (0, n.getBooleanOptions)(t3)).forEach(((e4, t4) => {
|
|
4267
|
+
const n2 = document.createElement("label");
|
|
4268
|
+
n2.classList.add("magicfeedback-boolean-option"), n2.htmlFor = `rating-${a}-${t4}`, n2.style.cursor = "pointer", n2.style.display = "flex", n2.style.justifyContent = "center", n2.style.alignItems = "center", n2.style.margin = "auto", n2.style.padding = "0", n2.style.width = "45%", n2.style.height = "38px";
|
|
4269
|
+
const s2 = document.createElement("label");
|
|
4270
|
+
s2.htmlFor = `rating-${a}-${t4}`, s2.textContent = e4, s2.style.margin = "0", s2.style.padding = "0";
|
|
4271
|
+
const l2 = document.createElement("input");
|
|
4272
|
+
l2.id = `rating-${a}-${t4}`, l2.type = "radio", l2.name = a, l2.value = ["Yes", "No"][t4], l2.classList.add(d), l2.classList.add("magicfeedback-input"), l2.style.position = "absolute", l2.style.opacity = "0", l2.style.width = "0", l2.style.height = "0", l2.style.margin = "0", (0, r.autoAdvanceOn)(l2, o), i2 && i2.toLowerCase() === l2.value.toLowerCase() && (l2.checked = true), n2.appendChild(l2), n2.appendChild(s2), c.appendChild(n2);
|
|
4273
|
+
})), l.appendChild(c), { element: l, elementTypeClass: d };
|
|
3809
4274
|
};
|
|
3810
|
-
},
|
|
4275
|
+
}, 7352: (e2, t2, i) => {
|
|
3811
4276
|
"use strict";
|
|
3812
4277
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderChoice = void 0;
|
|
3813
|
-
const r = i(
|
|
3814
|
-
t2.renderChoice = ({ question: e3, language: t3, urlParamValue: i2, randomPosition:
|
|
3815
|
-
const { type:
|
|
3816
|
-
let
|
|
3817
|
-
|
|
3818
|
-
let
|
|
3819
|
-
(null ==
|
|
3820
|
-
|
|
4278
|
+
const n = i(1140), r = i(9930), o = i(2139);
|
|
4279
|
+
t2.renderChoice = ({ question: e3, language: t3, urlParamValue: i2, randomPosition: a, send: s }) => {
|
|
4280
|
+
const { type: l, ref: d, value: c, defaultValue: u, assets: p } = e3, m = document.createElement("div"), h = "magicfeedback-" + ("MULTIPLECHOICE" === l ? "checkbox" : "radio");
|
|
4281
|
+
let f = c || [];
|
|
4282
|
+
a && (f = f.sort((() => Math.random() - 0.5)));
|
|
4283
|
+
let g = (null == p ? void 0 : p.exclusiveAnswers) || [];
|
|
4284
|
+
(null == p ? void 0 : p.extraOption) && (g = g.filter(((e4) => e4 !== p.extraOptionText))), g.length > 0 && (null == g || g.forEach(((e4) => {
|
|
4285
|
+
f.includes(e4) || f.push(e4);
|
|
3821
4286
|
})));
|
|
3822
|
-
const
|
|
3823
|
-
return (null ==
|
|
3824
|
-
const
|
|
3825
|
-
|
|
3826
|
-
const
|
|
3827
|
-
if (
|
|
3828
|
-
document.querySelectorAll(`input[name="${
|
|
3829
|
-
})),
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
const i3 = document.getElementById(`extra-option-${l}`);
|
|
3833
|
-
t4.target.checked && f.includes(e4) ? (h.forEach(((t5) => {
|
|
4287
|
+
const y = null == p ? void 0 : p.extraOptionText;
|
|
4288
|
+
return (null == p ? void 0 : p.extraOption) && y && !f.includes(y) && f.push(y), f.forEach(((e4, a2) => {
|
|
4289
|
+
const c2 = document.createElement("div");
|
|
4290
|
+
c2.classList.add(`magicfeedback-${"MULTIPLECHOICE" === l ? "checkbox" : "radio"}-container`);
|
|
4291
|
+
const y2 = document.createElement("label"), v = document.createElement("input");
|
|
4292
|
+
if (v.id = `rating-${d}-${a2}`, v.type = "MULTIPLECHOICE" === l ? "checkbox" : "radio", v.name = d, v.value = e4, v.classList.add(h), v.classList.add("magicfeedback-input"), l === n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE && (null == p ? void 0 : p.maxOptions) && (null == p ? void 0 : p.maxOptions) > 0 && v.addEventListener("change", (() => {
|
|
4293
|
+
document.querySelectorAll(`input[name="${d}"]:checked`).length > (null == p ? void 0 : p.maxOptions) && (v.checked = false);
|
|
4294
|
+
})), l === n.FEEDBACKAPPANSWERTYPE.RADIO && s && (!(null == p ? void 0 : p.extraOptionText) || (null == p ? void 0 : p.extraOptionText) && e4 !== (null == p ? void 0 : p.extraOptionText)) && (0, o.autoAdvanceOn)(v, s), e4 !== u && e4 !== i2 || (v.checked = true), y2.textContent = e4, y2.htmlFor = `rating-${d}-${a2}`, v.addEventListener("change", ((t4) => {
|
|
4295
|
+
const i3 = document.getElementById(`extra-option-${d}`);
|
|
4296
|
+
t4.target.checked && g.includes(e4) ? (f.forEach(((t5) => {
|
|
3834
4297
|
t5 !== e4 && (document.querySelector(`input[value="${t5}"]`).checked = false);
|
|
3835
|
-
})), i3 && (i3.style.display = "none")) :
|
|
4298
|
+
})), i3 && (i3.style.display = "none")) : g.forEach(((t5) => {
|
|
3836
4299
|
t5 !== e4 && (document.querySelector(`input[value="${t5}"]`).checked = false);
|
|
3837
|
-
})), (null ==
|
|
3838
|
-
})),
|
|
4300
|
+
})), (null == p ? void 0 : p.extraOption) && e4 === (null == p ? void 0 : p.extraOptionText) && i3 && (i3.style.display = t4.target.checked ? "block" : "none");
|
|
4301
|
+
})), c2.appendChild(v), c2.appendChild(y2), m.appendChild(c2), (null == p ? void 0 : p.extraOption) && e4 === (null == p ? void 0 : p.extraOptionText)) {
|
|
3839
4302
|
const e5 = document.createElement("input");
|
|
3840
|
-
e5.type = "text", e5.placeholder = (null ==
|
|
4303
|
+
e5.type = "text", e5.placeholder = (null == p ? void 0 : p.extraOptionPlaceholder) || r.placeholder.answer(t3 || "en"), e5.classList.add("magicfeedback-extra-option"), e5.classList.add("magicfeedback-input"), e5.id = `extra-option-${d}`, e5.name = `extra-option-${d}`, e5.style.display = "none", m.appendChild(e5);
|
|
3841
4304
|
}
|
|
3842
|
-
})), { element:
|
|
4305
|
+
})), { element: m, elementTypeClass: h };
|
|
3843
4306
|
};
|
|
3844
|
-
},
|
|
4307
|
+
}, 5429: (e2, t2, i) => {
|
|
3845
4308
|
"use strict";
|
|
3846
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderConsent = void 0
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
})), { element:
|
|
4309
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderConsent = void 0;
|
|
4310
|
+
const n = i(2139);
|
|
4311
|
+
t2.renderConsent = ({ question: e3, urlParamValue: t3, send: i2 }) => {
|
|
4312
|
+
const { id: r, ref: o, value: a, require: s } = e3, l = document.createElement("input");
|
|
4313
|
+
return l.type = "checkbox", l.id = `magicfeedback-${r}`, l.name = o, l.value = "true", l.required = s, l.classList.add("magicfeedback-consent"), l.classList.add("magicfeedback-input"), t3 && a.includes(t3) && (l.checked = true), (0, n.autoAdvanceOn)(l, i2), { element: l, elementTypeClass: "magicfeedback-consent" };
|
|
3851
4314
|
};
|
|
3852
|
-
},
|
|
4315
|
+
}, 511: (e2, t2, i) => {
|
|
3853
4316
|
"use strict";
|
|
3854
4317
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderDate = void 0;
|
|
3855
|
-
const
|
|
4318
|
+
const n = i(9930);
|
|
3856
4319
|
t2.renderDate = ({ language: e3, placeholderText: t3, urlParamValue: i2 }) => {
|
|
3857
|
-
const
|
|
3858
|
-
return
|
|
4320
|
+
const r = document.createElement("input");
|
|
4321
|
+
return r.type = "date", r.placeholder = t3 || n.placeholder.date(e3 || "en"), i2 && (r.value = i2), { element: r, elementTypeClass: "magicfeedback-date" };
|
|
3859
4322
|
};
|
|
3860
|
-
},
|
|
4323
|
+
}, 6055: (e2, t2) => {
|
|
3861
4324
|
"use strict";
|
|
3862
4325
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderEmail = void 0, t2.renderEmail = ({ placeholderText: e3, urlParamValue: t3 }) => {
|
|
3863
4326
|
const i = document.createElement("input");
|
|
3864
4327
|
return i.type = "email", i.placeholder = e3 || "you@example.com", t3 && (i.value = t3), { element: i, elementTypeClass: "magicfeedback-email" };
|
|
3865
4328
|
};
|
|
3866
|
-
},
|
|
4329
|
+
}, 4792: (e2, t2) => {
|
|
3867
4330
|
"use strict";
|
|
3868
4331
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderInfoPage = void 0, t2.renderInfoPage = ({ question: e3, placeholderText: t3 }) => {
|
|
3869
|
-
var i,
|
|
3870
|
-
const
|
|
3871
|
-
if ("string" == typeof (null === (i = e3.assets) || void 0 === i ? void 0 : i.placeholder) ? "" !== e3.assets.placeholder.trim() : Boolean(null === (
|
|
4332
|
+
var i, n;
|
|
4333
|
+
const r = document.createElement("div");
|
|
4334
|
+
if ("string" == typeof (null === (i = e3.assets) || void 0 === i ? void 0 : i.placeholder) ? "" !== e3.assets.placeholder.trim() : Boolean(null === (n = e3.assets) || void 0 === n ? void 0 : n.placeholder)) {
|
|
3872
4335
|
const e4 = document.createElement("div");
|
|
3873
|
-
e4.classList.add("magicfeedback-info-message"), e4.innerHTML = t3 || "",
|
|
4336
|
+
e4.classList.add("magicfeedback-info-message"), e4.innerHTML = t3 || "", r.appendChild(e4);
|
|
3874
4337
|
}
|
|
3875
|
-
return { element:
|
|
4338
|
+
return { element: r, elementTypeClass: "magicfeedback-info-page" };
|
|
3876
4339
|
};
|
|
3877
|
-
},
|
|
4340
|
+
}, 5826: (e2, t2, i) => {
|
|
3878
4341
|
"use strict";
|
|
3879
4342
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderLongText = void 0;
|
|
3880
|
-
const
|
|
3881
|
-
t2.renderLongText = ({ language: e3, placeholderText: t3, urlParamValue: i2, maxCharacters:
|
|
4343
|
+
const n = i(9930);
|
|
4344
|
+
t2.renderLongText = ({ language: e3, placeholderText: t3, urlParamValue: i2, maxCharacters: r }) => {
|
|
3882
4345
|
const o = document.createElement("textarea");
|
|
3883
|
-
return o.rows = 3,
|
|
4346
|
+
return o.rows = 3, r > 0 && (o.maxLength = r), o.placeholder = t3 || n.placeholder.answer(e3 || "en"), i2 && (o.value = i2), { element: o, elementTypeClass: "magicfeedback-longtext" };
|
|
3884
4347
|
};
|
|
3885
|
-
},
|
|
4348
|
+
}, 6838: (e2, t2) => {
|
|
3886
4349
|
"use strict";
|
|
3887
4350
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderMatrix = void 0, t2.renderMatrix = ({ question: e3, isPhone: t3, randomPosition: i }) => {
|
|
3888
|
-
const { ref:
|
|
4351
|
+
const { ref: n, value: r, assets: o } = e3, a = document.createElement("div"), s = document.createElement("div");
|
|
3889
4352
|
s.classList.add("magicfeedback-multi-question-matrix-container");
|
|
3890
|
-
let l = (null == o ? void 0 : o.options) || [], d = [...
|
|
4353
|
+
let l = (null == o ? void 0 : o.options) || [], d = [...r], c = [];
|
|
3891
4354
|
if (i && (l = null == l ? void 0 : l.sort((() => Math.random() - 0.5)), d = [...d].sort((() => Math.random() - 0.5))), (null == o ? void 0 : o.exclusiveAnswers) && (c = null == o ? void 0 : o.exclusiveAnswers, null == c || c.forEach(((e4) => {
|
|
3892
4355
|
d.includes(e4) || d.push(e4);
|
|
3893
4356
|
}))), t3) {
|
|
@@ -3895,12 +4358,12 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3895
4358
|
e4.classList.add("magicfeedback-multi-question-matrix-list"), null == l || l.forEach(((t4) => {
|
|
3896
4359
|
const i2 = document.createElement("div");
|
|
3897
4360
|
i2.classList.add("magicfeedback-multi-question-matrix-list-item"), i2.style.display = "flex", i2.style.flexDirection = "column", i2.style.alignItems = "flex-start", i2.style.marginBottom = "10px";
|
|
3898
|
-
const
|
|
3899
|
-
|
|
3900
|
-
const
|
|
3901
|
-
|
|
4361
|
+
const r2 = document.createElement("label");
|
|
4362
|
+
r2.classList.add("magicfeedback-multi-question-matrix-label"), r2.style.paddingBottom = "10px", r2.textContent = t4, i2.appendChild(r2), d.forEach(((e5) => {
|
|
4363
|
+
const r3 = document.createElement("div");
|
|
4364
|
+
r3.classList.add("magicfeedback-radio-container"), r3.style.display = "flex", r3.style.alignItems = "center", r3.style.justifyContent = "flex-start", r3.style.width = "99%", r3.style.margin = "5px auto";
|
|
3902
4365
|
const o2 = document.createElement("label"), a2 = document.createElement("input");
|
|
3903
|
-
a2.id = `${
|
|
4366
|
+
a2.id = `${n}-${t4}-${e5}`, a2.type = "radio", a2.name = `${n}-${t4}`, a2.value = e5, a2.classList.add("magicfeedback-input"), o2.textContent = e5, o2.htmlFor = `${n}-${t4}-${e5}`, r3.appendChild(a2), r3.appendChild(o2), i2.appendChild(r3);
|
|
3904
4367
|
})), e4.appendChild(i2);
|
|
3905
4368
|
})), s.appendChild(e4);
|
|
3906
4369
|
} else {
|
|
@@ -3908,8 +4371,8 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3908
4371
|
e4.classList.add("magicfeedback-multi-question-matrix-table");
|
|
3909
4372
|
const t4 = document.createElement("thead");
|
|
3910
4373
|
t4.classList.add("magicfeedback-multi-question-matrix-header"), t4.style.paddingBottom = "15px";
|
|
3911
|
-
const i2 = document.createElement("tr"),
|
|
3912
|
-
i2.appendChild(
|
|
4374
|
+
const i2 = document.createElement("tr"), r2 = document.createElement("th");
|
|
4375
|
+
i2.appendChild(r2), d.forEach(((e5) => {
|
|
3913
4376
|
const t5 = document.createElement("th");
|
|
3914
4377
|
t5.textContent = e5, i2.appendChild(t5);
|
|
3915
4378
|
})), t4.appendChild(i2), e4.appendChild(t4);
|
|
@@ -3918,105 +4381,163 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
3918
4381
|
const t5 = document.createElement("tr");
|
|
3919
4382
|
t5.classList.add("magicfeedback-multi-question-matrix-row-tr");
|
|
3920
4383
|
const i3 = document.createElement("td");
|
|
3921
|
-
i3.
|
|
3922
|
-
const
|
|
3923
|
-
|
|
3924
|
-
const
|
|
3925
|
-
o3.type = "radio", o3.name = `${
|
|
4384
|
+
i3.classList.add("magicfeedback-multi-question-matrix-question");
|
|
4385
|
+
const r3 = document.createElement("label");
|
|
4386
|
+
r3.classList.add("magicfeedback-multi-question-matrix-label"), r3.textContent = e5, i3.appendChild(r3), t5.appendChild(i3), d.forEach(((i4) => {
|
|
4387
|
+
const r4 = document.createElement("td"), o3 = document.createElement("input");
|
|
4388
|
+
o3.type = "radio", o3.name = `${n}-${e5}`, o3.value = i4, o3.id = `${n}-${e5}-${i4}`, o3.classList.add("magicfeedback-input");
|
|
4389
|
+
const a2 = document.createElement("label");
|
|
4390
|
+
a2.classList.add("magicfeedback-multi-question-matrix-option-label"), a2.htmlFor = o3.id, a2.textContent = i4, r4.classList.add("magicfeedback-multi-question-matrix-option"), r4.appendChild(o3), r4.appendChild(a2), t5.appendChild(r4);
|
|
3926
4391
|
})), o2.appendChild(t5);
|
|
3927
4392
|
})), e4.appendChild(o2), s.appendChild(e4);
|
|
3928
4393
|
}
|
|
3929
4394
|
return a.appendChild(s), { element: a, elementTypeClass: "magicfeedback-multi-question-matrix" };
|
|
3930
4395
|
};
|
|
3931
|
-
},
|
|
4396
|
+
}, 7754: (e2, t2, i) => {
|
|
4397
|
+
"use strict";
|
|
4398
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderMaxDiff = void 0;
|
|
4399
|
+
const n = i(6658), r = i(7031), o = "http://www.w3.org/2000/svg";
|
|
4400
|
+
t2.renderMaxDiff = ({ question: e3, language: t3, randomPosition: i2 }) => {
|
|
4401
|
+
const { ref: a, value: s, assets: l } = e3, d = document.createElement("div");
|
|
4402
|
+
let c = [...s || []];
|
|
4403
|
+
i2 && (c = c.sort((() => Math.random() - 0.5)));
|
|
4404
|
+
const u = { best: (0, n.parseTitle)(null == l ? void 0 : l.bestLabel, t3) || (0, r.t)(t3, "maxDiff.best"), worst: (0, n.parseTitle)(null == l ? void 0 : l.worstLabel, t3) || (0, r.t)(t3, "maxDiff.worst") }, p = document.createElement("div");
|
|
4405
|
+
p.classList.add("magicfeedback-max-diff-container");
|
|
4406
|
+
const m = Number(null == l ? void 0 : l.setIndex) || 1, h = Number(null == l ? void 0 : l.setCount) || 1;
|
|
4407
|
+
(null == l ? void 0 : l.showSetProgress) && h > 1 && p.appendChild((function(e4, t4, i3) {
|
|
4408
|
+
const n2 = document.createElement("div");
|
|
4409
|
+
n2.classList.add("magicfeedback-max-diff-progress");
|
|
4410
|
+
const o2 = document.createElement("span");
|
|
4411
|
+
o2.classList.add("magicfeedback-max-diff-progress-label"), o2.textContent = (0, r.t)(i3, "maxDiff.setProgress", { k: e4, n: t4 });
|
|
4412
|
+
const a2 = document.createElement("span");
|
|
4413
|
+
a2.classList.add("magicfeedback-max-diff-progress-track"), a2.setAttribute("aria-hidden", "true");
|
|
4414
|
+
const s2 = document.createElement("span");
|
|
4415
|
+
return s2.classList.add("magicfeedback-max-diff-progress-fill"), s2.style.width = `${Math.min(100, e4 / t4 * 100)}%`, a2.appendChild(s2), n2.appendChild(o2), n2.appendChild(a2), n2;
|
|
4416
|
+
})(m, h, t3));
|
|
4417
|
+
const f = document.createElement("table");
|
|
4418
|
+
f.classList.add("magicfeedback-max-diff-table");
|
|
4419
|
+
const g = (e4) => {
|
|
4420
|
+
const t4 = document.createElement("th");
|
|
4421
|
+
t4.scope = "col", t4.classList.add("magicfeedback-max-diff-head", `magicfeedback-max-diff-head-${e4}`);
|
|
4422
|
+
const i3 = document.createElement("span");
|
|
4423
|
+
return i3.classList.add("magicfeedback-max-diff-head-label"), i3.appendChild((function(e5) {
|
|
4424
|
+
const t5 = document.createElementNS(o, "svg");
|
|
4425
|
+
t5.setAttribute("viewBox", "0 0 24 24"), t5.setAttribute("width", "16"), t5.setAttribute("height", "16"), t5.setAttribute("fill", "none"), t5.setAttribute("stroke", "currentColor"), t5.setAttribute("stroke-width", "2.6"), t5.setAttribute("stroke-linecap", "round"), t5.setAttribute("stroke-linejoin", "round"), t5.setAttribute("aria-hidden", "true");
|
|
4426
|
+
const i4 = document.createElementNS(o, "path");
|
|
4427
|
+
return i4.setAttribute("d", "best" === e5 ? "M12 19V5M5 12l7-7 7 7" : "M12 5v14M19 12l-7 7-7-7"), t5.appendChild(i4), t5;
|
|
4428
|
+
})(e4)), i3.appendChild(document.createTextNode(u[e4])), t4.appendChild(i3), t4;
|
|
4429
|
+
}, y = document.createElement("thead"), v = document.createElement("tr"), b = document.createElement("td");
|
|
4430
|
+
b.classList.add("magicfeedback-max-diff-head-spacer"), v.appendChild(g("best")), v.appendChild(b), v.appendChild(g("worst")), y.appendChild(v), f.appendChild(y);
|
|
4431
|
+
const E = (e4, t4, i3) => {
|
|
4432
|
+
const n2 = document.createElement("td");
|
|
4433
|
+
n2.classList.add("magicfeedback-max-diff-cell");
|
|
4434
|
+
const r2 = document.createElement("label");
|
|
4435
|
+
r2.classList.add("magicfeedback-max-diff-pick");
|
|
4436
|
+
const o2 = document.createElement("input");
|
|
4437
|
+
return o2.type = "radio", o2.name = `${a}-${e4}`, o2.value = t4, o2.id = `${a}-${e4}-${i3}`, o2.classList.add("magicfeedback-input", "magicfeedback-max-diff-input", `magicfeedback-max-diff-${e4}`), o2.setAttribute("aria-label", `${t4}: ${u[e4]}`), r2.appendChild(o2), n2.appendChild(r2), n2;
|
|
4438
|
+
}, A = document.createElement("tbody");
|
|
4439
|
+
return c.forEach(((e4, t4) => {
|
|
4440
|
+
const i3 = document.createElement("tr");
|
|
4441
|
+
i3.classList.add("magicfeedback-max-diff-row");
|
|
4442
|
+
const n2 = document.createElement("th");
|
|
4443
|
+
n2.scope = "row", n2.classList.add("magicfeedback-max-diff-item"), n2.textContent = e4, i3.appendChild(E("best", e4, t4)), i3.appendChild(n2), i3.appendChild(E("worst", e4, t4)), A.appendChild(i3);
|
|
4444
|
+
})), f.appendChild(A), f.addEventListener("change", ((e4) => {
|
|
4445
|
+
var t4;
|
|
4446
|
+
const i3 = e4.target;
|
|
4447
|
+
i3.classList.contains("magicfeedback-max-diff-input") && (null === (t4 = i3.closest("tr")) || void 0 === t4 || t4.querySelectorAll(".magicfeedback-max-diff-input").forEach(((e5) => {
|
|
4448
|
+
e5 !== i3 && (e5.checked = false);
|
|
4449
|
+
})));
|
|
4450
|
+
})), p.appendChild(f), d.appendChild(p), { element: d, elementTypeClass: "magicfeedback-max-diff" };
|
|
4451
|
+
};
|
|
4452
|
+
}, 5963: (e2, t2, i) => {
|
|
3932
4453
|
"use strict";
|
|
3933
|
-
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderMultipleChoiceImage = void 0
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
const
|
|
3937
|
-
|
|
3938
|
-
const d =
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
4454
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderMultipleChoiceImage = void 0;
|
|
4455
|
+
const n = i(2139);
|
|
4456
|
+
t2.renderMultipleChoiceImage = ({ question: e3, randomPosition: t3, urlParamValue: i2, send: r }) => {
|
|
4457
|
+
const o = document.createElement("div"), { ref: a, assets: s } = e3;
|
|
4458
|
+
let l = [...e3.value];
|
|
4459
|
+
const d = document.createElement("div");
|
|
4460
|
+
d.classList.add("magicfeedback-multiple-choice-image-container"), d.style.display = "flex", d.style.flexDirection = "row", d.style.flexWrap = "wrap", d.style.justifyContent = "center";
|
|
4461
|
+
const c = l.length;
|
|
4462
|
+
let u = 1, p = 1;
|
|
4463
|
+
if (window.innerWidth < 600) u = 1, p = c;
|
|
4464
|
+
else switch (c) {
|
|
3942
4465
|
case 1:
|
|
3943
4466
|
case 2:
|
|
3944
4467
|
case 3:
|
|
3945
|
-
|
|
4468
|
+
u = c, p = 1;
|
|
3946
4469
|
break;
|
|
3947
4470
|
case 4:
|
|
3948
4471
|
case 5:
|
|
3949
4472
|
case 6:
|
|
3950
|
-
|
|
4473
|
+
p = 2, u = Math.ceil(c / p);
|
|
3951
4474
|
break;
|
|
3952
4475
|
case 7:
|
|
3953
4476
|
case 8:
|
|
3954
4477
|
case 9:
|
|
3955
|
-
|
|
4478
|
+
p = 3, u = Math.ceil(c / p);
|
|
3956
4479
|
break;
|
|
3957
4480
|
default:
|
|
3958
|
-
|
|
4481
|
+
p = 4, u = Math.ceil(c / p);
|
|
3959
4482
|
}
|
|
3960
|
-
const
|
|
3961
|
-
function
|
|
4483
|
+
const m = void 0 !== (null == s ? void 0 : s.addTitle) && (null == s ? void 0 : s.addTitle), h = void 0 !== (null == s ? void 0 : s.multiOption) && (null == s ? void 0 : s.multiOption), f = void 0 !== (null == s ? void 0 : s.extraOption) && (null == s ? void 0 : s.extraOption);
|
|
4484
|
+
function g(e4) {
|
|
3962
4485
|
try {
|
|
3963
|
-
const { position: t4, url:
|
|
3964
|
-
|
|
3965
|
-
const
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
}));
|
|
3969
|
-
const h2 = document.createElement("label");
|
|
3970
|
-
h2.textContent = a2, h2.classList.add("magicfeedback-multiple-choice-image-label");
|
|
3971
|
-
const f2 = document.createElement("input");
|
|
3972
|
-
f2.id = `rating-${o}-${t4}`, f2.type = m ? "checkbox" : "radio", f2.name = o, f2.value = a2, f2.style.position = "absolute", f2.style.opacity = "0", f2.style.width = "0", f2.style.height = "0", f2.classList.add("magicfeedback-input"), i && i === f2.value && (f2.checked = true), !m && r && f2.addEventListener("change", (() => {
|
|
3973
|
-
r();
|
|
4486
|
+
const { position: t4, url: o2, value: s2 } = e4, l2 = document.createElement("div");
|
|
4487
|
+
l2.classList.add("magicfeedback-multiple-choice-image-option"), l2.style.width = `calc(100% / ${u} - 2px)`, l2.style.height = `calc(100% / ${p} - 2px)`, l2.style.padding = "8px", l2.style.margin = "0";
|
|
4488
|
+
const c2 = document.createElement("label");
|
|
4489
|
+
c2.classList.add("magicfeedback-image-option-label-container"), c2.htmlFor = `rating-${a}-${t4}`, c2.style.cursor = "pointer", c2.addEventListener("click", (() => {
|
|
4490
|
+
c2.style.border = "2px solid #000";
|
|
3974
4491
|
}));
|
|
3975
|
-
const
|
|
3976
|
-
|
|
4492
|
+
const f2 = document.createElement("label");
|
|
4493
|
+
f2.textContent = s2, f2.classList.add("magicfeedback-multiple-choice-image-label");
|
|
4494
|
+
const g2 = document.createElement("input");
|
|
4495
|
+
g2.id = `rating-${a}-${t4}`, g2.type = h ? "checkbox" : "radio", g2.name = a, g2.value = s2, g2.style.position = "absolute", g2.style.opacity = "0", g2.style.width = "0", g2.style.height = "0", g2.classList.add("magicfeedback-input"), i2 && i2 === g2.value && (g2.checked = true), h || (0, n.autoAdvanceOn)(g2, r);
|
|
4496
|
+
const y = document.createElement("img");
|
|
4497
|
+
y.classList.add("magicfeedback-multiple-choice-image-image"), y.src = o2, y.style.cursor = "pointer", y.style.backgroundSize = "cover", y.style.backgroundPosition = "center", y.style.width = "100%", y.style.height = "100%", y.style.objectFit = "cover", y.style.margin = "auto", c2.appendChild(g2), c2.appendChild(y), m && c2.appendChild(f2), l2.appendChild(c2), d.appendChild(l2);
|
|
3977
4498
|
} catch (e5) {
|
|
3978
4499
|
console.error(e5);
|
|
3979
4500
|
}
|
|
3980
4501
|
}
|
|
3981
|
-
return t3 && (
|
|
4502
|
+
return t3 && (l = l.sort((() => Math.random() - 0.5))), l.forEach(((e4) => g(JSON.parse(e4)))), f && (null == s ? void 0 : s.extraOptionValue) && (null == s ? void 0 : s.extraOptionValue.length) > 0 && g(null == s ? void 0 : s.extraOptionValue[0]), o.appendChild(d), { element: o, elementTypeClass: "magicfeedback-multiple-choice-image" };
|
|
3982
4503
|
};
|
|
3983
|
-
},
|
|
4504
|
+
}, 6054: (e2, t2, i) => {
|
|
3984
4505
|
"use strict";
|
|
3985
4506
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderNumber = void 0;
|
|
3986
|
-
const
|
|
4507
|
+
const n = i(9930), r = i(6658);
|
|
3987
4508
|
t2.renderNumber = ({ question: e3, format: t3, language: i2, urlParamValue: o }) => {
|
|
3988
4509
|
const a = document.createElement("input");
|
|
3989
|
-
a.type = "number", a.placeholder = "slim" === t3 ? (0,
|
|
4510
|
+
a.type = "number", a.placeholder = "slim" === t3 ? (0, r.parseTitle)(e3.title, i2) : n.placeholder.number(i2 || "en");
|
|
3990
4511
|
const { value: s } = e3;
|
|
3991
4512
|
return s.length && (s.sort(((e4, t4) => Number(e4) - Number(t4))), a.max = s[s.length - 1], a.min = s[0], a.value = s[0]), o && !isNaN(Number(o)) && (a.value = o), { element: a, elementTypeClass: "magicfeedback-number" };
|
|
3992
4513
|
};
|
|
3993
|
-
},
|
|
4514
|
+
}, 4310: (e2, t2, i) => {
|
|
3994
4515
|
"use strict";
|
|
3995
4516
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderPassword = void 0;
|
|
3996
|
-
const
|
|
4517
|
+
const n = i(9930);
|
|
3997
4518
|
t2.renderPassword = ({ language: e3, placeholderText: t3, urlParamValue: i2 }) => {
|
|
3998
|
-
const
|
|
3999
|
-
return
|
|
4519
|
+
const r = document.createElement("input");
|
|
4520
|
+
return r.type = "password", r.placeholder = t3 || n.placeholder.password(e3 || "en"), i2 && (r.value = i2), { element: r, elementTypeClass: "magicfeedback-password" };
|
|
4000
4521
|
};
|
|
4001
|
-
},
|
|
4522
|
+
}, 1732: (e2, t2, i) => {
|
|
4002
4523
|
"use strict";
|
|
4003
4524
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderPointSystem = void 0;
|
|
4004
|
-
const
|
|
4525
|
+
const n = i(9930);
|
|
4005
4526
|
t2.renderPointSystem = ({ question: e3, language: t3 }) => {
|
|
4006
|
-
const { ref: i2, value:
|
|
4527
|
+
const { ref: i2, value: r } = e3, o = document.createElement("div"), a = document.createElement("div");
|
|
4007
4528
|
a.classList.add("magicfeedback-point-system-container");
|
|
4008
4529
|
const s = document.createElement("ul");
|
|
4009
4530
|
s.classList.add("magicfeedback-point-system-list"), s.style.padding = "0";
|
|
4010
|
-
const l = 100 /
|
|
4011
|
-
d.classList.add("magicfeedback-error"), d.textContent =
|
|
4531
|
+
const l = 100 / r.length, d = document.createElement("div");
|
|
4532
|
+
d.classList.add("magicfeedback-error"), d.textContent = n.placeholder.pointsystemerror(t3 || "en"), d.style.color = "#C70039", d.style.fontSize = "14px", d.style.textAlign = "end", d.style.width = "100%", d.style.display = "none";
|
|
4012
4533
|
const c = document.createElement("div");
|
|
4013
4534
|
c.classList.add("magicfeedback-point-system-total"), c.style.textAlign = "end", c.style.fontSize = "15px", c.style.marginTop = "5px";
|
|
4014
4535
|
const u = document.createElement("bdi");
|
|
4015
|
-
return u.setAttribute("dir", "ltr"), u.textContent = "0 / 100 %", c.appendChild(u),
|
|
4016
|
-
const
|
|
4017
|
-
|
|
4018
|
-
const
|
|
4019
|
-
|
|
4536
|
+
return u.setAttribute("dir", "ltr"), u.textContent = "0 / 100 %", c.appendChild(u), r.forEach(((e4, t4) => {
|
|
4537
|
+
const n2 = document.createElement("li");
|
|
4538
|
+
n2.classList.add("magicfeedback-point-system-item"), n2.style.display = "flex", n2.style.justifyContent = "space-between", n2.style.alignItems = "center", n2.style.margin = "5px";
|
|
4539
|
+
const r2 = document.createElement("label");
|
|
4540
|
+
r2.textContent = e4, r2.style.fontSize = "15px", n2.appendChild(r2);
|
|
4020
4541
|
const o2 = document.createElement("span");
|
|
4021
4542
|
o2.classList.add("magicfeedback-point-system-input-container");
|
|
4022
4543
|
const a2 = document.createElement("input");
|
|
@@ -4039,17 +4560,17 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4039
4560
|
t5 += Number(e7.value);
|
|
4040
4561
|
})), t5 < 100 && (d.style.display = "block");
|
|
4041
4562
|
})));
|
|
4042
|
-
})), o2.appendChild(a2), o2.appendChild(p),
|
|
4563
|
+
})), o2.appendChild(a2), o2.appendChild(p), n2.appendChild(o2), s.appendChild(n2);
|
|
4043
4564
|
})), a.appendChild(s), a.appendChild(c), a.appendChild(d), o.appendChild(a), { element: o, elementTypeClass: "magicfeedback-point-system" };
|
|
4044
4565
|
};
|
|
4045
|
-
},
|
|
4566
|
+
}, 2427: (e2, t2, i) => {
|
|
4046
4567
|
"use strict";
|
|
4047
4568
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderPriorityList = void 0;
|
|
4048
|
-
const
|
|
4569
|
+
const n = i(7031);
|
|
4049
4570
|
t2.renderPriorityList = ({ question: e3, randomPosition: t3, language: i2 }) => {
|
|
4050
|
-
var
|
|
4571
|
+
var r, o, a;
|
|
4051
4572
|
const s = document.createElement("div"), l = (function(e4) {
|
|
4052
|
-
const { value: t4, ref: i3, randomPosition:
|
|
4573
|
+
const { value: t4, ref: i3, randomPosition: r2 = false, limitPriority: o2 = false, maxPriority: a2 = 0, language: s2 = "en", placeholder: l2 = "" } = e4, d = (e5) => (0, n.t)(s2, "priority." + e5), c = document.createElement("div");
|
|
4053
4574
|
if (c.classList.add("magicfeedback-priority-list-container"), o2 && a2 && a2 > 0) {
|
|
4054
4575
|
const e5 = [], o3 = document.createElement("div");
|
|
4055
4576
|
o3.classList.add("magicfeedback-priority-list-header");
|
|
@@ -4062,48 +4583,48 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4062
4583
|
const h = document.createElement("ul");
|
|
4063
4584
|
h.classList.add("magicfeedback-priority-list-list"), m.appendChild(h);
|
|
4064
4585
|
const f = () => {
|
|
4065
|
-
h.innerHTML = "", e5.forEach(((t5,
|
|
4066
|
-
const
|
|
4067
|
-
|
|
4586
|
+
h.innerHTML = "", e5.forEach(((t5, n2) => {
|
|
4587
|
+
const r3 = document.createElement("li");
|
|
4588
|
+
r3.classList.add("magicfeedback-priority-list-item");
|
|
4068
4589
|
const o4 = document.createElement("input");
|
|
4069
|
-
o4.classList.add("magicfeedback-input-magicfeedback-priority-list"), o4.classList.add("magicfeedback-input"), o4.type = "hidden", o4.id = `priority-list-${i3}`, o4.name = i3, o4.value = `${
|
|
4590
|
+
o4.classList.add("magicfeedback-input-magicfeedback-priority-list"), o4.classList.add("magicfeedback-input"), o4.type = "hidden", o4.id = `priority-list-${i3}`, o4.name = i3, o4.value = `${n2 + 1}. ${t5}`, r3.appendChild(o4);
|
|
4070
4591
|
const a3 = document.createElement("label");
|
|
4071
|
-
a3.classList.add("magicfeedback-priority-list-item-label"), a3.textContent = `${
|
|
4592
|
+
a3.classList.add("magicfeedback-priority-list-item-label"), a3.textContent = `${n2 + 1}. ${t5}`, r3.appendChild(a3);
|
|
4072
4593
|
const s3 = document.createElement("div");
|
|
4073
4594
|
s3.classList.add("magicfeedback-priority-list-arrows");
|
|
4074
4595
|
const l3 = document.createElement("img");
|
|
4075
|
-
l3.classList.add("magicfeedback-priority-list-arrow-up"), l3.src = "https://magicfeedback-c6458-dev.web.app/assets/arrow.svg", l3.style.visibility = 0 ===
|
|
4596
|
+
l3.classList.add("magicfeedback-priority-list-arrow-up"), l3.src = "https://magicfeedback-c6458-dev.web.app/assets/arrow.svg", l3.style.visibility = 0 === n2 ? "hidden" : "visible";
|
|
4076
4597
|
const d2 = document.createElement("img");
|
|
4077
|
-
d2.classList.add("magicfeedback-priority-list-arrow-down"), d2.src = "https://magicfeedback-c6458-dev.web.app/assets/arrow.svg", d2.style.transform = "rotate(180deg)", d2.style.visibility =
|
|
4078
|
-
var i4,
|
|
4079
|
-
const u3 =
|
|
4598
|
+
d2.classList.add("magicfeedback-priority-list-arrow-down"), d2.src = "https://magicfeedback-c6458-dev.web.app/assets/arrow.svg", d2.style.transform = "rotate(180deg)", d2.style.visibility = n2 === e5.length - 1 ? "hidden" : "visible", l3.addEventListener("click", (() => {
|
|
4599
|
+
var i4, n3, s4, c2;
|
|
4600
|
+
const u3 = r3.previousElementSibling;
|
|
4080
4601
|
if (u3) {
|
|
4081
4602
|
const p3 = Number(null === (i4 = o4.value) || void 0 === i4 ? void 0 : i4.split(".")[0]) - 1;
|
|
4082
4603
|
o4.value = `${p3}. ${t5}`, a3.textContent = `${p3}. ${t5}`, l3.style.visibility = 1 === p3 ? "hidden" : "visible", d2.style.visibility = p3 === e5.length ? "hidden" : "visible";
|
|
4083
4604
|
const m2 = u3.querySelector(".magicfeedback-input-magicfeedback-priority-list"), f2 = u3.querySelector(".magicfeedback-priority-list-item-label"), g2 = u3.querySelector(".magicfeedback-priority-list-arrow-up"), y2 = u3.querySelector(".magicfeedback-priority-list-arrow-down");
|
|
4084
4605
|
if (m2 && f2 && g2 && y2) {
|
|
4085
|
-
const t6 = Number(null === (
|
|
4606
|
+
const t6 = Number(null === (n3 = m2.value) || void 0 === n3 ? void 0 : n3.split(".")[0]) + 1;
|
|
4086
4607
|
m2.value = `${t6}.${null === (s4 = f2.textContent) || void 0 === s4 ? void 0 : s4.split(".")[1]}`, f2.textContent = `${t6}.${null === (c2 = f2.textContent) || void 0 === c2 ? void 0 : c2.split(".")[1]}`, g2.style.visibility = 1 === t6 ? "hidden" : "visible", y2.style.visibility = t6 === e5.length ? "hidden" : "visible";
|
|
4087
4608
|
}
|
|
4088
|
-
h.insertBefore(
|
|
4609
|
+
h.insertBefore(r3, u3);
|
|
4089
4610
|
}
|
|
4090
4611
|
})), d2.addEventListener("click", (() => {
|
|
4091
|
-
var i4,
|
|
4092
|
-
const c2 =
|
|
4612
|
+
var i4, n3, s4;
|
|
4613
|
+
const c2 = r3.nextElementSibling;
|
|
4093
4614
|
if (c2) {
|
|
4094
4615
|
const u3 = Number(null === (i4 = o4.value) || void 0 === i4 ? void 0 : i4.split(".")[0]) + 1;
|
|
4095
4616
|
o4.value = `${u3}. ${t5}`, a3.textContent = `${u3}. ${t5}`, l3.style.visibility = 1 === u3 ? "hidden" : "visible", d2.style.visibility = u3 === e5.length ? "hidden" : "visible";
|
|
4096
4617
|
const p3 = c2.querySelector(".magicfeedback-input-magicfeedback-priority-list"), m2 = c2.querySelector(".magicfeedback-priority-list-item-label"), f2 = c2.querySelector(".magicfeedback-priority-list-arrow-up"), g2 = c2.querySelector(".magicfeedback-priority-list-arrow-down");
|
|
4097
4618
|
if (p3 && m2 && f2 && g2) {
|
|
4098
4619
|
const t6 = Number(p3.value.split(".")[0]) - 1;
|
|
4099
|
-
p3.value = `${t6}.${null === (
|
|
4620
|
+
p3.value = `${t6}.${null === (n3 = m2.textContent) || void 0 === n3 ? void 0 : n3.split(".")[1]}`, m2.textContent = `${t6}.${null === (s4 = m2.textContent) || void 0 === s4 ? void 0 : s4.split(".")[1]}`, f2.style.visibility = 1 === t6 ? "hidden" : "visible", g2.style.visibility = t6 === e5.length ? "hidden" : "visible";
|
|
4100
4621
|
}
|
|
4101
|
-
h.insertBefore(c2,
|
|
4622
|
+
h.insertBefore(c2, r3);
|
|
4102
4623
|
}
|
|
4103
|
-
})), s3.appendChild(l3), s3.appendChild(d2),
|
|
4624
|
+
})), s3.appendChild(l3), s3.appendChild(d2), r3.appendChild(s3), h.appendChild(r3);
|
|
4104
4625
|
}));
|
|
4105
4626
|
}, g = document.createElement("div");
|
|
4106
|
-
g.classList.add("magicfeedback-modal-backdrop"), g.setAttribute("dir", (0,
|
|
4627
|
+
g.classList.add("magicfeedback-modal-backdrop"), g.setAttribute("dir", (0, n.isRtlLanguage)(s2) ? "rtl" : "ltr"), g.style.position = "fixed", g.style.top = "0", g.style.left = "0", g.style.width = "100vw", g.style.height = "100vh", g.style.background = "rgba(0,0,0,0.4)", g.style.display = "none", g.style.alignItems = "center", g.style.justifyContent = "center", g.style.zIndex = "9999";
|
|
4107
4628
|
const y = document.createElement("div");
|
|
4108
4629
|
y.classList.add("magicfeedback-modal"), y.style.background = "#fff", y.style.borderRadius = "8px", y.style.boxShadow = "0 8px 24px rgba(0,0,0,0.2)", y.style.maxWidth = "520px", y.style.width = "90%", y.style.maxHeight = "80vh", y.style.display = "flex", y.style.flexDirection = "column", y.style.overflow = "hidden", y.style.padding = "16px", y.style.position = "relative";
|
|
4109
4630
|
const v = document.createElement("h5");
|
|
@@ -4112,17 +4633,17 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4112
4633
|
v.textContent = `${d("selectOptionNumber")}${b()}`;
|
|
4113
4634
|
};
|
|
4114
4635
|
E();
|
|
4115
|
-
const
|
|
4116
|
-
|
|
4117
|
-
const
|
|
4118
|
-
|
|
4119
|
-
const
|
|
4120
|
-
|
|
4636
|
+
const A = document.createElement("div");
|
|
4637
|
+
A.classList.add("magicfeedback-modal-list"), A.style.flex = "1 1 auto", A.style.overflowY = "auto", A.style.minHeight = "0", (r2 ? [...t4].sort((() => Math.random() - 0.5)) : [...t4]).forEach(((t5) => {
|
|
4638
|
+
const n2 = document.createElement("label");
|
|
4639
|
+
n2.classList.add("magicfeedback-modal-row");
|
|
4640
|
+
const r3 = document.createElement("input");
|
|
4641
|
+
r3.type = "checkbox", r3.classList.add("magicfeedback-input"), r3.name = `${i3}-selection`, r3.value = t5;
|
|
4121
4642
|
const o4 = document.createElement("span");
|
|
4122
|
-
o4.textContent = t5,
|
|
4123
|
-
if (
|
|
4124
|
-
if (e5.length >= a2) return
|
|
4125
|
-
|
|
4643
|
+
o4.textContent = t5, r3.addEventListener("change", (() => {
|
|
4644
|
+
if (r3.checked) {
|
|
4645
|
+
if (e5.length >= a2) return r3.checked = false, n2.classList.add("magicfeedback-warning"), void setTimeout((() => {
|
|
4646
|
+
n2.classList.remove("magicfeedback-warning");
|
|
4126
4647
|
}), 800);
|
|
4127
4648
|
e5.push(t5);
|
|
4128
4649
|
} else {
|
|
@@ -4130,10 +4651,10 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4130
4651
|
-1 !== i4 && e5.splice(i4, 1);
|
|
4131
4652
|
}
|
|
4132
4653
|
E(), C();
|
|
4133
|
-
})),
|
|
4654
|
+
})), n2.appendChild(r3), n2.appendChild(o4), A.appendChild(n2);
|
|
4134
4655
|
}));
|
|
4135
|
-
const
|
|
4136
|
-
|
|
4656
|
+
const k = document.createElement("div");
|
|
4657
|
+
k.classList.add("magicfeedback-modal-actions"), k.style.flexShrink = "0";
|
|
4137
4658
|
const T = document.createElement("div");
|
|
4138
4659
|
T.classList.add("magicfeedback-modal-counter");
|
|
4139
4660
|
const C = () => {
|
|
@@ -4141,206 +4662,202 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4141
4662
|
T.textContent = `${d("prioritized")} ${e5.length} ${t5} ${a2}`, u2.style.display = e5.length > 0 ? "block" : "none";
|
|
4142
4663
|
};
|
|
4143
4664
|
C();
|
|
4144
|
-
const
|
|
4145
|
-
|
|
4146
|
-
const
|
|
4665
|
+
const x = document.createElement("button");
|
|
4666
|
+
x.type = "button", x.classList.add("magicfeedback-modal-close"), x.setAttribute("aria-label", d("cancel")), x.title = d("cancel"), x.textContent = "\xD7", x.style.position = "absolute", x.style.top = "8px", x.style.setProperty("inset-inline-end", "8px"), x.style.border = "none", x.style.background = "transparent", x.style.fontSize = "24px", x.style.cursor = "pointer";
|
|
4667
|
+
const P = () => {
|
|
4147
4668
|
document.body.appendChild(g), g.style.display = "flex", E(), C();
|
|
4148
|
-
},
|
|
4669
|
+
}, L = () => {
|
|
4149
4670
|
g.style.display = "none", c.appendChild(g);
|
|
4150
4671
|
};
|
|
4151
|
-
|
|
4152
|
-
|
|
4672
|
+
x.addEventListener("click", (() => {
|
|
4673
|
+
L();
|
|
4153
4674
|
}));
|
|
4154
|
-
const
|
|
4155
|
-
return
|
|
4156
|
-
|
|
4157
|
-
})),
|
|
4158
|
-
|
|
4675
|
+
const S = document.createElement("button");
|
|
4676
|
+
return S.type = "button", S.textContent = d("confirm"), S.classList.add("magicfeedback-button"), S.classList.add("magicfeedback-button-primary"), S.addEventListener("click", (() => {
|
|
4677
|
+
L(), f();
|
|
4678
|
+
})), k.appendChild(T), k.appendChild(S), y.appendChild(x), y.appendChild(v), y.appendChild(A), y.appendChild(k), g.appendChild(y), p2.addEventListener("click", (() => {
|
|
4679
|
+
P();
|
|
4159
4680
|
})), g.addEventListener("click", ((e6) => {
|
|
4160
|
-
e6.target === g &&
|
|
4681
|
+
e6.target === g && L();
|
|
4161
4682
|
})), c.appendChild(o3), c.appendChild(m), c.appendChild(g), f(), c;
|
|
4162
4683
|
}
|
|
4163
4684
|
const u = document.createElement("ul");
|
|
4164
4685
|
u.classList.add("magicfeedback-priority-list-list");
|
|
4165
|
-
const p =
|
|
4686
|
+
const p = r2 ? [...t4].sort((() => Math.random() - 0.5)) : [...t4];
|
|
4166
4687
|
return p.forEach(((e5, t5) => {
|
|
4167
|
-
const
|
|
4168
|
-
|
|
4169
|
-
const
|
|
4170
|
-
|
|
4688
|
+
const n2 = document.createElement("li");
|
|
4689
|
+
n2.classList.add("magicfeedback-priority-list-item"), n2.style.display = "flex", n2.style.justifyContent = "space-between", n2.style.alignItems = "center", n2.style.margin = "5px";
|
|
4690
|
+
const r3 = document.createElement("input");
|
|
4691
|
+
r3.classList.add("magicfeedback-input-magicfeedback-priority-list"), r3.classList.add("magicfeedback-input"), r3.type = "hidden", r3.id = `priority-list-${i3}`, r3.name = i3, r3.value = `${t5 + 1}. ${e5}`, n2.appendChild(r3);
|
|
4171
4692
|
const o3 = document.createElement("label");
|
|
4172
|
-
o3.classList.add("magicfeedback-priority-list-item-label"), o3.textContent = `${t5 + 1}. ${e5}`,
|
|
4693
|
+
o3.classList.add("magicfeedback-priority-list-item-label"), o3.textContent = `${t5 + 1}. ${e5}`, n2.appendChild(o3);
|
|
4173
4694
|
const a3 = document.createElement("div");
|
|
4174
4695
|
a3.style.display = "flex", a3.style.alignItems = "center", a3.style.justifyContent = "space-between";
|
|
4175
4696
|
const s3 = document.createElement("img");
|
|
4176
4697
|
s3.classList.add("magicfeedback-priority-list-arrow-up"), s3.src = "https://magicfeedback-c6458-dev.web.app/assets/arrow.svg", s3.style.width = "20px", s3.style.height = "20px", s3.style.cursor = "pointer", s3.style.margin = "0 5px", s3.style.color = "#000", s3.style.visibility = 0 === t5 ? "hidden" : "visible", s3.addEventListener("click", (() => {
|
|
4177
4698
|
var t6, i4, a4, d2;
|
|
4178
|
-
const c2 =
|
|
4699
|
+
const c2 = n2.previousElementSibling;
|
|
4179
4700
|
if (c2) {
|
|
4180
|
-
const m = Number(null === (t6 =
|
|
4181
|
-
|
|
4701
|
+
const m = Number(null === (t6 = r3.value) || void 0 === t6 ? void 0 : t6.split(".")[0]) - 1;
|
|
4702
|
+
r3.value = `${m}. ${e5}`, o3.textContent = `${m}. ${e5}`, s3.style.visibility = 1 === m ? "hidden" : "visible", l3.style.visibility = m === p.length ? "hidden" : "visible";
|
|
4182
4703
|
const h = c2.querySelector(".magicfeedback-input-magicfeedback-priority-list"), f = c2.querySelector(".magicfeedback-priority-list-item-label"), g = c2.querySelector(".magicfeedback-priority-list-arrow-up"), y = c2.querySelector(".magicfeedback-priority-list-arrow-down");
|
|
4183
4704
|
if (h && f && g && y) {
|
|
4184
4705
|
const e6 = Number(null === (i4 = h.value) || void 0 === i4 ? void 0 : i4.split(".")[0]) + 1;
|
|
4185
4706
|
h.value = `${e6}.${null === (a4 = f.textContent) || void 0 === a4 ? void 0 : a4.split(".")[1]}`, f.textContent = `${e6}.${null === (d2 = f.textContent) || void 0 === d2 ? void 0 : d2.split(".")[1]}`, g.style.visibility = 1 === e6 ? "hidden" : "visible", y.style.visibility = e6 === p.length ? "hidden" : "visible";
|
|
4186
4707
|
}
|
|
4187
|
-
u.insertBefore(
|
|
4708
|
+
u.insertBefore(n2, c2);
|
|
4188
4709
|
}
|
|
4189
4710
|
}));
|
|
4190
4711
|
const l3 = document.createElement("img");
|
|
4191
4712
|
l3.classList.add("magicfeedback-priority-list-arrow-down"), l3.src = "https://magicfeedback-c6458-dev.web.app/assets/arrow.svg", l3.style.width = "20px", l3.style.height = "20px", l3.style.cursor = "pointer", l3.style.margin = "0 5px", l3.style.color = "#000", l3.style.transform = "rotate(180deg)", l3.style.visibility = t5 === p.length - 1 ? "hidden" : "visible", l3.addEventListener("click", (() => {
|
|
4192
4713
|
var t6, i4, a4;
|
|
4193
|
-
const d2 =
|
|
4714
|
+
const d2 = n2.nextElementSibling;
|
|
4194
4715
|
if (d2) {
|
|
4195
|
-
const c2 = Number(null === (t6 =
|
|
4196
|
-
|
|
4716
|
+
const c2 = Number(null === (t6 = r3.value) || void 0 === t6 ? void 0 : t6.split(".")[0]) + 1;
|
|
4717
|
+
r3.value = `${c2}. ${e5}`, o3.textContent = `${c2}. ${e5}`, s3.style.visibility = 1 === c2 ? "hidden" : "visible", l3.style.visibility = c2 === p.length ? "hidden" : "visible";
|
|
4197
4718
|
const m = d2.querySelector(".magicfeedback-input-magicfeedback-priority-list"), h = d2.querySelector(".magicfeedback-priority-list-item-label"), f = d2.querySelector(".magicfeedback-priority-list-arrow-up"), g = d2.querySelector(".magicfeedback-priority-list-arrow-down");
|
|
4198
4719
|
if (m && h && f && g) {
|
|
4199
4720
|
const e6 = Number(m.value.split(".")[0]) - 1;
|
|
4200
4721
|
m.value = `${e6}.${null === (i4 = h.textContent) || void 0 === i4 ? void 0 : i4.split(".")[1]}`, h.textContent = `${e6}.${null === (a4 = h.textContent) || void 0 === a4 ? void 0 : a4.split(".")[1]}`, f.style.visibility = 1 === e6 ? "hidden" : "visible", g.style.visibility = e6 === p.length ? "hidden" : "visible";
|
|
4201
4722
|
}
|
|
4202
|
-
u.insertBefore(d2,
|
|
4723
|
+
u.insertBefore(d2, n2);
|
|
4203
4724
|
}
|
|
4204
|
-
})), a3.appendChild(s3), a3.appendChild(l3),
|
|
4725
|
+
})), a3.appendChild(s3), a3.appendChild(l3), n2.appendChild(a3), u.appendChild(n2);
|
|
4205
4726
|
})), c.appendChild(u), c;
|
|
4206
|
-
})({ value: e3.value, ref: e3.ref, randomPosition: t3, limitPriority: (null === (
|
|
4727
|
+
})({ value: e3.value, ref: e3.ref, randomPosition: t3, limitPriority: (null === (r = e3.assets) || void 0 === r ? void 0 : r.limitPriority) || false, maxPriority: (null === (o = e3.assets) || void 0 === o ? void 0 : o.maxPriority) || 0, placeholder: (null === (a = e3.assets) || void 0 === a ? void 0 : a.placeholder) || "", language: i2 || "en" });
|
|
4207
4728
|
return s.appendChild(l), { element: s, elementTypeClass: "magicfeedback-priority-list" };
|
|
4208
4729
|
};
|
|
4209
|
-
},
|
|
4730
|
+
}, 8822: (e2, t2, i) => {
|
|
4210
4731
|
"use strict";
|
|
4211
4732
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderRatingEmoji = void 0;
|
|
4212
|
-
const r = i(
|
|
4213
|
-
t2.renderRatingEmoji = ({ question: e3, url: t3, send: i2, urlParamValue:
|
|
4214
|
-
const { ref:
|
|
4215
|
-
|
|
4216
|
-
const
|
|
4217
|
-
for (let e4 =
|
|
4218
|
-
const
|
|
4219
|
-
|
|
4220
|
-
const s2 = document.createElement("label");
|
|
4221
|
-
s2.htmlFor = `rating-${a}-${e4}`, s2.classList.add("magicfeedback-rating-option-label-container");
|
|
4733
|
+
const n = i(1433), r = i(2139), o = "https://survey-dev.magicfeedback.io/assets/emojis";
|
|
4734
|
+
t2.renderRatingEmoji = ({ question: e3, url: t3, send: i2, urlParamValue: a }) => {
|
|
4735
|
+
const { ref: s, assets: l } = e3, d = document.createElement("div"), c = "magicfeedback-rating", u = document.createElement("div");
|
|
4736
|
+
u.classList.add("magicfeedback-rating-container");
|
|
4737
|
+
const p = (null == l ? void 0 : l.max) ? Number(null == l ? void 0 : l.max) : 5, m = (null == l ? void 0 : l.min) ? Number(null == l ? void 0 : l.min) : 1, h = (0, n.createRatingPlaceholder)(null == l ? void 0 : l.minPlaceholder, null == l ? void 0 : l.maxPlaceholder);
|
|
4738
|
+
for (let e4 = m; e4 <= p; e4++) {
|
|
4739
|
+
const n2 = document.createElement("div");
|
|
4740
|
+
n2.classList.add("magicfeedback-rating-option");
|
|
4222
4741
|
const l2 = document.createElement("label");
|
|
4223
|
-
l2.htmlFor = `rating-${
|
|
4224
|
-
const
|
|
4225
|
-
|
|
4226
|
-
|
|
4742
|
+
l2.htmlFor = `rating-${s}-${e4}`, l2.classList.add("magicfeedback-rating-option-label-container");
|
|
4743
|
+
const d2 = document.createElement("label");
|
|
4744
|
+
d2.htmlFor = `rating-${s}-${e4}`, d2.textContent = e4.toString();
|
|
4745
|
+
const h2 = document.createElement("img");
|
|
4746
|
+
if (h2.alt = `face-${s}-${e4}`, h2.className = `rating-image${e4}`, 0 === m && 10 === p) h2.src = `${t3}/${e4}.svg`, h2.onerror = () => h2.src = `${o}/${e4}.svg`;
|
|
4747
|
+
else if (1 === m && 5 === p) switch (e4) {
|
|
4227
4748
|
case 1:
|
|
4228
|
-
|
|
4749
|
+
h2.src = `${t3}/1.svg`, h2.onerror = () => h2.src = `${o}/1.svg`;
|
|
4229
4750
|
break;
|
|
4230
4751
|
case 2:
|
|
4231
|
-
|
|
4752
|
+
h2.src = `${t3}/2.svg`, h2.onerror = () => h2.src = `${o}/2.svg`;
|
|
4232
4753
|
break;
|
|
4233
4754
|
case 3:
|
|
4234
|
-
|
|
4755
|
+
h2.src = `${t3}/6.svg`, h2.onerror = () => h2.src = `${o}/6.svg`;
|
|
4235
4756
|
break;
|
|
4236
4757
|
case 4:
|
|
4237
|
-
|
|
4758
|
+
h2.src = `${t3}/9.svg`, h2.onerror = () => h2.src = `${o}/9.svg`;
|
|
4238
4759
|
break;
|
|
4239
4760
|
case 5:
|
|
4240
|
-
|
|
4761
|
+
h2.src = `${t3}/10.svg`, h2.onerror = () => h2.src = `${o}/10.svg`;
|
|
4241
4762
|
}
|
|
4242
4763
|
else {
|
|
4243
|
-
const i3 = Math.round(10 / (
|
|
4244
|
-
|
|
4764
|
+
const i3 = Math.round(10 / (p - m) * (e4 - m));
|
|
4765
|
+
h2.src = `${t3}/${i3}.svg`, h2.onerror = () => h2.src = `${o}/${i3}.svg`;
|
|
4245
4766
|
}
|
|
4246
|
-
const
|
|
4247
|
-
|
|
4248
|
-
i2();
|
|
4249
|
-
})), o && o === h.value && (h.checked = true), s2.appendChild(h), s2.appendChild(m2), s2.appendChild(l2), r2.appendChild(s2), c.appendChild(r2);
|
|
4767
|
+
const f = document.createElement("input");
|
|
4768
|
+
f.id = `rating-${s}-${e4}`, f.type = "radio", f.name = s, f.value = e4.toString(), f.classList.add(c), f.classList.add("magicfeedback-input"), (0, r.autoAdvanceOn)(f, i2), a && a === f.value && (f.checked = true), l2.appendChild(f), l2.appendChild(h2), l2.appendChild(d2), n2.appendChild(l2), u.appendChild(n2);
|
|
4250
4769
|
}
|
|
4251
|
-
if ((null ==
|
|
4770
|
+
if ((null == l ? void 0 : l.extraOption) && (null == l ? void 0 : l.extraOptionText)) {
|
|
4252
4771
|
const e4 = document.createElement("div");
|
|
4253
4772
|
e4.classList.add("magicfeedback-rating-option");
|
|
4254
4773
|
const t4 = document.createElement("label");
|
|
4255
|
-
t4.htmlFor = `rating-${
|
|
4256
|
-
const
|
|
4257
|
-
|
|
4258
|
-
const
|
|
4259
|
-
|
|
4260
|
-
const
|
|
4261
|
-
|
|
4262
|
-
i2();
|
|
4263
|
-
})), t4.appendChild(o2), t4.appendChild(n2), t4.appendChild(r2), e4.appendChild(t4), c.appendChild(e4);
|
|
4774
|
+
t4.htmlFor = `rating-${s}-extra`, t4.classList.add("magicfeedback-rating-option-label-container");
|
|
4775
|
+
const n2 = document.createElement("label");
|
|
4776
|
+
n2.htmlFor = `rating-${s}-extra`, n2.textContent = null == l ? void 0 : l.extraOptionText;
|
|
4777
|
+
const o2 = document.createElement("img");
|
|
4778
|
+
o2.src = "https://magicfeedback-c6458-dev.web.app/assets/question.svg", o2.alt = `face-${s}-extra`, o2.className = "magicfeedback-rating-image-extra";
|
|
4779
|
+
const a2 = document.createElement("input");
|
|
4780
|
+
a2.id = `rating-${s}-extra`, a2.type = "radio", a2.name = s, a2.value = "-", a2.classList.add(c), a2.classList.add("magicfeedback-input"), (0, r.autoAdvanceOn)(a2, i2), t4.appendChild(a2), t4.appendChild(o2), t4.appendChild(n2), e4.appendChild(t4), u.appendChild(e4);
|
|
4264
4781
|
}
|
|
4265
|
-
return
|
|
4782
|
+
return h.childElementCount > 0 && u.appendChild(h), d.appendChild(u), { element: d, elementTypeClass: c };
|
|
4266
4783
|
};
|
|
4267
|
-
},
|
|
4784
|
+
}, 6083: (e2, t2, i) => {
|
|
4268
4785
|
"use strict";
|
|
4269
4786
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderRatingNumber = void 0;
|
|
4270
|
-
const
|
|
4271
|
-
t2.renderRatingNumber = ({ question: e3, order: t3, direction: i2, send:
|
|
4272
|
-
const
|
|
4273
|
-
return { element: (0,
|
|
4787
|
+
const n = i(1433);
|
|
4788
|
+
t2.renderRatingNumber = ({ question: e3, order: t3, direction: i2, send: r, urlParamValue: o, language: a, isPhone: s, productId: l }) => {
|
|
4789
|
+
const d = "magicfeedback-rating-number";
|
|
4790
|
+
return { element: (0, n.createRatingNumberElement)(e3.ref, e3.assets, t3, i2, d, r, o, a, { legacy: (0, n.usesLegacyRatingNumber)(l), isPhone: s }), elementTypeClass: d };
|
|
4274
4791
|
};
|
|
4275
|
-
},
|
|
4792
|
+
}, 9102: (e2, t2, i) => {
|
|
4276
4793
|
"use strict";
|
|
4277
4794
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderRatingStar = void 0;
|
|
4278
|
-
const
|
|
4795
|
+
const n = i(1433);
|
|
4279
4796
|
t2.renderRatingStar = ({ question: e3, send: t3, urlParamValue: i2 }) => {
|
|
4280
|
-
var
|
|
4281
|
-
const a = document.createElement("div"), s = (0,
|
|
4797
|
+
var r, o;
|
|
4798
|
+
const a = document.createElement("div"), s = (0, n.createStarRating)(e3.ref, null === (r = e3.assets) || void 0 === r ? void 0 : r.minPlaceholder, null === (o = e3.assets) || void 0 === o ? void 0 : o.maxPlaceholder, t3, i2);
|
|
4282
4799
|
return a.appendChild(s), { element: a, elementTypeClass: "magicfeedback-rating-star" };
|
|
4283
4800
|
};
|
|
4284
|
-
},
|
|
4801
|
+
}, 8707: (e2, t2, i) => {
|
|
4285
4802
|
"use strict";
|
|
4286
4803
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderSelect = void 0;
|
|
4287
|
-
const
|
|
4804
|
+
const n = i(6658), r = i(7031);
|
|
4288
4805
|
t2.renderSelect = ({ question: e3, format: t3, language: i2, urlParamValue: o }) => {
|
|
4289
4806
|
const { title: a, value: s, defaultValue: l } = e3, d = document.createElement("select"), c = document.createElement("option");
|
|
4290
|
-
return c.value = "", c.text = "slim" === t3 ? (0,
|
|
4807
|
+
return c.value = "", c.text = "slim" === t3 ? (0, n.parseTitle)(a, i2) : l || (0, r.t)(i2, "select.placeholder"), c.disabled = true, c.selected = true, d.appendChild(c), s.forEach(((e4) => {
|
|
4291
4808
|
const t4 = document.createElement("option");
|
|
4292
4809
|
t4.value = e4, t4.text = e4, d.appendChild(t4);
|
|
4293
4810
|
})), o && s.includes(o) && (d.value = o), { element: d, elementTypeClass: "magicfeedback-select" };
|
|
4294
4811
|
};
|
|
4295
|
-
},
|
|
4812
|
+
}, 8416: (e2, t2, i) => {
|
|
4296
4813
|
"use strict";
|
|
4297
4814
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderText = void 0;
|
|
4298
|
-
const
|
|
4299
|
-
t2.renderText = ({ language: e3, placeholderText: t3, urlParamValue: i2, send:
|
|
4815
|
+
const n = i(9930);
|
|
4816
|
+
t2.renderText = ({ language: e3, placeholderText: t3, urlParamValue: i2, send: r }) => {
|
|
4300
4817
|
const o = document.createElement("input");
|
|
4301
|
-
return o.type = "text", o.placeholder = t3 ||
|
|
4302
|
-
e4.preventDefault(), "Enter" === e4.key &&
|
|
4818
|
+
return o.type = "text", o.placeholder = t3 || n.placeholder.answer(e3 || "en"), i2 && (o.value = i2), o.addEventListener("keyup", ((e4) => {
|
|
4819
|
+
e4.preventDefault(), "Enter" === e4.key && r && r();
|
|
4303
4820
|
})), { element: o, elementTypeClass: "magicfeedback-text" };
|
|
4304
4821
|
};
|
|
4305
|
-
},
|
|
4822
|
+
}, 4336: (e2, t2, i) => {
|
|
4306
4823
|
"use strict";
|
|
4307
4824
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderUploadFile = void 0;
|
|
4308
|
-
const
|
|
4309
|
-
t2.renderUploadFile = ({ question: e3, language: t3 }) => (0,
|
|
4310
|
-
},
|
|
4825
|
+
const n = i(1853);
|
|
4826
|
+
t2.renderUploadFile = ({ question: e3, language: t3 }) => (0, n.createUploadControl)(e3, t3, "file");
|
|
4827
|
+
}, 5469: (e2, t2, i) => {
|
|
4311
4828
|
"use strict";
|
|
4312
4829
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderUploadImage = void 0;
|
|
4313
|
-
const
|
|
4314
|
-
t2.renderUploadImage = ({ question: e3, language: t3 }) => (0,
|
|
4315
|
-
},
|
|
4830
|
+
const n = i(1853);
|
|
4831
|
+
t2.renderUploadImage = ({ question: e3, language: t3 }) => (0, n.createUploadControl)(e3, t3, "image");
|
|
4832
|
+
}, 1853: function(e2, t2, i) {
|
|
4316
4833
|
"use strict";
|
|
4317
|
-
var
|
|
4318
|
-
return new (i2 || (i2 = Promise))((function(
|
|
4834
|
+
var n = this && this.__awaiter || function(e3, t3, i2, n2) {
|
|
4835
|
+
return new (i2 || (i2 = Promise))((function(r2, o2) {
|
|
4319
4836
|
function a2(e4) {
|
|
4320
4837
|
try {
|
|
4321
|
-
l2(
|
|
4838
|
+
l2(n2.next(e4));
|
|
4322
4839
|
} catch (e5) {
|
|
4323
4840
|
o2(e5);
|
|
4324
4841
|
}
|
|
4325
4842
|
}
|
|
4326
4843
|
function s2(e4) {
|
|
4327
4844
|
try {
|
|
4328
|
-
l2(
|
|
4845
|
+
l2(n2.throw(e4));
|
|
4329
4846
|
} catch (e5) {
|
|
4330
4847
|
o2(e5);
|
|
4331
4848
|
}
|
|
4332
4849
|
}
|
|
4333
4850
|
function l2(e4) {
|
|
4334
4851
|
var t4;
|
|
4335
|
-
e4.done ?
|
|
4852
|
+
e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
4336
4853
|
e5(t4);
|
|
4337
4854
|
}))).then(a2, s2);
|
|
4338
4855
|
}
|
|
4339
|
-
l2((
|
|
4856
|
+
l2((n2 = n2.apply(e3, t3 || [])).next());
|
|
4340
4857
|
}));
|
|
4341
4858
|
};
|
|
4342
4859
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.createUploadControl = t2.awaitUploadReady = t2.getUploadValues = t2.formatFileSize = void 0;
|
|
4343
|
-
const
|
|
4860
|
+
const r = i(9930), o = i(6658), a = "__mfUploadValues", s = "__mfUploadReady";
|
|
4344
4861
|
function l(e3) {
|
|
4345
4862
|
if ("number" != typeof e3 || isNaN(e3)) return "";
|
|
4346
4863
|
if (e3 < 1024) return `${e3} B`;
|
|
@@ -4353,58 +4870,58 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4353
4870
|
const t3 = e3[a];
|
|
4354
4871
|
return Array.isArray(t3) ? t3 : [];
|
|
4355
4872
|
}, t2.awaitUploadReady = function(e3) {
|
|
4356
|
-
return
|
|
4873
|
+
return n(this, void 0, void 0, (function* () {
|
|
4357
4874
|
if (!e3) return;
|
|
4358
4875
|
const t3 = Array.from(e3.querySelectorAll(".magicfeedback-upload-native"));
|
|
4359
4876
|
yield Promise.all(t3.map(((e4) => e4[s])).filter(Boolean));
|
|
4360
4877
|
}));
|
|
4361
4878
|
}, t2.createUploadControl = function(e3, t3, i2) {
|
|
4362
|
-
const { ref:
|
|
4879
|
+
const { ref: n2, require: d, title: c, assets: u } = e3, p = "image" === i2 ? "magicfeedback-upload-image" : "magicfeedback-upload-file", m = (null == u ? void 0 : u.multiple) || false, h = m ? (null == u ? void 0 : u.maxFiles) || 0 : 1, f = Number(null == u ? void 0 : u.maxFileSize) > 0 ? Number(null == u ? void 0 : u.maxFileSize) : 0, g = 1024 * f * 1024, y = document.createElement("div");
|
|
4363
4880
|
y.classList.add("magicfeedback-upload");
|
|
4364
4881
|
const v = document.createElement("input");
|
|
4365
|
-
v.type = "file", "image" === i2 && (v.accept = "image/*"), v.multiple = m, v.required = d, v.name =
|
|
4882
|
+
v.type = "file", "image" === i2 && (v.accept = "image/*"), v.multiple = m, v.required = d, v.name = n2, v.id = `magicfeedback-upload-input-${n2}`, v.classList.add(p), v.classList.add("magicfeedback-input"), v.classList.add("magicfeedback-upload-native"), v[a] = [], v[s] = Promise.resolve();
|
|
4366
4883
|
const b = (0, o.parseTitle)(c, t3);
|
|
4367
4884
|
b && v.setAttribute("aria-label", b);
|
|
4368
4885
|
const E = document.createElement("div");
|
|
4369
4886
|
E.classList.add("magicfeedback-upload-dropzone");
|
|
4370
|
-
const k = document.createElement("span");
|
|
4371
|
-
k.classList.add("magicfeedback-upload-icon"), k.innerHTML = "image" === i2 ? '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><path d="M21 15l-5-5L5 21"/></svg>' : '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M16 16l-4-4-4 4"/><path d="M12 12v9"/><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"/></svg>';
|
|
4372
4887
|
const A = document.createElement("span");
|
|
4373
|
-
A.classList.add("magicfeedback-upload-
|
|
4888
|
+
A.classList.add("magicfeedback-upload-icon"), A.innerHTML = "image" === i2 ? '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><path d="M21 15l-5-5L5 21"/></svg>' : '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M16 16l-4-4-4 4"/><path d="M12 12v9"/><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"/></svg>';
|
|
4889
|
+
const k = document.createElement("span");
|
|
4890
|
+
k.classList.add("magicfeedback-upload-cta"), k.textContent = r.placeholder.upload.cta(t3);
|
|
4374
4891
|
const T = document.createElement("span");
|
|
4375
|
-
T.classList.add("magicfeedback-upload-hint"), T.textContent = (function(e4, t4, i3,
|
|
4376
|
-
const a2 = [
|
|
4377
|
-
return i3 &&
|
|
4378
|
-
})(t3, i2, m, h, f), E.appendChild(v), E.appendChild(
|
|
4892
|
+
T.classList.add("magicfeedback-upload-hint"), T.textContent = (function(e4, t4, i3, n3, o2) {
|
|
4893
|
+
const a2 = [r.placeholder.upload.formats(e4, t4)];
|
|
4894
|
+
return i3 && n3 > 0 && a2.push(r.placeholder.upload.maxFiles(e4, n3)), o2 > 0 && a2.push(r.placeholder.upload.maxSize(e4, o2)), a2.filter(Boolean).join(" \xB7 ");
|
|
4895
|
+
})(t3, i2, m, h, f), E.appendChild(v), E.appendChild(A), E.appendChild(k), E.appendChild(T);
|
|
4379
4896
|
const C = document.createElement("div");
|
|
4380
4897
|
C.classList.add("magicfeedback-upload-error");
|
|
4381
|
-
const
|
|
4382
|
-
|
|
4383
|
-
const
|
|
4384
|
-
const t4 =
|
|
4898
|
+
const x = document.createElement("ul");
|
|
4899
|
+
x.classList.add("magicfeedback-upload-list"), y.appendChild(E), y.appendChild(C), y.appendChild(x);
|
|
4900
|
+
const P = /* @__PURE__ */ new WeakMap(), L = (e4) => {
|
|
4901
|
+
const t4 = P.get(e4);
|
|
4385
4902
|
return t4 ? Promise.resolve(t4) : new Promise(((t5) => {
|
|
4386
|
-
const i3 = new FileReader(),
|
|
4387
|
-
const
|
|
4388
|
-
|
|
4903
|
+
const i3 = new FileReader(), n3 = (i4) => {
|
|
4904
|
+
const n4 = JSON.stringify({ name: e4.name, type: e4.type, size: e4.size, content: i4 });
|
|
4905
|
+
P.set(e4, n4), t5(n4);
|
|
4389
4906
|
};
|
|
4390
|
-
i3.onload = () =>
|
|
4907
|
+
i3.onload = () => n3("string" == typeof i3.result ? i3.result : ""), i3.onerror = () => n3(""), i3.readAsDataURL(e4);
|
|
4391
4908
|
}));
|
|
4392
|
-
},
|
|
4909
|
+
}, S = [], w = (e4) => {
|
|
4393
4910
|
try {
|
|
4394
4911
|
const t4 = h > 0 ? e4.slice(0, h) : e4, i3 = new DataTransfer();
|
|
4395
4912
|
t4.forEach(((e5) => i3.items.add(e5))), v.files = i3.files;
|
|
4396
4913
|
} catch (e5) {
|
|
4397
4914
|
}
|
|
4398
4915
|
!(function() {
|
|
4399
|
-
|
|
4916
|
+
S.forEach(((e6) => URL.revokeObjectURL(e6))), S.length = 0, x.innerHTML = "";
|
|
4400
4917
|
const e5 = Array.from(v.files || []);
|
|
4401
|
-
y.classList.toggle("magicfeedback-upload--has-files", e5.length > 0), e5.forEach(((e6,
|
|
4918
|
+
y.classList.toggle("magicfeedback-upload--has-files", e5.length > 0), e5.forEach(((e6, n3) => {
|
|
4402
4919
|
const o2 = document.createElement("li");
|
|
4403
4920
|
o2.classList.add("magicfeedback-upload-file-item");
|
|
4404
4921
|
const a2 = document.createElement("span");
|
|
4405
4922
|
if (a2.classList.add("magicfeedback-upload-thumb"), "image" === i2 && e6.type.startsWith("image/")) {
|
|
4406
4923
|
const t4 = URL.createObjectURL(e6);
|
|
4407
|
-
|
|
4924
|
+
S.push(t4);
|
|
4408
4925
|
const i3 = document.createElement("img");
|
|
4409
4926
|
i3.src = t4, i3.alt = e6.name, a2.appendChild(i3);
|
|
4410
4927
|
} else a2.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><path d="M14 2v6h6"/></svg>';
|
|
@@ -4415,20 +4932,20 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4415
4932
|
const c2 = document.createElement("span");
|
|
4416
4933
|
c2.classList.add("magicfeedback-upload-file-size"), c2.textContent = l(e6.size), s2.appendChild(d2), s2.appendChild(c2);
|
|
4417
4934
|
const u2 = document.createElement("button");
|
|
4418
|
-
u2.type = "button", u2.classList.add("magicfeedback-upload-remove"), u2.setAttribute("aria-label", `${
|
|
4419
|
-
e7.preventDefault(), e7.stopPropagation(),
|
|
4420
|
-
})), o2.appendChild(a2), o2.appendChild(s2), o2.appendChild(u2),
|
|
4935
|
+
u2.type = "button", u2.classList.add("magicfeedback-upload-remove"), u2.setAttribute("aria-label", `${r.placeholder.upload.remove(t3)}: ${e6.name}`), u2.innerHTML = '<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>', u2.addEventListener("click", ((e7) => {
|
|
4936
|
+
e7.preventDefault(), e7.stopPropagation(), w(Array.from(v.files || []).filter(((e8, t4) => t4 !== n3)));
|
|
4937
|
+
})), o2.appendChild(a2), o2.appendChild(s2), o2.appendChild(u2), x.appendChild(o2);
|
|
4421
4938
|
}));
|
|
4422
4939
|
})(), (() => {
|
|
4423
|
-
const e5 = Array.from(v.files || []), t4 = Promise.all(e5.map(
|
|
4940
|
+
const e5 = Array.from(v.files || []), t4 = Promise.all(e5.map(L)).then(((e6) => {
|
|
4424
4941
|
v[a] = e6;
|
|
4425
4942
|
}));
|
|
4426
4943
|
v[s] = t4;
|
|
4427
4944
|
})();
|
|
4428
|
-
},
|
|
4945
|
+
}, O = (e4) => {
|
|
4429
4946
|
if (!e4.length) return C.textContent = "", void C.classList.remove("is-visible");
|
|
4430
4947
|
const i3 = e4.map(((e5) => e5.name)).join(", ");
|
|
4431
|
-
C.textContent = `${
|
|
4948
|
+
C.textContent = `${r.placeholder.upload.tooLarge(t3, f)}: ${i3}`, C.classList.add("is-visible");
|
|
4432
4949
|
}, N = (e4) => {
|
|
4433
4950
|
if (!g) return { accepted: e4, rejected: [] };
|
|
4434
4951
|
const t4 = [], i3 = [];
|
|
@@ -4436,7 +4953,7 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4436
4953
|
};
|
|
4437
4954
|
v.addEventListener("change", (() => {
|
|
4438
4955
|
const { accepted: e4, rejected: t4 } = N(Array.from(v.files || []));
|
|
4439
|
-
|
|
4956
|
+
O(t4), w(e4);
|
|
4440
4957
|
}));
|
|
4441
4958
|
const I = (e4) => {
|
|
4442
4959
|
e4.preventDefault(), e4.stopPropagation();
|
|
@@ -4448,72 +4965,72 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4448
4965
|
})))), E.addEventListener("drop", ((e4) => {
|
|
4449
4966
|
I(e4), E.classList.remove("is-dragover");
|
|
4450
4967
|
const t4 = e4.dataTransfer;
|
|
4451
|
-
let
|
|
4452
|
-
if ("image" === i2 && (
|
|
4453
|
-
const { accepted:
|
|
4454
|
-
if (
|
|
4968
|
+
let n3 = t4 ? Array.from(t4.files) : [];
|
|
4969
|
+
if ("image" === i2 && (n3 = n3.filter(((e5) => e5.type.startsWith("image/")))), !n3.length) return;
|
|
4970
|
+
const { accepted: r2, rejected: o2 } = N(n3);
|
|
4971
|
+
if (O(o2), !r2.length) return;
|
|
4455
4972
|
const a2 = m ? Array.from(v.files || []) : [];
|
|
4456
|
-
|
|
4973
|
+
w(a2.concat(r2));
|
|
4457
4974
|
})), { element: y, elementTypeClass: p };
|
|
4458
4975
|
};
|
|
4459
|
-
},
|
|
4976
|
+
}, 8019: function(e2, t2, i) {
|
|
4460
4977
|
"use strict";
|
|
4461
|
-
var
|
|
4462
|
-
return new (i2 || (i2 = Promise))((function(
|
|
4978
|
+
var n = this && this.__awaiter || function(e3, t3, i2, n2) {
|
|
4979
|
+
return new (i2 || (i2 = Promise))((function(r2, o2) {
|
|
4463
4980
|
function a2(e4) {
|
|
4464
4981
|
try {
|
|
4465
|
-
l2(
|
|
4982
|
+
l2(n2.next(e4));
|
|
4466
4983
|
} catch (e5) {
|
|
4467
4984
|
o2(e5);
|
|
4468
4985
|
}
|
|
4469
4986
|
}
|
|
4470
4987
|
function s2(e4) {
|
|
4471
4988
|
try {
|
|
4472
|
-
l2(
|
|
4989
|
+
l2(n2.throw(e4));
|
|
4473
4990
|
} catch (e5) {
|
|
4474
4991
|
o2(e5);
|
|
4475
4992
|
}
|
|
4476
4993
|
}
|
|
4477
4994
|
function l2(e4) {
|
|
4478
4995
|
var t4;
|
|
4479
|
-
e4.done ?
|
|
4996
|
+
e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
4480
4997
|
e5(t4);
|
|
4481
4998
|
}))).then(a2, s2);
|
|
4482
4999
|
}
|
|
4483
|
-
l2((
|
|
5000
|
+
l2((n2 = n2.apply(e3, t3 || [])).next());
|
|
4484
5001
|
}));
|
|
4485
|
-
},
|
|
5002
|
+
}, r = this && this.__importDefault || function(e3) {
|
|
4486
5003
|
return e3 && e3.__esModule ? e3 : { default: e3 };
|
|
4487
5004
|
};
|
|
4488
5005
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.nextAgentTurn = t2.startAgentSurvey = void 0;
|
|
4489
|
-
const o =
|
|
4490
|
-
function d(e3, t3, i2,
|
|
5006
|
+
const o = r(i(6911)), a = i(6891), s = i(1347), l = i(9);
|
|
5007
|
+
function d(e3, t3, i2, r2, s2) {
|
|
4491
5008
|
var d2;
|
|
4492
|
-
return
|
|
4493
|
-
let
|
|
5009
|
+
return n(this, void 0, void 0, (function* () {
|
|
5010
|
+
let n2;
|
|
4494
5011
|
try {
|
|
4495
|
-
|
|
5012
|
+
n2 = yield (0, o.default)(e3 + t3, { method: "POST", headers: Object.assign({ "Content-Type": "application/json" }, a.header), body: JSON.stringify(i2) });
|
|
4496
5013
|
} catch (e4) {
|
|
4497
|
-
throw
|
|
5014
|
+
throw r2.err(`[agentSurvey/${s2}] network error`, e4), new l.AgentApiError("NETWORK", (null == e4 ? void 0 : e4.message) || "Network error");
|
|
4498
5015
|
}
|
|
4499
|
-
if (!
|
|
5016
|
+
if (!n2.ok) {
|
|
4500
5017
|
let e4 = null;
|
|
4501
5018
|
try {
|
|
4502
|
-
e4 = yield
|
|
5019
|
+
e4 = yield n2.json();
|
|
4503
5020
|
} catch (e5) {
|
|
4504
5021
|
}
|
|
4505
|
-
const t4 = (0, l.mapAgentStatus)(
|
|
4506
|
-
throw
|
|
5022
|
+
const t4 = (0, l.mapAgentStatus)(n2.status, s2);
|
|
5023
|
+
throw r2.err(`[agentSurvey/${s2}] ${n2.status}`, e4), new l.AgentApiError(t4, (null === (d2 = null == e4 ? void 0 : e4.error) || void 0 === d2 ? void 0 : d2.message) || (null == e4 ? void 0 : e4.message) || n2.statusText, n2.status, "RATE_LIMITED" === t4 ? (function(e5) {
|
|
4507
5024
|
var t5, i3;
|
|
4508
|
-
const
|
|
4509
|
-
return Number.isFinite(
|
|
4510
|
-
})(
|
|
5025
|
+
const n3 = null === (i3 = null === (t5 = null == e5 ? void 0 : e5.headers) || void 0 === t5 ? void 0 : t5.get) || void 0 === i3 ? void 0 : i3.call(t5, "Retry-After"), r3 = n3 ? Number(n3) : NaN;
|
|
5026
|
+
return Number.isFinite(r3) && r3 > 0 ? 1e3 * r3 : 6e4;
|
|
5027
|
+
})(n2) : void 0, e4);
|
|
4511
5028
|
}
|
|
4512
5029
|
try {
|
|
4513
|
-
const e4 = yield
|
|
4514
|
-
return
|
|
5030
|
+
const e4 = yield n2.json();
|
|
5031
|
+
return r2.log(`[agentSurvey/${s2}] ok`, e4), e4;
|
|
4515
5032
|
} catch (e4) {
|
|
4516
|
-
throw new l.AgentApiError("MALFORMED", "Unreadable response body",
|
|
5033
|
+
throw new l.AgentApiError("MALFORMED", "Unreadable response body", n2.status);
|
|
4517
5034
|
}
|
|
4518
5035
|
}));
|
|
4519
5036
|
}
|
|
@@ -4522,12 +5039,12 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4522
5039
|
}, t2.nextAgentTurn = function(e3, t3, i2) {
|
|
4523
5040
|
return d(e3, s.endpoints.sdk.agentSurveyNext, t3, i2, "next");
|
|
4524
5041
|
};
|
|
4525
|
-
},
|
|
5042
|
+
}, 9: (e2, t2) => {
|
|
4526
5043
|
"use strict";
|
|
4527
5044
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.mapAgentStatus = t2.AgentApiError = void 0;
|
|
4528
5045
|
class i extends Error {
|
|
4529
|
-
constructor(e3, t3,
|
|
4530
|
-
super(t3), this.kind = e3, this.status =
|
|
5046
|
+
constructor(e3, t3, n, r, o) {
|
|
5047
|
+
super(t3), this.kind = e3, this.status = n, this.retryAfterMs = r, this.body = o, this.name = "AgentApiError", Object.setPrototypeOf(this, i.prototype);
|
|
4531
5048
|
}
|
|
4532
5049
|
get retryable() {
|
|
4533
5050
|
return "RATE_LIMITED" === this.kind || "AI_UNAVAILABLE" === this.kind || "NETWORK" === this.kind;
|
|
@@ -4536,38 +5053,38 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4536
5053
|
t2.AgentApiError = i, t2.mapAgentStatus = function(e3, t3) {
|
|
4537
5054
|
return 429 === e3 ? "RATE_LIMITED" : 406 === e3 || 401 === e3 || 403 === e3 ? "AUTH" : 404 === e3 ? "NOT_FOUND" : 400 === e3 || 422 === e3 ? "BAD_CONFIG" : e3 >= 500 ? "start" === t3 ? "AI_UNAVAILABLE" : "NETWORK" : "MALFORMED";
|
|
4538
5055
|
};
|
|
4539
|
-
},
|
|
5056
|
+
}, 3963: (e2, t2, i) => {
|
|
4540
5057
|
"use strict";
|
|
4541
5058
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.encodeAnswer = t2.toAgentStep = t2.ratingBounds = t2.mapAgentType = t2.DEFAULT_ANSWER_DELIMITER = void 0;
|
|
4542
|
-
const
|
|
5059
|
+
const n = i(1140), r = i(6658);
|
|
4543
5060
|
t2.DEFAULT_ANSWER_DELIMITER = ", ";
|
|
4544
|
-
const o = [
|
|
5061
|
+
const o = [n.FEEDBACKAPPANSWERTYPE.RADIO, n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE, n.FEEDBACKAPPANSWERTYPE.SELECT, n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE], a = Object.values(n.FEEDBACKAPPANSWERTYPE);
|
|
4545
5062
|
function s(e3, t3, i2) {
|
|
4546
5063
|
var s2, l2, d2;
|
|
4547
5064
|
const c2 = String(e3 || "").trim().toUpperCase();
|
|
4548
|
-
return "RATING" === c2 ?
|
|
5065
|
+
return "RATING" === c2 ? n.FEEDBACKAPPANSWERTYPE.RATING_NUMBER : c2 === n.FEEDBACKAPPANSWERTYPE.CONTACT ? (null === (s2 = i2.log) || void 0 === s2 || s2.log("[agentSurvey] CONTACT has no renderer, falling back to TEXT"), n.FEEDBACKAPPANSWERTYPE.TEXT) : a.includes(c2) ? o.includes(c2) && 0 === t3.length ? (null === (d2 = i2.log) || void 0 === d2 || d2.err(`[agentSurvey] ${c2} arrived with no options, falling back to TEXT`), n.FEEDBACKAPPANSWERTYPE.TEXT) : c2 !== n.FEEDBACKAPPANSWERTYPE.BOOLEAN || 2 !== t3.length || (function(e4, t4) {
|
|
4549
5066
|
if (2 !== e4.length) return false;
|
|
4550
|
-
const i3 = e4.map(((e5) => String(e5).trim().toLowerCase())),
|
|
4551
|
-
return i3[0] === o2[0] && i3[1] === o2[1] || i3[0] ===
|
|
4552
|
-
})(t3, i2.language) ? c2 :
|
|
5067
|
+
const i3 = e4.map(((e5) => String(e5).trim().toLowerCase())), n2 = (0, r.getBooleanOptions)(t4).map(((e5) => e5.toLowerCase())), o2 = ["yes", "no"];
|
|
5068
|
+
return i3[0] === o2[0] && i3[1] === o2[1] || i3[0] === n2[0] && i3[1] === n2[1];
|
|
5069
|
+
})(t3, i2.language) ? c2 : n.FEEDBACKAPPANSWERTYPE.RADIO : (null === (l2 = i2.log) || void 0 === l2 || l2.err(`[agentSurvey] unknown question type "${e3}", falling back to TEXT`), n.FEEDBACKAPPANSWERTYPE.TEXT);
|
|
4553
5070
|
}
|
|
4554
5071
|
function l(e3) {
|
|
4555
5072
|
const t3 = e3.map(Number).filter(((e4) => Number.isFinite(e4)));
|
|
4556
5073
|
return t3.length >= 2 ? { min: Math.min(...t3), max: Math.max(...t3) } : { min: 1, max: 5 };
|
|
4557
5074
|
}
|
|
4558
5075
|
function d(e3, t3, i2) {
|
|
4559
|
-
const
|
|
4560
|
-
return e3 !==
|
|
5076
|
+
const r2 = { randomPosition: false, direction: "row", order: "ltr" };
|
|
5077
|
+
return e3 !== n.FEEDBACKAPPANSWERTYPE.RATING_NUMBER && e3 !== n.FEEDBACKAPPANSWERTYPE.RATING_EMOJI || Object.assign(r2, l(t3)), e3 === n.FEEDBACKAPPANSWERTYPE.LONGTEXT && (r2.maxCharacters = 0), Object.assign(Object.assign({}, r2), (null == i2 ? void 0 : i2.assets) || {});
|
|
4561
5078
|
}
|
|
4562
5079
|
function c(e3, t3, i2) {
|
|
4563
|
-
var
|
|
4564
|
-
const { full: l2, title: c2 } = t3, u = [...null !== (
|
|
5080
|
+
var n2, r2, o2, a2;
|
|
5081
|
+
const { full: l2, title: c2 } = t3, u = [...null !== (r2 = null !== (n2 = e3.questionValues) && void 0 !== n2 ? n2 : null == l2 ? void 0 : l2.value) && void 0 !== r2 ? r2 : []], p = s(null !== (o2 = null == l2 ? void 0 : l2.type) && void 0 !== o2 ? o2 : e3.questionType, u, i2), m = e3.questionRef || (null == l2 ? void 0 : l2.ref) || `agent-q-${e3.currentTurn}`;
|
|
4565
5082
|
return { id: (null == l2 ? void 0 : l2.id) || `agent-${i2.sessionId}-${e3.currentTurn}`, title: c2 || "", type: p, questionType: { conf: null }, ref: m, require: null === (a2 = null == l2 ? void 0 : l2.require) || void 0 === a2 || a2, external_id: (null == l2 ? void 0 : l2.external_id) || "", value: u, defaultValue: (null == l2 ? void 0 : l2.defaultValue) || "", followup: false, position: e3.currentTurn, assets: d(p, u, l2), refMetric: (null == l2 ? void 0 : l2.refMetric) || "", integrationId: i2.integrationId, integrationPageId: "", status: "ACTIVE" };
|
|
4566
5083
|
}
|
|
4567
5084
|
t2.mapAgentType = s, t2.ratingBounds = l, t2.toAgentStep = function(e3, t3) {
|
|
4568
|
-
var i2,
|
|
5085
|
+
var i2, r2, o2;
|
|
4569
5086
|
const a2 = e3, s2 = e3.currentTurn, l2 = e3.maxTurns, d2 = a2.coverageSummary, u = (e4) => ({ kind: "END", reason: e4, currentTurn: s2, maxTurns: l2, coverageSummary: d2 });
|
|
4570
|
-
if (a2.answerType ===
|
|
5087
|
+
if (a2.answerType === n.AGENT_ANSWER_TYPE_BLOCKED) return u("BLOCKED");
|
|
4571
5088
|
if (true === a2.shouldEnd) return u("SHOULD_END");
|
|
4572
5089
|
const p = (function(e4) {
|
|
4573
5090
|
const t4 = e4.question && "object" == typeof e4.question ? e4.question : e4.nextQuestion && "object" == typeof e4.nextQuestion ? e4.nextQuestion : null;
|
|
@@ -4577,17 +5094,17 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4577
5094
|
}
|
|
4578
5095
|
return { full: null, title: "string" == typeof e4.nextQuestion ? e4.nextQuestion : null };
|
|
4579
5096
|
})(e3);
|
|
4580
|
-
return "NONE" === String(null !== (o2 = null !== (
|
|
4581
|
-
}, t2.encodeAnswer = function(e3, i2,
|
|
4582
|
-
const
|
|
4583
|
-
return [a2.filter(((e4, t3) => a2.indexOf(e4) === t3)).join(
|
|
5097
|
+
return "NONE" === String(null !== (o2 = null !== (r2 = null === (i2 = p.full) || void 0 === i2 ? void 0 : i2.type) && void 0 !== r2 ? r2 : e3.questionType) && void 0 !== o2 ? o2 : "").trim().toUpperCase() ? u("TYPE_NONE") : p.title && p.title.trim() ? { kind: "QUESTION", question: c(e3, p, t3), isFromBase: true === e3.isFromBase, currentTurn: s2, maxTurns: l2, topic: a2.topic, coverageGaps: e3.coverageGaps, coverageSummary: d2 } : u("NO_QUESTION");
|
|
5098
|
+
}, t2.encodeAnswer = function(e3, i2, n2 = t2.DEFAULT_ANSWER_DELIMITER) {
|
|
5099
|
+
const r2 = i2.ref, o2 = (e4) => e4.flatMap(((e5) => Array.isArray(e5.value) ? e5.value : [e5.value])).map(((e5) => "string" == typeof e5 ? e5 : JSON.stringify(e5))).map(((e5) => (e5 || "").trim())).filter(((e5) => "" !== e5)), a2 = o2(e3.filter(((e4) => e4.key === r2))), s2 = o2(e3.filter(((e4) => e4.key === `extra-option-${r2}`)));
|
|
5100
|
+
return [a2.filter(((e4, t3) => a2.indexOf(e4) === t3)).join(n2), s2.join(n2)].filter(((e4) => "" !== e4)).join(n2);
|
|
4584
5101
|
};
|
|
4585
|
-
},
|
|
5102
|
+
}, 1817: (e2, t2, i) => {
|
|
4586
5103
|
"use strict";
|
|
4587
5104
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.scrapeInputs = void 0;
|
|
4588
|
-
const
|
|
5105
|
+
const n = i(1853);
|
|
4589
5106
|
t2.scrapeInputs = function(e3) {
|
|
4590
|
-
const t3 = e3.querySelectorAll(".magicfeedback-input"), i2 = [],
|
|
5107
|
+
const t3 = e3.querySelectorAll(".magicfeedback-input"), i2 = [], r = {};
|
|
4591
5108
|
return t3.forEach(((e4) => {
|
|
4592
5109
|
var t4;
|
|
4593
5110
|
const o = e4, a = o.name;
|
|
@@ -4595,236 +5112,394 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4595
5112
|
const s = o.type;
|
|
4596
5113
|
if (("radio" === s || "checkbox" === s) && !o.checked) return;
|
|
4597
5114
|
const l = o.value, d = o.classList[0];
|
|
4598
|
-
if ((null == d ? void 0 : d.includes("magicfeedback-priority-list")) || (null === (t4 = o.id) || void 0 === t4 ? void 0 : t4.startsWith("priority-list-"))) return
|
|
5115
|
+
if ((null == d ? void 0 : d.includes("magicfeedback-priority-list")) || (null === (t4 = o.id) || void 0 === t4 ? void 0 : t4.startsWith("priority-list-"))) return r[a] || (r[a] = []), void r[a].push(l);
|
|
4599
5116
|
if (null == d ? void 0 : d.includes("magicfeedback-upload")) {
|
|
4600
|
-
const e5 = (0,
|
|
5117
|
+
const e5 = (0, n.getUploadValues)(o);
|
|
4601
5118
|
return void (e5.length && i2.push({ key: a, value: e5 }));
|
|
4602
5119
|
}
|
|
4603
5120
|
const c = "magicfeedback-consent" === d ? o.checked.toString() : l;
|
|
4604
5121
|
null != c && i2.push({ key: a, value: [c] });
|
|
4605
|
-
})), Object.entries(
|
|
4606
|
-
const
|
|
4607
|
-
i2.push({ key: e4, value:
|
|
5122
|
+
})), Object.entries(r).forEach((([e4, t4]) => {
|
|
5123
|
+
const n2 = t4.slice().sort(((e5, t5) => Number(e5.split(".")[0]) - Number(t5.split(".")[0])));
|
|
5124
|
+
i2.push({ key: e4, value: n2 });
|
|
4608
5125
|
})), i2;
|
|
4609
5126
|
};
|
|
4610
|
-
},
|
|
5127
|
+
}, 7031: (e2, t2) => {
|
|
4611
5128
|
"use strict";
|
|
4612
5129
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.t = t2.isLanguageSupported = t2.isRtlLanguage = t2.hasOwnTranslation = t2.TRANSLATION_KEYS = t2.normalizeLanguage = t2.RTL_LANGUAGES = t2.AVAILABLE_LANGUAGES = t2.SUPPORTED_LANGUAGES = void 0;
|
|
4613
|
-
const i = { "placeholder.answer": "Write your answer here...", "placeholder.number": "Write your number here...", "placeholder.email": "Write your email here...", "placeholder.date": "Write your date here...", "placeholder.password": "Write your password here...", "pointSystem.error": "The total points must be 100 %", "boolean.yes": "Yes", "boolean.no": "No", "upload.cta": "Drag & drop or click to upload", "upload.imagesOnly": "Images only", "upload.anyFileType": "Any file type", "upload.maxFiles": "Max {n} files", "upload.maxSize": "Max {mb} MB", "upload.tooLarge": "File is too large (max {mb} MB)", "upload.remove": "Remove", "select.placeholder": "Select an option", "rating.ariaLabel": "Rating", "priority.selectUpTo": "Select up to", "priority.options": "options", "priority.thenOrder": "and then order them", "priority.selectOptions": "Select options", "priority.cancel": "Cancel", "priority.confirm": "Confirm", "priority.selectOptionNumber": "Select option #", "priority.prioritized": "Prioritized", "priority.of": "of", "priority.instruction": "Your priority list can be seen below. If you wish, you can rearrange your choices using the arrows. Click 'Next' to confirm your selection and proceed.", "action.send": "Send", "action.back": "Back", "action.next": "Next", "action.start": "Go!", "message.success": "Thank you for your feedback!", "message.blocked": "Thanks for your time - we'll end the conversation here.", "message.required": "Please answer before continuing.", "message.rateLimit": "Too many requests. Retrying in {seconds}s..." }, r = { en: i, es: { "placeholder.answer": "Escribe tu respuesta aqu\xED...", "placeholder.number": "Escribe tu n\xFAmero aqu\xED...", "placeholder.email": "Escribe tu correo electr\xF3nico aqu\xED...", "placeholder.date": "Escribe tu fecha aqu\xED...", "placeholder.password": "Escribe tu contrase\xF1a aqu\xED...", "pointSystem.error": "El total de puntos debe ser 100 %", "boolean.yes": "S\xED", "boolean.no": "No", "upload.cta": "Arrastra y suelta o haz clic para subir", "upload.imagesOnly": "Solo im\xE1genes", "upload.anyFileType": "Cualquier tipo de archivo", "upload.maxFiles": "M\xE1x. {n} archivos", "upload.maxSize": "M\xE1x. {mb} MB", "upload.tooLarge": "Archivo demasiado grande (m\xE1x. {mb} MB)", "upload.remove": "Eliminar", "select.placeholder": "Selecciona una opci\xF3n", "rating.ariaLabel": "Valoraci\xF3n", "priority.selectUpTo": "Selecciona hasta", "priority.options": "opciones", "priority.thenOrder": "y luego ord\xE9nalas", "priority.selectOptions": "Seleccionar opciones", "priority.cancel": "Cancelar", "priority.confirm": "Confirmar", "priority.selectOptionNumber": "Selecciona la opci\xF3n #", "priority.prioritized": "Priorizadas", "priority.of": "de", "priority.instruction": 'Tu lista priorizada se muestra abajo. Si deseas, puedes reordenar las opciones con las flechas. Haz clic en "Siguiente" para confirmar y continuar.', "action.send": "Enviar", "action.back": "Atr\xE1s", "action.next": "Siguiente", "action.start": "\xA1Empezar!", "message.success": "\xA1Gracias por tus comentarios!", "message.blocked": "Gracias por tu tiempo, terminamos aqu\xED la conversaci\xF3n.", "message.required": "Por favor, responde antes de continuar.", "message.rateLimit": "Demasiadas solicitudes. Reintentando en {seconds} s..." }, de: { "placeholder.answer": "Schreiben Sie hier Ihre Antwort...", "placeholder.number": "Geben Sie hier Ihre Zahl ein...", "placeholder.email": "Geben Sie hier Ihre E-Mail-Adresse ein...", "placeholder.date": "Geben Sie hier Ihr Datum ein...", "placeholder.password": "Geben Sie hier Ihr Passwort ein...", "pointSystem.error": "Die Gesamtpunktzahl muss 100 % betragen", "boolean.yes": "Ja", "boolean.no": "Nein", "upload.cta": "Ziehen Sie Dateien hierher oder klicken Sie zum Hochladen", "upload.imagesOnly": "Nur Bilder", "upload.anyFileType": "Beliebiger Dateityp", "upload.maxFiles": "Max. {n} Dateien", "upload.maxSize": "Max. {mb} MB", "upload.tooLarge": "Datei ist zu gro\xDF (max. {mb} MB)", "upload.remove": "Entfernen", "select.placeholder": "Option ausw\xE4hlen", "rating.ariaLabel": "Bewertung", "priority.selectUpTo": "W\xE4hlen Sie bis zu", "priority.options": "Optionen", "priority.thenOrder": "und ordnen Sie sie dann", "priority.selectOptions": "Optionen ausw\xE4hlen", "priority.cancel": "Abbrechen", "priority.confirm": "Best\xE4tigen", "priority.selectOptionNumber": "W\xE4hlen Sie Option #", "priority.prioritized": "Priorisiert", "priority.of": "von", "priority.instruction": 'Ihre Priorit\xE4tenliste wird unten angezeigt. Wenn Sie m\xF6chten, k\xF6nnen Sie Ihre Auswahl mit den Pfeilen neu anordnen. Klicken Sie auf "Weiter", um Ihre Auswahl zu best\xE4tigen und fortzufahren.', "action.send": "Senden", "action.back": "Zur\xFCck", "action.next": "Weiter", "action.start": "Los!", "message.success": "Vielen Dank f\xFCr Ihr Feedback!", "message.blocked": "Danke f\xFCr Ihre Zeit - wir beenden das Gespr\xE4ch hier.", "message.required": "Bitte antworten Sie, bevor Sie fortfahren.", "message.rateLimit": "Zu viele Anfragen. Erneuter Versuch in {seconds} s..." }, fr: { "placeholder.answer": "\xC9crivez votre r\xE9ponse ici...", "placeholder.number": "\xC9crivez votre nombre ici...", "placeholder.email": "\xC9crivez votre e-mail ici...", "placeholder.date": "\xC9crivez votre date ici...", "placeholder.password": "\xC9crivez votre mot de passe ici...", "pointSystem.error": "Le total des points doit \xEAtre de 100 %", "boolean.yes": "Oui", "boolean.no": "Non", "upload.cta": "Glissez-d\xE9posez ou cliquez pour t\xE9l\xE9verser", "upload.imagesOnly": "Images uniquement", "upload.anyFileType": "Tout type de fichier", "upload.maxFiles": "Max. {n} fichiers", "upload.maxSize": "Max. {mb} Mo", "upload.tooLarge": "Fichier trop volumineux (max. {mb} Mo)", "upload.remove": "Supprimer", "select.placeholder": "S\xE9lectionnez une option", "rating.ariaLabel": "\xC9valuation", "priority.selectUpTo": "S\xE9lectionnez jusqu'\xE0", "priority.options": "options", "priority.thenOrder": "puis classez-les", "priority.selectOptions": "S\xE9lectionner des options", "priority.cancel": "Annuler", "priority.confirm": "Confirmer", "priority.selectOptionNumber": "S\xE9lectionnez l'option #", "priority.prioritized": "Prioris\xE9es", "priority.of": "sur", "priority.instruction": `Votre liste de priorit\xE9s est affich\xE9e ci-dessous. Si vous le souhaitez, vous pouvez r\xE9organiser vos choix \xE0 l'aide des fl\xE8ches. Cliquez sur "Suivant" pour confirmer votre s\xE9lection et continuer.`, "action.send": "Envoyer", "action.back": "Retour", "action.next": "Suivant", "action.start": "C'est parti !", "message.success": "Merci pour votre retour !", "message.blocked": "Merci pour votre temps, nous terminons la conversation ici.", "message.required": "Veuillez r\xE9pondre avant de continuer.", "message.rateLimit": "Trop de requ\xEAtes. Nouvelle tentative dans {seconds} s..." }, pt: { "placeholder.answer": "Escreva sua resposta aqui...", "placeholder.number": "Escreva seu n\xFAmero aqui...", "placeholder.email": "Escreva seu e-mail aqui...", "placeholder.date": "Escreva sua data aqui...", "placeholder.password": "Escreva sua senha aqui...", "pointSystem.error": "O total de pontos deve ser 100 %", "boolean.yes": "Sim", "boolean.no": "N\xE3o", "upload.cta": "Arraste e solte ou clique para enviar", "upload.imagesOnly": "Somente imagens", "upload.anyFileType": "Qualquer tipo de arquivo", "upload.maxFiles": "M\xE1x. {n} arquivos", "upload.maxSize": "M\xE1x. {mb} MB", "upload.tooLarge": "Arquivo muito grande (m\xE1x. {mb} MB)", "upload.remove": "Remover", "select.placeholder": "Selecione uma op\xE7\xE3o", "rating.ariaLabel": "Avalia\xE7\xE3o", "priority.selectUpTo": "Selecione at\xE9", "priority.options": "op\xE7\xF5es", "priority.thenOrder": "e depois ordene-as", "priority.selectOptions": "Selecionar op\xE7\xF5es", "priority.cancel": "Cancelar", "priority.confirm": "Confirmar", "priority.selectOptionNumber": "Selecione a op\xE7\xE3o #", "priority.prioritized": "Priorizadas", "priority.of": "de", "priority.instruction": 'Sua lista de prioridades pode ser vista abaixo. Se quiser, voc\xEA pode reorganizar suas escolhas usando as setas. Clique em "Pr\xF3ximo" para confirmar sua sele\xE7\xE3o e continuar.', "action.send": "Enviar", "action.back": "Voltar", "action.next": "Pr\xF3ximo", "action.start": "Come\xE7ar!", "message.success": "Obrigado pelo seu feedback!", "message.blocked": "Obrigado pelo seu tempo, encerramos a conversa por aqui.", "message.required": "Responda antes de continuar.", "message.rateLimit": "Muitas solicita\xE7\xF5es. Tentando novamente em {seconds} s..." }, da: { "placeholder.answer": "Skriv dit svar her...", "placeholder.number": "Skriv dit nummer her...", "placeholder.email": "Skriv din e-mail her...", "placeholder.date": "Skriv din dato her...", "placeholder.password": "Skriv dit kodeord her...", "pointSystem.error": "Samlet antal point skal v\xE6re 100 %", "boolean.yes": "Ja", "boolean.no": "Nej", "upload.cta": "Tr\xE6k og slip eller klik for at uploade", "upload.imagesOnly": "Kun billeder", "upload.anyFileType": "Enhver filtype", "upload.maxFiles": "Maks. {n} filer", "upload.maxSize": "Maks. {mb} MB", "upload.tooLarge": "Filen er for stor (maks. {mb} MB)", "upload.remove": "Fjern", "select.placeholder": "V\xE6lg en mulighed", "rating.ariaLabel": "Bed\xF8mmelse", "priority.selectUpTo": "V\xE6lg op til", "priority.options": "muligheder", "priority.thenOrder": "og sorter dem derefter", "priority.selectOptions": "V\xE6lg muligheder", "priority.cancel": "Annuller", "priority.confirm": "Bekr\xE6ft", "priority.selectOptionNumber": "V\xE6lg mulighed #", "priority.prioritized": "Prioriteret", "priority.of": "af", "priority.instruction": 'Din prioritetsliste vises nedenfor. Hvis du \xF8nsker det, kan du omarrangere dine valg ved hj\xE6lp af pilene. Klik p\xE5 "N\xE6ste" for at bekr\xE6fte dit valg og forts\xE6tte.', "action.send": "Send", "action.back": "Tilbage", "action.next": "N\xE6ste", "action.start": "Start!", "message.success": "Tak for din feedback!", "message.blocked": "Tak for din tid - vi afslutter samtalen her.", "message.required": "Svar venligst, f\xF8r du forts\xE6tter.", "message.rateLimit": "For mange foresp\xF8rgsler. Pr\xF8ver igen om {seconds} s..." }, fi: { "placeholder.answer": "Kirjoita vastauksesi t\xE4h\xE4n...", "placeholder.number": "Kirjoita numerosi t\xE4h\xE4n...", "placeholder.email": "Kirjoita s\xE4hk\xF6postiosoitteesi t\xE4h\xE4n...", "placeholder.date": "Kirjoita p\xE4iv\xE4m\xE4\xE4r\xE4si t\xE4h\xE4n...", "placeholder.password": "Kirjoita salasanasi t\xE4h\xE4n...", "pointSystem.error": "Kokonaispisteiden on oltava 100 %", "boolean.yes": "Kyll\xE4", "boolean.no": "Ei", "upload.cta": "Ved\xE4 ja pudota tai napsauta ladataksesi", "upload.imagesOnly": "Vain kuvat", "upload.anyFileType": "Mik\xE4 tahansa tiedostotyyppi", "upload.maxFiles": "Enint\xE4\xE4n {n} tiedostoa", "upload.maxSize": "Enint\xE4\xE4n {mb} MB", "upload.tooLarge": "Tiedosto on liian suuri (enint\xE4\xE4n {mb} MB)", "upload.remove": "Poista", "select.placeholder": "Valitse vaihtoehto", "rating.ariaLabel": "Arvio", "priority.selectUpTo": "Valitse enint\xE4\xE4n", "priority.options": "vaihtoehtoa", "priority.thenOrder": "ja j\xE4rjest\xE4 ne sitten", "priority.selectOptions": "Valitse vaihtoehdot", "priority.cancel": "Peruuta", "priority.confirm": "Vahvista", "priority.selectOptionNumber": "Valitse vaihtoehto #", "priority.prioritized": "Priorisoitu", "priority.of": " / ", "priority.instruction": 'Prioriteettilistasi n\xE4kyy alla. Voit halutessasi j\xE4rjest\xE4\xE4 valinnat uudelleen nuolien avulla. Napsauta "Seuraava" vahvistaaksesi valinnan ja jatkaaksesi.', "action.send": "L\xE4het\xE4", "action.back": "Takaisin", "action.next": "Seuraava", "action.start": "Aloita!", "message.success": "Kiitos palautteestasi!", "message.blocked": "Kiitos ajastasi - lopetamme keskustelun t\xE4h\xE4n.", "message.required": "Vastaa ennen jatkamista.", "message.rateLimit": "Liikaa pyynt\xF6j\xE4. Yritet\xE4\xE4n uudelleen {seconds} s kuluttua..." }, no: { "placeholder.answer": "Skriv svaret ditt her...", "placeholder.number": "Skriv nummeret ditt her...", "placeholder.email": "Skriv e-posten din her...", "placeholder.date": "Skriv datoen din her...", "placeholder.password": "Skriv passordet ditt her...", "pointSystem.error": "Totalt antall poeng m\xE5 v\xE6re 100 %", "boolean.yes": "Ja", "boolean.no": "Nei", "upload.cta": "Dra og slipp eller klikk for \xE5 laste opp", "upload.imagesOnly": "Kun bilder", "upload.anyFileType": "Alle filtyper", "upload.maxFiles": "Maks {n} filer", "upload.maxSize": "Maks {mb} MB", "upload.tooLarge": "Filen er for stor (maks {mb} MB)", "upload.remove": "Fjern", "select.placeholder": "Velg et alternativ", "rating.ariaLabel": "Vurdering", "priority.selectUpTo": "Velg opptil", "priority.options": "alternativer", "priority.thenOrder": "og ordne dem deretter", "priority.selectOptions": "Velg alternativer", "priority.cancel": "Avbryt", "priority.confirm": "Bekreft", "priority.selectOptionNumber": "Velg alternativ #", "priority.prioritized": "Prioritert", "priority.of": "av", "priority.instruction": 'Prioriteringslisten din vises nedenfor. Hvis du \xF8nsker det, kan du ordne valgene dine ved hjelp av pilene. Klikk p\xE5 "Neste" for \xE5 bekrefte valget ditt og fortsette.', "action.send": "Send", "action.back": "Tilbake", "action.next": "Neste", "action.start": "Start!", "message.success": "Takk for tilbakemeldingen!", "message.blocked": "Takk for tiden din - vi avslutter samtalen her.", "message.required": "Vennligst svar f\xF8r du fortsetter.", "message.rateLimit": "For mange foresp\xF8rsler. Pr\xF8ver igjen om {seconds} s..." }, sv: { "placeholder.answer": "Skriv ditt svar h\xE4r...", "placeholder.number": "Skriv ditt nummer h\xE4r...", "placeholder.email": "Skriv din e-post h\xE4r...", "placeholder.date": "Skriv ditt datum h\xE4r...", "placeholder.password": "Skriv ditt l\xF6senord h\xE4r...", "pointSystem.error": "Totala po\xE4ng m\xE5ste vara 100 %", "boolean.yes": "Ja", "boolean.no": "Nej", "upload.cta": "Dra och sl\xE4pp eller klicka f\xF6r att ladda upp", "upload.imagesOnly": "Endast bilder", "upload.anyFileType": "Alla filtyper", "upload.maxFiles": "Max {n} filer", "upload.maxSize": "Max {mb} MB", "upload.tooLarge": "Filen \xE4r f\xF6r stor (max {mb} MB)", "upload.remove": "Ta bort", "select.placeholder": "V\xE4lj ett alternativ", "rating.ariaLabel": "Betyg", "priority.selectUpTo": "V\xE4lj upp till", "priority.options": "alternativ", "priority.thenOrder": "och ordna dem sedan", "priority.selectOptions": "V\xE4lj alternativ", "priority.cancel": "Avbryt", "priority.confirm": "Bekr\xE4fta", "priority.selectOptionNumber": "V\xE4lj alternativ #", "priority.prioritized": "Prioriterat", "priority.of": "av", "priority.instruction": 'Din prioriteringslista visas nedan. Om du vill kan du ordna om dina val med hj\xE4lp av pilarna. Klicka p\xE5 "N\xE4sta" f\xF6r att bekr\xE4fta ditt val och forts\xE4tta.', "action.send": "Skicka", "action.back": "Tillbaka", "action.next": "N\xE4sta", "action.start": "K\xF6r!", "message.success": "Tack f\xF6r din feedback!", "message.blocked": "Tack f\xF6r din tid - vi avslutar samtalet h\xE4r.", "message.required": "Svara innan du forts\xE4tter.", "message.rateLimit": "F\xF6r m\xE5nga f\xF6rfr\xE5gningar. F\xF6rs\xF6ker igen om {seconds} s..." }, ar: { "placeholder.answer": "\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643 \u0647\u0646\u0627...", "placeholder.number": "\u0627\u0643\u062A\u0628 \u0631\u0642\u0645\u0643 \u0647\u0646\u0627...", "placeholder.email": "\u0627\u0643\u062A\u0628 \u0628\u0631\u064A\u062F\u0643 \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A \u0647\u0646\u0627...", "placeholder.date": "\u0627\u0643\u062A\u0628 \u062A\u0627\u0631\u064A\u062E\u0643 \u0647\u0646\u0627...", "placeholder.password": "\u0627\u0643\u062A\u0628 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631 \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0647\u0646\u0627...", "pointSystem.error": "\u064A\u062C\u0628 \u0623\u0646 \u062A\u0643\u0648\u0646 \u0627\u0644\u0646\u0642\u0627\u0637 \u0627\u0644\u0625\u062C\u0645\u0627\u0644\u064A\u0629 100 %", "boolean.yes": "\u0646\u0639\u0645", "boolean.no": "\u0644\u0627", "upload.cta": "\u0627\u0633\u062D\u0628 \u0648\u0623\u0641\u0644\u062A \u0623\u0648 \u0627\u0646\u0642\u0631 \u0644\u0644\u062A\u062D\u0645\u064A\u0644", "upload.imagesOnly": "\u0627\u0644\u0635\u0648\u0631 \u0641\u0642\u0637", "upload.anyFileType": "\u0623\u064A \u0646\u0648\u0639 \u0645\u0646 \u0627\u0644\u0645\u0644\u0641\u0627\u062A", "upload.maxFiles": "{n} \u0645\u0644\u0641\u0627\u062A \u0643\u062D\u062F \u0623\u0642\u0635\u0649", "upload.maxSize": "{mb} \u0645\u064A\u063A\u0627\u0628\u0627\u064A\u062A \u0643\u062D\u062F \u0623\u0642\u0635\u0649", "upload.tooLarge": "\u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u064B\u0627 (\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 {mb} \u0645\u064A\u063A\u0627\u0628\u0627\u064A\u062A)", "upload.remove": "\u0625\u0632\u0627\u0644\u0629", "select.placeholder": "\u0627\u062E\u062A\u0631 \u062E\u064A\u0627\u0631\u064B\u0627", "rating.ariaLabel": "\u0627\u0644\u062A\u0642\u064A\u064A\u0645", "priority.selectUpTo": "\u0627\u062E\u062A\u0631 \u062D\u062A\u0649", "priority.options": "\u062E\u064A\u0627\u0631\u0627\u062A", "priority.thenOrder": "\u062B\u0645 \u0631\u062A\u0628\u0647\u0627", "priority.selectOptions": "\u0627\u062E\u062A\u0631 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A", "priority.cancel": "\u0625\u0644\u063A\u0627\u0621", "priority.confirm": "\u062A\u0623\u0643\u064A\u062F", "priority.selectOptionNumber": "\u0627\u062E\u062A\u0631 \u0627\u0644\u062E\u064A\u0627\u0631 #", "priority.prioritized": "\u062A\u0645 \u0627\u0644\u062A\u0631\u062A\u064A\u0628", "priority.of": "\u0645\u0646", "priority.instruction": '\u062A\u0638\u0647\u0631 \u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0623\u0648\u0644\u0648\u064A\u0627\u062A \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0623\u062F\u0646\u0627\u0647. \u0625\u0630\u0627 \u0631\u063A\u0628\u062A\u060C \u064A\u0645\u0643\u0646\u0643 \u0625\u0639\u0627\u062F\u0629 \u062A\u0631\u062A\u064A\u0628 \u0627\u062E\u062A\u064A\u0627\u0631\u0627\u062A\u0643 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0623\u0633\u0647\u0645. \u0627\u0646\u0642\u0631 \u0639\u0644\u0649 "\u0627\u0644\u062A\u0627\u0644\u064A" \u0644\u062A\u0623\u0643\u064A\u062F \u0627\u062E\u062A\u064A\u0627\u0631\u0643 \u0648\u0627\u0644\u0645\u062A\u0627\u0628\u0639\u0629.', "action.send": "\u0625\u0631\u0633\u0627\u0644", "action.back": "\u0631\u062C\u0648\u0639", "action.next": "\u0627\u0644\u062A\u0627\u0644\u064A", "action.start": "\u0627\u0628\u062F\u0623!", "message.success": "\u0634\u0643\u0631\u064B\u0627 \u0644\u0645\u0644\u0627\u062D\u0638\u0627\u062A\u0643!", "message.blocked": "\u0634\u0643\u0631\u064B\u0627 \u0639\u0644\u0649 \u0648\u0642\u062A\u0643\u060C \u0633\u0646\u0646\u0647\u064A \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629 \u0647\u0646\u0627.", "message.required": "\u064A\u0631\u062C\u0649 \u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0642\u0628\u0644 \u0627\u0644\u0645\u062A\u0627\u0628\u0639\u0629.", "message.rateLimit": "\u0637\u0644\u0628\u0627\u062A \u0643\u062B\u064A\u0631\u0629 \u062C\u062F\u064B\u0627. \u0633\u0646\u0639\u064A\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u062E\u0644\u0627\u0644 {seconds} \u062B\u0627\u0646\u064A\u0629..." }, bn: { "placeholder.answer": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u0989\u09A4\u09CD\u09A4\u09B0 \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.number": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09B8\u0982\u0996\u09CD\u09AF\u09BE \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.email": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u0987\u09AE\u09C7\u0987\u09B2 \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.date": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09A4\u09BE\u09B0\u09BF\u0996 \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.password": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09AA\u09BE\u09B8\u0993\u09AF\u09BC\u09BE\u09B0\u09CD\u09A1 \u09B2\u09BF\u0996\u09C1\u09A8...", "pointSystem.error": "\u09AE\u09CB\u099F \u09AA\u09AF\u09BC\u09C7\u09A8\u09CD\u099F 100 % \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7", "boolean.yes": "\u09B9\u09CD\u09AF\u09BE\u0981", "boolean.no": "\u09A8\u09BE", "upload.cta": "\u099F\u09C7\u09A8\u09C7 \u0986\u09A8\u09C1\u09A8 \u09AC\u09BE \u0986\u09AA\u09B2\u09CB\u09A1 \u0995\u09B0\u09A4\u09C7 \u0995\u09CD\u09B2\u09BF\u0995 \u0995\u09B0\u09C1\u09A8", "upload.imagesOnly": "\u09B6\u09C1\u09A7\u09C1\u09AE\u09BE\u09A4\u09CD\u09B0 \u099B\u09AC\u09BF", "upload.anyFileType": "\u09AF\u09C7\u0995\u09CB\u09A8\u09CB \u09A7\u09B0\u09A8\u09C7\u09B0 \u09AB\u09BE\u0987\u09B2", "upload.maxFiles": "\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A {n}\u099F\u09BF \u09AB\u09BE\u0987\u09B2", "upload.maxSize": "\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A {mb} MB", "upload.tooLarge": "\u09AB\u09BE\u0987\u09B2\u099F\u09BF \u0996\u09C1\u09AC \u09AC\u09A1\u09BC (\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A {mb} MB)", "upload.remove": "\u09B8\u09B0\u09BE\u09A8", "select.placeholder": "\u098F\u0995\u099F\u09BF \u09AC\u09BF\u0995\u09B2\u09CD\u09AA \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "rating.ariaLabel": "\u09B0\u09C7\u099F\u09BF\u0982", "priority.selectUpTo": "\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "priority.options": "\u099F\u09BF \u09AC\u09BF\u0995\u09B2\u09CD\u09AA", "priority.thenOrder": "\u09A4\u09BE\u09B0\u09AA\u09B0 \u09B8\u09C7\u0997\u09C1\u09B2\u09CB \u09B8\u09BE\u099C\u09BE\u09A8", "priority.selectOptions": "\u09AC\u09BF\u0995\u09B2\u09CD\u09AA \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "priority.cancel": "\u09AC\u09BE\u09A4\u09BF\u09B2", "priority.confirm": "\u09A8\u09BF\u09B6\u09CD\u099A\u09BF\u09A4 \u0995\u09B0\u09C1\u09A8", "priority.selectOptionNumber": "\u09AC\u09BF\u0995\u09B2\u09CD\u09AA # \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "priority.prioritized": "\u0985\u0997\u09CD\u09B0\u09BE\u09A7\u09BF\u0995\u09BE\u09B0\u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4", "priority.of": "\u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7", "priority.instruction": '\u0986\u09AA\u09A8\u09BE\u09B0 \u0985\u0997\u09CD\u09B0\u09BE\u09A7\u09BF\u0995\u09BE\u09B0 \u09A4\u09BE\u09B2\u09BF\u0995\u09BE \u09A8\u09BF\u099A\u09C7 \u09A6\u09C7\u0996\u09BE\u09A8\u09CB \u09B9\u09AF\u09BC\u09C7\u099B\u09C7\u0964 \u099A\u09BE\u0987\u09B2\u09C7 \u09A4\u09C0\u09B0 \u099A\u09BF\u09B9\u09CD\u09A8 \u09AC\u09CD\u09AF\u09AC\u09B9\u09BE\u09B0 \u0995\u09B0\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09AA\u099B\u09A8\u09CD\u09A6\u0997\u09C1\u09B2\u09CB \u09AA\u09C1\u09A8\u09B0\u09BE\u09AF\u09BC \u09B8\u09BE\u099C\u09BE\u09A4\u09C7 \u09AA\u09BE\u09B0\u09C7\u09A8\u0964 "\u09AA\u09B0\u09AC\u09B0\u09CD\u09A4\u09C0" \u0995\u09CD\u09B2\u09BF\u0995 \u0995\u09B0\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u09A8\u09BF\u09B6\u09CD\u099A\u09BF\u09A4 \u0995\u09B0\u09C1\u09A8 \u098F\u09AC\u0982 \u098F\u0997\u09BF\u09AF\u09BC\u09C7 \u09AF\u09BE\u09A8\u0964', "action.send": "\u09AA\u09BE\u09A0\u09BE\u09A8", "action.back": "\u09AA\u09BF\u099B\u09A8\u09C7", "action.next": "\u09AA\u09B0\u09AC\u09B0\u09CD\u09A4\u09C0", "action.start": "\u09B6\u09C1\u09B0\u09C1 \u0995\u09B0\u09C1\u09A8!", "message.success": "\u0986\u09AA\u09A8\u09BE\u09B0 \u09AE\u09A4\u09BE\u09AE\u09A4\u09C7\u09B0 \u099C\u09A8\u09CD\u09AF \u09A7\u09A8\u09CD\u09AF\u09AC\u09BE\u09A6!", "message.blocked": "\u0986\u09AA\u09A8\u09BE\u09B0 \u09B8\u09AE\u09AF\u09BC\u09C7\u09B0 \u099C\u09A8\u09CD\u09AF \u09A7\u09A8\u09CD\u09AF\u09AC\u09BE\u09A6, \u0986\u09AE\u09B0\u09BE \u098F\u0996\u09BE\u09A8\u09C7\u0987 \u0995\u09A5\u09CB\u09AA\u0995\u09A5\u09A8 \u09B6\u09C7\u09B7 \u0995\u09B0\u099B\u09BF\u0964", "message.required": "\u099A\u09BE\u09B2\u09BF\u09AF\u09BC\u09C7 \u09AF\u09BE\u0993\u09AF\u09BC\u09BE\u09B0 \u0986\u0997\u09C7 \u0985\u09A8\u09C1\u0997\u09CD\u09B0\u09B9 \u0995\u09B0\u09C7 \u0989\u09A4\u09CD\u09A4\u09B0 \u09A6\u09BF\u09A8\u0964", "message.rateLimit": "\u0985\u09A8\u09C7\u0995 \u09AC\u09C7\u09B6\u09BF \u0985\u09A8\u09C1\u09B0\u09CB\u09A7\u0964 {seconds} \u09B8\u09C7\u0995\u09C7\u09A8\u09CD\u09A1\u09C7 \u0986\u09AC\u09BE\u09B0 \u099A\u09C7\u09B7\u09CD\u099F\u09BE \u0995\u09B0\u09BE \u09B9\u099A\u09CD\u099B\u09C7..." }, it: { "boolean.yes": "S\xEC", "boolean.no": "No", "priority.selectUpTo": "Seleziona fino a", "priority.options": "opzioni", "priority.thenOrder": "e poi ordinali", "priority.selectOptions": "Seleziona opzioni", "priority.cancel": "Annulla", "priority.confirm": "Conferma", "priority.selectOptionNumber": "Seleziona opzione #", "priority.prioritized": "Prioritizzate", "priority.of": "di", "priority.instruction": 'La tua lista di priorit\xE0 \xE8 mostrata qui sotto. Se vuoi, puoi riordinare le tue scelte usando le frecce. Clicca su "Avanti" per confermare la selezione e continuare.' }, nl: { "boolean.yes": "Ja", "boolean.no": "Nee", "priority.selectUpTo": "Selecteer tot", "priority.options": "opties", "priority.thenOrder": "en rangschik ze vervolgens", "priority.selectOptions": "Selecteer opties", "priority.cancel": "Annuleren", "priority.confirm": "Bevestigen", "priority.selectOptionNumber": "Selecteer optie #", "priority.prioritized": "Geprioriteerd", "priority.of": "van", "priority.instruction": 'Je prioriteitenlijst wordt hieronder weergegeven. Als je wilt, kun je je keuzes herschikken met behulp van de pijlen. Klik op "Volgende" om je selectie te bevestigen en door te gaan.' }, pl: { "boolean.yes": "Tak", "boolean.no": "Nie", "priority.selectUpTo": "Wybierz do", "priority.options": "opcje", "priority.thenOrder": "a nast\u0119pnie je uporz\u0105dkuj", "priority.selectOptions": "Wybierz opcje", "priority.cancel": "Anuluj", "priority.confirm": "Potwierd\u017A", "priority.selectOptionNumber": "Wybierz opcj\u0119 #", "priority.prioritized": "Priorytetowe", "priority.of": "z", "priority.instruction": 'Twoja lista priorytet\xF3w jest pokazana poni\u017Cej. Je\u015Bli chcesz, mo\u017Cesz zmieni\u0107 kolejno\u015B\u0107 swoich wybor\xF3w za pomoc\u0105 strza\u0142ek. Kliknij "Dalej", aby potwierdzi\u0107 wyb\xF3r i kontynuowa\u0107.' }, ru: { "boolean.yes": "\u0414\u0430", "boolean.no": "\u041D\u0435\u0442", "priority.selectUpTo": "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u043E", "priority.options": "\u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432", "priority.thenOrder": "\u0430 \u0437\u0430\u0442\u0435\u043C \u0443\u043F\u043E\u0440\u044F\u0434\u043E\u0447\u044C\u0442\u0435 \u0438\u0445", "priority.selectOptions": "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B", "priority.cancel": "\u041E\u0442\u043C\u0435\u043D\u0430", "priority.confirm": "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C", "priority.selectOptionNumber": "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 #", "priority.prioritized": "\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u044B", "priority.of": "\u0438\u0437", "priority.instruction": '\u0412\u0430\u0448 \u0441\u043F\u0438\u0441\u043E\u043A \u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u043E\u0432 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043D\u0438\u0436\u0435. \u0415\u0441\u043B\u0438 \u0445\u043E\u0442\u0438\u0442\u0435, \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0440\u044F\u0434\u043E\u043A \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0441\u0442\u0440\u0435\u043B\u043E\u043A. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 "\u0414\u0430\u043B\u0435\u0435", \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0432\u044B\u0431\u043E\u0440 \u0438 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C.' }, ja: { "boolean.yes": "\u306F\u3044", "boolean.no": "\u3044\u3044\u3048", "priority.selectUpTo": "\u6700\u5927", "priority.options": "\u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u9078\u629E", "priority.thenOrder": "\u305D\u306E\u5F8C\u4E26\u3079\u66FF\u3048\u3066\u304F\u3060\u3055\u3044", "priority.selectOptions": "\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u9078\u629E", "priority.cancel": "\u30AD\u30E3\u30F3\u30BB\u30EB", "priority.confirm": "\u78BA\u8A8D", "priority.selectOptionNumber": "\u30AA\u30D7\u30B7\u30E7\u30F3 # \u3092\u9078\u629E", "priority.prioritized": "\u512A\u5148\u9806\u4F4D", "priority.of": "\u306E\u3046\u3061", "priority.instruction": "\u512A\u5148\u9806\u4F4D\u30EA\u30B9\u30C8\u306F\u4EE5\u4E0B\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u3001\u77E2\u5370\u3092\u4F7F\u3063\u3066\u9078\u629E\u80A2\u3092\u4E26\u3079\u66FF\u3048\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u300C\u6B21\u3078\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u9078\u629E\u3092\u78BA\u5B9A\u3057\u3001\u7D9A\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002" }, zh: { "boolean.yes": "\u662F", "boolean.no": "\u4E0D", "priority.selectUpTo": "\u6700\u591A\u9009\u62E9", "priority.options": "\u4E2A\u9009\u9879", "priority.thenOrder": "\u7136\u540E\u6392\u5E8F\u5B83\u4EEC", "priority.selectOptions": "\u9009\u62E9\u9009\u9879", "priority.cancel": "\u53D6\u6D88", "priority.confirm": "\u786E\u8BA4", "priority.selectOptionNumber": "\u9009\u62E9\u9009\u9879 #", "priority.prioritized": "\u5DF2\u4F18\u5148", "priority.of": "\u5171", "priority.instruction": "\u4F60\u7684\u4F18\u5148\u5217\u8868\u5982\u4E0B\u6240\u793A\u3002\u5982\u6709\u9700\u8981\uFF0C\u53EF\u4EE5\u4F7F\u7528\u7BAD\u5934\u91CD\u65B0\u6392\u5E8F\u9009\u9879\u3002\u70B9\u51FB\u201C\u4E0B\u4E00\u6B65\u201D\u786E\u8BA4\u9009\u62E9\u5E76\u7EE7\u7EED\u3002" }, ko: { "boolean.yes": "\uC608", "boolean.no": "\uC544\uB2C8", "priority.selectUpTo": "\uCD5C\uB300", "priority.options": "\uAC1C\uC758 \uC635\uC158 \uC120\uD0DD", "priority.thenOrder": "\uADF8\uB7F0 \uB2E4\uC74C \uC815\uB82C\uD558\uC138\uC694", "priority.selectOptions": "\uC635\uC158 \uC120\uD0DD", "priority.cancel": "\uCDE8\uC18C", "priority.confirm": "\uD655\uC778", "priority.selectOptionNumber": "\uC635\uC158 # \uC120\uD0DD", "priority.prioritized": "\uC6B0\uC120\uC21C\uC704", "priority.of": "\uC911", "priority.instruction": '\uC6B0\uC120\uC21C\uC704 \uBAA9\uB85D\uC740 \uC544\uB798\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4. \uC6D0\uD55C\uB2E4\uBA74 \uD654\uC0B4\uD45C\uB97C \uC0AC\uC6A9\uD574 \uC120\uD0DD \uD56D\uBAA9\uC744 \uC7AC\uC815\uB82C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. "\uB2E4\uC74C"\uC744 \uD074\uB9AD\uD558\uC5EC \uC120\uD0DD\uC744 \uD655\uC778\uD558\uACE0 \uACC4\uC18D\uD558\uC138\uC694.' } };
|
|
4614
|
-
t2.SUPPORTED_LANGUAGES = ["en", "da", "fi", "no", "es", "sv", "ar", "bn", "de", "pt", "fr"], t2.AVAILABLE_LANGUAGES = Object.keys(
|
|
4615
|
-
const
|
|
5130
|
+
const i = { "placeholder.answer": "Write your answer here...", "placeholder.number": "Write your number here...", "placeholder.email": "Write your email here...", "placeholder.date": "Write your date here...", "placeholder.password": "Write your password here...", "pointSystem.error": "The total points must be 100 %", "boolean.yes": "Yes", "boolean.no": "No", "upload.cta": "Drag & drop or click to upload", "upload.imagesOnly": "Images only", "upload.anyFileType": "Any file type", "upload.maxFiles": "Max {n} files", "upload.maxSize": "Max {mb} MB", "upload.tooLarge": "File is too large (max {mb} MB)", "upload.remove": "Remove", "select.placeholder": "Select an option", "rating.ariaLabel": "Rating", "maxDiff.best": "Most important", "maxDiff.worst": "Least important", "maxDiff.setProgress": "Block {k} of {n}", "priority.selectUpTo": "Select up to", "priority.options": "options", "priority.thenOrder": "and then order them", "priority.selectOptions": "Select options", "priority.cancel": "Cancel", "priority.confirm": "Confirm", "priority.selectOptionNumber": "Select option #", "priority.prioritized": "Prioritized", "priority.of": "of", "priority.instruction": "Your priority list can be seen below. If you wish, you can rearrange your choices using the arrows. Click 'Next' to confirm your selection and proceed.", "action.send": "Send", "action.back": "Back", "action.next": "Next", "action.start": "Go!", "message.success": "Thank you for your feedback!", "message.blocked": "Thanks for your time - we'll end the conversation here.", "message.required": "Please answer before continuing.", "message.rateLimit": "Too many requests. Retrying in {seconds}s..." }, n = { en: i, es: { "placeholder.answer": "Escribe tu respuesta aqu\xED...", "placeholder.number": "Escribe tu n\xFAmero aqu\xED...", "placeholder.email": "Escribe tu correo electr\xF3nico aqu\xED...", "placeholder.date": "Escribe tu fecha aqu\xED...", "placeholder.password": "Escribe tu contrase\xF1a aqu\xED...", "pointSystem.error": "El total de puntos debe ser 100 %", "boolean.yes": "S\xED", "boolean.no": "No", "upload.cta": "Arrastra y suelta o haz clic para subir", "upload.imagesOnly": "Solo im\xE1genes", "upload.anyFileType": "Cualquier tipo de archivo", "upload.maxFiles": "M\xE1x. {n} archivos", "upload.maxSize": "M\xE1x. {mb} MB", "upload.tooLarge": "Archivo demasiado grande (m\xE1x. {mb} MB)", "upload.remove": "Eliminar", "select.placeholder": "Selecciona una opci\xF3n", "rating.ariaLabel": "Valoraci\xF3n", "maxDiff.best": "M\xE1s importante", "maxDiff.worst": "Menos importante", "maxDiff.setProgress": "Bloque {k} de {n}", "priority.selectUpTo": "Selecciona hasta", "priority.options": "opciones", "priority.thenOrder": "y luego ord\xE9nalas", "priority.selectOptions": "Seleccionar opciones", "priority.cancel": "Cancelar", "priority.confirm": "Confirmar", "priority.selectOptionNumber": "Selecciona la opci\xF3n #", "priority.prioritized": "Priorizadas", "priority.of": "de", "priority.instruction": 'Tu lista priorizada se muestra abajo. Si deseas, puedes reordenar las opciones con las flechas. Haz clic en "Siguiente" para confirmar y continuar.', "action.send": "Enviar", "action.back": "Atr\xE1s", "action.next": "Siguiente", "action.start": "\xA1Empezar!", "message.success": "\xA1Gracias por tus comentarios!", "message.blocked": "Gracias por tu tiempo, terminamos aqu\xED la conversaci\xF3n.", "message.required": "Por favor, responde antes de continuar.", "message.rateLimit": "Demasiadas solicitudes. Reintentando en {seconds} s..." }, de: { "placeholder.answer": "Schreiben Sie hier Ihre Antwort...", "placeholder.number": "Geben Sie hier Ihre Zahl ein...", "placeholder.email": "Geben Sie hier Ihre E-Mail-Adresse ein...", "placeholder.date": "Geben Sie hier Ihr Datum ein...", "placeholder.password": "Geben Sie hier Ihr Passwort ein...", "pointSystem.error": "Die Gesamtpunktzahl muss 100 % betragen", "boolean.yes": "Ja", "boolean.no": "Nein", "upload.cta": "Ziehen Sie Dateien hierher oder klicken Sie zum Hochladen", "upload.imagesOnly": "Nur Bilder", "upload.anyFileType": "Beliebiger Dateityp", "upload.maxFiles": "Max. {n} Dateien", "upload.maxSize": "Max. {mb} MB", "upload.tooLarge": "Datei ist zu gro\xDF (max. {mb} MB)", "upload.remove": "Entfernen", "select.placeholder": "Option ausw\xE4hlen", "rating.ariaLabel": "Bewertung", "maxDiff.best": "Am wichtigsten", "maxDiff.worst": "Am wenigsten wichtig", "maxDiff.setProgress": "Block {k} von {n}", "priority.selectUpTo": "W\xE4hlen Sie bis zu", "priority.options": "Optionen", "priority.thenOrder": "und ordnen Sie sie dann", "priority.selectOptions": "Optionen ausw\xE4hlen", "priority.cancel": "Abbrechen", "priority.confirm": "Best\xE4tigen", "priority.selectOptionNumber": "W\xE4hlen Sie Option #", "priority.prioritized": "Priorisiert", "priority.of": "von", "priority.instruction": 'Ihre Priorit\xE4tenliste wird unten angezeigt. Wenn Sie m\xF6chten, k\xF6nnen Sie Ihre Auswahl mit den Pfeilen neu anordnen. Klicken Sie auf "Weiter", um Ihre Auswahl zu best\xE4tigen und fortzufahren.', "action.send": "Senden", "action.back": "Zur\xFCck", "action.next": "Weiter", "action.start": "Los!", "message.success": "Vielen Dank f\xFCr Ihr Feedback!", "message.blocked": "Danke f\xFCr Ihre Zeit - wir beenden das Gespr\xE4ch hier.", "message.required": "Bitte antworten Sie, bevor Sie fortfahren.", "message.rateLimit": "Zu viele Anfragen. Erneuter Versuch in {seconds} s..." }, fr: { "placeholder.answer": "\xC9crivez votre r\xE9ponse ici...", "placeholder.number": "\xC9crivez votre nombre ici...", "placeholder.email": "\xC9crivez votre e-mail ici...", "placeholder.date": "\xC9crivez votre date ici...", "placeholder.password": "\xC9crivez votre mot de passe ici...", "pointSystem.error": "Le total des points doit \xEAtre de 100 %", "boolean.yes": "Oui", "boolean.no": "Non", "upload.cta": "Glissez-d\xE9posez ou cliquez pour t\xE9l\xE9verser", "upload.imagesOnly": "Images uniquement", "upload.anyFileType": "Tout type de fichier", "upload.maxFiles": "Max. {n} fichiers", "upload.maxSize": "Max. {mb} Mo", "upload.tooLarge": "Fichier trop volumineux (max. {mb} Mo)", "upload.remove": "Supprimer", "select.placeholder": "S\xE9lectionnez une option", "rating.ariaLabel": "\xC9valuation", "maxDiff.best": "Le plus important", "maxDiff.worst": "Le moins important", "maxDiff.setProgress": "Bloc {k} sur {n}", "priority.selectUpTo": "S\xE9lectionnez jusqu'\xE0", "priority.options": "options", "priority.thenOrder": "puis classez-les", "priority.selectOptions": "S\xE9lectionner des options", "priority.cancel": "Annuler", "priority.confirm": "Confirmer", "priority.selectOptionNumber": "S\xE9lectionnez l'option #", "priority.prioritized": "Prioris\xE9es", "priority.of": "sur", "priority.instruction": `Votre liste de priorit\xE9s est affich\xE9e ci-dessous. Si vous le souhaitez, vous pouvez r\xE9organiser vos choix \xE0 l'aide des fl\xE8ches. Cliquez sur "Suivant" pour confirmer votre s\xE9lection et continuer.`, "action.send": "Envoyer", "action.back": "Retour", "action.next": "Suivant", "action.start": "C'est parti !", "message.success": "Merci pour votre retour !", "message.blocked": "Merci pour votre temps, nous terminons la conversation ici.", "message.required": "Veuillez r\xE9pondre avant de continuer.", "message.rateLimit": "Trop de requ\xEAtes. Nouvelle tentative dans {seconds} s..." }, pt: { "placeholder.answer": "Escreva sua resposta aqui...", "placeholder.number": "Escreva seu n\xFAmero aqui...", "placeholder.email": "Escreva seu e-mail aqui...", "placeholder.date": "Escreva sua data aqui...", "placeholder.password": "Escreva sua senha aqui...", "pointSystem.error": "O total de pontos deve ser 100 %", "boolean.yes": "Sim", "boolean.no": "N\xE3o", "upload.cta": "Arraste e solte ou clique para enviar", "upload.imagesOnly": "Somente imagens", "upload.anyFileType": "Qualquer tipo de arquivo", "upload.maxFiles": "M\xE1x. {n} arquivos", "upload.maxSize": "M\xE1x. {mb} MB", "upload.tooLarge": "Arquivo muito grande (m\xE1x. {mb} MB)", "upload.remove": "Remover", "select.placeholder": "Selecione uma op\xE7\xE3o", "rating.ariaLabel": "Avalia\xE7\xE3o", "maxDiff.best": "Mais importante", "maxDiff.worst": "Menos importante", "maxDiff.setProgress": "Bloco {k} de {n}", "priority.selectUpTo": "Selecione at\xE9", "priority.options": "op\xE7\xF5es", "priority.thenOrder": "e depois ordene-as", "priority.selectOptions": "Selecionar op\xE7\xF5es", "priority.cancel": "Cancelar", "priority.confirm": "Confirmar", "priority.selectOptionNumber": "Selecione a op\xE7\xE3o #", "priority.prioritized": "Priorizadas", "priority.of": "de", "priority.instruction": 'Sua lista de prioridades pode ser vista abaixo. Se quiser, voc\xEA pode reorganizar suas escolhas usando as setas. Clique em "Pr\xF3ximo" para confirmar sua sele\xE7\xE3o e continuar.', "action.send": "Enviar", "action.back": "Voltar", "action.next": "Pr\xF3ximo", "action.start": "Come\xE7ar!", "message.success": "Obrigado pelo seu feedback!", "message.blocked": "Obrigado pelo seu tempo, encerramos a conversa por aqui.", "message.required": "Responda antes de continuar.", "message.rateLimit": "Muitas solicita\xE7\xF5es. Tentando novamente em {seconds} s..." }, da: { "placeholder.answer": "Skriv dit svar her...", "placeholder.number": "Skriv dit nummer her...", "placeholder.email": "Skriv din e-mail her...", "placeholder.date": "Skriv din dato her...", "placeholder.password": "Skriv dit kodeord her...", "pointSystem.error": "Samlet antal point skal v\xE6re 100 %", "boolean.yes": "Ja", "boolean.no": "Nej", "upload.cta": "Tr\xE6k og slip eller klik for at uploade", "upload.imagesOnly": "Kun billeder", "upload.anyFileType": "Enhver filtype", "upload.maxFiles": "Maks. {n} filer", "upload.maxSize": "Maks. {mb} MB", "upload.tooLarge": "Filen er for stor (maks. {mb} MB)", "upload.remove": "Fjern", "select.placeholder": "V\xE6lg en mulighed", "rating.ariaLabel": "Bed\xF8mmelse", "maxDiff.best": "Vigtigst", "maxDiff.worst": "Mindst vigtigt", "maxDiff.setProgress": "Blok {k} af {n}", "priority.selectUpTo": "V\xE6lg op til", "priority.options": "muligheder", "priority.thenOrder": "og sorter dem derefter", "priority.selectOptions": "V\xE6lg muligheder", "priority.cancel": "Annuller", "priority.confirm": "Bekr\xE6ft", "priority.selectOptionNumber": "V\xE6lg mulighed #", "priority.prioritized": "Prioriteret", "priority.of": "af", "priority.instruction": 'Din prioritetsliste vises nedenfor. Hvis du \xF8nsker det, kan du omarrangere dine valg ved hj\xE6lp af pilene. Klik p\xE5 "N\xE6ste" for at bekr\xE6fte dit valg og forts\xE6tte.', "action.send": "Send", "action.back": "Tilbage", "action.next": "N\xE6ste", "action.start": "Start!", "message.success": "Tak for din feedback!", "message.blocked": "Tak for din tid - vi afslutter samtalen her.", "message.required": "Svar venligst, f\xF8r du forts\xE6tter.", "message.rateLimit": "For mange foresp\xF8rgsler. Pr\xF8ver igen om {seconds} s..." }, fi: { "placeholder.answer": "Kirjoita vastauksesi t\xE4h\xE4n...", "placeholder.number": "Kirjoita numerosi t\xE4h\xE4n...", "placeholder.email": "Kirjoita s\xE4hk\xF6postiosoitteesi t\xE4h\xE4n...", "placeholder.date": "Kirjoita p\xE4iv\xE4m\xE4\xE4r\xE4si t\xE4h\xE4n...", "placeholder.password": "Kirjoita salasanasi t\xE4h\xE4n...", "pointSystem.error": "Kokonaispisteiden on oltava 100 %", "boolean.yes": "Kyll\xE4", "boolean.no": "Ei", "upload.cta": "Ved\xE4 ja pudota tai napsauta ladataksesi", "upload.imagesOnly": "Vain kuvat", "upload.anyFileType": "Mik\xE4 tahansa tiedostotyyppi", "upload.maxFiles": "Enint\xE4\xE4n {n} tiedostoa", "upload.maxSize": "Enint\xE4\xE4n {mb} MB", "upload.tooLarge": "Tiedosto on liian suuri (enint\xE4\xE4n {mb} MB)", "upload.remove": "Poista", "select.placeholder": "Valitse vaihtoehto", "rating.ariaLabel": "Arvio", "maxDiff.best": "T\xE4rkein", "maxDiff.worst": "V\xE4hiten t\xE4rke\xE4", "maxDiff.setProgress": "Osa {k}/{n}", "priority.selectUpTo": "Valitse enint\xE4\xE4n", "priority.options": "vaihtoehtoa", "priority.thenOrder": "ja j\xE4rjest\xE4 ne sitten", "priority.selectOptions": "Valitse vaihtoehdot", "priority.cancel": "Peruuta", "priority.confirm": "Vahvista", "priority.selectOptionNumber": "Valitse vaihtoehto #", "priority.prioritized": "Priorisoitu", "priority.of": " / ", "priority.instruction": 'Prioriteettilistasi n\xE4kyy alla. Voit halutessasi j\xE4rjest\xE4\xE4 valinnat uudelleen nuolien avulla. Napsauta "Seuraava" vahvistaaksesi valinnan ja jatkaaksesi.', "action.send": "L\xE4het\xE4", "action.back": "Takaisin", "action.next": "Seuraava", "action.start": "Aloita!", "message.success": "Kiitos palautteestasi!", "message.blocked": "Kiitos ajastasi - lopetamme keskustelun t\xE4h\xE4n.", "message.required": "Vastaa ennen jatkamista.", "message.rateLimit": "Liikaa pyynt\xF6j\xE4. Yritet\xE4\xE4n uudelleen {seconds} s kuluttua..." }, no: { "placeholder.answer": "Skriv svaret ditt her...", "placeholder.number": "Skriv nummeret ditt her...", "placeholder.email": "Skriv e-posten din her...", "placeholder.date": "Skriv datoen din her...", "placeholder.password": "Skriv passordet ditt her...", "pointSystem.error": "Totalt antall poeng m\xE5 v\xE6re 100 %", "boolean.yes": "Ja", "boolean.no": "Nei", "upload.cta": "Dra og slipp eller klikk for \xE5 laste opp", "upload.imagesOnly": "Kun bilder", "upload.anyFileType": "Alle filtyper", "upload.maxFiles": "Maks {n} filer", "upload.maxSize": "Maks {mb} MB", "upload.tooLarge": "Filen er for stor (maks {mb} MB)", "upload.remove": "Fjern", "select.placeholder": "Velg et alternativ", "rating.ariaLabel": "Vurdering", "maxDiff.best": "Viktigst", "maxDiff.worst": "Minst viktig", "maxDiff.setProgress": "Blokk {k} av {n}", "priority.selectUpTo": "Velg opptil", "priority.options": "alternativer", "priority.thenOrder": "og ordne dem deretter", "priority.selectOptions": "Velg alternativer", "priority.cancel": "Avbryt", "priority.confirm": "Bekreft", "priority.selectOptionNumber": "Velg alternativ #", "priority.prioritized": "Prioritert", "priority.of": "av", "priority.instruction": 'Prioriteringslisten din vises nedenfor. Hvis du \xF8nsker det, kan du ordne valgene dine ved hjelp av pilene. Klikk p\xE5 "Neste" for \xE5 bekrefte valget ditt og fortsette.', "action.send": "Send", "action.back": "Tilbake", "action.next": "Neste", "action.start": "Start!", "message.success": "Takk for tilbakemeldingen!", "message.blocked": "Takk for tiden din - vi avslutter samtalen her.", "message.required": "Vennligst svar f\xF8r du fortsetter.", "message.rateLimit": "For mange foresp\xF8rsler. Pr\xF8ver igjen om {seconds} s..." }, sv: { "placeholder.answer": "Skriv ditt svar h\xE4r...", "placeholder.number": "Skriv ditt nummer h\xE4r...", "placeholder.email": "Skriv din e-post h\xE4r...", "placeholder.date": "Skriv ditt datum h\xE4r...", "placeholder.password": "Skriv ditt l\xF6senord h\xE4r...", "pointSystem.error": "Totala po\xE4ng m\xE5ste vara 100 %", "boolean.yes": "Ja", "boolean.no": "Nej", "upload.cta": "Dra och sl\xE4pp eller klicka f\xF6r att ladda upp", "upload.imagesOnly": "Endast bilder", "upload.anyFileType": "Alla filtyper", "upload.maxFiles": "Max {n} filer", "upload.maxSize": "Max {mb} MB", "upload.tooLarge": "Filen \xE4r f\xF6r stor (max {mb} MB)", "upload.remove": "Ta bort", "select.placeholder": "V\xE4lj ett alternativ", "rating.ariaLabel": "Betyg", "maxDiff.best": "Viktigast", "maxDiff.worst": "Minst viktig", "maxDiff.setProgress": "Block {k} av {n}", "priority.selectUpTo": "V\xE4lj upp till", "priority.options": "alternativ", "priority.thenOrder": "och ordna dem sedan", "priority.selectOptions": "V\xE4lj alternativ", "priority.cancel": "Avbryt", "priority.confirm": "Bekr\xE4fta", "priority.selectOptionNumber": "V\xE4lj alternativ #", "priority.prioritized": "Prioriterat", "priority.of": "av", "priority.instruction": 'Din prioriteringslista visas nedan. Om du vill kan du ordna om dina val med hj\xE4lp av pilarna. Klicka p\xE5 "N\xE4sta" f\xF6r att bekr\xE4fta ditt val och forts\xE4tta.', "action.send": "Skicka", "action.back": "Tillbaka", "action.next": "N\xE4sta", "action.start": "K\xF6r!", "message.success": "Tack f\xF6r din feedback!", "message.blocked": "Tack f\xF6r din tid - vi avslutar samtalet h\xE4r.", "message.required": "Svara innan du forts\xE4tter.", "message.rateLimit": "F\xF6r m\xE5nga f\xF6rfr\xE5gningar. F\xF6rs\xF6ker igen om {seconds} s..." }, ar: { "placeholder.answer": "\u0627\u0643\u062A\u0628 \u0625\u062C\u0627\u0628\u062A\u0643 \u0647\u0646\u0627...", "placeholder.number": "\u0627\u0643\u062A\u0628 \u0631\u0642\u0645\u0643 \u0647\u0646\u0627...", "placeholder.email": "\u0627\u0643\u062A\u0628 \u0628\u0631\u064A\u062F\u0643 \u0627\u0644\u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A \u0647\u0646\u0627...", "placeholder.date": "\u0627\u0643\u062A\u0628 \u062A\u0627\u0631\u064A\u062E\u0643 \u0647\u0646\u0627...", "placeholder.password": "\u0627\u0643\u062A\u0628 \u0643\u0644\u0645\u0629 \u0627\u0644\u0645\u0631\u0648\u0631 \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0647\u0646\u0627...", "pointSystem.error": "\u064A\u062C\u0628 \u0623\u0646 \u062A\u0643\u0648\u0646 \u0627\u0644\u0646\u0642\u0627\u0637 \u0627\u0644\u0625\u062C\u0645\u0627\u0644\u064A\u0629 100 %", "boolean.yes": "\u0646\u0639\u0645", "boolean.no": "\u0644\u0627", "upload.cta": "\u0627\u0633\u062D\u0628 \u0648\u0623\u0641\u0644\u062A \u0623\u0648 \u0627\u0646\u0642\u0631 \u0644\u0644\u062A\u062D\u0645\u064A\u0644", "upload.imagesOnly": "\u0627\u0644\u0635\u0648\u0631 \u0641\u0642\u0637", "upload.anyFileType": "\u0623\u064A \u0646\u0648\u0639 \u0645\u0646 \u0627\u0644\u0645\u0644\u0641\u0627\u062A", "upload.maxFiles": "{n} \u0645\u0644\u0641\u0627\u062A \u0643\u062D\u062F \u0623\u0642\u0635\u0649", "upload.maxSize": "{mb} \u0645\u064A\u063A\u0627\u0628\u0627\u064A\u062A \u0643\u062D\u062F \u0623\u0642\u0635\u0649", "upload.tooLarge": "\u0627\u0644\u0645\u0644\u0641 \u0643\u0628\u064A\u0631 \u062C\u062F\u064B\u0627 (\u0627\u0644\u062D\u062F \u0627\u0644\u0623\u0642\u0635\u0649 {mb} \u0645\u064A\u063A\u0627\u0628\u0627\u064A\u062A)", "upload.remove": "\u0625\u0632\u0627\u0644\u0629", "select.placeholder": "\u0627\u062E\u062A\u0631 \u062E\u064A\u0627\u0631\u064B\u0627", "rating.ariaLabel": "\u0627\u0644\u062A\u0642\u064A\u064A\u0645", "maxDiff.best": "\u0627\u0644\u0623\u0643\u062B\u0631 \u0623\u0647\u0645\u064A\u0629", "maxDiff.worst": "\u0627\u0644\u0623\u0642\u0644 \u0623\u0647\u0645\u064A\u0629", "maxDiff.setProgress": "\u0627\u0644\u0645\u062C\u0645\u0648\u0639\u0629 {k} \u0645\u0646 {n}", "priority.selectUpTo": "\u0627\u062E\u062A\u0631 \u062D\u062A\u0649", "priority.options": "\u062E\u064A\u0627\u0631\u0627\u062A", "priority.thenOrder": "\u062B\u0645 \u0631\u062A\u0628\u0647\u0627", "priority.selectOptions": "\u0627\u062E\u062A\u0631 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A", "priority.cancel": "\u0625\u0644\u063A\u0627\u0621", "priority.confirm": "\u062A\u0623\u0643\u064A\u062F", "priority.selectOptionNumber": "\u0627\u062E\u062A\u0631 \u0627\u0644\u062E\u064A\u0627\u0631 #", "priority.prioritized": "\u062A\u0645 \u0627\u0644\u062A\u0631\u062A\u064A\u0628", "priority.of": "\u0645\u0646", "priority.instruction": '\u062A\u0638\u0647\u0631 \u0642\u0627\u0626\u0645\u0629 \u0627\u0644\u0623\u0648\u0644\u0648\u064A\u0627\u062A \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0623\u062F\u0646\u0627\u0647. \u0625\u0630\u0627 \u0631\u063A\u0628\u062A\u060C \u064A\u0645\u0643\u0646\u0643 \u0625\u0639\u0627\u062F\u0629 \u062A\u0631\u062A\u064A\u0628 \u0627\u062E\u062A\u064A\u0627\u0631\u0627\u062A\u0643 \u0628\u0627\u0633\u062A\u062E\u062F\u0627\u0645 \u0627\u0644\u0623\u0633\u0647\u0645. \u0627\u0646\u0642\u0631 \u0639\u0644\u0649 "\u0627\u0644\u062A\u0627\u0644\u064A" \u0644\u062A\u0623\u0643\u064A\u062F \u0627\u062E\u062A\u064A\u0627\u0631\u0643 \u0648\u0627\u0644\u0645\u062A\u0627\u0628\u0639\u0629.', "action.send": "\u0625\u0631\u0633\u0627\u0644", "action.back": "\u0631\u062C\u0648\u0639", "action.next": "\u0627\u0644\u062A\u0627\u0644\u064A", "action.start": "\u0627\u0628\u062F\u0623!", "message.success": "\u0634\u0643\u0631\u064B\u0627 \u0644\u0645\u0644\u0627\u062D\u0638\u0627\u062A\u0643!", "message.blocked": "\u0634\u0643\u0631\u064B\u0627 \u0639\u0644\u0649 \u0648\u0642\u062A\u0643\u060C \u0633\u0646\u0646\u0647\u064A \u0627\u0644\u0645\u062D\u0627\u062F\u062B\u0629 \u0647\u0646\u0627.", "message.required": "\u064A\u0631\u062C\u0649 \u0627\u0644\u0625\u062C\u0627\u0628\u0629 \u0642\u0628\u0644 \u0627\u0644\u0645\u062A\u0627\u0628\u0639\u0629.", "message.rateLimit": "\u0637\u0644\u0628\u0627\u062A \u0643\u062B\u064A\u0631\u0629 \u062C\u062F\u064B\u0627. \u0633\u0646\u0639\u064A\u062F \u0627\u0644\u0645\u062D\u0627\u0648\u0644\u0629 \u062E\u0644\u0627\u0644 {seconds} \u062B\u0627\u0646\u064A\u0629..." }, bn: { "placeholder.answer": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u0989\u09A4\u09CD\u09A4\u09B0 \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.number": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09B8\u0982\u0996\u09CD\u09AF\u09BE \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.email": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u0987\u09AE\u09C7\u0987\u09B2 \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.date": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09A4\u09BE\u09B0\u09BF\u0996 \u09B2\u09BF\u0996\u09C1\u09A8...", "placeholder.password": "\u098F\u0996\u09BE\u09A8\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09AA\u09BE\u09B8\u0993\u09AF\u09BC\u09BE\u09B0\u09CD\u09A1 \u09B2\u09BF\u0996\u09C1\u09A8...", "pointSystem.error": "\u09AE\u09CB\u099F \u09AA\u09AF\u09BC\u09C7\u09A8\u09CD\u099F 100 % \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7", "boolean.yes": "\u09B9\u09CD\u09AF\u09BE\u0981", "boolean.no": "\u09A8\u09BE", "upload.cta": "\u099F\u09C7\u09A8\u09C7 \u0986\u09A8\u09C1\u09A8 \u09AC\u09BE \u0986\u09AA\u09B2\u09CB\u09A1 \u0995\u09B0\u09A4\u09C7 \u0995\u09CD\u09B2\u09BF\u0995 \u0995\u09B0\u09C1\u09A8", "upload.imagesOnly": "\u09B6\u09C1\u09A7\u09C1\u09AE\u09BE\u09A4\u09CD\u09B0 \u099B\u09AC\u09BF", "upload.anyFileType": "\u09AF\u09C7\u0995\u09CB\u09A8\u09CB \u09A7\u09B0\u09A8\u09C7\u09B0 \u09AB\u09BE\u0987\u09B2", "upload.maxFiles": "\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A {n}\u099F\u09BF \u09AB\u09BE\u0987\u09B2", "upload.maxSize": "\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A {mb} MB", "upload.tooLarge": "\u09AB\u09BE\u0987\u09B2\u099F\u09BF \u0996\u09C1\u09AC \u09AC\u09A1\u09BC (\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A {mb} MB)", "upload.remove": "\u09B8\u09B0\u09BE\u09A8", "select.placeholder": "\u098F\u0995\u099F\u09BF \u09AC\u09BF\u0995\u09B2\u09CD\u09AA \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "rating.ariaLabel": "\u09B0\u09C7\u099F\u09BF\u0982", "maxDiff.best": "\u09B8\u09AC\u099A\u09C7\u09AF\u09BC\u09C7 \u0997\u09C1\u09B0\u09C1\u09A4\u09CD\u09AC\u09AA\u09C2\u09B0\u09CD\u09A3", "maxDiff.worst": "\u09B8\u09AC\u099A\u09C7\u09AF\u09BC\u09C7 \u0995\u09AE \u0997\u09C1\u09B0\u09C1\u09A4\u09CD\u09AC\u09AA\u09C2\u09B0\u09CD\u09A3", "maxDiff.setProgress": "\u09AC\u09CD\u09B2\u0995 {k}/{n}", "priority.selectUpTo": "\u09B8\u09B0\u09CD\u09AC\u09CB\u099A\u09CD\u099A \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "priority.options": "\u099F\u09BF \u09AC\u09BF\u0995\u09B2\u09CD\u09AA", "priority.thenOrder": "\u09A4\u09BE\u09B0\u09AA\u09B0 \u09B8\u09C7\u0997\u09C1\u09B2\u09CB \u09B8\u09BE\u099C\u09BE\u09A8", "priority.selectOptions": "\u09AC\u09BF\u0995\u09B2\u09CD\u09AA \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "priority.cancel": "\u09AC\u09BE\u09A4\u09BF\u09B2", "priority.confirm": "\u09A8\u09BF\u09B6\u09CD\u099A\u09BF\u09A4 \u0995\u09B0\u09C1\u09A8", "priority.selectOptionNumber": "\u09AC\u09BF\u0995\u09B2\u09CD\u09AA # \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u0995\u09B0\u09C1\u09A8", "priority.prioritized": "\u0985\u0997\u09CD\u09B0\u09BE\u09A7\u09BF\u0995\u09BE\u09B0\u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4", "priority.of": "\u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7", "priority.instruction": '\u0986\u09AA\u09A8\u09BE\u09B0 \u0985\u0997\u09CD\u09B0\u09BE\u09A7\u09BF\u0995\u09BE\u09B0 \u09A4\u09BE\u09B2\u09BF\u0995\u09BE \u09A8\u09BF\u099A\u09C7 \u09A6\u09C7\u0996\u09BE\u09A8\u09CB \u09B9\u09AF\u09BC\u09C7\u099B\u09C7\u0964 \u099A\u09BE\u0987\u09B2\u09C7 \u09A4\u09C0\u09B0 \u099A\u09BF\u09B9\u09CD\u09A8 \u09AC\u09CD\u09AF\u09AC\u09B9\u09BE\u09B0 \u0995\u09B0\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09AA\u099B\u09A8\u09CD\u09A6\u0997\u09C1\u09B2\u09CB \u09AA\u09C1\u09A8\u09B0\u09BE\u09AF\u09BC \u09B8\u09BE\u099C\u09BE\u09A4\u09C7 \u09AA\u09BE\u09B0\u09C7\u09A8\u0964 "\u09AA\u09B0\u09AC\u09B0\u09CD\u09A4\u09C0" \u0995\u09CD\u09B2\u09BF\u0995 \u0995\u09B0\u09C7 \u0986\u09AA\u09A8\u09BE\u09B0 \u09A8\u09BF\u09B0\u09CD\u09AC\u09BE\u099A\u09A8 \u09A8\u09BF\u09B6\u09CD\u099A\u09BF\u09A4 \u0995\u09B0\u09C1\u09A8 \u098F\u09AC\u0982 \u098F\u0997\u09BF\u09AF\u09BC\u09C7 \u09AF\u09BE\u09A8\u0964', "action.send": "\u09AA\u09BE\u09A0\u09BE\u09A8", "action.back": "\u09AA\u09BF\u099B\u09A8\u09C7", "action.next": "\u09AA\u09B0\u09AC\u09B0\u09CD\u09A4\u09C0", "action.start": "\u09B6\u09C1\u09B0\u09C1 \u0995\u09B0\u09C1\u09A8!", "message.success": "\u0986\u09AA\u09A8\u09BE\u09B0 \u09AE\u09A4\u09BE\u09AE\u09A4\u09C7\u09B0 \u099C\u09A8\u09CD\u09AF \u09A7\u09A8\u09CD\u09AF\u09AC\u09BE\u09A6!", "message.blocked": "\u0986\u09AA\u09A8\u09BE\u09B0 \u09B8\u09AE\u09AF\u09BC\u09C7\u09B0 \u099C\u09A8\u09CD\u09AF \u09A7\u09A8\u09CD\u09AF\u09AC\u09BE\u09A6, \u0986\u09AE\u09B0\u09BE \u098F\u0996\u09BE\u09A8\u09C7\u0987 \u0995\u09A5\u09CB\u09AA\u0995\u09A5\u09A8 \u09B6\u09C7\u09B7 \u0995\u09B0\u099B\u09BF\u0964", "message.required": "\u099A\u09BE\u09B2\u09BF\u09AF\u09BC\u09C7 \u09AF\u09BE\u0993\u09AF\u09BC\u09BE\u09B0 \u0986\u0997\u09C7 \u0985\u09A8\u09C1\u0997\u09CD\u09B0\u09B9 \u0995\u09B0\u09C7 \u0989\u09A4\u09CD\u09A4\u09B0 \u09A6\u09BF\u09A8\u0964", "message.rateLimit": "\u0985\u09A8\u09C7\u0995 \u09AC\u09C7\u09B6\u09BF \u0985\u09A8\u09C1\u09B0\u09CB\u09A7\u0964 {seconds} \u09B8\u09C7\u0995\u09C7\u09A8\u09CD\u09A1\u09C7 \u0986\u09AC\u09BE\u09B0 \u099A\u09C7\u09B7\u09CD\u099F\u09BE \u0995\u09B0\u09BE \u09B9\u099A\u09CD\u099B\u09C7..." }, it: { "boolean.yes": "S\xEC", "boolean.no": "No", "priority.selectUpTo": "Seleziona fino a", "priority.options": "opzioni", "priority.thenOrder": "e poi ordinali", "priority.selectOptions": "Seleziona opzioni", "priority.cancel": "Annulla", "priority.confirm": "Conferma", "priority.selectOptionNumber": "Seleziona opzione #", "priority.prioritized": "Prioritizzate", "priority.of": "di", "priority.instruction": 'La tua lista di priorit\xE0 \xE8 mostrata qui sotto. Se vuoi, puoi riordinare le tue scelte usando le frecce. Clicca su "Avanti" per confermare la selezione e continuare.' }, nl: { "boolean.yes": "Ja", "boolean.no": "Nee", "priority.selectUpTo": "Selecteer tot", "priority.options": "opties", "priority.thenOrder": "en rangschik ze vervolgens", "priority.selectOptions": "Selecteer opties", "priority.cancel": "Annuleren", "priority.confirm": "Bevestigen", "priority.selectOptionNumber": "Selecteer optie #", "priority.prioritized": "Geprioriteerd", "priority.of": "van", "priority.instruction": 'Je prioriteitenlijst wordt hieronder weergegeven. Als je wilt, kun je je keuzes herschikken met behulp van de pijlen. Klik op "Volgende" om je selectie te bevestigen en door te gaan.' }, pl: { "boolean.yes": "Tak", "boolean.no": "Nie", "priority.selectUpTo": "Wybierz do", "priority.options": "opcje", "priority.thenOrder": "a nast\u0119pnie je uporz\u0105dkuj", "priority.selectOptions": "Wybierz opcje", "priority.cancel": "Anuluj", "priority.confirm": "Potwierd\u017A", "priority.selectOptionNumber": "Wybierz opcj\u0119 #", "priority.prioritized": "Priorytetowe", "priority.of": "z", "priority.instruction": 'Twoja lista priorytet\xF3w jest pokazana poni\u017Cej. Je\u015Bli chcesz, mo\u017Cesz zmieni\u0107 kolejno\u015B\u0107 swoich wybor\xF3w za pomoc\u0105 strza\u0142ek. Kliknij "Dalej", aby potwierdzi\u0107 wyb\xF3r i kontynuowa\u0107.' }, ru: { "boolean.yes": "\u0414\u0430", "boolean.no": "\u041D\u0435\u0442", "priority.selectUpTo": "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u043E", "priority.options": "\u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432", "priority.thenOrder": "\u0430 \u0437\u0430\u0442\u0435\u043C \u0443\u043F\u043E\u0440\u044F\u0434\u043E\u0447\u044C\u0442\u0435 \u0438\u0445", "priority.selectOptions": "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B", "priority.cancel": "\u041E\u0442\u043C\u0435\u043D\u0430", "priority.confirm": "\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C", "priority.selectOptionNumber": "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442 #", "priority.prioritized": "\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u044B", "priority.of": "\u0438\u0437", "priority.instruction": '\u0412\u0430\u0448 \u0441\u043F\u0438\u0441\u043E\u043A \u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u043E\u0432 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043D\u0438\u0436\u0435. \u0415\u0441\u043B\u0438 \u0445\u043E\u0442\u0438\u0442\u0435, \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0440\u044F\u0434\u043E\u043A \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0441\u0442\u0440\u0435\u043B\u043E\u043A. \u041D\u0430\u0436\u043C\u0438\u0442\u0435 "\u0414\u0430\u043B\u0435\u0435", \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0432\u044B\u0431\u043E\u0440 \u0438 \u043F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C.' }, ja: { "boolean.yes": "\u306F\u3044", "boolean.no": "\u3044\u3044\u3048", "priority.selectUpTo": "\u6700\u5927", "priority.options": "\u500B\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u9078\u629E", "priority.thenOrder": "\u305D\u306E\u5F8C\u4E26\u3079\u66FF\u3048\u3066\u304F\u3060\u3055\u3044", "priority.selectOptions": "\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u9078\u629E", "priority.cancel": "\u30AD\u30E3\u30F3\u30BB\u30EB", "priority.confirm": "\u78BA\u8A8D", "priority.selectOptionNumber": "\u30AA\u30D7\u30B7\u30E7\u30F3 # \u3092\u9078\u629E", "priority.prioritized": "\u512A\u5148\u9806\u4F4D", "priority.of": "\u306E\u3046\u3061", "priority.instruction": "\u512A\u5148\u9806\u4F4D\u30EA\u30B9\u30C8\u306F\u4EE5\u4E0B\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u3001\u77E2\u5370\u3092\u4F7F\u3063\u3066\u9078\u629E\u80A2\u3092\u4E26\u3079\u66FF\u3048\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002\u300C\u6B21\u3078\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u9078\u629E\u3092\u78BA\u5B9A\u3057\u3001\u7D9A\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002" }, zh: { "boolean.yes": "\u662F", "boolean.no": "\u4E0D", "priority.selectUpTo": "\u6700\u591A\u9009\u62E9", "priority.options": "\u4E2A\u9009\u9879", "priority.thenOrder": "\u7136\u540E\u6392\u5E8F\u5B83\u4EEC", "priority.selectOptions": "\u9009\u62E9\u9009\u9879", "priority.cancel": "\u53D6\u6D88", "priority.confirm": "\u786E\u8BA4", "priority.selectOptionNumber": "\u9009\u62E9\u9009\u9879 #", "priority.prioritized": "\u5DF2\u4F18\u5148", "priority.of": "\u5171", "priority.instruction": "\u4F60\u7684\u4F18\u5148\u5217\u8868\u5982\u4E0B\u6240\u793A\u3002\u5982\u6709\u9700\u8981\uFF0C\u53EF\u4EE5\u4F7F\u7528\u7BAD\u5934\u91CD\u65B0\u6392\u5E8F\u9009\u9879\u3002\u70B9\u51FB\u201C\u4E0B\u4E00\u6B65\u201D\u786E\u8BA4\u9009\u62E9\u5E76\u7EE7\u7EED\u3002" }, ko: { "boolean.yes": "\uC608", "boolean.no": "\uC544\uB2C8", "priority.selectUpTo": "\uCD5C\uB300", "priority.options": "\uAC1C\uC758 \uC635\uC158 \uC120\uD0DD", "priority.thenOrder": "\uADF8\uB7F0 \uB2E4\uC74C \uC815\uB82C\uD558\uC138\uC694", "priority.selectOptions": "\uC635\uC158 \uC120\uD0DD", "priority.cancel": "\uCDE8\uC18C", "priority.confirm": "\uD655\uC778", "priority.selectOptionNumber": "\uC635\uC158 # \uC120\uD0DD", "priority.prioritized": "\uC6B0\uC120\uC21C\uC704", "priority.of": "\uC911", "priority.instruction": '\uC6B0\uC120\uC21C\uC704 \uBAA9\uB85D\uC740 \uC544\uB798\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4. \uC6D0\uD55C\uB2E4\uBA74 \uD654\uC0B4\uD45C\uB97C \uC0AC\uC6A9\uD574 \uC120\uD0DD \uD56D\uBAA9\uC744 \uC7AC\uC815\uB82C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. "\uB2E4\uC74C"\uC744 \uD074\uB9AD\uD558\uC5EC \uC120\uD0DD\uC744 \uD655\uC778\uD558\uACE0 \uACC4\uC18D\uD558\uC138\uC694.' } };
|
|
5131
|
+
t2.SUPPORTED_LANGUAGES = ["en", "da", "fi", "no", "es", "sv", "ar", "bn", "de", "pt", "fr"], t2.AVAILABLE_LANGUAGES = Object.keys(n), t2.RTL_LANGUAGES = ["ar"];
|
|
5132
|
+
const r = { nb: "no", nn: "no", nob: "no", nno: "no", iw: "he", in: "id", cmn: "zh" };
|
|
4616
5133
|
function o(e3) {
|
|
4617
5134
|
if (!e3) return null;
|
|
4618
5135
|
const t3 = e3.trim().toLowerCase().replace(/_/g, "-");
|
|
4619
5136
|
if (!t3) return null;
|
|
4620
|
-
if (
|
|
4621
|
-
const i2 = t3.split("-")[0], o2 =
|
|
4622
|
-
return
|
|
5137
|
+
if (n[t3]) return t3;
|
|
5138
|
+
const i2 = t3.split("-")[0], o2 = r[i2] || i2;
|
|
5139
|
+
return n[o2] ? o2 : null;
|
|
4623
5140
|
}
|
|
4624
5141
|
function a(e3) {
|
|
4625
5142
|
return o(e3) || "en";
|
|
4626
5143
|
}
|
|
4627
5144
|
t2.normalizeLanguage = a, t2.TRANSLATION_KEYS = Object.keys(i), t2.hasOwnTranslation = function(e3, t3) {
|
|
4628
5145
|
const i2 = o(e3);
|
|
4629
|
-
return !!i2 && void 0 !==
|
|
5146
|
+
return !!i2 && void 0 !== n[i2][t3];
|
|
4630
5147
|
}, t2.isRtlLanguage = function(e3) {
|
|
4631
5148
|
return -1 !== t2.RTL_LANGUAGES.indexOf(a(e3));
|
|
4632
5149
|
}, t2.isLanguageSupported = function(e3) {
|
|
4633
5150
|
const i2 = o(e3);
|
|
4634
5151
|
return !!i2 && -1 !== t2.SUPPORTED_LANGUAGES.indexOf(i2);
|
|
4635
|
-
}, t2.t = function(e3, t3,
|
|
4636
|
-
const o2 =
|
|
4637
|
-
return
|
|
5152
|
+
}, t2.t = function(e3, t3, r2) {
|
|
5153
|
+
const o2 = n[a(e3)] || i, s = void 0 !== o2[t3] ? o2[t3] : i[t3];
|
|
5154
|
+
return r2 ? (function(e4, t4) {
|
|
4638
5155
|
return Object.keys(t4).reduce(((e5, i2) => e5.replace(new RegExp("\\{" + i2 + "\\}", "g"), String(t4[i2]))), e4);
|
|
4639
|
-
})(s,
|
|
5156
|
+
})(s, r2) : s;
|
|
4640
5157
|
};
|
|
4641
|
-
},
|
|
5158
|
+
}, 1347: (e2, t2) => {
|
|
4642
5159
|
"use strict";
|
|
4643
5160
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.endpoints = void 0, t2.endpoints = { sdk: { app: (e3, t3) => `sdk/app/${e3}/${t3}`, app_info: (e3, t3) => `sdk/app/${e3}/${t3}/info`, session: (e3) => `sdk/app/session/${e3}/info`, feedback: "sdk/feedback", followUpQuestion: "sdk/followUpQuestion", agentSurveyStart: "sdk/agentSurvey/start", agentSurveyNext: "sdk/agentSurvey/next" } };
|
|
4644
|
-
},
|
|
5161
|
+
}, 9930: (e2, t2, i) => {
|
|
4645
5162
|
"use strict";
|
|
4646
5163
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.placeholder = void 0;
|
|
4647
|
-
const
|
|
4648
|
-
t2.placeholder = { answer: (e3) => (0,
|
|
4649
|
-
},
|
|
5164
|
+
const n = i(7031);
|
|
5165
|
+
t2.placeholder = { answer: (e3) => (0, n.t)(e3, "placeholder.answer"), number: (e3) => (0, n.t)(e3, "placeholder.number"), email: (e3) => (0, n.t)(e3, "placeholder.email"), date: (e3) => (0, n.t)(e3, "placeholder.date"), password: (e3) => (0, n.t)(e3, "placeholder.password"), pointsystemerror: (e3) => (0, n.t)(e3, "pointSystem.error"), upload: { cta: (e3) => (0, n.t)(e3, "upload.cta"), formats: (e3, t3) => (0, n.t)(e3, "image" === t3 ? "upload.imagesOnly" : "upload.anyFileType"), maxFiles: (e3, t3) => (0, n.t)(e3, "upload.maxFiles", { n: t3 }), maxSize: (e3, t3) => (0, n.t)(e3, "upload.maxSize", { mb: t3 }), tooLarge: (e3, t3) => (0, n.t)(e3, "upload.tooLarge", { mb: t3 }), remove: (e3) => (0, n.t)(e3, "upload.remove") } };
|
|
5166
|
+
}, 3903: (e2, t2, i) => {
|
|
4650
5167
|
"use strict";
|
|
4651
5168
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.renderStartMessage = t2.renderSuccess = t2.renderError = t2.renderActions = t2.renderQuestions = void 0;
|
|
4652
|
-
const
|
|
4653
|
-
t2.renderQuestions = function e3(t3, i2 = "standard",
|
|
5169
|
+
const n = i(1140), r = i(7156), o = i(6658), a = i(6029), s = i(2139), l = { small: "1rem", medium: "1.2rem", large: "1.5rem" };
|
|
5170
|
+
t2.renderQuestions = function e3(t3, i2 = "standard", d = "en", c = { customIcons: false }, u) {
|
|
4654
5171
|
if (!t3) throw new Error("[MagicFeedback] No questions provided");
|
|
4655
|
-
const
|
|
4656
|
-
return t3.forEach(((
|
|
4657
|
-
var
|
|
4658
|
-
if ((null === (
|
|
5172
|
+
const p = [], { customIcons: m, id: h } = c;
|
|
5173
|
+
return t3.forEach(((f) => {
|
|
5174
|
+
var g, y;
|
|
5175
|
+
if ((null === (y = null === (g = null == f ? void 0 : f.questionType) || void 0 === g ? void 0 : g.conf) || void 0 === y ? void 0 : y.length) > 0) {
|
|
4659
5176
|
let t4 = document.createElement("div");
|
|
4660
5177
|
t4.classList.add("magicfeedback-div");
|
|
4661
|
-
const
|
|
4662
|
-
|
|
4663
|
-
e4.ref =
|
|
4664
|
-
})), e3(
|
|
5178
|
+
const n2 = document.createElement("label");
|
|
5179
|
+
n2.setAttribute("for", `magicfeedback-${f.id}`), n2.textContent = (0, o.parseTitle)(f.title, d), n2.classList.add("magicfeedback-label"), t4.appendChild(n2), f.questionType.conf.forEach(((e4) => {
|
|
5180
|
+
e4.ref = f.ref, f.assets[e4.id] && (e4.assets = { placeholder: f.assets[e4.id] });
|
|
5181
|
+
})), e3(f.questionType.conf, i2, d, c, u).forEach(((e4) => {
|
|
4665
5182
|
t4.appendChild(e4);
|
|
4666
|
-
})),
|
|
5183
|
+
})), p.push(t4);
|
|
4667
5184
|
} else {
|
|
4668
|
-
const e4 = (function(e5, t4, i3,
|
|
4669
|
-
var
|
|
4670
|
-
let
|
|
4671
|
-
|
|
4672
|
-
const
|
|
4673
|
-
if (!
|
|
5185
|
+
const e4 = (function(e5, t4, i3, d2, c2, u2) {
|
|
5186
|
+
var p2, m2, h2;
|
|
5187
|
+
let f2, g2, { id: y2, title: v, type: b, ref: E, require: A, defaultValue: k, assets: T } = e5, C = document.createElement("div");
|
|
5188
|
+
C.classList.add("magicfeedback-div");
|
|
5189
|
+
const x = window.innerWidth < 600, P = "slim" === t4 ? (0, o.parseTitle)(v, i3) : null == T ? void 0 : T.placeholder, L = (0, a.shownValueFor)(e5, (0, o.getUrlParam)(E)), S = (null == T ? void 0 : T.maxCharacters) || 0, w = false === (null == T ? void 0 : T.autoAdvance) ? void 0 : c2, O = void 0 !== (null == T ? void 0 : T.randomPosition) && (null == T ? void 0 : T.randomPosition), N = (null == T ? void 0 : T.direction) || "row", I = (null == T ? void 0 : T.order) || "ltr", D = (0, r.getQuestionRenderer)(b);
|
|
5190
|
+
if (!D) return C;
|
|
4674
5191
|
{
|
|
4675
|
-
const r2 =
|
|
4676
|
-
|
|
5192
|
+
const r2 = D({ question: e5, format: t4, language: i3, url: d2, send: b === n.FEEDBACKAPPANSWERTYPE.TEXT ? c2 : w, isPhone: x, urlParamValue: L, placeholderText: P, maxCharacters: S, randomPosition: O, direction: N, order: I, productId: u2 });
|
|
5193
|
+
f2 = r2.element, g2 = r2.elementTypeClass;
|
|
4677
5194
|
}
|
|
4678
|
-
|
|
4679
|
-
const
|
|
4680
|
-
|
|
5195
|
+
f2.id = `magicfeedback-${y2}`, f2.setAttribute("name", E), f2.classList.add(g2), (void 0 !== k || null !== L) && (f2.value = L || k), ["RADIO", "MULTIPLECHOICE", "UPLOAD_IMAGE", "UPLOAD_FILE"].includes(b) || (f2.classList.add("magicfeedback-input"), f2.required = A);
|
|
5196
|
+
const R = document.createElement("label");
|
|
5197
|
+
R.setAttribute("for", `magicfeedback-${y2}`), R.textContent = (0, o.parseTitle)(v, i3), R.classList.add("magicfeedback-label"), (function(e6, t5) {
|
|
4681
5198
|
if ("INFO_PAGE" !== t5.type) return;
|
|
4682
|
-
const { assets: i4 } = t5,
|
|
4683
|
-
if (e7) return
|
|
4684
|
-
})(null == i4 ? void 0 : i4.titleSize),
|
|
4685
|
-
var
|
|
4686
|
-
|
|
4687
|
-
})(
|
|
4688
|
-
const
|
|
4689
|
-
if (
|
|
5199
|
+
const { assets: i4 } = t5, n2 = (function(e7) {
|
|
5200
|
+
if (e7) return l[e7] || e7;
|
|
5201
|
+
})(null == i4 ? void 0 : i4.titleSize), r2 = (o2 = null == i4 ? void 0 : i4.titleStyle, Array.isArray(o2) ? o2 : o2 ? [o2] : []);
|
|
5202
|
+
var o2;
|
|
5203
|
+
n2 && e6.style.setProperty("font-size", n2, "important"), (null == i4 ? void 0 : i4.titleAlign) && (e6.style.setProperty("width", "100%", "important"), e6.style.setProperty("align-self", "stretch", "important"), e6.style.setProperty("text-align", i4.titleAlign, "important")), r2.includes("italic") && e6.style.setProperty("font-style", "italic", "important"), r2.includes("bold") && e6.style.setProperty("font-weight", "bold", "important"), r2.includes("underline") && e6.style.setProperty("text-decoration", "underline", "important");
|
|
5204
|
+
})(R, e5);
|
|
5205
|
+
const M = document.createElement("label");
|
|
5206
|
+
if (M.textContent = (0, o.parseTitle)(null == T ? void 0 : T.subtitle, i3), M.classList.add("magicfeedback-sublabel"), (null === (p2 = null == T ? void 0 : T.subtitleStyle) || void 0 === p2 ? void 0 : p2.includes("italic")) && (M.style.fontStyle = "italic"), (null === (m2 = null == T ? void 0 : T.subtitleStyle) || void 0 === m2 ? void 0 : m2.includes("bold")) && (M.style.fontWeight = "bold"), (null === (h2 = null == T ? void 0 : T.subtitleStyle) || void 0 === h2 ? void 0 : h2.includes("underline")) && (M.style.textDecoration = "underline"), ["CONSENT"].includes(b)) C.classList.add("magicfeedback-consent-container"), C.appendChild(f2), C.appendChild(R), (null == T ? void 0 : T.subtitle) && C.appendChild(M);
|
|
4690
5207
|
else {
|
|
4691
|
-
if ("slim" !== t4 && (
|
|
5208
|
+
if ("slim" !== t4 && (C.appendChild(R), (null == T ? void 0 : T.subtitle) && C.appendChild(M), void 0 !== (null == T ? void 0 : T.general) && "" !== (null == T ? void 0 : T.general))) {
|
|
4692
5209
|
const e6 = document.createElement("img");
|
|
4693
|
-
e6.src = null ==
|
|
5210
|
+
e6.src = null == T ? void 0 : T.general, e6.classList.add("magicfeedback-image"), e6.style.maxWidth = "auto", e6.style.height = "400px", e6.style.margin = "10px 0", C.appendChild(e6);
|
|
4694
5211
|
}
|
|
4695
|
-
if ("LONGTEXT" ===
|
|
5212
|
+
if ("LONGTEXT" === b && S > 0) {
|
|
4696
5213
|
const e6 = document.createElement("div");
|
|
4697
|
-
if (e6.classList.add("magicfeedback-counter"), e6.textContent = `${
|
|
4698
|
-
e6.textContent = `${
|
|
4699
|
-
})),
|
|
5214
|
+
if (e6.classList.add("magicfeedback-counter"), e6.textContent = `${f2.value.length}/${S}`, e6.style.textAlign = "end", e6.style.fontSize = "15px", e6.style.marginTop = "5px", f2.addEventListener("input", (() => {
|
|
5215
|
+
e6.textContent = `${f2.value.length}/${S}`;
|
|
5216
|
+
})), C.appendChild(f2), C.appendChild(e6), (null == T ? void 0 : T.extraOption) && (null == T ? void 0 : T.extraOptionText)) {
|
|
4700
5217
|
const e7 = document.createElement("div");
|
|
4701
5218
|
e7.classList.add("magicfeedback-skip-container"), e7.classList.add("magicfeedback-checkbox-container"), e7.style.display = "flex", e7.style.justifyContent = "flex-start";
|
|
4702
5219
|
const t5 = document.createElement("input");
|
|
4703
|
-
t5.classList.add("magicfeedback-skip"), t5.type = "checkbox", t5.id = `skip-${
|
|
5220
|
+
t5.classList.add("magicfeedback-skip"), t5.type = "checkbox", t5.id = `skip-${E}`, t5.name = E, t5.value = "-", t5.style.cursor = "pointer";
|
|
4704
5221
|
const i4 = document.createElement("label");
|
|
4705
|
-
i4.htmlFor = `skip-${
|
|
4706
|
-
|
|
4707
|
-
})), e7.appendChild(t5), e7.appendChild(i4),
|
|
5222
|
+
i4.htmlFor = `skip-${E}`, i4.textContent = null == T ? void 0 : T.extraOptionText, i4.style.fontSize = "15px", i4.style.cursor = "pointer", i4.style.margin = "0 5px", t5.addEventListener("click", (() => {
|
|
5223
|
+
f2.value = "-";
|
|
5224
|
+
})), (0, s.autoAdvanceOn)(t5, w, "click"), e7.appendChild(t5), e7.appendChild(i4), C.appendChild(e7);
|
|
4708
5225
|
}
|
|
4709
|
-
} else
|
|
5226
|
+
} else C.appendChild(f2);
|
|
4710
5227
|
}
|
|
4711
|
-
return
|
|
4712
|
-
})(
|
|
4713
|
-
|
|
5228
|
+
return C;
|
|
5229
|
+
})(f, i2, d, "https://survey-dev.magicfeedback.io/assets/emojis" + (m ? `/${h}` : ""), 1 === t3.length ? u : void 0, h);
|
|
5230
|
+
p.push(e4);
|
|
4714
5231
|
}
|
|
4715
|
-
})),
|
|
4716
|
-
}, t2.renderActions = function(e3 = "", t3, i2 = "Submit",
|
|
5232
|
+
})), p;
|
|
5233
|
+
}, t2.renderActions = function(e3 = "", t3, i2 = "Submit", n2 = "Back", r2 = "Next") {
|
|
4717
5234
|
const o2 = document.createElement("div");
|
|
4718
5235
|
o2.classList.add("magicfeedback-action-container");
|
|
4719
|
-
const
|
|
4720
|
-
|
|
4721
|
-
const
|
|
4722
|
-
return
|
|
4723
|
-
|
|
4724
|
-
})), "MAGICSURVEY" === e3 && o2.appendChild(
|
|
5236
|
+
const a2 = document.createElement("button");
|
|
5237
|
+
a2.id = "magicfeedback-submit", a2.type = "submit", a2.classList.add("magicfeedback-submit"), a2.textContent = "MAGICSURVEY" === e3 ? r2 || "Next" : i2 || "Submit";
|
|
5238
|
+
const s2 = document.createElement("button");
|
|
5239
|
+
return s2.id = "magicfeedback-back", s2.type = "button", s2.classList.add("magicfeedback-back"), s2.textContent = n2 || "Back", s2.addEventListener("click", t3), s2.addEventListener("click", (() => {
|
|
5240
|
+
a2.removeAttribute("disabled");
|
|
5241
|
+
})), "MAGICSURVEY" === e3 && o2.appendChild(s2), o2.appendChild(a2), o2;
|
|
4725
5242
|
}, t2.renderError = function(e3) {
|
|
4726
5243
|
const t3 = document.createElement("div");
|
|
4727
5244
|
return t3.classList.add("magicfeedback-error"), t3.textContent = e3, t3;
|
|
4728
5245
|
}, t2.renderSuccess = function(e3) {
|
|
4729
5246
|
const t3 = document.createElement("div");
|
|
4730
5247
|
return t3.classList.add("magicfeedback-success"), t3.textContent = e3, t3;
|
|
4731
|
-
}, t2.renderStartMessage = function(e3, t3 = false, i2 = "Go!",
|
|
5248
|
+
}, t2.renderStartMessage = function(e3, t3 = false, i2 = "Go!", n2 = () => {
|
|
4732
5249
|
}) {
|
|
4733
|
-
const
|
|
4734
|
-
|
|
5250
|
+
const r2 = document.createElement("div");
|
|
5251
|
+
r2.classList.add("magicfeedback-start-message-container");
|
|
4735
5252
|
const o2 = document.createElement("div");
|
|
4736
|
-
if (o2.classList.add("magicfeedback-start-message"), o2.innerHTML = e3,
|
|
5253
|
+
if (o2.classList.add("magicfeedback-start-message"), o2.innerHTML = e3, r2.appendChild(o2), t3) {
|
|
4737
5254
|
const e4 = document.createElement("button");
|
|
4738
|
-
e4.id = "magicfeedback-start-message-button", e4.classList.add("magicfeedback-start-message-button"), e4.textContent = i2, e4.addEventListener("click", (() =>
|
|
5255
|
+
e4.id = "magicfeedback-start-message-button", e4.classList.add("magicfeedback-start-message-button"), e4.textContent = i2, e4.addEventListener("click", (() => n2())), r2.appendChild(e4);
|
|
4739
5256
|
}
|
|
4740
|
-
return
|
|
5257
|
+
return r2;
|
|
4741
5258
|
};
|
|
4742
|
-
},
|
|
5259
|
+
}, 6891: function(e2, t2, i) {
|
|
4743
5260
|
"use strict";
|
|
4744
|
-
var
|
|
4745
|
-
return new (i2 || (i2 = Promise))((function(
|
|
5261
|
+
var n = this && this.__awaiter || function(e3, t3, i2, n2) {
|
|
5262
|
+
return new (i2 || (i2 = Promise))((function(r2, o2) {
|
|
4746
5263
|
function a2(e4) {
|
|
4747
5264
|
try {
|
|
4748
|
-
|
|
5265
|
+
l2(n2.next(e4));
|
|
4749
5266
|
} catch (e5) {
|
|
4750
5267
|
o2(e5);
|
|
4751
5268
|
}
|
|
4752
5269
|
}
|
|
4753
5270
|
function s2(e4) {
|
|
4754
5271
|
try {
|
|
4755
|
-
|
|
5272
|
+
l2(n2.throw(e4));
|
|
4756
5273
|
} catch (e5) {
|
|
4757
5274
|
o2(e5);
|
|
4758
5275
|
}
|
|
4759
5276
|
}
|
|
4760
|
-
function
|
|
5277
|
+
function l2(e4) {
|
|
4761
5278
|
var t4;
|
|
4762
|
-
e4.done ?
|
|
5279
|
+
e4.done ? r2(e4.value) : (t4 = e4.value, t4 instanceof i2 ? t4 : new i2((function(e5) {
|
|
4763
5280
|
e5(t4);
|
|
4764
5281
|
}))).then(a2, s2);
|
|
4765
5282
|
}
|
|
4766
|
-
|
|
5283
|
+
l2((n2 = n2.apply(e3, t3 || [])).next());
|
|
4767
5284
|
}));
|
|
4768
|
-
},
|
|
5285
|
+
}, r = this && this.__importDefault || function(e3) {
|
|
4769
5286
|
return e3 && e3.__esModule ? e3 : { default: e3 };
|
|
4770
5287
|
};
|
|
4771
5288
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.getFollowUpQuestion = t2.sendFeedback = t2.getQuestions = t2.getSessionForm = t2.getForm = t2.validateEmail = t2.header = void 0;
|
|
4772
|
-
const o =
|
|
5289
|
+
const o = r(i(6911)), a = r(i(8330)), s = i(1347), l = i(6029);
|
|
4773
5290
|
t2.header = { Accept: "application/json", "Magicfeedback-Sdk-Version": a.default.version, "x-magicfeedback-parameters": window.location.search || "" }, t2.validateEmail = function(e3) {
|
|
4774
5291
|
return /\S+@\S+\.\S+/.test(e3);
|
|
4775
|
-
}, t2.getForm = function(e3, i2,
|
|
4776
|
-
return
|
|
5292
|
+
}, t2.getForm = function(e3, i2, r2, a2, d) {
|
|
5293
|
+
return n(this, void 0, void 0, (function* () {
|
|
4777
5294
|
try {
|
|
4778
|
-
const
|
|
4779
|
-
return yield
|
|
5295
|
+
const n2 = yield (0, o.default)((0, l.withLangParam)(e3 + s.endpoints.sdk.app_info(i2, r2), d), { method: "GET", headers: t2.header });
|
|
5296
|
+
return yield n2.json();
|
|
4780
5297
|
} catch (e4) {
|
|
4781
5298
|
a2.err(e4);
|
|
4782
5299
|
}
|
|
4783
5300
|
}));
|
|
4784
|
-
}, t2.getSessionForm = function(e3, i2,
|
|
4785
|
-
return
|
|
5301
|
+
}, t2.getSessionForm = function(e3, i2, r2, a2) {
|
|
5302
|
+
return n(this, void 0, void 0, (function* () {
|
|
4786
5303
|
try {
|
|
4787
|
-
const
|
|
4788
|
-
return yield
|
|
5304
|
+
const n2 = yield (0, o.default)((0, l.withLangParam)(e3 + s.endpoints.sdk.session(i2), a2), { method: "GET", headers: t2.header });
|
|
5305
|
+
return yield n2.json();
|
|
4789
5306
|
} catch (e4) {
|
|
4790
|
-
|
|
5307
|
+
r2.err(e4);
|
|
4791
5308
|
}
|
|
4792
5309
|
}));
|
|
4793
|
-
}, t2.getQuestions = function(e3, i2,
|
|
4794
|
-
return
|
|
5310
|
+
}, t2.getQuestions = function(e3, i2, r2, a2, d) {
|
|
5311
|
+
return n(this, void 0, void 0, (function* () {
|
|
4795
5312
|
try {
|
|
4796
|
-
const
|
|
4797
|
-
if (
|
|
4798
|
-
const e4 = yield
|
|
5313
|
+
const n2 = yield (0, o.default)((0, l.withLangParam)(e3 + s.endpoints.sdk.app(i2, r2), d), { method: "GET", headers: t2.header });
|
|
5314
|
+
if (n2.ok) {
|
|
5315
|
+
const e4 = yield n2.json();
|
|
4799
5316
|
return a2.log(`Received questions for app ${i2}`, e4), e4;
|
|
4800
5317
|
}
|
|
4801
|
-
throw a2.err(`Failed to get questions for app ${i2}:`,
|
|
5318
|
+
throw a2.err(`Failed to get questions for app ${i2}:`, n2.status, n2.statusText), new Error("[MagicFeedback] Bad response from server");
|
|
4802
5319
|
} catch (e4) {
|
|
4803
5320
|
return a2.err(e4), [];
|
|
4804
5321
|
}
|
|
4805
5322
|
}));
|
|
4806
|
-
}, t2.sendFeedback = function(e3, i2,
|
|
4807
|
-
return
|
|
5323
|
+
}, t2.sendFeedback = function(e3, i2, r2) {
|
|
5324
|
+
return n(this, void 0, void 0, (function* () {
|
|
4808
5325
|
try {
|
|
4809
|
-
const
|
|
4810
|
-
if (
|
|
4811
|
-
throw
|
|
5326
|
+
const n2 = yield (0, o.default)(e3 + s.endpoints.sdk.feedback, { method: "POST", headers: Object.assign({ "Content-Type": "application/json" }, t2.header), body: JSON.stringify(i2) });
|
|
5327
|
+
if (n2.ok) return r2.log(`Form ${i2.integration} submitted successfully!`), (yield n2.json()).sessionId;
|
|
5328
|
+
throw r2.err(`Failed to submit form ${i2.integration}:`, n2.status, n2.statusText), new Error(n2.statusText);
|
|
4812
5329
|
} catch (e4) {
|
|
4813
|
-
return
|
|
5330
|
+
return r2.err(e4), "";
|
|
4814
5331
|
}
|
|
4815
5332
|
}));
|
|
4816
|
-
}, t2.getFollowUpQuestion = function(e3, i2,
|
|
4817
|
-
return
|
|
5333
|
+
}, t2.getFollowUpQuestion = function(e3, i2, r2) {
|
|
5334
|
+
return n(this, void 0, void 0, (function* () {
|
|
4818
5335
|
try {
|
|
4819
|
-
const
|
|
4820
|
-
if (
|
|
4821
|
-
throw
|
|
5336
|
+
const n2 = yield (0, o.default)(e3 + s.endpoints.sdk.followUpQuestion, { method: "POST", headers: Object.assign({ "Content-Type": "application/json" }, t2.header), body: JSON.stringify(i2) });
|
|
5337
|
+
if (n2.ok) return r2.log(`Received follow up question for form ${i2.integration}`), (yield n2.json()) || "";
|
|
5338
|
+
throw r2.err(`Failed to get follow up question for form ${i2.integration}:`, n2.status, n2.statusText), new Error(n2.statusText);
|
|
4822
5339
|
} catch (e4) {
|
|
4823
|
-
return
|
|
5340
|
+
return r2.err(e4), "";
|
|
5341
|
+
}
|
|
5342
|
+
}));
|
|
5343
|
+
};
|
|
5344
|
+
}, 6029: (e2, t2, i) => {
|
|
5345
|
+
"use strict";
|
|
5346
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.toBaseAnswers = t2.shownValueFor = t2.baseValueMap = t2.withLangParam = t2.detectSurveyLang = t2.normalizeSurveyLang = void 0;
|
|
5347
|
+
const n = i(1140), r = { nb: "no", nn: "no", nob: "no", nno: "no" };
|
|
5348
|
+
function o(e3) {
|
|
5349
|
+
if (!e3 || "string" != typeof e3) return null;
|
|
5350
|
+
const t3 = e3.trim().toLowerCase().replace(/_/g, "-").split("-")[0];
|
|
5351
|
+
return /^[a-z]{2,3}$/.test(t3) ? r[t3] || t3 : null;
|
|
5352
|
+
}
|
|
5353
|
+
function a(e3) {
|
|
5354
|
+
if (null == e3) return null;
|
|
5355
|
+
if ("string" == typeof e3 && e3.trim().startsWith("{")) try {
|
|
5356
|
+
e3 = JSON.parse(e3);
|
|
5357
|
+
} catch (t3) {
|
|
5358
|
+
return e3;
|
|
5359
|
+
}
|
|
5360
|
+
return "object" == typeof e3 ? void 0 !== e3.value ? String(e3.value) : null : String(e3);
|
|
5361
|
+
}
|
|
5362
|
+
function s(e3) {
|
|
5363
|
+
const t3 = /* @__PURE__ */ new Map(), i2 = null == e3 ? void 0 : e3.value, n2 = null == e3 ? void 0 : e3.baseValue;
|
|
5364
|
+
return Array.isArray(i2) && Array.isArray(n2) ? (i2.forEach(((e4, i3) => {
|
|
5365
|
+
const r2 = a(e4), o2 = a(n2[i3]);
|
|
5366
|
+
null === r2 || null === o2 || t3.has(r2) || t3.set(r2, o2);
|
|
5367
|
+
})), t3) : t3;
|
|
5368
|
+
}
|
|
5369
|
+
t2.normalizeSurveyLang = o, t2.detectSurveyLang = function(e3) {
|
|
5370
|
+
return o(e3) || (function() {
|
|
5371
|
+
if ("undefined" == typeof navigator) return null;
|
|
5372
|
+
const e4 = [...Array.isArray(navigator.languages) ? navigator.languages : [], navigator.language];
|
|
5373
|
+
for (const t3 of e4) {
|
|
5374
|
+
const e5 = o(t3);
|
|
5375
|
+
if (e5) return e5;
|
|
5376
|
+
}
|
|
5377
|
+
return null;
|
|
5378
|
+
})();
|
|
5379
|
+
}, t2.withLangParam = function(e3, t3) {
|
|
5380
|
+
return t3 ? `${e3}${e3.includes("?") ? "&" : "?"}lang=${encodeURIComponent(t3)}` : e3;
|
|
5381
|
+
}, t2.baseValueMap = s, t2.shownValueFor = function(e3, t3) {
|
|
5382
|
+
var i2, n2;
|
|
5383
|
+
if (null === t3 || !Array.isArray(null == e3 ? void 0 : e3.baseValue)) return t3;
|
|
5384
|
+
const r2 = e3.baseValue.findIndex(((e4) => a(e4) === t3));
|
|
5385
|
+
return -1 === r2 ? t3 : null !== (n2 = a(null === (i2 = e3.value) || void 0 === i2 ? void 0 : i2[r2])) && void 0 !== n2 ? n2 : t3;
|
|
5386
|
+
};
|
|
5387
|
+
const l = [n.FEEDBACKAPPANSWERTYPE.RADIO, n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOICE, n.FEEDBACKAPPANSWERTYPE.MULTIPLECHOISE_IMAGE, n.FEEDBACKAPPANSWERTYPE.SELECT];
|
|
5388
|
+
t2.toBaseAnswers = function(e3, t3) {
|
|
5389
|
+
return e3.map(((e4) => {
|
|
5390
|
+
if (e4.key.startsWith("extra-option-")) return e4;
|
|
5391
|
+
const i2 = t3.find(((t4) => t4.ref === e4.key)) || t3.find(((t4) => e4.key.includes(t4.ref)));
|
|
5392
|
+
if (!i2) return e4;
|
|
5393
|
+
const r2 = s(i2);
|
|
5394
|
+
if (0 === r2.size) return e4;
|
|
5395
|
+
let o2;
|
|
5396
|
+
if (l.includes(i2.type)) o2 = (e5) => {
|
|
5397
|
+
var t4;
|
|
5398
|
+
return "string" == typeof e5 && null !== (t4 = r2.get(e5)) && void 0 !== t4 ? t4 : e5;
|
|
5399
|
+
};
|
|
5400
|
+
else if (i2.type === n.FEEDBACKAPPANSWERTYPE.PRIORITY_LIST) o2 = (e5) => "string" == typeof e5 ? (function(e6, t4) {
|
|
5401
|
+
var i3, n2;
|
|
5402
|
+
const r3 = /^(\d+)\.\s?(.*)$/.exec(e6);
|
|
5403
|
+
if (!r3) return null !== (i3 = t4.get(e6)) && void 0 !== i3 ? i3 : e6;
|
|
5404
|
+
const o3 = r3[2];
|
|
5405
|
+
return `${r3[1]}. ${null !== (n2 = t4.get(o3)) && void 0 !== n2 ? n2 : o3}`;
|
|
5406
|
+
})(e5, r2) : e5;
|
|
5407
|
+
else if (i2.type === n.FEEDBACKAPPANSWERTYPE.POINT_SYSTEM) o2 = (e5) => "string" == typeof e5 ? (function(e6, t4) {
|
|
5408
|
+
var i3;
|
|
5409
|
+
const n2 = e6.lastIndexOf(":");
|
|
5410
|
+
if (-1 === n2) return e6;
|
|
5411
|
+
const r3 = e6.substring(0, n2);
|
|
5412
|
+
return `${null !== (i3 = t4.get(r3)) && void 0 !== i3 ? i3 : r3}${e6.substring(n2)}`;
|
|
5413
|
+
})(e5, r2) : e5;
|
|
5414
|
+
else if (i2.type === n.FEEDBACKAPPANSWERTYPE.MULTI_QUESTION_MATRIX) o2 = (e5) => "string" == typeof e5 ? (function(e6, t4) {
|
|
5415
|
+
try {
|
|
5416
|
+
const i3 = JSON.parse(e6);
|
|
5417
|
+
return Array.isArray(i3) ? JSON.stringify(i3.map(((e7) => Object.assign(Object.assign({}, e7), { value: Array.isArray(null == e7 ? void 0 : e7.value) ? e7.value.map(((e8) => {
|
|
5418
|
+
var i4;
|
|
5419
|
+
return null !== (i4 = t4.get(e8)) && void 0 !== i4 ? i4 : e8;
|
|
5420
|
+
})) : null == e7 ? void 0 : e7.value })))) : e6;
|
|
5421
|
+
} catch (t5) {
|
|
5422
|
+
return e6;
|
|
5423
|
+
}
|
|
5424
|
+
})(e5, r2) : e5;
|
|
5425
|
+
else {
|
|
5426
|
+
if (i2.type !== n.FEEDBACKAPPANSWERTYPE.MAX_DIFF) return e4;
|
|
5427
|
+
o2 = (e5) => "string" == typeof e5 ? (function(e6, t4) {
|
|
5428
|
+
try {
|
|
5429
|
+
const i3 = JSON.parse(e6);
|
|
5430
|
+
if (!Array.isArray(i3)) return e6;
|
|
5431
|
+
const n2 = (e7) => {
|
|
5432
|
+
var i4;
|
|
5433
|
+
return "string" == typeof e7 && null !== (i4 = t4.get(e7)) && void 0 !== i4 ? i4 : e7;
|
|
5434
|
+
};
|
|
5435
|
+
return JSON.stringify(i3.map(((e7) => Object.assign(Object.assign({}, e7), { shown: Array.isArray(null == e7 ? void 0 : e7.shown) ? e7.shown.map(n2) : null == e7 ? void 0 : e7.shown, best: n2(null == e7 ? void 0 : e7.best), worst: n2(null == e7 ? void 0 : e7.worst) }))));
|
|
5436
|
+
} catch (t5) {
|
|
5437
|
+
return e6;
|
|
5438
|
+
}
|
|
5439
|
+
})(e5, r2) : e5;
|
|
4824
5440
|
}
|
|
5441
|
+
return Object.assign(Object.assign({}, e4), { value: e4.value.map(o2) });
|
|
4825
5442
|
}));
|
|
4826
5443
|
};
|
|
4827
|
-
},
|
|
5444
|
+
}, 2139: (e2, t2) => {
|
|
5445
|
+
"use strict";
|
|
5446
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.cancelAutoAdvance = t2.autoAdvanceOn = t2.scheduleAutoAdvance = t2.AUTO_ADVANCE_DELAY_MS = void 0, t2.AUTO_ADVANCE_DELAY_MS = 300;
|
|
5447
|
+
const i = /* @__PURE__ */ new Map();
|
|
5448
|
+
function n(e3, n2) {
|
|
5449
|
+
const r = i.get(n2);
|
|
5450
|
+
r && clearTimeout(r.timer);
|
|
5451
|
+
const o = setTimeout((() => {
|
|
5452
|
+
i.delete(n2), e3.isConnected && n2();
|
|
5453
|
+
}), t2.AUTO_ADVANCE_DELAY_MS);
|
|
5454
|
+
i.set(n2, { timer: o, source: e3 });
|
|
5455
|
+
}
|
|
5456
|
+
t2.scheduleAutoAdvance = n, t2.autoAdvanceOn = function(e3, t3, i2 = "change") {
|
|
5457
|
+
t3 && e3.addEventListener(i2, (() => n(e3, t3)));
|
|
5458
|
+
}, t2.cancelAutoAdvance = function(e3) {
|
|
5459
|
+
e3 && i.forEach((({ timer: t3, source: n2 }, r) => {
|
|
5460
|
+
e3.contains(n2) && (clearTimeout(t3), i.delete(r));
|
|
5461
|
+
}));
|
|
5462
|
+
};
|
|
5463
|
+
}, 9033: (e2, t2) => {
|
|
5464
|
+
"use strict";
|
|
5465
|
+
function i(e3) {
|
|
5466
|
+
if (!e3) return null;
|
|
5467
|
+
const i2 = e3.querySelector(".magicfeedback-div");
|
|
5468
|
+
if (!i2) return null;
|
|
5469
|
+
const n = i2.querySelector('input:not([type="hidden"]), textarea, select, button');
|
|
5470
|
+
if (!n) return null;
|
|
5471
|
+
const r = n;
|
|
5472
|
+
return r.disabled || r.readOnly ? null : "TEXTAREA" === n.tagName || "INPUT" === n.tagName && t2.AUTOFOCUS_INPUT_TYPES.includes(n.type) ? r : null;
|
|
5473
|
+
}
|
|
5474
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.focusFirstTextQuestion = t2.findAutofocusTarget = t2.AUTOFOCUS_INPUT_TYPES = void 0, t2.AUTOFOCUS_INPUT_TYPES = ["text", "email", "number", "tel", "url", "search"], t2.findAutofocusTarget = i, t2.focusFirstTextQuestion = function(e3) {
|
|
5475
|
+
var t3, n;
|
|
5476
|
+
if (!e3) return false;
|
|
5477
|
+
const r = i(e3);
|
|
5478
|
+
if (!r) return false;
|
|
5479
|
+
const o = null === (t3 = e3.ownerDocument) || void 0 === t3 ? void 0 : t3.activeElement;
|
|
5480
|
+
if (o && !e3.contains(o) && (function(e4) {
|
|
5481
|
+
const t4 = e4.tagName;
|
|
5482
|
+
return "INPUT" === t4 || "TEXTAREA" === t4 || "SELECT" === t4 || true === e4.isContentEditable;
|
|
5483
|
+
})(o)) return false;
|
|
5484
|
+
try {
|
|
5485
|
+
r.focus({ preventScroll: true });
|
|
5486
|
+
} catch (e4) {
|
|
5487
|
+
r.focus();
|
|
5488
|
+
}
|
|
5489
|
+
return (null === (n = e3.ownerDocument) || void 0 === n ? void 0 : n.activeElement) === r;
|
|
5490
|
+
};
|
|
5491
|
+
}, 93: (e2, t2) => {
|
|
5492
|
+
"use strict";
|
|
5493
|
+
Object.defineProperty(t2, "__esModule", { value: true }), t2.armGhostTapGuard = t2.GHOST_TAP_GUARD_MS = void 0, t2.GHOST_TAP_GUARD_MS = 400;
|
|
5494
|
+
const i = /* @__PURE__ */ new WeakMap();
|
|
5495
|
+
t2.armGhostTapGuard = function(e3) {
|
|
5496
|
+
e3 && (i.has(e3) || e3.addEventListener("click", ((r) => {
|
|
5497
|
+
var o;
|
|
5498
|
+
0 !== r.detail && (n() - (null !== (o = i.get(e3)) && void 0 !== o ? o : -1 / 0) >= t2.GHOST_TAP_GUARD_MS || (r.preventDefault(), r.stopPropagation()));
|
|
5499
|
+
}), true), i.set(e3, n()));
|
|
5500
|
+
};
|
|
5501
|
+
const n = () => "undefined" != typeof performance ? performance.now() : Date.now();
|
|
5502
|
+
}, 1874: (e2, t2) => {
|
|
4828
5503
|
"use strict";
|
|
4829
5504
|
Object.defineProperty(t2, "__esModule", { value: true }), t2.Log = void 0, t2.Log = class {
|
|
4830
5505
|
constructor(e3) {
|
|
@@ -4837,15 +5512,15 @@ var require_magicfeedback_sdk_browser = __commonJS({
|
|
|
4837
5512
|
console.error("[MagicFeedback]:", ...e3);
|
|
4838
5513
|
}
|
|
4839
5514
|
};
|
|
4840
|
-
},
|
|
5515
|
+
}, 8330: (e2) => {
|
|
4841
5516
|
"use strict";
|
|
4842
|
-
e2.exports = JSON.parse('{"name":"@magicfeedback/native","version":"2.2.
|
|
4843
|
-
} }, t = {}, (function i(
|
|
4844
|
-
var
|
|
4845
|
-
if (void 0 !==
|
|
4846
|
-
var o = t[
|
|
4847
|
-
return e[
|
|
4848
|
-
})(
|
|
5517
|
+
e2.exports = JSON.parse('{"name":"@magicfeedback/native","version":"2.2.31","main":"./dist/magicfeedback-sdk.node.js","browser":"./dist/magicfeedback-sdk.browser.js","types":"./dist/types/src/index.d.ts","repository":{"type":"git","url":"git+ssh://git@github.com/MagicFeedback/magicfeedback-sdk.git"},"author":"farias@magicfeedback.io","license":"MIT","private":false,"scripts":{"dev":"vite","build":"webpack","build:watch":"webpack --watch --mode development","release":"npm publish --access public","release:beta":"npm publish --access public --tag beta","release:alpha":"npm publish --access public --tag alpha","test":"jest","test:watch":"jest --watchAll","coverage":"jest --coverage","publish:sdk":"bash publish.sh","publish:sdk:dry-run":"NPM_DRY_RUN=1 bash publish.sh"},"files":["dist"],"devDependencies":{"@babel/preset-typescript":"^7.22.5","@types/node":"^17.0.21","@types/webpack":"^5.28.0","@types/webpack-node-externals":"^2.5.3","c8":"^7.11.0","copy-webpack-plugin":"^11.0.0","jest":"^29.5.0","jest-environment-jsdom":"^29.5.0","jest-fetch-mock":"^3.0.3","nock":"^13.2.4","ts-jest":"^29.1.0","ts-loader":"^9.2.7","ts-node":"^10.7.0","typescript":"^4.6.2","vite":"^2.8.0","vite-plugin-dts":"^0.9.9","webpack":"^5.70.0","webpack-cli":"^4.9.2","webpack-node-externals":"^3.0.0"},"dependencies":{"cross-fetch":"^3.1.5","is-bundling-for-browser-or-node":"^1.1.1"},"description":"MagicFeedbackAI JavaScript Library for [MagicFeedback.io](https://magicfeedback.io/)","bugs":{"url":"https://github.com/MagicFeedback/magicfeedback-sdk/issues"},"homepage":"https://github.com/MagicFeedback/magicfeedback-sdk#readme","directories":{"example":"examples","test":"test"},"style":"./dist/styles/magicfeedback-default.css"}');
|
|
5518
|
+
} }, t = {}, (function i(n) {
|
|
5519
|
+
var r = t[n];
|
|
5520
|
+
if (void 0 !== r) return r.exports;
|
|
5521
|
+
var o = t[n] = { exports: {} };
|
|
5522
|
+
return e[n].call(o.exports, o, o.exports, i), o.exports;
|
|
5523
|
+
})(2474).default;
|
|
4849
5524
|
var e, t;
|
|
4850
5525
|
}));
|
|
4851
5526
|
}
|
|
@@ -5445,10 +6120,14 @@ async function renderPopup(container, surveyId, productId, actions, emit, onClos
|
|
|
5445
6120
|
// La pantalla final la pinta el popup: `renderSuccess` de @magicfeedback/native usa
|
|
5446
6121
|
// textContent, así que el mensaje de la plataforma (HTML con imagen) no se vería, y
|
|
5447
6122
|
// su fallback es un literal genérico que ignora `style.successMessage`.
|
|
5448
|
-
addSuccessScreen: false
|
|
6123
|
+
addSuccessScreen: false,
|
|
6124
|
+
// Surveys multi-idioma: native pide a la API este idioma (el del init o el del
|
|
6125
|
+
// dispositivo) y, si el survey no lo tiene, la API sirve el idioma por defecto.
|
|
6126
|
+
lang: options?.language
|
|
5449
6127
|
};
|
|
5450
|
-
generateOptions.onLoadedEvent = ({ formData }) => {
|
|
5451
|
-
const
|
|
6128
|
+
generateOptions.onLoadedEvent = ({ formData, lang }) => {
|
|
6129
|
+
const shownLang = typeof lang === "string" && lang.trim().length > 0 ? lang : void 0;
|
|
6130
|
+
const surveyLang = shownLang ?? (Array.isArray(formData?.lang) ? formData.lang.find((l) => typeof l === "string" && l.trim().length > 0) : void 0);
|
|
5452
6131
|
if (surveyLang) applyLabels(surveyLang);
|
|
5453
6132
|
try {
|
|
5454
6133
|
} catch {
|
|
@@ -5847,7 +6526,7 @@ function trimmedOrNull(value) {
|
|
|
5847
6526
|
}
|
|
5848
6527
|
function buildSurveyHtml(opts) {
|
|
5849
6528
|
const env = opts.env === "development" ? "dev" : "prod";
|
|
5850
|
-
const version = opts.version ?? "2.2.
|
|
6529
|
+
const version = opts.version ?? "2.2.31";
|
|
5851
6530
|
const cdn = `https://cdn.jsdelivr.net/npm/@magicfeedback/native@${version}/dist/magicfeedback-sdk.browser.js`;
|
|
5852
6531
|
const sid = jsonForScript(opts.surveyId);
|
|
5853
6532
|
const pid = jsonForScript(opts.productId);
|
|
@@ -6227,10 +6906,15 @@ ${REVEAL_JS}
|
|
|
6227
6906
|
// textContent, as\xED que el mensaje de la plataforma (HTML con imagen) no se ver\xEDa, y su
|
|
6228
6907
|
// fallback es un literal gen\xE9rico que ignora style.successMessage.
|
|
6229
6908
|
addSuccessScreen:false,
|
|
6909
|
+
// Surveys multi-idioma: native pide a la API este idioma (el del init o el del
|
|
6910
|
+
// dispositivo); si el survey no lo tiene, la API sirve el idioma por defecto.
|
|
6911
|
+
lang:${initLangJson}||undefined,
|
|
6230
6912
|
onLoadedEvent:function(args){
|
|
6231
|
-
// Idioma
|
|
6232
|
-
// ingl\xE9s delante de un survey traducido.
|
|
6233
|
-
|
|
6913
|
+
// Idioma en el que native muestra el survey: manda sobre el del init para que el
|
|
6914
|
+
// chrome no se quede en ingl\xE9s delante de un survey traducido. Native < 2.3 no lo
|
|
6915
|
+
// env\xEDa: entonces el primero de formData.lang (el idioma por defecto).
|
|
6916
|
+
var shown=args && typeof args.lang==='string' && args.lang.trim() ? args.lang : null;
|
|
6917
|
+
var langs=shown ? [shown] : (args && args.formData ? args.formData.lang : null);
|
|
6234
6918
|
if(langs && langs.length){
|
|
6235
6919
|
for(var li=0;li<langs.length;li++){
|
|
6236
6920
|
if(typeof langs[li]==='string' && langs[li].trim()){ ddApplyLabels(langs[li]); break; }
|
|
@@ -6816,8 +7500,10 @@ async function safeBodyText(res) {
|
|
|
6816
7500
|
function createFeedbackSink(options) {
|
|
6817
7501
|
let feedbackSessionId;
|
|
6818
7502
|
let firstPostInFlight = null;
|
|
7503
|
+
let generation = 0;
|
|
6819
7504
|
const url = `${options.baseUrl}/sdk/feedback`;
|
|
6820
7505
|
const post = async (body, final, sessionEnd = false) => {
|
|
7506
|
+
const postGeneration = generation;
|
|
6821
7507
|
const json = JSON.stringify(body);
|
|
6822
7508
|
const small = json.length <= KEEPALIVE_MAX_BYTES;
|
|
6823
7509
|
if (final) options.log?.("[DeepdotsAnalytics] final flush via fetch keepalive");
|
|
@@ -6847,9 +7533,25 @@ function createFeedbackSink(options) {
|
|
|
6847
7533
|
);
|
|
6848
7534
|
return;
|
|
6849
7535
|
}
|
|
6850
|
-
if (sessionEnd)
|
|
7536
|
+
if (sessionEnd) {
|
|
7537
|
+
let closedId = body.sessionId;
|
|
7538
|
+
try {
|
|
7539
|
+
const data = await res.json();
|
|
7540
|
+
closedId = data?.sessionId ?? closedId;
|
|
7541
|
+
} catch {
|
|
7542
|
+
}
|
|
7543
|
+
try {
|
|
7544
|
+
if (closedId) options.onSessionClosed?.(closedId);
|
|
7545
|
+
} catch {
|
|
7546
|
+
}
|
|
7547
|
+
return;
|
|
7548
|
+
}
|
|
6851
7549
|
try {
|
|
6852
7550
|
const data = await res.json();
|
|
7551
|
+
if (postGeneration !== generation) {
|
|
7552
|
+
options.log?.("[DeepdotsAnalytics] sessionId of a closed session ignored:", data?.sessionId);
|
|
7553
|
+
return;
|
|
7554
|
+
}
|
|
6853
7555
|
if (data?.sessionId && data.sessionId !== feedbackSessionId) {
|
|
6854
7556
|
feedbackSessionId = data.sessionId;
|
|
6855
7557
|
options.log?.("[DeepdotsAnalytics] feedbackSessionId cached:", feedbackSessionId);
|
|
@@ -6862,6 +7564,7 @@ function createFeedbackSink(options) {
|
|
|
6862
7564
|
if (meta?.resetSession) {
|
|
6863
7565
|
feedbackSessionId = void 0;
|
|
6864
7566
|
firstPostInFlight = null;
|
|
7567
|
+
generation++;
|
|
6865
7568
|
options.onSessionReset?.();
|
|
6866
7569
|
return;
|
|
6867
7570
|
}
|
|
@@ -6876,6 +7579,7 @@ function createFeedbackSink(options) {
|
|
|
6876
7579
|
if (sessionEnd) {
|
|
6877
7580
|
feedbackSessionId = void 0;
|
|
6878
7581
|
firstPostInFlight = null;
|
|
7582
|
+
generation++;
|
|
6879
7583
|
options.onSessionReset?.();
|
|
6880
7584
|
} else if (!feedbackSessionId) {
|
|
6881
7585
|
firstPostInFlight = sent.then(
|
|
@@ -7526,6 +8230,8 @@ var DeepdotsPopups = class {
|
|
|
7526
8230
|
this.analytics = null;
|
|
7527
8231
|
/** feedbackSessionId cacheado del canal de analytics (devuelto por POST /sdk/feedback). */
|
|
7528
8232
|
this.analyticsFeedbackSessionId = void 0;
|
|
8233
|
+
/** `init({ onFeedbackSession })`: avisa al host al abrir y cerrar cada registro. */
|
|
8234
|
+
this.onFeedbackSession = void 0;
|
|
7529
8235
|
/** Timer del flush periódico de analytics (cada ANALYTICS_FLUSH_INTERVAL_MS). */
|
|
7530
8236
|
this.analyticsFlushTimer = void 0;
|
|
7531
8237
|
/** Crash & error reporting (#14–17). Null hasta init(). */
|
|
@@ -7583,6 +8289,7 @@ var DeepdotsPopups = class {
|
|
|
7583
8289
|
this.renderChrome = config.renderChrome ?? true;
|
|
7584
8290
|
this.showProgressBar = config.showProgressBar;
|
|
7585
8291
|
this.surveyCss = config.surveyCss;
|
|
8292
|
+
this.onFeedbackSession = config.onFeedbackSession;
|
|
7586
8293
|
this.config = {
|
|
7587
8294
|
apiKey: config.apiKey || void 0,
|
|
7588
8295
|
debug: config.debug || false,
|
|
@@ -7616,7 +8323,9 @@ var DeepdotsPopups = class {
|
|
|
7616
8323
|
log: (...a) => this.log(...a),
|
|
7617
8324
|
onSessionId: (id) => {
|
|
7618
8325
|
this.analyticsFeedbackSessionId = id;
|
|
8326
|
+
this.notifyFeedbackSession(id, "open");
|
|
7619
8327
|
},
|
|
8328
|
+
onSessionClosed: (id) => this.notifyFeedbackSession(id, "closed"),
|
|
7620
8329
|
onSessionReset: () => {
|
|
7621
8330
|
this.analyticsFeedbackSessionId = void 0;
|
|
7622
8331
|
}
|
|
@@ -7691,6 +8400,23 @@ var DeepdotsPopups = class {
|
|
|
7691
8400
|
getSessionId() {
|
|
7692
8401
|
return this.tracking?.getSessionId() ?? null;
|
|
7693
8402
|
}
|
|
8403
|
+
/**
|
|
8404
|
+
* Id del registro de analytics abierto: el `sessionId` que devolvió `POST /sdk/feedback`,
|
|
8405
|
+
* que la API guarda como `sdkSessionId` en el Feedback en que se convierte la sesión. No es
|
|
8406
|
+
* `getSessionId()`. Null hasta que el backend acepta el primer lote y de nuevo al cerrar la
|
|
8407
|
+
* sesión: para saber también qué registro se cerró, usa `init({ onFeedbackSession })`.
|
|
8408
|
+
*/
|
|
8409
|
+
getFeedbackSessionId() {
|
|
8410
|
+
return this.analyticsFeedbackSessionId ?? null;
|
|
8411
|
+
}
|
|
8412
|
+
/** Avisa al host del registro abierto o cerrado; un fallo del host no corta el envío. */
|
|
8413
|
+
notifyFeedbackSession(sessionId, status) {
|
|
8414
|
+
try {
|
|
8415
|
+
this.onFeedbackSession?.({ sessionId, status });
|
|
8416
|
+
} catch (error) {
|
|
8417
|
+
this.log("analytics \xB7 onFeedbackSession threw:", error);
|
|
8418
|
+
}
|
|
8419
|
+
}
|
|
7694
8420
|
/** Activa/desactiva el tracking (identidad + sesión + analytics). Kill-switch del contrato §7bis. */
|
|
7695
8421
|
setTrackingEnabled(enabled) {
|
|
7696
8422
|
if (!enabled) this.closeSession("tracking_disabled");
|