@foxy.io/elements 1.14.0-beta.1 → 1.14.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/README.md +1 -1
  2. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  3. package/dist/cdn/foxy-address-card.js +1 -1
  4. package/dist/cdn/foxy-address-form.js +1 -1
  5. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  6. package/dist/cdn/foxy-attribute-card.js +1 -1
  7. package/dist/cdn/foxy-attribute-form.js +1 -1
  8. package/dist/cdn/foxy-cancellation-form.js +1 -1
  9. package/dist/cdn/foxy-collection-page.js +1 -1
  10. package/dist/cdn/foxy-collection-pages.js +1 -1
  11. package/dist/cdn/foxy-custom-field-card.js +1 -1
  12. package/dist/cdn/foxy-custom-field-form.js +1 -1
  13. package/dist/cdn/foxy-customer-api.js +1 -1
  14. package/dist/cdn/foxy-customer-card.js +1 -1
  15. package/dist/cdn/foxy-customer-form.js +1 -1
  16. package/dist/cdn/foxy-customer-portal-settings.js +18 -18
  17. package/dist/cdn/foxy-customer-portal.js +1 -1
  18. package/dist/cdn/foxy-customer.js +4 -4
  19. package/dist/cdn/foxy-customers-table.js +1 -1
  20. package/dist/cdn/foxy-discount-card.js +1 -1
  21. package/dist/cdn/foxy-donation.js +1 -1
  22. package/dist/cdn/foxy-email-template-form.js +1 -0
  23. package/dist/cdn/foxy-error-entry-card.js +1 -1
  24. package/dist/cdn/foxy-form-dialog.js +1 -1
  25. package/dist/cdn/foxy-i18n.js +1 -1
  26. package/dist/cdn/foxy-items-form.js +1 -1
  27. package/dist/cdn/foxy-nucleon-element.js +1 -1
  28. package/dist/cdn/foxy-payment-card.js +1 -1
  29. package/dist/cdn/foxy-payment-method-card.js +1 -1
  30. package/dist/cdn/foxy-query-builder.js +1 -1
  31. package/dist/cdn/foxy-sign-in-form.js +1 -1
  32. package/dist/cdn/foxy-spinner.js +2 -2
  33. package/dist/cdn/foxy-subscription-card.js +1 -1
  34. package/dist/cdn/foxy-subscription-form.js +26 -9
  35. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  36. package/dist/cdn/foxy-table.js +1 -1
  37. package/dist/cdn/foxy-tax-card.js +1 -1
  38. package/dist/cdn/foxy-tax-form.js +1 -1
  39. package/dist/cdn/foxy-template-config-form.js +1 -0
  40. package/dist/cdn/foxy-template-form.js +1 -1
  41. package/dist/cdn/foxy-transaction-card.js +1 -1
  42. package/dist/cdn/foxy-transactions-table.js +1 -1
  43. package/dist/cdn/foxy-user-form.js +1 -1
  44. package/dist/cdn/foxy-users-table.js +1 -1
  45. package/dist/cdn/{shared-151ca103.js → shared-00070cc4.js} +1 -1
  46. package/dist/cdn/{shared-d4dad105.js → shared-00563cb0.js} +1 -1
  47. package/dist/cdn/shared-007c4e34.js +1 -0
  48. package/dist/cdn/shared-07134f93.js +14 -0
  49. package/dist/cdn/shared-0ced76a0.js +358 -0
  50. package/dist/cdn/shared-0f9809ab.js +1 -0
  51. package/dist/cdn/{shared-f4119f12.js → shared-16f72e27.js} +1 -1
  52. package/dist/cdn/shared-1761daef.js +15 -0
  53. package/dist/cdn/{shared-5fedf5e4.js → shared-200f613b.js} +2 -2
  54. package/dist/cdn/{shared-4059f633.js → shared-218ba06e.js} +1 -1
  55. package/dist/cdn/shared-31d03530.js +264 -0
  56. package/dist/cdn/{shared-e9920617.js → shared-34b2c1e2.js} +1 -1
  57. package/dist/cdn/{shared-cf248335.js → shared-44cfc617.js} +1 -1
  58. package/dist/cdn/{shared-45d647e4.js → shared-46ee137f.js} +1 -1
  59. package/dist/cdn/shared-4ba926ca.js +1 -0
  60. package/dist/cdn/{shared-f0199313.js → shared-593f7e2c.js} +1 -1
  61. package/dist/cdn/shared-59e44f29.js +1 -0
  62. package/dist/cdn/{shared-35415106.js → shared-5d94bacb.js} +1 -1
  63. package/dist/cdn/{shared-cd700eac.js → shared-60126eee.js} +1 -1
  64. package/dist/cdn/{shared-17968c53.js → shared-63eaded9.js} +3 -3
  65. package/dist/cdn/shared-6b7602c7.js +1 -0
  66. package/dist/cdn/{shared-98ee7fad.js → shared-6d45a07b.js} +1 -1
  67. package/dist/cdn/{shared-99f45065.js → shared-7007dedb.js} +1 -1
  68. package/dist/cdn/{shared-84fa75d9.js → shared-9221e6b2.js} +1 -1
  69. package/dist/cdn/{shared-2860a3d3.js → shared-94b0ae99.js} +2 -2
  70. package/dist/cdn/shared-a3d2c48e.js +314 -0
  71. package/dist/cdn/shared-a46edf4b.js +1 -0
  72. package/dist/cdn/{shared-54702b33.js → shared-b0f0e8b5.js} +1 -1
  73. package/dist/cdn/{shared-f2a4fd27.js → shared-b24377bf.js} +1 -1
  74. package/dist/cdn/{shared-ed4ed7a5.js → shared-b710881a.js} +2 -2
  75. package/dist/cdn/{shared-3ae39e52.js → shared-bb824ab4.js} +3 -3
  76. package/dist/cdn/{shared-6783c996.js → shared-c5ae5d33.js} +1 -1
  77. package/dist/cdn/shared-ca7c3b9a.js +1 -0
  78. package/dist/cdn/shared-d01035c5.js +1 -0
  79. package/dist/cdn/{shared-dbbe03f9.js → shared-d05c93a5.js} +1 -1
  80. package/dist/cdn/{shared-5d286626.js → shared-da787055.js} +1 -1
  81. package/dist/cdn/{shared-566252ac.js → shared-daf6b763.js} +1 -1
  82. package/dist/cdn/shared-df573cea.js +12 -0
  83. package/dist/cdn/{shared-e5de8675.js → shared-e7f8ffe9.js} +1 -1
  84. package/dist/cdn/{shared-54c485d2.js → shared-ec861f31.js} +21 -21
  85. package/dist/cdn/{shared-e0248713.js → shared-f0a83bd6.js} +1 -1
  86. package/dist/cdn/shared-fe8a7aa2.js +1 -0
  87. package/dist/cdn/{shared-747b0842.js → shared-ff79f3f9.js} +1 -1
  88. package/dist/cdn/translations/shared/en.json +87 -3
  89. package/dist/elements/private/Checkbox/Checkbox.d.ts +3 -1
  90. package/dist/elements/private/Checkbox/Checkbox.js +45 -12
  91. package/dist/elements/private/Checkbox/Checkbox.js.map +1 -1
  92. package/dist/elements/private/Choice/Choice.js +10 -8
  93. package/dist/elements/private/Choice/Choice.js.map +1 -1
  94. package/dist/elements/private/Group/Group.js +1 -1
  95. package/dist/elements/private/Group/Group.js.map +1 -1
  96. package/dist/elements/private/I18N/I18N.js +1 -1
  97. package/dist/elements/private/I18N/I18N.js.map +1 -1
  98. package/dist/elements/public/AddressForm/AddressForm.js +8 -4
  99. package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
  100. package/dist/elements/public/AttributeForm/AttributeForm.js +8 -4
  101. package/dist/elements/public/AttributeForm/AttributeForm.js.map +1 -1
  102. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +8 -4
  103. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
  104. package/dist/elements/public/CustomerForm/CustomerForm.js +8 -4
  105. package/dist/elements/public/CustomerForm/CustomerForm.js.map +1 -1
  106. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.d.ts +46 -0
  107. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +350 -0
  108. package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -0
  109. package/dist/elements/public/EmailTemplateForm/index.d.ts +9 -0
  110. package/dist/elements/public/EmailTemplateForm/index.js +11 -0
  111. package/dist/elements/public/EmailTemplateForm/index.js.map +1 -0
  112. package/dist/elements/public/EmailTemplateForm/types.d.ts +17 -0
  113. package/dist/elements/public/EmailTemplateForm/types.js +2 -0
  114. package/dist/elements/public/EmailTemplateForm/types.js.map +1 -0
  115. package/dist/elements/public/ItemsForm/ItemsForm.js +2 -2
  116. package/dist/elements/public/ItemsForm/ItemsForm.js.map +1 -1
  117. package/dist/elements/public/NucleonElement/serveFromCache.js +1 -0
  118. package/dist/elements/public/NucleonElement/serveFromCache.js.map +1 -1
  119. package/dist/elements/public/TaxForm/TaxForm.js +8 -4
  120. package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
  121. package/dist/elements/public/TemplateConfigForm/CountriesList.d.ts +23 -0
  122. package/dist/elements/public/TemplateConfigForm/CountriesList.js +138 -0
  123. package/dist/elements/public/TemplateConfigForm/CountriesList.js.map +1 -0
  124. package/dist/elements/public/TemplateConfigForm/CountryCard.d.ts +22 -0
  125. package/dist/elements/public/TemplateConfigForm/CountryCard.js +157 -0
  126. package/dist/elements/public/TemplateConfigForm/CountryCard.js.map +1 -0
  127. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.d.ts +88 -0
  128. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +1336 -0
  129. package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -0
  130. package/dist/elements/public/TemplateConfigForm/defaults.d.ts +2 -0
  131. package/dist/elements/public/TemplateConfigForm/defaults.js +95 -0
  132. package/dist/elements/public/TemplateConfigForm/defaults.js.map +1 -0
  133. package/dist/elements/public/TemplateConfigForm/index.d.ts +9 -0
  134. package/dist/elements/public/TemplateConfigForm/index.js +11 -0
  135. package/dist/elements/public/TemplateConfigForm/index.js.map +1 -0
  136. package/dist/elements/public/TemplateConfigForm/types.d.ts +150 -0
  137. package/dist/elements/public/TemplateConfigForm/types.js +2 -0
  138. package/dist/elements/public/TemplateConfigForm/types.js.map +1 -0
  139. package/dist/elements/public/TemplateForm/TemplateForm.d.ts +23 -1
  140. package/dist/elements/public/TemplateForm/TemplateForm.js +102 -58
  141. package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -1
  142. package/dist/elements/public/TemplateForm/types.d.ts +14 -0
  143. package/dist/elements/public/TemplateForm/types.js.map +1 -1
  144. package/dist/elements/public/index.d.ts +2 -0
  145. package/dist/elements/public/index.defined.d.ts +2 -0
  146. package/dist/elements/public/index.defined.js +2 -0
  147. package/dist/elements/public/index.defined.js.map +1 -1
  148. package/dist/elements/public/index.js +2 -0
  149. package/dist/elements/public/index.js.map +1 -1
  150. package/dist/mixins/themeable.js +125 -16
  151. package/dist/mixins/themeable.js.map +1 -1
  152. package/package.json +2 -7
  153. package/dist/cdn/shared-35502e88.js +0 -1
  154. package/dist/cdn/shared-50744508.js +0 -15
  155. package/dist/cdn/shared-5388f705.js +0 -1
  156. package/dist/cdn/shared-7f588649.js +0 -1
  157. package/dist/cdn/shared-9467cb31.js +0 -572
  158. package/dist/cdn/shared-b98f88c9.js +0 -369
  159. package/dist/cdn/shared-c0161e6a.js +0 -1
  160. package/dist/cdn/shared-dbcffd8e.js +0 -1
  161. package/dist/cdn/shared-e057788f.js +0 -1
  162. package/dist/cdn/shared-e21a2aac.js +0 -1
  163. package/dist/cdn/shared-ebbef842.js +0 -1
  164. package/dist/cdn/shared-fd5b81be.js +0 -1
@@ -8,7 +8,7 @@ export const ThemeableMixin = (BaseElement) => {
8
8
  const originalCSS = super.styles;
9
9
  return [
10
10
  ...(originalCSS ? (Array.isArray(originalCSS) ? originalCSS : [originalCSS]) : []),
11
- css `/*! tailwindcss v2.2.4 | MIT License | https://tailwindcss.com */
11
+ css `/*! tailwindcss v2.2.19 | MIT License | https://tailwindcss.com */
12
12
 
13
13
  /*! modern-normalize v1.1.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
14
14
 
@@ -111,6 +111,11 @@ button,
111
111
  -webkit-appearance:button;
112
112
  }
113
113
 
114
+ ::-moz-focus-inner{
115
+ border-style:none;
116
+ padding:0;
117
+ }
118
+
114
119
  legend{
115
120
  padding:0;
116
121
  }
@@ -119,11 +124,25 @@ progress{
119
124
  vertical-align:baseline;
120
125
  }
121
126
 
127
+ ::-webkit-inner-spin-button,
128
+ ::-webkit-outer-spin-button{
129
+ height:auto;
130
+ }
131
+
122
132
  [type='search']{
123
133
  -webkit-appearance:textfield;
124
134
  outline-offset:-2px;
125
135
  }
126
136
 
137
+ ::-webkit-search-decoration{
138
+ -webkit-appearance:none;
139
+ }
140
+
141
+ ::-webkit-file-upload-button{
142
+ -webkit-appearance:button;
143
+ font:inherit;
144
+ }
145
+
127
146
  summary{
128
147
  display:list-item;
129
148
  }
@@ -257,6 +276,10 @@ video{
257
276
  height:auto;
258
277
  }
259
278
 
279
+ [hidden]{
280
+ display:none;
281
+ }
282
+
260
283
  *, ::before, ::after {
261
284
  border-color: currentColor;
262
285
  }
@@ -475,6 +498,11 @@ input::-webkit-date-and-time-value{
475
498
  margin-right: var(--lumo-space-xs, 0.25rem);
476
499
  }
477
500
 
501
+ .mx-s {
502
+ margin-left: var(--lumo-space-s, 0.5rem);
503
+ margin-right: var(--lumo-space-s, 0.5rem);
504
+ }
505
+
478
506
  .mx-m {
479
507
  margin-left: var(--lumo-space-m, 1rem);
480
508
  margin-right: var(--lumo-space-m, 1rem);
@@ -490,6 +518,11 @@ input::-webkit-date-and-time-value{
490
518
  margin-right: calc(var(--lumo-space-s, 0.5rem) * -1);
491
519
  }
492
520
 
521
+ .my-auto {
522
+ margin-top: auto;
523
+ margin-bottom: auto;
524
+ }
525
+
493
526
  .my-xs {
494
527
  margin-top: var(--lumo-space-xs, 0.25rem);
495
528
  margin-bottom: var(--lumo-space-xs, 0.25rem);
@@ -591,6 +624,10 @@ input::-webkit-date-and-time-value{
591
624
  margin-bottom: calc(var(--lumo-space-xs, 0.25rem) * -1);
592
625
  }
593
626
 
627
+ .-mb-s {
628
+ margin-bottom: calc(var(--lumo-space-s, 0.5rem) * -1);
629
+ }
630
+
594
631
  .ml-auto {
595
632
  margin-left: auto;
596
633
  }
@@ -679,6 +716,10 @@ input::-webkit-date-and-time-value{
679
716
  display: table-cell;
680
717
  }
681
718
 
719
+ :host([md]) .md-block {
720
+ display: block;
721
+ }
722
+
682
723
  :host([md]) .md-flex {
683
724
  display: flex;
684
725
  }
@@ -743,6 +784,10 @@ input::-webkit-date-and-time-value{
743
784
  width: var(--lumo-size-xxs, 1.5rem);
744
785
  }
745
786
 
787
+ .w-xs {
788
+ width: var(--lumo-size-xs, 1.625rem);
789
+ }
790
+
746
791
  .w-s {
747
792
  width: var(--lumo-size-s, 1.875rem);
748
793
  }
@@ -819,17 +864,6 @@ input::-webkit-date-and-time-value{
819
864
  table-layout: fixed;
820
865
  }
821
866
 
822
- .transform {
823
- --tw-translate-x: 0;
824
- --tw-translate-y: 0;
825
- --tw-rotate: 0;
826
- --tw-skew-x: 0;
827
- --tw-skew-y: 0;
828
- --tw-scale-x: 1;
829
- --tw-scale-y: 1;
830
- transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
831
- }
832
-
833
867
  .origin-top-right {
834
868
  transform-origin: top right;
835
869
  }
@@ -854,6 +888,17 @@ input::-webkit-date-and-time-value{
854
888
  transform-origin: center;
855
889
  }
856
890
 
891
+ .transform {
892
+ --tw-translate-x: 0;
893
+ --tw-translate-y: 0;
894
+ --tw-rotate: 0;
895
+ --tw-skew-x: 0;
896
+ --tw-skew-y: 0;
897
+ --tw-scale-x: 1;
898
+ --tw-scale-y: 1;
899
+ transform: translateX(var(--tw-translate-x)) translateY(var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
900
+ }
901
+
857
902
  .translate-x-0 {
858
903
  --tw-translate-x: 0;
859
904
  }
@@ -1006,6 +1051,10 @@ input::-webkit-date-and-time-value{
1006
1051
  grid-template-columns: repeat(2, minmax(0, 1fr));
1007
1052
  }
1008
1053
 
1054
+ :host([md]) .md-grid-cols-2 {
1055
+ grid-template-columns: repeat(2, minmax(0, 1fr));
1056
+ }
1057
+
1009
1058
  .grid-rows-2 {
1010
1059
  grid-template-rows: repeat(2, minmax(0, 1fr));
1011
1060
  }
@@ -1243,6 +1292,10 @@ input::-webkit-date-and-time-value{
1243
1292
  border-color: var(--lumo-contrast-20pct, hsla(214, 53%, 23%, 0.16));
1244
1293
  }
1245
1294
 
1295
+ .border-contrast-30 {
1296
+ border-color: var(--lumo-contrast-30pct, hsla(214, 50%, 22%, 0.26));
1297
+ }
1298
+
1246
1299
  .border-contrast-50 {
1247
1300
  border-color: var(--lumo-contrast-50pct, hsla(214, 45%, 20%, 0.5));
1248
1301
  }
@@ -1263,14 +1316,26 @@ input::-webkit-date-and-time-value{
1263
1316
  border-color: var(--lumo-contrast-10pct, hsla(214, 57%, 24%, 0.1));
1264
1317
  }
1265
1318
 
1319
+ .focus-within-border-primary-50:focus-within {
1320
+ border-color: var(--lumo-primary-color-50pct, hsla(214, 90%, 52%, 0.5));
1321
+ }
1322
+
1266
1323
  @media (hover: hover) {
1267
1324
  .hover-border-contrast-30:hover {
1268
1325
  border-color: var(--lumo-contrast-30pct, hsla(214, 50%, 22%, 0.26));
1269
1326
  }
1270
1327
 
1328
+ .hover-border-contrast-40:hover {
1329
+ border-color: var(--lumo-contrast-40pct, hsla(214, 47%, 21%, 0.38));
1330
+ }
1331
+
1271
1332
  .hover-border-primary-10:hover {
1272
1333
  border-color: var(--lumo-primary-color-10pct, hsla(214, 90%, 52%, 0.1));
1273
1334
  }
1335
+
1336
+ .hover-border-primary:hover {
1337
+ border-color: var(--lumo-primary-color, hsl(214, 90%, 52%));
1338
+ }
1274
1339
  }
1275
1340
 
1276
1341
  .focus-border-primary:focus {
@@ -1305,6 +1370,10 @@ input::-webkit-date-and-time-value{
1305
1370
  background-color: var(--lumo-contrast-20pct, hsla(214, 53%, 23%, 0.16));
1306
1371
  }
1307
1372
 
1373
+ .bg-contrast-70 {
1374
+ background-color: var(--lumo-contrast-70pct, hsla(214, 42%, 18%, 0.72));
1375
+ }
1376
+
1308
1377
  .bg-contrast {
1309
1378
  background-color: var(--lumo-contrast, hsl(214, 35%, 15%));
1310
1379
  }
@@ -1359,6 +1428,14 @@ input::-webkit-date-and-time-value{
1359
1428
  .hover-bg-primary-10:hover {
1360
1429
  background-color: var(--lumo-primary-color-10pct, hsla(214, 90%, 52%, 0.1));
1361
1430
  }
1431
+
1432
+ .hover-bg-error-10:hover {
1433
+ background-color: var(--lumo-error-color-10pct, hsla(3, 100%, 60%, 0.1));
1434
+ }
1435
+
1436
+ .hover-bg-success:hover {
1437
+ background-color: var(--lumo-success-color, hsl(145, 80%, 42%));
1438
+ }
1362
1439
  }
1363
1440
 
1364
1441
  .fill-current {
@@ -1434,6 +1511,10 @@ input::-webkit-date-and-time-value{
1434
1511
  padding-top: var(--lumo-space-m, 1rem);
1435
1512
  }
1436
1513
 
1514
+ .pr-xs {
1515
+ padding-right: var(--lumo-space-xs, 0.25rem);
1516
+ }
1517
+
1437
1518
  .pr-m {
1438
1519
  padding-right: var(--lumo-space-m, 1rem);
1439
1520
  }
@@ -1594,14 +1675,14 @@ input::-webkit-date-and-time-value{
1594
1675
  color: var(--lumo-tint, #fff);
1595
1676
  }
1596
1677
 
1597
- .text-contrast-20 {
1598
- color: var(--lumo-contrast-20pct, hsla(214, 53%, 23%, 0.16));
1599
- }
1600
-
1601
1678
  .text-contrast-30 {
1602
1679
  color: var(--lumo-contrast-30pct, hsla(214, 50%, 22%, 0.26));
1603
1680
  }
1604
1681
 
1682
+ .text-contrast-70 {
1683
+ color: var(--lumo-contrast-70pct, hsla(214, 42%, 18%, 0.72));
1684
+ }
1685
+
1605
1686
  .text-contrast {
1606
1687
  color: var(--lumo-contrast, hsl(214, 35%, 15%));
1607
1688
  }
@@ -1655,6 +1736,10 @@ input::-webkit-date-and-time-value{
1655
1736
  color: var(--lumo-error-text-color, hsl(3, 92%, 53%));
1656
1737
  }
1657
1738
 
1739
+ .hover-text-success-contrast:hover {
1740
+ color: var(--lumo-success-contrast-color, #fff);
1741
+ }
1742
+
1658
1743
  .hover-text-body:hover {
1659
1744
  color: var(--lumo-body-text-color, hsla(214, 40%, 16%, 0.94));
1660
1745
  }
@@ -1779,6 +1864,12 @@ input::-webkit-date-and-time-value{
1779
1864
  --tw-ring-shadow: 0 0 #0000;
1780
1865
  }
1781
1866
 
1867
+ .focus-within-ring-1:focus-within {
1868
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
1869
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
1870
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
1871
+ }
1872
+
1782
1873
  .focus-within-ring-2:focus-within {
1783
1874
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
1784
1875
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
@@ -1791,6 +1882,10 @@ input::-webkit-date-and-time-value{
1791
1882
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
1792
1883
  }
1793
1884
 
1885
+ .ring-inset {
1886
+ --tw-ring-inset: inset;
1887
+ }
1888
+
1794
1889
  .focus-ring-inset:focus {
1795
1890
  --tw-ring-inset: inset;
1796
1891
  }
@@ -1799,6 +1894,14 @@ input::-webkit-date-and-time-value{
1799
1894
  --tw-ring-color: var(--lumo-primary-color-50pct, hsla(214, 90%, 52%, 0.5));
1800
1895
  }
1801
1896
 
1897
+ .ring-error-50 {
1898
+ --tw-ring-color: var(--lumo-error-color-50pct, hsla(3, 100%, 60%, 0.5));
1899
+ }
1900
+
1901
+ .ring-success-50 {
1902
+ --tw-ring-color: var(--lumo-success-color-50pct, hsla(145, 76%, 44%, 0.55));
1903
+ }
1904
+
1802
1905
  .focus-within-ring-primary-50:focus-within {
1803
1906
  --tw-ring-color: var(--lumo-primary-color-50pct, hsla(214, 90%, 52%, 0.5));
1804
1907
  }
@@ -1877,6 +1980,12 @@ input::-webkit-date-and-time-value{
1877
1980
  transition-duration: 150ms;
1878
1981
  }
1879
1982
 
1983
+ .transition-transform {
1984
+ transition-property: transform;
1985
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
1986
+ transition-duration: 150ms;
1987
+ }
1988
+
1880
1989
  .duration-100 {
1881
1990
  transition-duration: 100ms;
1882
1991
  }
@@ -1 +1 @@
1
- {"version":3,"file":"themeable.js","sourceRoot":"","sources":["../../src/mixins/themeable.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,OAAO,EAA0C,UAAU,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,wBAAqB;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAI/D,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,WAAkB,EACkB,EAAE;IACtC,OAAO,MAAM,gBAAiB,SAAQ,WAAW;QAC/C,MAAM,KAAK,MAAM;YACf,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;YAEjC,OAAO;gBACL,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAClF,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAqHF;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,OAAgB,SAAU,SAAQ,mBAAmB,CACzD,eAAe,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAC5C;CAAG","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\nimport { CSSResult, CSSResultArray, Constructor, LitElement, css } from 'lit-element';\n\nimport { ResponsiveMixin } from './responsive';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements';\n\ntype Base = Constructor<LitElement> & { styles?: CSSResult | CSSResultArray | CSSStyleSheet };\n\nexport const ThemeableMixin = <TBase extends Base>(\n BaseElement: TBase\n): TBase & { styles: CSSResultArray } => {\n return class ThemeableElement extends BaseElement {\n static get styles(): CSSResultArray {\n const originalCSS = super.styles;\n\n return [\n ...(originalCSS ? (Array.isArray(originalCSS) ? originalCSS : [originalCSS]) : []),\n css`\n @tailwind base;\n\n * {\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n :host {\n display: block;\n }\n\n details > summary::-webkit-details-marker {\n display: none;\n }\n\n details > summary {\n list-style: none;\n }\n\n vaadin-select {\n margin-top: -4px;\n margin-bottom: -4px;\n }\n\n vaadin-text-area,\n vaadin-text-field,\n vaadin-date-picker,\n vaadin-email-field,\n vaadin-number-field,\n vaadin-custom-field,\n vaadin-integer-field,\n vaadin-password-field,\n vaadin-combo-box::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-date-picker::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-button {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(label) {\n margin: 0.1875em var(--lumo-space-m);\n }\n\n .appearance-none {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n }\n\n .appearance-none::-webkit-calendar-picker-indicator,\n .appearance-none::-webkit-outer-spin-button,\n .appearance-none::-webkit-inner-spin-button,\n .appearance-none::-webkit-list-button {\n opacity: 0 !important;\n width: 0 !important;\n margin: 0 !important;\n padding: 0 !important;\n }\n\n input::-webkit-date-and-time-value {\n text-align: inherit !important;\n }\n\n @tailwind components;\n\n @tailwind utilities;\n\n @layer utilities {\n .border-radius-overflow-fix {\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n }\n\n @variants sm, md, lg, xl {\n .grid-rows-auto {\n grid-auto-rows: 1fr;\n }\n\n .icon-inline {\n --iron-icon-height: 1em;\n --iron-icon-width: 1em;\n }\n\n .bg-blurred {\n backdrop-filter: blur(25px);\n background: var(--lumo-tint-80pct);\n }\n\n .max-w-modal {\n max-width: 28rem;\n }\n\n .w-narrow-modal {\n width: 18rem;\n }\n\n .snap-x-mandatory {\n scroll-snap-type: x mandatory;\n }\n\n .snap-start {\n scroll-snap-align: start;\n }\n }\n }\n `,\n ];\n }\n };\n};\n\n/**\n * One of the base classes for each rel-specific element in the collection\n * providing shared TailwindCSS styles for Shadow DOM content.\n * This class MUST NOT be used on its own (hence the `abstract` keyword) or\n * referenced externally (outside of the package).\n *\n * @deprecated\n */\nexport abstract class Themeable extends ScopedElementsMixin(\n ResponsiveMixin(ThemeableMixin(LitElement))\n) {}\n"]}
1
+ {"version":3,"file":"themeable.js","sourceRoot":"","sources":["../../src/mixins/themeable.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,OAAO,EAA0C,UAAU,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,wBAAqB;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAI/D,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,WAAkB,EACkB,EAAE;IACtC,OAAO,MAAM,gBAAiB,SAAQ,WAAW;QAC/C,MAAM,KAAK,MAAM;YACf,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;YAEjC,OAAO;gBACL,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAClF,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAqHF;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,OAAgB,SAAU,SAAQ,mBAAmB,CACzD,eAAe,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAC5C;CAAG","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\nimport { CSSResult, CSSResultArray, Constructor, LitElement, css } from 'lit-element';\n\nimport { ResponsiveMixin } from './responsive';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements';\n\ntype Base = Constructor<LitElement> & { styles?: CSSResult | CSSResultArray | CSSStyleSheet };\n\nexport const ThemeableMixin = <TBase extends Base>(\n BaseElement: TBase\n): TBase & { styles: CSSResultArray } => {\n return class ThemeableElement extends BaseElement {\n static get styles(): CSSResultArray {\n const originalCSS = super.styles;\n\n return [\n ...(originalCSS ? (Array.isArray(originalCSS) ? originalCSS : [originalCSS]) : []),\n css`\n @tailwind base;\n\n * {\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n :host {\n display: block;\n }\n\n details > summary::-webkit-details-marker {\n display: none;\n }\n\n details > summary {\n list-style: none;\n }\n\n vaadin-select {\n margin-top: -4px;\n margin-bottom: -4px;\n }\n\n vaadin-text-area,\n vaadin-text-field,\n vaadin-date-picker,\n vaadin-email-field,\n vaadin-number-field,\n vaadin-custom-field,\n vaadin-integer-field,\n vaadin-password-field,\n vaadin-combo-box::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-date-picker::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-button {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(label) {\n margin: 0.1875em var(--lumo-space-m);\n }\n\n .appearance-none {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n }\n\n .appearance-none::-webkit-calendar-picker-indicator,\n .appearance-none::-webkit-outer-spin-button,\n .appearance-none::-webkit-inner-spin-button,\n .appearance-none::-webkit-list-button {\n opacity: 0 !important;\n width: 0 !important;\n margin: 0 !important;\n padding: 0 !important;\n }\n\n input::-webkit-date-and-time-value {\n text-align: inherit !important;\n }\n\n @tailwind components;\n\n @tailwind utilities;\n\n @layer utilities {\n .border-radius-overflow-fix {\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n }\n\n @variants sm, md, lg, xl {\n .grid-rows-auto {\n grid-auto-rows: 1fr;\n }\n\n .icon-inline {\n --iron-icon-height: 1em;\n --iron-icon-width: 1em;\n }\n\n .bg-blurred {\n backdrop-filter: blur(25px);\n background: var(--lumo-tint-80pct);\n }\n\n .max-w-modal {\n max-width: 28rem;\n }\n\n .w-narrow-modal {\n width: 18rem;\n }\n\n .snap-x-mandatory {\n scroll-snap-type: x mandatory;\n }\n\n .snap-start {\n scroll-snap-align: start;\n }\n }\n }\n `,\n ];\n }\n };\n};\n\n/**\n * One of the base classes for each rel-specific element in the collection\n * providing shared TailwindCSS styles for Shadow DOM content.\n * This class MUST NOT be used on its own (hence the `abstract` keyword) or\n * referenced externally (outside of the package).\n *\n * @deprecated\n */\nexport abstract class Themeable extends ScopedElementsMixin(\n ResponsiveMixin(ThemeableMixin(LitElement))\n) {}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@foxy.io/elements",
3
3
  "type": "module",
4
- "version": "1.14.0-beta.1",
4
+ "version": "1.14.0-beta.10",
5
5
  "description": "E-commerce web components by Foxy.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -23,7 +23,6 @@
23
23
  "format:prettier": "prettier \"**/*.js\" \"**/*.ts\" --write --ignore-path .gitignore",
24
24
  "test": "wtr src/**/*.test.ts",
25
25
  "test:watch": "wtr src/**/*.test.ts --watch",
26
- "test:playwright": "wtr src/**/*.test.ts --playwright --browsers chromium firefox webkit",
27
26
  "prepack": "npm run lint && rimraf dist && node ./.build/compile-for-npm.js && rollup -c"
28
27
  },
29
28
  "dependencies": {
@@ -35,19 +34,16 @@
35
34
  "@vaadin/vaadin": "^15.0.6",
36
35
  "cookie-storage": "^6.1.0",
37
36
  "dedent": "^0.7.0",
38
- "dexie": "^3.0.3",
39
37
  "email-validator": "^2.0.4",
40
- "halson": "^3.0.0",
41
38
  "i18next": "^19.7.0",
42
39
  "i18next-http-backend": "^1.0.18",
43
- "indexeddb-export-import": "^2.1.2",
44
40
  "jsonata": "^1.8.3",
45
41
  "lit-element": "^2.4.0",
46
42
  "lodash-es": "^4.17.15",
47
43
  "service-worker-router": "^1.7.5",
48
44
  "traverse": "^0.6.6",
49
45
  "webcomponent-qr-code": "^1.0.5",
50
- "xstate": "^4.16.2"
46
+ "xstate": "^4.16.0"
51
47
  },
52
48
  "devDependencies": {
53
49
  "@babel/core": "^7.11.6",
@@ -74,7 +70,6 @@
74
70
  "@web/dev-server-rollup": "^0.3.4",
75
71
  "@web/dev-server-storybook": "^0.3.5",
76
72
  "@web/test-runner": "^0.12.14",
77
- "@web/test-runner-playwright": "^0.8.6",
78
73
  "@xstate/test": "^0.4.1",
79
74
  "@zoltu/typescript-transformer-append-js-extension": "^1.0.1",
80
75
  "autoprefixer": "^10.2.5",
@@ -1 +0,0 @@
1
- import"./shared-3ae39e52.js";import"./shared-b98f88c9.js";import"./shared-566252ac.js";import"./foxy-spinner.js";import"./foxy-i18n.js";import{C as e}from"./shared-e057788f.js";import"./shared-9467cb31.js";import"./shared-7f588649.js";import{s as t,h as s}from"./shared-17968c53.js";import{S as i,T as r,a}from"./shared-5388f705.js";import"./shared-54c485d2.js";import{b as n}from"./shared-50744508.js";import{G as l}from"./shared-5d286626.js";import"./shared-45d647e4.js";import"./shared-e0248713.js";import{c as o}from"./shared-4e709717.js";import{C as d}from"./shared-f0199313.js";import{N as h}from"./shared-cf248335.js";import{i as m}from"./shared-98ee7fad.js";import{v as c}from"./shared-b738ee96.js";let C,f,p,g,u=e=>e;const y=[{property:"is_merchant",icon:t(C||(C=u`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.8961 8.89L21.7932 4.52C21.5622 3.62 20.7429 3 19.7871 3H5.1979C4.25259 3 3.42283 3.63 3.20225 4.52L2.0994 8.89C1.84732 9.91 2.07839 10.95 2.75061 11.77C2.83464 11.88 2.95017 11.96 3.0447 12.06V19C3.0447 20.1 3.99001 21 5.14538 21H19.8501C21.0055 21 21.9508 20.1 21.9508 19V12.06C22.0453 11.97 22.1609 11.88 22.2449 11.78C22.9171 10.96 23.1587 9.91 22.8961 8.89ZM19.7556 4.99L20.8584 9.36C20.9635 9.78 20.8689 10.2 20.5958 10.53C20.4488 10.71 20.1337 11 19.6085 11C18.9678 11 18.4111 10.51 18.3376 9.86L17.7284 5L19.7556 4.99ZM13.5481 5H15.6067L16.1739 9.52C16.2264 9.91 16.1004 10.3 15.8273 10.59C15.5962 10.85 15.2601 11 14.8295 11C14.1258 11 13.5481 10.41 13.5481 9.69V5ZM8.81106 9.52L9.38874 5H11.4474V9.69C11.4474 10.41 10.8697 11 10.0925 11C9.73536 11 9.40975 10.85 9.15767 10.59C8.89509 10.3 8.76905 9.91 8.81106 9.52ZM4.13705 9.36L5.1979 5H7.26706L6.65787 9.86C6.57384 10.51 6.02766 11 5.38696 11C4.87229 11 4.54669 10.71 4.41014 10.53C4.12655 10.21 4.03202 9.78 4.13705 9.36ZM5.14538 19V12.97C5.22941 12.98 5.30293 13 5.38696 13C6.30075 13 7.13052 12.64 7.73971 12.05C8.36992 12.65 9.21019 13 10.166 13C11.0798 13 11.8991 12.64 12.5082 12.07C13.1279 12.64 13.9682 13 14.9135 13C15.7958 13 16.6361 12.65 17.2663 12.05C17.8755 12.64 18.7052 13 19.619 13C19.7031 13 19.7766 12.98 19.8606 12.97V19H5.14538Z" /></svg>`)),key:"merchant"},{property:"is_programmer",icon:t(f||(f=u`<svg class="fill-current h-full w-full" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 3C0 1.34315 1.34315 0 3 0H17C18.6569 0 20 1.34315 20 3V15C20 16.6569 18.6569 18 17 18H3C1.34315 18 0 16.6569 0 15V3ZM3 2C2.44772 2 2 2.44772 2 3V15C2 15.5523 2.44772 16 3 16H17C17.5523 16 18 15.5523 18 15V3C18 2.44772 17.5523 2 17 2H3ZM4.29289 4.29289C4.68342 3.90237 5.31658 3.90237 5.70711 4.29289L9.70711 8.29289C9.89464 8.48043 10 8.73478 10 9C10 9.26522 9.89464 9.51957 9.70711 9.70711L5.70711 13.7071C5.31658 14.0976 4.68342 14.0976 4.29289 13.7071C3.90237 13.3166 3.90237 12.6834 4.29289 12.2929L7.58579 9L4.29289 5.70711C3.90237 5.31658 3.90237 4.68342 4.29289 4.29289ZM9 13C9 12.4477 9.44771 12 10 12H15C15.5523 12 16 12.4477 16 13C16 13.5523 15.5523 14 15 14H10C9.44771 14 9 13.5523 9 13Z"/></svg>`)),key:"backend_developer"},{property:"is_front_end_developer",icon:t(p||(p=u`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.2747 4.03847C14.8058 4.1902 15.1132 4.74368 14.9615 5.27472L10.9615 19.2747C10.8098 19.8058 10.2563 20.1132 9.72528 19.9615C9.19424 19.8098 8.88675 19.2563 9.03848 18.7253L13.0385 4.72528C13.1902 4.19424 13.7437 3.88675 14.2747 4.03847ZM6.70711 7.29289C7.09763 7.68342 7.09763 8.31658 6.70711 8.7071L3.41421 12L6.70711 15.2929C7.09763 15.6834 7.09763 16.3166 6.70711 16.7071C6.31658 17.0976 5.68342 17.0976 5.29289 16.7071L1.29289 12.7071C0.902369 12.3166 0.902369 11.6834 1.29289 11.2929L5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.70711 7.29289ZM17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289L22.7071 11.2929C22.8946 11.4804 23 11.7348 23 12C23 12.2652 22.8946 12.5196 22.7071 12.7071L18.7071 16.7071C18.3166 17.0976 17.6834 17.0976 17.2929 16.7071C16.9024 16.3166 16.9024 15.6834 17.2929 15.2929L20.5858 12L17.2929 8.70711C16.9024 8.31658 16.9024 7.68342 17.2929 7.29289Z" /></svg>`)),key:"frontend_developer"},{property:"is_designer",icon:t(g||(g=u`<svg class="fill-current h-full w-full" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 20C4.49 20 0 15.51 0 10C0 4.49 4.49 0 10 0C15.51 0 20 4.04 20 9C20 12.31 17.31 15 14 15H12.23C11.95 15 11.73 15.22 11.73 15.5C11.73 15.62 11.78 15.73 11.86 15.83C12.27 16.3 12.5 16.89 12.5 17.5C12.5 18.88 11.38 20 10 20ZM10 2C5.59 2 2 5.59 2 10C2 14.41 5.59 18 10 18C10.28 18 10.5 17.78 10.5 17.5C10.5 17.34 10.42 17.22 10.36 17.15C9.95 16.69 9.73 16.1 9.73 15.5C9.73 14.12 10.85 13 12.23 13H14C16.21 13 18 11.21 18 9C18 5.14 14.41 2 10 2Z" /><path d="M4.5 11C5.32843 11 6 10.3284 6 9.5C6 8.67157 5.32843 8 4.5 8C3.67157 8 3 8.67157 3 9.5C3 10.3284 3.67157 11 4.5 11Z" /><path d="M7.5 7C8.32843 7 9 6.32843 9 5.5C9 4.67157 8.32843 4 7.5 4C6.67157 4 6 4.67157 6 5.5C6 6.32843 6.67157 7 7.5 7Z" /><path d="M12.5 7C13.3284 7 14 6.32843 14 5.5C14 4.67157 13.3284 4 12.5 4C11.6716 4 11 4.67157 11 5.5C11 6.32843 11.6716 7 12.5 7Z" /><path d="M15.5 11C16.3284 11 17 10.3284 17 9.5C17 8.67157 16.3284 8 15.5 8C14.6716 8 14 8.67157 14 9.5C14 10.3284 14.6716 11 15.5 11Z" /></svg>`)),key:"designer"}];let v,x,_,$=e=>e;const w=i(r(d(a(h,"user-form"))));class b extends w{constructor(){super(...arguments),this.__getValidator=n((e=>()=>!this.errors.some((t=>t.startsWith(e))))),this.__bindField=n((e=>t=>{const s=t.target;this.edit({[e]:s.value})}))}static get scopedElements(){return{"foxy-internal-confirm-dialog":customElements.get("foxy-internal-confirm-dialog"),"vaadin-text-field":customElements.get("vaadin-text-field"),"vaadin-button":customElements.get("vaadin-button"),"foxy-spinner":customElements.get("foxy-spinner"),"x-checkbox":e,"foxy-i18n":customElements.get("foxy-i18n"),"x-group":l}}static get v8n(){return[({first_name:e})=>!e||e.length<=50||"first_name_too_long",({last_name:e})=>!e||e.length<=50||"last_name_too_long",({email:e})=>e&&e.length>0||"email_required",({email:e})=>e&&e.length<=100||"email_too_long",({email:e})=>e&&c(e)||"email_invalid_email",({phone:e})=>!e||e.length<=50||"phone_too_long"]}render(){const e=this.in({idle:{template:{dirty:"valid"}}}),t=this.in({idle:{snapshot:{dirty:"valid"}}}),i=e||t,r=this.in("busy"),a=this.in("fail"),n=r||a||this.disabled;return s(v||(v=$` <foxy-internal-confirm-dialog data-testid="confirm" message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="space-y-l relative"> <div class="grid grid-cols-1 sm-grid-cols-2 gap-m"> ${0} </div> <x-group frame> ${0} </x-group> <vaadin-button data-testid="action" theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> </vaadin-button> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="${0}" lang="${0}" ns="${0}"> </foxy-spinner> </div> </div> `),this.lang,this.ns,this.__handleConfirmHide,this.in("busy"),["first_name","last_name","email","phone"].map((e=>s(x||(x=$` <vaadin-text-field error-message="${0}" data-testid="${0}" ?disabled="${0}" ?readonly="${0}" class="w-full" label="${0}" value="${0}" .checkValidity="${0}" @input="${0}" @keydown="${0}"> </vaadin-text-field> `),this.__getErrorMessage(e),e,n,this.readonly,this.t(e),m(this.form[e]),this.__getValidator(e),this.__bindField(e),this.__handleKeyDown))),y.map(((e,t)=>s(_||(_=$` <hr class="${0}" style="margin-left:calc((var(--lumo-space-m) * 2) + 1.125rem)"> <x-checkbox class="w-full p-m" ?readonly="${0}" ?disabled="${0}" ?checked="${0}" @change="${0}"> <div class="flex items-start leading-s"> <div class="flex-1 flex flex-col"> <foxy-i18n key="${0}" lang="${0}" ns="${0}"></foxy-i18n> <foxy-i18n class="text-s text-secondary" lang="${0}" key="${0}_explainer" ns="${0}"> </foxy-i18n> </div> <div class="mt-xs" style="width:1.125rem;height:1.125rem">${0}</div> </div> </x-checkbox> `),t>0?"border-contrast-10":"hidden",this.readonly,n,this.form[e.property],(t=>{const s=t.target;this.edit({[e.property]:s.checked})}),e.key,this.lang,this.ns,this.lang,e.key,this.ns,e.icon))),this.in("idle")?"primary "+(this.href?"error":"success"):"",this.in({idle:"template"})&&!i||n,this.__handleActionClick,this.lang,this.href?"delete":"create",this.ns,o({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!r&&!a}),a?"error":r?"busy":"empty",this.lang,this.ns)}__getErrorMessage(e){const t=this.errors.find((t=>t.startsWith(e)));return t?this.t(t.replace(e,"v8n")):""}__handleActionClick(e){if(this.in({idle:"snapshot"})){this.renderRoot.querySelector("#confirm").show(e.currentTarget)}else this.submit()}__handleConfirmHide(e){e.detail.cancelled||this.delete()}__handleKeyDown(e){"Enter"===e.key&&this.submit()}}customElements.define("foxy-user-form",b);export{b as U,y as r};
@@ -1,15 +0,0 @@
1
- import{S as t,i as e,e as n,l as r,r as i,n as o,o as a,c as s,a as c,g as u,d as l}from"./shared-17968c53.js";class f extends Event{constructor(t,e){super(t,e),this.request=e.request,this.__reject=e.reject,this.__resolve=e.resolve}respondWith(t){this.preventDefault(),this.stopImmediatePropagation(),t.then(this.__resolve).catch(this.__reject)}}
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var h=function(){return(h=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function p(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function d(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function y(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t}var g={};function _(t){return Object.keys(t)}function b(t,e,n){void 0===n&&(n=".");var r=j(t,n),i=j(e,n);return $(i)?!!$(r)&&i===r:$(r)?r in i:_(r).every((function(t){return t in i&&b(r[t],i[t])}))}function m(t){try{return $(t)||"number"==typeof t?""+t:t.type}catch(t){throw new Error("Events must be strings or objects with a string event.type property.")}}function w(t,e){try{return C(t)?t:t.toString().split(e)}catch(e){throw new Error("'"+t+"' is not a valid state path.")}}function j(t,e){return"object"==typeof(n=t)&&"value"in n&&"context"in n&&"event"in n&&"_event"in n?t.value:C(t)?S(t):"string"!=typeof t?t:S(w(t,e));var n}function S(t){if(1===t.length)return t[0];for(var e={},n=e,r=0;r<t.length-1;r++)r===t.length-2?n[t[r]]=t[r+1]:(n[t[r]]={},n=n[t[r]]);return e}function x(t,e){for(var n={},r=_(t),i=0;i<r.length;i++){var o=r[i];n[o]=e(t[o],o,t,i)}return n}function O(t,e,n){var r,i,o={};try{for(var a=d(_(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];n(u)&&(o[c]=e(u,c,t))}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}var E=function(t){return function(e){var n,r,i=e;try{for(var o=d(t),a=o.next();!a.done;a=o.next()){i=i[a.value]}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}};function k(t){return t?$(t)?[[t]]:A(_(t).map((function(e){var n=t[e];return"string"==typeof n||n&&Object.keys(n).length?k(t[e]).map((function(t){return[e].concat(t)})):[[e]]}))):[[]]}function A(t){var e;return(e=[]).concat.apply(e,y([],v(t)))}function P(t){return C(t)?t:[t]}function T(t){return void 0===t?[]:P(t)}function R(t,e,n){var r,i;if(F(t))return t(e,n.data);var o={};try{for(var a=d(Object.keys(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];F(u)?o[c]=u(e,n.data):o[c]=u}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return o}function N(t){return t instanceof Promise||!(null===t||!F(t)&&"object"!=typeof t||!F(t.then))}function D(t){return null!==t&&"object"==typeof t&&"transition"in t&&"function"==typeof t.transition}function I(t,e){var n,r,i=v([[],[]],2),o=i[0],a=i[1];try{for(var s=d(t),c=s.next();!c.done;c=s.next()){var u=c.value;e(u)?o.push(u):a.push(u)}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return[o,a]}function L(t,e){return x(t.states,(function(t,n){if(t){var r=($(e)?void 0:e[n])||(t?t.current:void 0);if(r)return{current:r,states:L(t,r)}}}))}function C(t){return Array.isArray(t)}function F(t){return"function"==typeof t}function $(t){return"string"==typeof t}function V(t,e){if(t)return $(t)?{type:"xstate.guard",name:t,predicate:e?e[t]:void 0}:F(t)?{type:"xstate.guard",name:t.name,predicate:t}:t}function M(t){try{return"subscribe"in t&&F(t.subscribe)}catch(t){return!1}}var U,z,W=function(){return"function"==typeof Symbol&&Symbol.observable||"@@observable"}();function B(t){try{return"__xstatenode"in t}catch(t){return!1}}function q(t){return!!t&&"function"==typeof t.send}function H(t,e){return $(t)||"number"==typeof t?h({type:t},e):t}function J(t,e){if(!$(t)&&"$$type"in t&&"scxml"===t.$$type)return t;var n=H(t);return h({name:n.type,data:n,$$type:"scxml",type:"external"},e)}function G(t,e){return P(e).map((function(e){return void 0===e||"string"==typeof e||B(e)?{target:e,event:t}:h(h({},e),{event:t})}))}function Z(t,e,n,r,i){var o=t.options.guards,a={state:i,cond:e,_event:r};if("xstate.guard"===e.type)return e.predicate(n,r.data,a);var s=o[e.type];if(!s)throw new Error("Guard '"+e.type+"' is not implemented on machine '"+t.id+"'.");return s(n,r.data,a)}function K(t){return"string"==typeof t?{type:t}:t}function Q(t,e,n){if("object"==typeof t)return t;var r=function(){};return{next:t,error:e||r,complete:n||r}}!function(t){t.Start="xstate.start",t.Stop="xstate.stop",t.Raise="xstate.raise",t.Send="xstate.send",t.Cancel="xstate.cancel",t.NullEvent="",t.Assign="xstate.assign",t.After="xstate.after",t.DoneState="done.state",t.DoneInvoke="done.invoke",t.Log="xstate.log",t.Init="xstate.init",t.Invoke="xstate.invoke",t.ErrorExecution="error.execution",t.ErrorCommunication="error.communication",t.ErrorPlatform="error.platform",t.ErrorCustom="xstate.error",t.Update="xstate.update",t.Pure="xstate.pure",t.Choose="xstate.choose"}(U||(U={})),function(t){t.Parent="#_parent",t.Internal="#_internal"}(z||(z={}));var X=U.Start,Y=U.Stop,tt=U.Raise,et=U.Send,nt=U.Cancel,rt=U.NullEvent,it=U.Assign;U.After,U.DoneState;var ot=U.Log,at=U.Init,st=U.Invoke;U.ErrorExecution;var ct=U.ErrorPlatform,ut=U.ErrorCustom,lt=U.Update,ft=U.Choose,ht=U.Pure,pt=J({type:at});function dt(t,e){return e&&e[t]||void 0}function vt(t,e){var n;if($(t)||"number"==typeof t){var r=dt(t,e);n=F(r)?{type:t,exec:r}:r||{type:t,exec:void 0}}else if(F(t))n={type:t.name||t.toString(),exec:t};else{if(F(r=dt(t.type,e)))n=h(h({},t),{exec:r});else if(r){var i=r.type||t.type;n=h(h(h({},r),t),{type:i})}else n=t}return Object.defineProperty(n,"toString",{value:function(){return n.type},enumerable:!1,configurable:!0}),n}var yt=function(t,e){return t?(C(t)?t:[t]).map((function(t){return vt(t,e)})):[]};function gt(t){var e=vt(t);return h(h({id:$(t)?t:e.id},e),{type:e.type})}function _t(t){return $(t)?{type:tt,event:t}:bt(t,{to:z.Internal})}function bt(t,e){return{to:e?e.to:void 0,type:et,event:F(t)?t:H(t),delay:e?e.delay:void 0,id:e&&void 0!==e.id?e.id:F(t)?t.name:m(t)}}function mt(t,e){return bt(t,h(h({},e),{to:z.Parent}))}function wt(){return mt(lt)}function jt(t,e){return bt(t,h(h({},e),{to:function(t,e,n){return n._event.origin}}))}var St=function(t,e){return{context:t,event:e}};function xt(t,e){return void 0===t&&(t=St),{type:ot,label:e,expr:t}}var Ot=function(t){return{type:nt,sendId:t}};function Et(t){var e=gt(t);return{type:U.Start,activity:e,exec:void 0}}function kt(t){var e=F(t)?t:gt(t);return{type:U.Stop,activity:e,exec:void 0}}var At=function(t){return{type:it,assignment:t}};function Pt(t,e){var n=e?"#"+e:"";return U.After+"("+t+")"+n}function Tt(t,e){var n=U.DoneState+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Rt(t,e){var n=U.DoneInvoke+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Nt(t,e){var n=U.ErrorPlatform+"."+t,r={type:n,data:e,toString:function(){return n}};return r}function Dt(t){return{type:U.Pure,get:t}}function It(t,e){return bt((function(t,e){return e}),h(h({},e),{to:t}))}function Lt(t,e){return mt((function(e,n,r){return{type:ut,data:F(t)?t(e,n,r):t}}),h(h({},e),{to:z.Parent}))}function Ct(t){return{type:U.Choose,conds:t}}function Ft(t,e,n,r,i){var o=v(I(i,(function(t){return t.type===it})),2),a=o[0],s=o[1],c=a.length?function(t,e,n,r){return t?n.reduce((function(t,n){var i,o,a=n.assignment,s={state:r,action:n,_event:e},c={};if(F(a))c=a(t,e.data,s);else try{for(var u=d(_(a)),l=u.next();!l.done;l=u.next()){var f=l.value,h=a[f];c[f]=F(h)?h(t,e.data,s):h}}catch(t){i={error:t}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}return Object.assign({},t,c)}),t):t}(n,r,a,e):n;return[A(s.map((function(n){var i;switch(n.type){case tt:return{type:tt,_event:J(n.event)};case et:return function(t,e,n,r){var i,o={_event:n},a=J(F(t.event)?t.event(e,n.data,o):t.event);if($(t.delay)){var s=r&&r[t.delay];i=F(s)?s(e,n.data,o):s}else i=F(t.delay)?t.delay(e,n.data,o):t.delay;var c=F(t.to)?t.to(e,n.data,o):t.to;return h(h({},t),{to:c,_event:a,event:a.data,delay:i})}(n,c,r,t.options.delays);case ot:return function(t,e,n){return h(h({},t),{value:$(t.expr)?t.expr:t.expr(e,n.data,{_event:n})})}(n,c,r);case ft:if(!(a=null===(i=n.conds.find((function(n){var i=V(n.cond,t.options.guards);return!i||Z(t,i,c,r,e)})))||void 0===i?void 0:i.actions))return[];var o=Ft(t,e,c,r,yt(T(a),t.options.actions));return c=o[1],o[0];case ht:var a;if(!(a=n.get(c,r.data)))return[];o=Ft(t,e,c,r,yt(T(a),t.options.actions));return c=o[1],o[0];case Y:return function(t,e,n){var r=F(t.activity)?t.activity(e,n.data):t.activity,i="string"==typeof r?{id:r}:r;return{type:U.Stop,activity:i}}(n,c,r);default:return vt(n,t.options.actions)}}))),c]}var $t=function(t){return"atomic"===t.type||"final"===t.type};function Vt(t){return _(t.states).map((function(e){return t.states[e]}))}function Mt(t){var e=[t];return $t(t)?e:e.concat(A(Vt(t).map(Mt)))}function Ut(t,e){var n,r,i,o,a,s,c,u,l=Wt(new Set(t)),f=new Set(e);try{for(var h=d(f),p=h.next();!p.done;p=h.next())for(var v=(x=p.value).parent;v&&!f.has(v);)f.add(v),v=v.parent}catch(t){n={error:t}}finally{try{p&&!p.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}var y=Wt(f);try{for(var g=d(f),_=g.next();!_.done;_=g.next()){if("compound"!==(x=_.value).type||y.get(x)&&y.get(x).length){if("parallel"===x.type)try{for(var b=(a=void 0,d(Vt(x))),m=b.next();!m.done;m=b.next()){var w=m.value;"history"!==w.type&&(f.has(w)||(f.add(w),l.get(w)?l.get(w).forEach((function(t){return f.add(t)})):w.initialStateNodes.forEach((function(t){return f.add(t)}))))}}catch(t){a={error:t}}finally{try{m&&!m.done&&(s=b.return)&&s.call(b)}finally{if(a)throw a.error}}}else l.get(x)?l.get(x).forEach((function(t){return f.add(t)})):x.initialStateNodes.forEach((function(t){return f.add(t)}))}}catch(t){i={error:t}}finally{try{_&&!_.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}try{for(var j=d(f),S=j.next();!S.done;S=j.next()){var x;for(v=(x=S.value).parent;v&&!f.has(v);)f.add(v),v=v.parent}}catch(t){c={error:t}}finally{try{S&&!S.done&&(u=j.return)&&u.call(j)}finally{if(c)throw c.error}}return f}function zt(t,e){var n=e.get(t);if(!n)return{};if("compound"===t.type){var r=n[0];if(!r)return{};if($t(r))return r.key}var i={};return n.forEach((function(t){i[t.key]=zt(t,e)})),i}function Wt(t){var e,n,r=new Map;try{for(var i=d(t),o=i.next();!o.done;o=i.next()){var a=o.value;r.has(a)||r.set(a,[]),a.parent&&(r.has(a.parent)||r.set(a.parent,[]),r.get(a.parent).push(a))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function Bt(t,e){return zt(t,Wt(Ut([t],e)))}function qt(t,e){return Array.isArray(t)?t.some((function(t){return t===e})):t instanceof Set&&t.has(e)}function Ht(t,e){return"compound"===e.type?Vt(e).some((function(e){return"final"===e.type&&qt(t,e)})):"parallel"===e.type&&Vt(e).every((function(e){return Ht(t,e)}))}function Jt(t,e){if(t===e)return!0;if(void 0===t||void 0===e)return!1;if($(t)||$(e))return t===e;var n=_(t),r=_(e);return n.length===r.length&&n.every((function(n){return Jt(t[n],e[n])}))}function Gt(t){return!$(t)&&("value"in t&&"history"in t)}function Zt(t,e){var n=t.exec;return h(h({},t),{exec:void 0!==n?function(){return n(e.context,e.event,{action:t,state:e,_event:e._event})}:void 0})}var Kt=function(){function t(t){var e,n,r=this;this.actions=[],this.activities=g,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||g,this.meta=(void 0===(n=t.configuration)&&(n=[]),n.reduce((function(t,e){return void 0!==e.meta&&(t[e.id]=e.meta),t}),{})),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=null!==(e=t.tags)&&void 0!==e?e:new Set,Object.defineProperty(this,"nextEvents",{get:function(){return function(t){return y([],v(new Set(A(y([],v(t.map((function(t){return t.ownEvents}))))))))}(r.configuration)}})}return t.from=function(e,n){return e instanceof t?e.context!==n?new t({value:e.value,context:n,_event:e._event,_sessionid:null,historyValue:e.historyValue,history:e.history,actions:[],activities:e.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):e:new t({value:e,context:n,_event:pt,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},t.create=function(e){return new t(e)},t.inert=function(e,n){if(e instanceof t){if(!e.actions.length)return e;var r=pt;return new t({value:e.value,context:n,_event:r,_sessionid:null,historyValue:e.historyValue,history:e.history,activities:e.activities,configuration:e.configuration,transitions:[],children:{}})}return t.from(e,n)},t.prototype.toStrings=function(t,e){var n=this;if(void 0===t&&(t=this.value),void 0===e&&(e="."),$(t))return[t];var r=_(t);return r.concat.apply(r,y([],v(r.map((function(r){return n.toStrings(t[r],e).map((function(t){return r+e+t}))})))))},t.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var e=t.tags,n=p(t,["configuration","transitions","tags"]);return h(h({},n),{tags:Array.from(e)})},t.prototype.matches=function(t){return b(t,this.value)},t.prototype.hasTag=function(t){return this.tags.has(t)},t}(),Qt=function(t,e){return e(t)};function Xt(t){return{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:t}}}}function Yt(t,e,n,r){var i,o=K(t.src),a=null===(i=null==e?void 0:e.options.services)||void 0===i?void 0:i[o.type],s=t.data?R(t.data,n,r):void 0,c=a?function(t,e,n){var r=Xt(e);if(r.deferred=!0,B(t)){var i=r.state=Qt(void 0,(function(){return(n?t.withContext(n):t).initialState}));r.getSnapshot=function(){return i}}return r}(a,t.id,s):Xt(t.id);return c.meta=t,c}function te(t){return function(t){try{return"function"==typeof t.send}catch(t){return!1}}(t)&&"id"in t}function ee(t){return h({subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t)}function ne(t){if("string"==typeof t){var e={type:t,toString:function(){return t}};return e}return t}function re(t){return h(h({type:st},t),{toJSON:function(){t.onDone,t.onError;var e=p(t,["onDone","onError"]);return h(h({},e),{type:st,src:ne(t.src)})}})}var ie={},oe=function(t){return"#"===t[0]},ae=function(){function t(e,n,r){var i,o=this;void 0===r&&(r=e.context),this.config=e,this._context=r,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign({actions:{},guards:{},services:{},activities:{},delays:{}},n),this.parent=this.options._parent,this.key=this.config.key||this.options._key||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:"."),this.id=this.config.id||y([this.machine.key],v(this.path)).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&_(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:null!==(i=this.config.schema)&&void 0!==i?i:{},this.initial=this.config.initial,this.states=this.config.states?x(this.config.states,(function(e,n){var r,i=new t(e,{_parent:o,_key:n});return Object.assign(o.idMap,h(((r={})[i.id]=i,r),i.idMap)),i})):ie;var a=0;!function t(e){var n,r;e.order=a++;try{for(var i=d(Vt(e)),o=i.next();!o.done;o=i.next()){t(o.value)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}(this),this.history=!0===this.config.history?"shallow":this.config.history||!1,this._transient=!!this.config.always||!!this.config.on&&(Array.isArray(this.config.on)?this.config.on.some((function(t){return""===t.event})):""in this.config.on),this.strict=!!this.config.strict,this.onEntry=T(this.config.entry||this.config.onEntry).map((function(t){return vt(t)})),this.onExit=T(this.config.exit||this.config.onExit).map((function(t){return vt(t)})),this.meta=this.config.meta,this.doneData="final"===this.type?this.config.data:void 0,this.invoke=T(this.config.invoke).map((function(t,e){var n,r;if(B(t))return o.machine.options.services=h(((n={})[t.id]=t,n),o.machine.options.services),re({src:t.id,id:t.id});if($(t.src))return re(h(h({},t),{id:t.id||t.src,src:t.src}));if(B(t.src)||F(t.src)){var i=o.id+":invocation["+e+"]";return o.machine.options.services=h(((r={})[i]=t.src,r),o.machine.options.services),re(h(h({id:i},t),{src:i}))}var a=t.src;return re(h(h({id:a.type},t),{src:a}))})),this.activities=T(this.config.activities).concat(this.invoke).map((function(t){return gt(t)})),this.transition=this.transition.bind(this),this.tags=T(this.config.tags)}return t.prototype._init=function(){this.__cache.transitions||Mt(this).forEach((function(t){return t.on}))},t.prototype.withConfig=function(e,n){var r=this.options,i=r.actions,o=r.activities,a=r.guards,s=r.services,c=r.delays;return new t(this.config,{actions:h(h({},i),e.actions),activities:h(h({},o),e.activities),guards:h(h({},a),e.guards),services:h(h({},s),e.services),delays:h(h({},c),e.delays)},null!=n?n:this.context)},t.prototype.withContext=function(e){return new t(this.config,this.options,e)},Object.defineProperty(t.prototype,"context",{get:function(){return F(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:x(this.states,(function(t){return t.definition})),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke}},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){return this.definition},Object.defineProperty(t.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce((function(t,e){return t[e.eventType]=t[e.eventType]||[],t[e.eventType].push(e),t}),{})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),t.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var e=""===t,n=this.transitions.filter((function(n){var r=n.eventType===t;return e?r:r||"*"===n.eventType}));return this.__cache.candidates[t]=n,n},t.prototype.getDelayedTransitions=function(){var t=this,e=this.config.after;if(!e)return[];var n=function(e,n){var r=Pt(F(e)?t.id+":delay["+n+"]":e,t.id);return t.onEntry.push(bt(r,{delay:e})),t.onExit.push(Ot(r)),r};return(C(e)?e.map((function(t,e){var r=n(t.delay,e);return h(h({},t),{event:r})})):A(_(e).map((function(t,r){var i=e[t],o=$(i)?{target:i}:i,a=isNaN(+t)?t:+t,s=n(a,r);return T(o).map((function(t){return h(h({},t),{event:s,delay:a})}))})))).map((function(e){var n=e.delay;return h(h({},t.formatTransition(e)),{delay:n})}))},t.prototype.getStateNodes=function(t){var e,n=this;if(!t)return[];var r=t instanceof Kt?t.value:j(t,this.delimiter);if($(r)){var i=this.getStateNode(r).initial;return void 0!==i?this.getStateNodes(((e={})[r]=i,e)):[this,this.states[r]]}var o=_(r),a=o.map((function(t){return n.getStateNode(t)}));return a.push(this),a.concat(o.reduce((function(t,e){var i=n.getStateNode(e).getStateNodes(r[e]);return t.concat(i)}),[]))},t.prototype.handles=function(t){var e=m(t);return this.events.includes(e)},t.prototype.resolveState=function(t){var e=Array.from(Ut([],this.getStateNodes(t.value)));return new Kt(h(h({},t),{value:this.resolve(t.value),configuration:e,done:Ht(e,this)}))},t.prototype.transitionLeafNode=function(t,e,n){var r=this.getStateNode(t).next(e,n);return r&&r.transitions.length?r:this.next(e,n)},t.prototype.transitionCompoundNode=function(t,e,n){var r=_(t),i=this.getStateNode(r[0])._transition(t[r[0]],e,n);return i&&i.transitions.length?i:this.next(e,n)},t.prototype.transitionParallelNode=function(t,e,n){var r,i,o={};try{for(var a=d(_(t)),s=a.next();!s.done;s=a.next()){var c=s.value,u=t[c];if(u){var l=this.getStateNode(c)._transition(u,e,n);l&&(o[c]=l)}}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}var f=_(o).map((function(t){return o[t]})),h=A(f.map((function(t){return t.transitions})));if(!f.some((function(t){return t.transitions.length>0})))return this.next(e,n);var p=A(f.map((function(t){return t.entrySet}))),v=A(_(o).map((function(t){return o[t].configuration})));return{transitions:h,entrySet:p,exitSet:A(f.map((function(t){return t.exitSet}))),configuration:v,source:e,actions:A(_(o).map((function(t){return o[t].actions})))}},t.prototype._transition=function(t,e,n){return $(t)?this.transitionLeafNode(t,e,n):1===_(t).length?this.transitionCompoundNode(t,e,n):this.transitionParallelNode(t,e,n)},t.prototype.next=function(t,e){var n,r,i,o=this,a=e.name,s=[],c=[];try{for(var u=d(this.getCandidates(a)),l=u.next();!l.done;l=u.next()){var f=l.value,h=f.cond,p=f.in,g=t.context,_=!p||($(p)&&oe(p)?t.matches(j(this.getStateNodeById(p).path,this.delimiter)):b(j(p,this.delimiter),E(this.path.slice(0,-2))(t.value))),m=!1;try{m=!h||Z(this.machine,h,g,e,t)}catch(t){throw new Error("Unable to evaluate guard '"+(h.name||h.type)+"' in transition for event '"+a+"' in state node '"+this.id+"':\n"+t.message)}if(m&&_){void 0!==f.target&&(c=f.target),s.push.apply(s,y([],v(f.actions))),i=f;break}}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}if(i){if(!c.length)return{transitions:[i],entrySet:[],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var w=A(c.map((function(e){return o.getRelativeStateNodes(e,t.historyValue)}))),S=!!i.internal;return{transitions:[i],entrySet:S?[]:A(w.map((function(t){return o.nodesFromChild(t)}))),exitSet:S?[]:[this],configuration:w,source:t,actions:s}}},t.prototype.nodesFromChild=function(t){if(t.escapes(this))return[];for(var e=[],n=t;n&&n!==this;)e.push(n),n=n.parent;return e.push(this),e},t.prototype.escapes=function(t){if(this===t)return!1;for(var e=this.parent;e;){if(e===t)return!1;e=e.parent}return!0},t.prototype.getActions=function(t,e,n,r){var i,o,a,s,c=Ut([],r?this.getStateNodes(r.value):[this]),u=t.configuration.length?Ut(c,t.configuration):c;try{for(var l=d(u),f=l.next();!f.done;f=l.next()){qt(c,g=f.value)||t.entrySet.push(g)}}catch(t){i={error:t}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}try{for(var h=d(c),p=h.next();!p.done;p=h.next()){var g;qt(u,g=p.value)&&!qt(t.exitSet,g.parent)||t.exitSet.push(g)}}catch(t){a={error:t}}finally{try{p&&!p.done&&(s=h.return)&&s.call(h)}finally{if(a)throw a.error}}t.source||(t.exitSet=[],t.entrySet.push(this));var _=A(t.entrySet.map((function(r){var i=[];if("final"!==r.type)return i;var o=r.parent;if(!o.parent)return i;i.push(Tt(r.id,r.doneData),Tt(o.id,r.doneData?R(r.doneData,e,n):void 0));var a=o.parent;return"parallel"===a.type&&Vt(a).every((function(e){return Ht(t.configuration,e)}))&&i.push(Tt(a.id)),i})));t.exitSet.sort((function(t,e){return e.order-t.order})),t.entrySet.sort((function(t,e){return t.order-e.order}));var b=new Set(t.entrySet),m=new Set(t.exitSet),w=v([A(Array.from(b).map((function(t){return y(y([],v(t.activities.map((function(t){return Et(t)})))),v(t.onEntry))}))).concat(_.map(_t)),A(Array.from(m).map((function(t){return y(y([],v(t.onExit)),v(t.activities.map((function(t){return kt(t)}))))})))],2),j=w[0],S=w[1];return yt(S.concat(t.actions).concat(j),this.machine.options.actions)},t.prototype.transition=function(t,e,n){void 0===t&&(t=this.initialState);var r,i,o=J(e);if(t instanceof Kt)r=void 0===n?t:this.resolveState(Kt.from(t,n));else{var a=$(t)?this.resolve(S(this.getResolvedPath(t))):this.resolve(t),s=null!=n?n:this.machine.context;r=this.resolveState(Kt.from(a,s))}if(this.strict&&!this.events.includes(o.name)&&(i=o.name,!/^(done|error)\./.test(i)))throw new Error("Machine '"+this.id+"' does not accept event '"+o.name+"'");var c=this._transition(r.value,r,o)||{transitions:[],configuration:[],entrySet:[],exitSet:[],source:r,actions:[]},u=Ut([],this.getStateNodes(r.value)),l=c.configuration.length?Ut(u,c.configuration):u;return c.configuration=y([],v(l)),this.resolveTransition(c,r,o)},t.prototype.resolveRaisedTransition=function(t,e,n){var r,i=t.actions;return(t=this.transition(t,e))._event=n,t.event=n.data,(r=t.actions).unshift.apply(r,y([],v(i))),t},t.prototype.resolveTransition=function(t,e,n,r){var i,o,a=this;void 0===n&&(n=pt),void 0===r&&(r=this.machine.context);var s=t.configuration,c=!e||t.transitions.length>0,u=c?Bt(this.machine,s):void 0,l=e?e.historyValue?e.historyValue:t.source?this.machine.historyValue(e.value):void 0:void 0,f=e?e.context:r,p=this.getActions(t,f,n,e),y=e?h({},e.activities):{};try{for(var g=d(p),_=g.next();!_.done;_=g.next()){var b=_.value;b.type===X?y[b.activity.id||b.activity.type]=b:b.type===Y&&(y[b.activity.id||b.activity.type]=!1)}}catch(t){i={error:t}}finally{try{_&&!_.done&&(o=g.return)&&o.call(g)}finally{if(i)throw i.error}}var m,w,j=v(Ft(this,e,f,n,p),2),S=j[0],x=j[1],O=v(I(S,(function(t){return t.type===tt||t.type===et&&t.to===z.Internal})),2),E=O[0],k=O[1],P=S.filter((function(t){var e;return t.type===X&&(null===(e=t.activity)||void 0===e?void 0:e.type)===st})).reduce((function(t,e){return t[e.activity.id]=Yt(e.activity,a.machine,x,n),t}),e?h({},e.children):{}),T=u?t.configuration:e?e.configuration:[],R=Ht(T,this),N=new Kt({value:u||e.value,context:x,_event:n,_sessionid:e?e._sessionid:null,historyValue:u?l?(m=l,w=u,{current:w,states:L(m,w)}):void 0:e?e.historyValue:void 0,history:!u||t.source?e:void 0,actions:u?k:[],activities:u?y:e?e.activities:{},events:[],configuration:T,transitions:t.transitions,children:P,done:R,tags:null==e?void 0:e.tags}),D=f!==x;N.changed=n.name===lt||D;var C=N.history;C&&delete C.history;var F=!R&&(this._transient||s.some((function(t){return t._transient})));if(!(c||F&&""!==n.name))return N;var $=N;if(!R)for(F&&($=this.resolveRaisedTransition($,{type:rt},n));E.length;){var V=E.shift();$=this.resolveRaisedTransition($,V._event,n)}var M=$.changed||(C?!!$.actions.length||D||typeof C.value!=typeof $.value||!Jt($.value,C.value):void 0);return $.changed=M,$.history=C,$.tags=new Set(A($.configuration.map((function(t){return t.tags})))),$},t.prototype.getStateNode=function(t){if(oe(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '"+t+"' from '"+this.id+"'; no child states exist.");var e=this.states[t];if(!e)throw new Error("Child state '"+t+"' does not exist on '"+this.id+"'");return e},t.prototype.getStateNodeById=function(t){var e=oe(t)?t.slice("#".length):t;if(e===this.id)return this;var n=this.machine.idMap[e];if(!n)throw new Error("Child state node '#"+e+"' does not exist on machine '"+this.id+"'");return n},t.prototype.getStateNodeByPath=function(t){if("string"==typeof t&&oe(t))try{return this.getStateNodeById(t.slice(1))}catch(t){}for(var e=w(t,this.delimiter).slice(),n=this;e.length;){var r=e.shift();if(!r.length)break;n=n.getStateNode(r)}return n},t.prototype.resolve=function(t){var e,n=this;if(!t)return this.initialStateValue||ie;switch(this.type){case"parallel":return x(this.initialStateValue,(function(e,r){return e?n.getStateNode(r).resolve(t[r]||e):ie}));case"compound":if($(t)){var r=this.getStateNode(t);return"parallel"===r.type||"compound"===r.type?((e={})[t]=r.initialStateValue,e):t}return _(t).length?x(t,(function(t,e){return t?n.getStateNode(e).resolve(t):ie})):this.initialStateValue||{};default:return t||ie}},t.prototype.getResolvedPath=function(t){if(oe(t)){var e=this.machine.idMap[t.slice("#".length)];if(!e)throw new Error("Unable to find state node '"+t+"'");return e.path}return w(t,this.delimiter)},Object.defineProperty(t.prototype,"initialStateValue",{get:function(){var t,e;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;if("parallel"===this.type)e=O(this.states,(function(t){return t.initialStateValue||ie}),(function(t){return!("history"===t.type)}));else if(void 0!==this.initial){if(!this.states[this.initial])throw new Error("Initial state '"+this.initial+"' not found on '"+this.key+"'");e=$t(this.states[this.initial])?this.initial:((t={})[this.initial]=this.states[this.initial].initialStateValue,t)}else e={};return this.__cache.initialStateValue=e,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),t.prototype.getInitialState=function(t,e){var n=this.getStateNodes(t);return this.resolveTransition({configuration:n,entrySet:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,void 0,e)},Object.defineProperty(t.prototype,"initialState",{get:function(){this._init();var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '"+this.id+"'.");return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){var t;if("history"===this.type){var e=this.config;t=$(e.target)&&oe(e.target)?S(this.machine.getStateNodeById(e.target).path.slice(this.path.length-1)):e.target}return t},enumerable:!1,configurable:!0}),t.prototype.getRelativeStateNodes=function(t,e,n){return void 0===n&&(n=!0),n?"history"===t.type?t.resolveHistory(e):t.initialStateNodes:[t]},Object.defineProperty(t.prototype,"initialStateNodes",{get:function(){var t=this;return $t(this)?[this]:"compound"!==this.type||this.initial?A(k(this.initialStateValue).map((function(e){return t.getFromRelativePath(e)}))):[this]},enumerable:!1,configurable:!0}),t.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var e=v(t),n=e[0],r=e.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '"+n+"' from node with no states");var i=this.getStateNode(n);if("history"===i.type)return i.resolveHistory();if(!this.states[n])throw new Error("Child state '"+n+"' does not exist on '"+this.id+"'");return this.states[n].getFromRelativePath(r)},t.prototype.historyValue=function(t){if(_(this.states).length)return{current:t||this.initialStateValue,states:O(this.states,(function(e,n){if(!t)return e.historyValue();var r=$(t)?void 0:t[n];return e.historyValue(r||e.initialStateValue)}),(function(t){return!t.history}))}},t.prototype.resolveHistory=function(t){var e=this;if("history"!==this.type)return[this];var n=this.parent;if(!t){var r=this.target;return r?A(k(r).map((function(t){return n.getFromRelativePath(t)}))):n.initialStateNodes}var i,o,a=(i=n.path,o="states",function(t){var e,n,r=t;try{for(var a=d(i),s=a.next();!s.done;s=a.next()){var c=s.value;r=r[o][c]}}catch(t){e={error:t}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}return r})(t).current;return $(a)?[n.getStateNode(a)]:A(k(a).map((function(t){return"deep"===e.history?n.getFromRelativePath(t):[n.states[t[0]]]})))},Object.defineProperty(t.prototype,"stateIds",{get:function(){var t=this,e=A(_(this.states).map((function(e){return t.states[e].stateIds})));return[this.id].concat(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){var t,e,n,r;if(this.__cache.events)return this.__cache.events;var i=this.states,o=new Set(this.ownEvents);if(i)try{for(var a=d(_(i)),s=a.next();!s.done;s=a.next()){var c=i[s.value];if(c.states)try{for(var u=(n=void 0,d(c.events)),l=u.next();!l.done;l=u.next()){var f=l.value;o.add(""+f)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=a.return)&&e.call(a)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(o)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter((function(t){return!(!t.target&&!t.actions.length&&t.internal)})).map((function(t){return t.eventType})));return Array.from(t)},enumerable:!1,configurable:!0}),t.prototype.resolveTarget=function(t){var e=this;if(void 0!==t)return t.map((function(t){if(!$(t))return t;var n=t[0]===e.delimiter;if(n&&!e.parent)return e.getStateNodeByPath(t.slice(1));var r=n?e.key+t:t;if(!e.parent)return e.getStateNodeByPath(r);try{return e.parent.getStateNodeByPath(r)}catch(t){throw new Error("Invalid transition definition for state node '"+e.id+"':\n"+t.message)}}))},t.prototype.formatTransition=function(t){var e=this,n=function(t){if(void 0!==t&&""!==t)return T(t)}(t.target),r="internal"in t?t.internal:!n||n.some((function(t){return $(t)&&t[0]===e.delimiter})),i=this.machine.options.guards,o=this.resolveTarget(n),a=h(h({},t),{actions:yt(T(t.actions)),cond:V(t.cond,i),target:o,source:this,internal:r,eventType:t.event,toJSON:function(){return h(h({},a),{target:a.target?a.target.map((function(t){return"#"+t.id})):void 0,source:"#"+e.id})}});return a},t.prototype.formatTransitions=function(){var t,e,n,r=this;if(this.config.on)if(Array.isArray(this.config.on))n=this.config.on;else{var i=this.config.on,o="*",a=i[o],s=void 0===a?[]:a,c=p(i,["*"]);n=A(_(c).map((function(t){return G(t,c[t])})).concat(G("*",s)))}else n=[];var u=this.config.always?G("",this.config.always):[],l=this.config.onDone?G(String(Tt(this.id)),this.config.onDone):[],f=A(this.invoke.map((function(t){var e=[];return t.onDone&&e.push.apply(e,y([],v(G(String(Rt(t.id)),t.onDone)))),t.onError&&e.push.apply(e,y([],v(G(String(Nt(t.id)),t.onError)))),e}))),h=this.after,g=A(y(y(y(y([],v(l)),v(f)),v(n)),v(u)).map((function(t){return T(t).map((function(t){return r.formatTransition(t)}))})));try{for(var b=d(h),m=b.next();!m.done;m=b.next()){var w=m.value;g.push(w)}}catch(e){t={error:e}}finally{try{m&&!m.done&&(e=b.return)&&e.call(b)}finally{if(t)throw t.error}}return g},t}();function se(t,e,n){return void 0===n&&(n=t.context),new ae(t,e,n)}function ce(t,e){return new ae(t,e)}const ue=At({failure:null}),le=At({errors:[]}),fe=At({edits:null}),he=At({data:null}),pe=le,de=At({failure:(t,e)=>e.data}),ve=At({errors:(t,e)=>e.data}),ye=At({data:(t,e)=>e.data}),ge=At({edits:(t,e)=>Object.assign(Object.assign({},t.edits),e.data)});const _e=ce({context:{data:null,edits:null,errors:[],failure:null},entry:["validate"],id:"nucleon",initial:"init",on:{DELETE:{actions:["clearData","clearEdits","clearErrors"],target:"#nucleon.busy.deleting"},FETCH:{actions:["clearData","clearEdits","clearErrors"],target:"#nucleon.busy.fetching"},REFRESH:{target:"#nucleon.busy.fetching"},SET_DATA:{actions:["setData","clearEdits","clearErrors"],target:"#nucleon.init"}},states:{busy:{states:{creating:{invoke:{onDone:{actions:["setData","clearEdits","validate"],target:"#nucleon.idle.snapshot"},onError:[{actions:"setErrors",cond:"isV8nErrorEvent",target:"#nucleon.idle"},{actions:"setFailure",target:"#nucleon.fail"}],src:"sendPost"}},deleting:{invoke:{onDone:{actions:["clearData","clearEdits","validate"],target:"#nucleon.idle.template"},onError:[{actions:"setErrors",cond:"isV8nErrorEvent",target:"#nucleon.idle"},{actions:"setFailure",target:"#nucleon.fail"}],src:"sendDelete"}},fetching:{invoke:{onDone:{actions:["setData","clearErrors","validate"],target:"#nucleon.idle.snapshot"},onError:[{actions:"setErrors",cond:"isV8nErrorEvent",target:"#nucleon.idle"},{actions:"setFailure",target:"#nucleon.fail"}],src:"sendGet"}},updating:{invoke:{onDone:{actions:["setData","clearEdits","validate"],target:"#nucleon.idle.snapshot"},onError:[{actions:"setErrors",cond:"isV8nErrorEvent",target:"#nucleon.idle"},{actions:"setFailure",target:"#nucleon.fail"}],src:"sendPatch"}}}},fail:{exit:"clearFailure"},idle:{initial:"unknown",on:{EDIT:{actions:["applyEdit","validate"],target:".unknown"}},states:{snapshot:{initial:"unknown",states:{clean:{initial:"unknown",states:{invalid:{},unknown:{always:[{cond:"hasErrors",target:"invalid"},{target:"valid"}]},valid:{}}},dirty:{initial:"unknown",on:{UNDO:{actions:["clearEdits","clearErrors","validate"],target:"#nucleon.idle.snapshot.clean"}},states:{invalid:{},unknown:{always:[{cond:"hasErrors",target:"invalid"},{target:"valid"}]},valid:{on:{SUBMIT:{target:"#nucleon.busy.updating"}}}}},unknown:{always:[{cond:"hasEdits",target:"dirty"},{target:"clean"}]}}},template:{initial:"unknown",states:{clean:{initial:"unknown",states:{invalid:{},unknown:{always:[{cond:"hasErrors",target:"invalid"},{target:"valid"}]},valid:{}}},dirty:{initial:"unknown",on:{UNDO:{actions:["clearEdits","clearErrors","validate"],target:"#nucleon.idle.template.clean"}},states:{invalid:{},unknown:{always:[{cond:"hasErrors",target:"invalid"},{target:"valid"}]},valid:{on:{SUBMIT:{target:"#nucleon.busy.creating"}}}}},unknown:{always:[{cond:"hasEdits",target:"dirty"},{target:"clean"}]}}},unknown:{always:[{cond:"hasData",target:"snapshot"},{target:"template"}]}}},init:{always:[{cond:"hasData",target:"idle.snapshot"},{target:"idle.template"}]}}},{actions:Object.freeze({__proto__:null,clearFailure:ue,clearErrors:le,clearEdits:fe,clearData:he,validate:pe,setFailure:de,setErrors:ve,setData:ye,applyEdit:ge}),guards:Object.freeze({__proto__:null,hasData:t=>null!==t.data,hasEdits:t=>null!==t.edits,hasErrors:t=>t.errors.length>0,isV8nErrorEvent:(t,e)=>Array.isArray(e.data)})});var be;!function(t){t[t.List=0]="List",t[t.Set=1]="Set"}(be||(be={}));class me{constructor(t){this.__value=t,this.__tree=me.__parse(t)}static get True(){return je}static get False(){return we}static fromAttribute(t,e){return null===t?me.False:""===t||t===e?me.True:new me(t)}matches(t,e=!1){const n=this.zoom(t).toString();return e?"not=*"===n:""!==n}zoom(t){const[e,...n]=t.split(":"),{only:r,not:i}=this.__tree;if(null==r?void 0:r[e]){const t=new me(me.__stringify(r[e]));return 0===n.length?t:t.zoom(n.join(":"))}return!i||i.includes(e)?me.False:me.True}toString(){return this.__value}toAttribute(t=""){var e;return"*"===(null===(e=this.__tree.not)||void 0===e?void 0:e[0])?t:0===this.__value.trim().length?null:this.toString()}static __stringify(t,e=""){return t.only?Object.entries(t.only).reduce(((t,[n,r])=>{const i=me.__stringify(r,0===e.length?n:`${e}:${n}`);return 0===t.length?i:`${t} ${i}`}),""):t.not?`${0===e.length?"":`${e}:`}not=${t.not.join(",")}`:e}static __parse(t){const e={},n={branch:e,buffer:"",entity:be.List,tree:e};return Array.from(`${t} `).forEach(((e,r)=>{try{me.__processors[n.entity](n,e)}catch(e){const n="This error occured at: ",i=t=>t.substring(Math.max(0,r-30),r+30),o=i(t),a=" ".repeat(n.length)+i("^".padStart(r+1," "));throw new SyntaxError([e.message,`${n}${o}`,a].join("\n"))}})),e}}me.__processors={[be.List](t,e){var n,r,i,o;if(Array.isArray(t.branch))throw new SyntaxError("Paths are not allowed in sets.");if("="===e){if("not"===t.buffer){const e=null!==(n=t.branch.not)&&void 0!==n?n:[];return delete t.branch.only,t.branch.not=e,t.entity=be.Set,t.branch=e,void(t.buffer="")}throw new SyntaxError(`Unknown modifier "${t.buffer}".`)}if(/^\s$/.test(e)||":"===e){if(t.buffer.length>0){const n=t.buffer,a=null!==(i=null===(r=t.branch.only)||void 0===r?void 0:r[n])&&void 0!==i?i:{};":"!==e&&(a.not=["*"]),!0!==(null===(o=t.branch.not)||void 0===o?void 0:o.includes("*"))&&(t.branch.only=Object.assign(Object.assign({},t.branch.only),{[n]:a}),delete t.branch.not),t.branch=":"===e?a:t.tree,t.buffer=""}}else{if(!/^[a-z]|-$/.test(e))throw new SyntaxError(`Expected [a-z], "-", ":" or a whitespace, but got "${e}" instead.`);t.buffer+=e}},[be.Set](t,e){if(!Array.isArray(t.branch))throw new SyntaxError("Unexpected set item.");if(0!==t.buffer.length||!/^\s$/.test(e)){if(","===e||"*"===e||/^\s$/.test(e)){const n="*"===e?"*":t.buffer,r=new Set([...t.branch,n]),i=r.has("*")?new Set(["*"]):r;return t.branch.splice(0,t.branch.length,...i),t.entity=","===e?be.Set:be.List,t.branch=","===e?t.branch:t.tree,void(t.buffer="")}if(!/^[a-z]|-$/.test(e))throw new SyntaxError(`Expected [a-z], "-", "," or a whitespace, but got "${e}" instead.`);t.buffer+=e}}};const we=new me(""),je=new me("not=*");var Se=Array.isArray,xe=t?t.prototype:void 0,Oe=xe?xe.toString:void 0;function Ee(t){if("string"==typeof t)return t;if(Se(t))return function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}(t,Ee)+"";if(e(t))return Oe?Oe.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}function ke(t){if(!n(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var Ae,Pe=i["__core-js_shared__"],Te=(Ae=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||""))?"Symbol(src)_1."+Ae:"";var Re=Function.prototype.toString;function Ne(t){if(null!=t){try{return Re.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var De=/^\[object .+?Constructor\]$/,Ie=Function.prototype,Le=Object.prototype,Ce=Ie.toString,Fe=Le.hasOwnProperty,$e=RegExp("^"+Ce.call(Fe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ve(t){return!(!n(t)||(e=t,Te&&Te in e))&&(ke(t)?$e:De).test(Ne(t));var e}function Me(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Ve(n)?n:void 0}var Ue=Me(i,"WeakMap"),ze=/^(?:0|[1-9]\d*)$/;function We(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&ze.test(t))&&t>-1&&t%1==0&&t<e}function Be(t,e){return t===e||t!=t&&e!=e}function qe(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function He(t){return null!=t&&qe(t.length)&&!ke(t)}var Je=Object.prototype;function Ge(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Je)}function Ze(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ke(t){return o(t)&&"[object Arguments]"==r(t)}var Qe=Object.prototype,Xe=Qe.hasOwnProperty,Ye=Qe.propertyIsEnumerable,tn=Ke(function(){return arguments}())?Ke:function(t){return o(t)&&Xe.call(t,"callee")&&!Ye.call(t,"callee")};var en="object"==typeof exports&&exports&&!exports.nodeType&&exports,nn=en&&"object"==typeof module&&module&&!module.nodeType&&module,rn=nn&&nn.exports===en?i.Buffer:void 0,on=(rn?rn.isBuffer:void 0)||function(){return!1},an={};function sn(t){return function(e){return t(e)}}an["[object Float32Array]"]=an["[object Float64Array]"]=an["[object Int8Array]"]=an["[object Int16Array]"]=an["[object Int32Array]"]=an["[object Uint8Array]"]=an["[object Uint8ClampedArray]"]=an["[object Uint16Array]"]=an["[object Uint32Array]"]=!0,an["[object Arguments]"]=an["[object Array]"]=an["[object ArrayBuffer]"]=an["[object Boolean]"]=an["[object DataView]"]=an["[object Date]"]=an["[object Error]"]=an["[object Function]"]=an["[object Map]"]=an["[object Number]"]=an["[object Object]"]=an["[object RegExp]"]=an["[object Set]"]=an["[object String]"]=an["[object WeakMap]"]=!1;var cn="object"==typeof exports&&exports&&!exports.nodeType&&exports,un=cn&&"object"==typeof module&&module&&!module.nodeType&&module,ln=un&&un.exports===cn&&a.process,fn=function(){try{var t=un&&un.require&&un.require("util").types;return t||ln&&ln.binding&&ln.binding("util")}catch(t){}}(),hn=fn&&fn.isTypedArray,pn=hn?sn(hn):function(t){return o(t)&&qe(t.length)&&!!an[r(t)]},dn=Object.prototype.hasOwnProperty;function vn(t,e){var n=Se(t),r=!n&&tn(t),i=!n&&!r&&on(t),o=!n&&!r&&!i&&pn(t),a=n||r||i||o,s=a?Ze(t.length,String):[],c=s.length;for(var u in t)!e&&!dn.call(t,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||We(u,c))||s.push(u);return s}function yn(t,e){return function(n){return t(e(n))}}var gn=yn(Object.keys,Object),_n=Object.prototype.hasOwnProperty;function bn(t){return He(t)?vn(t):function(t){if(!Ge(t))return gn(t);var e=[];for(var n in Object(t))_n.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var mn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wn=/^\w*$/;var jn=Me(Object,"create");var Sn=Object.prototype.hasOwnProperty;var xn=Object.prototype.hasOwnProperty;function On(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function En(t,e){for(var n=t.length;n--;)if(Be(t[n][0],e))return n;return-1}On.prototype.clear=function(){this.__data__=jn?jn(null):{},this.size=0},On.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},On.prototype.get=function(t){var e=this.__data__;if(jn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Sn.call(e,t)?e[t]:void 0},On.prototype.has=function(t){var e=this.__data__;return jn?void 0!==e[t]:xn.call(e,t)},On.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=jn&&void 0===e?"__lodash_hash_undefined__":e,this};var kn=Array.prototype.splice;function An(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}An.prototype.clear=function(){this.__data__=[],this.size=0},An.prototype.delete=function(t){var e=this.__data__,n=En(e,t);return!(n<0)&&(n==e.length-1?e.pop():kn.call(e,n,1),--this.size,!0)},An.prototype.get=function(t){var e=this.__data__,n=En(e,t);return n<0?void 0:e[n][1]},An.prototype.has=function(t){return En(this.__data__,t)>-1},An.prototype.set=function(t,e){var n=this.__data__,r=En(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Pn=Me(i,"Map");function Tn(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Rn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Rn.prototype.clear=function(){this.size=0,this.__data__={hash:new On,map:new(Pn||An),string:new On}},Rn.prototype.delete=function(t){var e=Tn(this,t).delete(t);return this.size-=e?1:0,e},Rn.prototype.get=function(t){return Tn(this,t).get(t)},Rn.prototype.has=function(t){return Tn(this,t).has(t)},Rn.prototype.set=function(t,e){var n=Tn(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Nn(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Nn.Cache||Rn),n}Nn.Cache=Rn;var Dn,In,Ln,Cn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fn=/\\(\\)?/g,$n=(Dn=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Cn,(function(t,n,r,i){e.push(r?i.replace(Fn,"$1"):n||t)})),e},In=Nn(Dn,(function(t){return 500===Ln.size&&Ln.clear(),t})),Ln=In.cache,In);function Vn(t,n){return Se(t)?t:function(t,n){if(Se(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!e(t))||wn.test(t)||!mn.test(t)||null!=n&&t in Object(n)}(t,n)?[t]:$n(function(t){return null==t?"":Ee(t)}(t))}function Mn(t){if("string"==typeof t||e(t))return t;var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n}function Un(t,e,n){var r=null==t?void 0:function(t,e){for(var n=0,r=(e=Vn(e,t)).length;null!=t&&n<r;)t=t[Mn(e[n++])];return n&&n==r?t:void 0}(t,e);return void 0===r?n:r}function zn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Wn(t){var e=this.__data__=new An(t);this.size=e.size}function Bn(){return[]}Wn.prototype.clear=function(){this.__data__=new An,this.size=0},Wn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Wn.prototype.get=function(t){return this.__data__.get(t)},Wn.prototype.has=function(t){return this.__data__.has(t)},Wn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof An){var r=n.__data__;if(!Pn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Rn(r)}return n.set(t,e),this.size=n.size,this};var qn=Object.prototype.propertyIsEnumerable,Hn=Object.getOwnPropertySymbols,Jn=Hn?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}(Hn(t),(function(e){return qn.call(t,e)})))}:Bn;function Gn(t,e,n){var r=e(t);return Se(t)?r:zn(r,n(t))}function Zn(t){return Gn(t,bn,Jn)}var Kn=Me(i,"DataView"),Qn=Me(i,"Promise"),Xn=Me(i,"Set"),Yn=Ne(Kn),tr=Ne(Pn),er=Ne(Qn),nr=Ne(Xn),rr=Ne(Ue),ir=r;(Kn&&"[object DataView]"!=ir(new Kn(new ArrayBuffer(1)))||Pn&&"[object Map]"!=ir(new Pn)||Qn&&"[object Promise]"!=ir(Qn.resolve())||Xn&&"[object Set]"!=ir(new Xn)||Ue&&"[object WeakMap]"!=ir(new Ue))&&(ir=function(t){var e=r(t),n="[object Object]"==e?t.constructor:void 0,i=n?Ne(n):"";if(i)switch(i){case Yn:return"[object DataView]";case tr:return"[object Map]";case er:return"[object Promise]";case nr:return"[object Set]";case rr:return"[object WeakMap]"}return e});var or=ir,ar=i.Uint8Array;function sr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Rn;++e<n;)this.add(t[e])}function cr(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function ur(t,e){return t.has(e)}sr.prototype.add=sr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},sr.prototype.has=function(t){return this.__data__.has(t)};function lr(t,e,n,r,i,o){var a=1&n,s=t.length,c=e.length;if(s!=c&&!(a&&c>s))return!1;var u=o.get(t),l=o.get(e);if(u&&l)return u==e&&l==t;var f=-1,h=!0,p=2&n?new sr:void 0;for(o.set(t,e),o.set(e,t);++f<s;){var d=t[f],v=e[f];if(r)var y=a?r(v,d,f,e,t,o):r(d,v,f,t,e,o);if(void 0!==y){if(y)continue;h=!1;break}if(p){if(!cr(e,(function(t,e){if(!ur(p,e)&&(d===t||i(d,t,n,r,o)))return p.push(e)}))){h=!1;break}}else if(d!==v&&!i(d,v,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function fr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function hr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var pr=t?t.prototype:void 0,dr=pr?pr.valueOf:void 0;var vr=Object.prototype.hasOwnProperty;var yr="[object Object]",gr=Object.prototype.hasOwnProperty;function _r(t,e,n,r,i,o){var a=Se(t),s=Se(e),c=a?"[object Array]":or(t),u=s?"[object Array]":or(e),l=(c="[object Arguments]"==c?yr:c)==yr,f=(u="[object Arguments]"==u?yr:u)==yr,h=c==u;if(h&&on(t)){if(!on(e))return!1;a=!0,l=!1}if(h&&!l)return o||(o=new Wn),a||pn(t)?lr(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new ar(t),new ar(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Be(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=fr;case"[object Set]":var c=1&r;if(s||(s=hr),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=2,a.set(t,e);var l=lr(s(t),s(e),r,i,o,a);return a.delete(t),l;case"[object Symbol]":if(dr)return dr.call(t)==dr.call(e)}return!1}(t,e,c,n,r,i,o);if(!(1&n)){var p=l&&gr.call(t,"__wrapped__"),d=f&&gr.call(e,"__wrapped__");if(p||d){var v=p?t.value():t,y=d?e.value():e;return o||(o=new Wn),i(v,y,n,r,o)}}return!!h&&(o||(o=new Wn),function(t,e,n,r,i,o){var a=1&n,s=Zn(t),c=s.length;if(c!=Zn(e).length&&!a)return!1;for(var u=c;u--;){var l=s[u];if(!(a?l in e:vr.call(e,l)))return!1}var f=o.get(t),h=o.get(e);if(f&&h)return f==e&&h==t;var p=!0;o.set(t,e),o.set(e,t);for(var d=a;++u<c;){var v=t[l=s[u]],y=e[l];if(r)var g=a?r(y,v,l,e,t,o):r(v,y,l,t,e,o);if(!(void 0===g?v===y||i(v,y,n,r,o):g)){p=!1;break}d||(d="constructor"==l)}if(p&&!d){var _=t.constructor,b=e.constructor;_==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b||(p=!1)}return o.delete(t),o.delete(e),p}(t,e,n,r,i,o))}function br(t,e,n,r,i){return t===e||(null==t||null==e||!o(t)&&!o(e)?t!=t&&e!=e:_r(t,e,n,r,br,i))}function mr(t,e){return br(t,e)}class wr extends Error{constructor(){super("not enough info to update; please reload resource instead")}}var jr=s((function(t){var e=t.exports=function(t){return new n(t)};function n(t){this.value=t}function r(t,e,n){var r=[],a=[],l=!0;return function t(f){var h=n?i(f):f,p={},d=!0,v={node:h,node_:f,path:[].concat(r),parent:a[a.length-1],parents:a,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(t,e){v.isRoot||(v.parent.node[v.key]=t),v.node=t,e&&(d=!1)},delete:function(t){delete v.parent.node[v.key],t&&(d=!1)},remove:function(t){s(v.parent.node)?v.parent.node.splice(v.key,1):delete v.parent.node[v.key],t&&(d=!1)},keys:null,before:function(t){p.before=t},after:function(t){p.after=t},pre:function(t){p.pre=t},post:function(t){p.post=t},stop:function(){l=!1},block:function(){d=!1}};if(!l)return v;function y(){if("object"==typeof v.node&&null!==v.node){v.keys&&v.node_===v.node||(v.keys=o(v.node)),v.isLeaf=0==v.keys.length;for(var t=0;t<a.length;t++)if(a[t].node_===f){v.circular=a[t];break}}else v.isLeaf=!0,v.keys=null;v.notLeaf=!v.isLeaf,v.notRoot=!v.isRoot}y();var g=e.call(v,v.node);return void 0!==g&&v.update&&v.update(g),p.before&&p.before.call(v,v.node),d?("object"!=typeof v.node||null===v.node||v.circular||(a.push(v),y(),c(v.keys,(function(e,i){r.push(e),p.pre&&p.pre.call(v,v.node[e],e);var o=t(v.node[e]);n&&u.call(v.node,e)&&(v.node[e]=o.node),o.isLast=i==v.keys.length-1,o.isFirst=0==i,p.post&&p.post.call(v,o),r.pop()})),a.pop()),p.after&&p.after.call(v,v.node),v):v}(t).node}function i(t){if("object"==typeof t&&null!==t){var e;if(s(t))e=[];else if("[object Date]"===a(t))e=new Date(t.getTime?t.getTime():t);else if(function(t){return"[object RegExp]"===a(t)}(t))e=new RegExp(t);else if(function(t){return"[object Error]"===a(t)}(t))e={message:t.message};else if(function(t){return"[object Boolean]"===a(t)}(t))e=new Boolean(t);else if(function(t){return"[object Number]"===a(t)}(t))e=new Number(t);else if(function(t){return"[object String]"===a(t)}(t))e=new String(t);else if(Object.create&&Object.getPrototypeOf)e=Object.create(Object.getPrototypeOf(t));else if(t.constructor===Object)e={};else{var n=t.constructor&&t.constructor.prototype||t.__proto__||{},r=function(){};r.prototype=n,e=new r}return c(o(t),(function(n){e[n]=t[n]})),e}return t}n.prototype.get=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!u.call(e,r)){e=void 0;break}e=e[r]}return e},n.prototype.has=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!u.call(e,r))return!1;e=e[r]}return!0},n.prototype.set=function(t,e){for(var n=this.value,r=0;r<t.length-1;r++){var i=t[r];u.call(n,i)||(n[i]={}),n=n[i]}return n[t[r]]=e,e},n.prototype.map=function(t){return r(this.value,t,!0)},n.prototype.forEach=function(t){return this.value=r(this.value,t,!1),this.value},n.prototype.reduce=function(t,e){var n=1===arguments.length,r=n?this.value:e;return this.forEach((function(e){this.isRoot&&n||(r=t.call(this,r,e))})),r},n.prototype.paths=function(){var t=[];return this.forEach((function(e){t.push(this.path)})),t},n.prototype.nodes=function(){var t=[];return this.forEach((function(e){t.push(this.node)})),t},n.prototype.clone=function(){var t=[],e=[];return function n(r){for(var a=0;a<t.length;a++)if(t[a]===r)return e[a];if("object"==typeof r&&null!==r){var s=i(r);return t.push(r),e.push(s),c(o(r),(function(t){s[t]=n(r[t])})),t.pop(),e.pop(),s}return r}(this.value)};var o=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};function a(t){return Object.prototype.toString.call(t)}var s=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},c=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)};c(o(n.prototype),(function(t){e[t]=function(e){var r=[].slice.call(arguments,1),i=new n(e);return i[t].apply(i,r)}}));var u=Object.hasOwnProperty||function(t,e){return e in t}}));class Sr{constructor(){this.__callbacks=[]}share(t){const{related:e,source:n,data:r}=t,i=null===r?new Map([[n,null]]):Sr.__createPatch(r);[...this.__callbacks].forEach((t=>{t((t=>{const n=Sr.__applyPatch(i,t,e);return mr(t,n)?t:n}))}))}track(t){return this.__callbacks.push(t),()=>{this.__callbacks.splice(this.__callbacks.indexOf(t),1)}}cease(){this.__callbacks.length=0}static __isResource(t){return"string"==typeof Un(t,"_links.self.href")}static __approximateURI(t){try{const e=new URL(t);return e.search="",e.hash="",e.toString()}catch(e){return t}}static __createPatch(t){return jr(t).reduce((function(t,e){if(!Sr.__isResource(e))return t;const n=jr(e).map((function(){var t;(null===(t=this.key)||void 0===t?void 0:t.startsWith("_"))&&this.delete(!0)}));return t.set(e._links.self.href,n),t}),new Map)}static __applyPatch(t,e,n){var r,i;const o=null!==(r=null==n?void 0:n.map((t=>Sr.__approximateURI(t))))&&void 0!==r?r:[];return null!==(i=jr({data:e}).map((function(e){if(!Sr.__isResource(e))return;const n=e._links.self.href,r=Sr.__approximateURI(n);if(o.includes(r))throw new Sr.UpdateError;if(t.has(n)){const r=t.get(n);if(r)return this.update(Object.assign(Object.assign({},e),r),!0);if(!this.parent.parent)return this.delete(!0);throw new Sr.UpdateError}})).data)&&void 0!==i?i:null}}Sr.UpdateError=wr;var xr=s((function(t,e){t.exports=function(){function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function a(t){return function(t){if(Array.isArray(t))return c(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||s(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){if(t){if("string"==typeof t)return c(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(t,e):void 0}}function c(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function u(t){if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(t=s(t))){var e=0,n=function(){};return{s:n,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return o=t.done,t},e:function(t){a=!0,i=t},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}var l={};l[l.Fatal=0]="Fatal",l[l.Error=0]="Error",l[l.Warn=1]="Warn",l[l.Log=2]="Log",l[l.Info=3]="Info",l[l.Success=3]="Success",l[l.Debug=4]="Debug",l[l.Trace=5]="Trace",l[l.Silent=-1/0]="Silent",l[l.Verbose=1/0]="Verbose";var f={silent:{level:-1},fatal:{level:l.Fatal},error:{level:l.Error},warn:{level:l.Warn},log:{level:l.Log},info:{level:l.Info},success:{level:l.Success},debug:{level:l.Debug},trace:{level:l.Trace},verbose:{level:l.Trace},ready:{level:l.Info},start:{level:l.Info}};function h(t){return e=t,!("[object Object]"!==Object.prototype.toString.call(e)||!t.message&&!t.args||t.stack);var e}var p=!1,d=[],v=function(){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var r in t(this,e),this._reporters=n.reporters||[],this._types=n.types||f,this.level=void 0!==n.level?n.level:3,this._defaults=n.defaults||{},this._async=void 0!==n.async?n.async:void 0,this._stdout=n.stdout,this._stderr=n.stderr,this._mockFn=n.mockFn,this._throttle=n.throttle||1e3,this._throttleMin=n.throttleMin||5,this._types){var i=o(o({type:r},this._types[r]),this._defaults);this[r]=this._wrapLogFn(i),this[r].raw=this._wrapLogFn(i,!0)}this._mockFn&&this.mockTypes(),this._lastLogSerialized=void 0,this._lastLog=void 0,this._lastLogTime=void 0,this._lastLogCount=0,this._throttleTimeout=void 0}return n(e,[{key:"create",value:function(t){return new e(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},t))}},{key:"withDefaults",value:function(t){return this.create({defaults:Object.assign({},this._defaults,t)})}},{key:"withTag",value:function(t){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+t:t})}},{key:"addReporter",value:function(t){return this._reporters.push(t),this}},{key:"removeReporter",value:function(t){if(t){var e=this._reporters.indexOf(t);if(e>=0)return this._reporters.splice(e,1)}else this._reporters.splice(0);return this}},{key:"setReporters",value:function(t){return this._reporters=Array.isArray(t)?t:[t],this}},{key:"wrapAll",value:function(){this.wrapConsole(),this.wrapStd()}},{key:"restoreAll",value:function(){this.restoreConsole(),this.restoreStd()}},{key:"wrapConsole",value:function(){for(var t in this._types)console["__"+t]||(console["__"+t]=console[t]),console[t]=this[t].raw}},{key:"restoreConsole",value:function(){for(var t in this._types)console["__"+t]&&(console[t]=console["__"+t],delete console["__"+t])}},{key:"wrapStd",value:function(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}},{key:"_wrapStream",value:function(t,e){var n=this;t&&(t.__write||(t.__write=t.write),t.write=function(t){n[e].raw(String(t).trim())})}},{key:"restoreStd",value:function(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}},{key:"_restoreStream",value:function(t){t&&t.__write&&(t.write=t.__write,delete t.__write)}},{key:"pauseLogs",value:function(){p=!0}},{key:"resumeLogs",value:function(){p=!1;var t,e=u(d.splice(0));try{for(e.s();!(t=e.n()).done;){var n=t.value;n[0]._logFn(n[1],n[2])}}catch(t){e.e(t)}finally{e.f()}}},{key:"mockTypes",value:function(t){if(this._mockFn=t||this._mockFn,"function"==typeof this._mockFn)for(var e in this._types)this[e]=this._mockFn(e,this._types[e])||this[e],this[e].raw=this[e]}},{key:"_wrapLogFn",value:function(t,e){var n=this;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];if(!p)return n._logFn(t,i,e);d.push([n,t,i,e])}}},{key:"_logFn",value:function(t,e,n){var r=this;if(t.level>this.level)return!!this._async&&Promise.resolve(!1);var i=Object.assign({date:new Date,args:[]},t);!n&&1===e.length&&h(e[0])?Object.assign(i,e[0]):i.args=Array.from(e),i.message&&(i.args.unshift(i.message),delete i.message),i.additional&&(Array.isArray(i.additional)||(i.additional=i.additional.split("\n")),i.args.push("\n"+i.additional.join("\n")),delete i.additional),i.type="string"==typeof i.type?i.type.toLowerCase():"",i.tag="string"==typeof i.tag?i.tag.toLowerCase():"";var s=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=r._lastLogCount-r._throttleMin;if(r._lastLog&&e>0){var n=a(r._lastLog.args);e>1&&n.push("(repeated ".concat(e," times)")),r._log(o(o({},r._lastLog),{},{args:n})),r._lastLogCount=1}if(t){if(r._lastLog=i,r._async)return r._logAsync(i);r._log(i)}};clearTimeout(this._throttleTimeout);var c=this._lastLogTime?i.date-this._lastLogTime:0;if(this._lastLogTime=i.date,c<this._throttle)try{var u=JSON.stringify([i.type,i.tag,i.args]),l=this._lastLogSerialized===u;if(this._lastLogSerialized=u,l&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(s,this._throttle))}catch(t){}s(!0)}},{key:"_log",value:function(t){var e,n=u(this._reporters);try{for(n.s();!(e=n.n()).done;)e.value.log(t,{async:!1,stdout:this.stdout,stderr:this.stderr})}catch(t){n.e(t)}finally{n.f()}}},{key:"_logAsync",value:function(t){var e=this;return Promise.all(this._reporters.map((function(n){return n.log(t,{async:!0,stdout:e.stdout,stderr:e.stderr})})))}},{key:"stdout",get:function(){return this._stdout||console._stdout}},{key:"stderr",get:function(){return this._stderr||console._stderr}}]),e}();v.prototype.add=v.prototype.addReporter,v.prototype.remove=v.prototype.removeReporter,v.prototype.clear=v.prototype.removeReporter,v.prototype.withScope=v.prototype.withTag,v.prototype.mock=v.prototype.mockTypes,v.prototype.pause=v.prototype.pauseLogs,v.prototype.resume=v.prototype.resumeLogs;var y,g=function(){function e(n){t(this,e),this.options=Object.assign({},n),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}return n(e,[{key:"log",value:function(t){var e=t.level<1?console.__error||console.error:1===t.level&&console.warn?console.__warn||console.warn:console.__log||console.log,n="log"!==t.type?t.type:"",r=t.tag?t.tag:"",i=this.typeColorMap[t.type]||this.levelColorMap[t.level]||this.defaultColor,o="\n background: ".concat(i,";\n border-radius: 0.5em;\n color: white;\n font-weight: bold;\n padding: 2px 0.5em;\n "),s="%c".concat([r,n].filter(Boolean).join(":"));"string"==typeof t.args[0]?e.apply(void 0,["".concat(s,"%c ").concat(t.args[0]),o,""].concat(a(t.args.slice(1)))):e.apply(void 0,[s,o].concat(a(t.args)))}}]),e}();return"undefined"!=typeof window&&window.consola||((y=new v({reporters:[new g]})).Consola=v,y.LogLevel=l,y.BrowserReporter=g,y)}()})),Or=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Er=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),kr=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},Ar=function(){function t(e,n,r,i){Or(this,t),this.name=e,this.fn=n,this.args=r,this.modifiers=i}return Er(t,[{key:"_test",value:function(t){var e=this.fn;try{Tr(this.modifiers.slice(),e)(t)}catch(t){e=function(){return!1}}try{return Tr(this.modifiers.slice(),e)(t)}catch(t){return!1}}},{key:"_check",value:function(t){try{Tr(this.modifiers.slice(),this.fn)(t)}catch(t){if(Tr(this.modifiers.slice(),(function(t){return t}))(!1))return}if(!Tr(this.modifiers.slice(),this.fn)(t))throw null}},{key:"_testAsync",value:function(t){var e=this;return new Promise((function(n,r){Rr(e.modifiers.slice(),e.fn)(t).then((function(e){e?n(t):r(null)})).catch((function(t){return r(t)}))}))}}]),t}();function Pr(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"simple";return"object"==typeof t?t[e]:t}function Tr(t,e){if(t.length){var n=t.shift(),r=Tr(t,e);return n.perform(r)}return Pr(e)}function Rr(t,e){if(t.length){var n=t.shift(),r=Rr(t,e);return n.performAsync(r)}return function(t){return Promise.resolve(Pr(e,"async")(t))}}var Nr=function t(e,n,r){Or(this,t),this.name=e,this.perform=n,this.performAsync=r},Dr=function(t){function e(t,n,r,i){Or(this,e);for(var o=arguments.length,a=Array(o>4?o-4:0),s=4;s<o;s++)a[s-4]=arguments[s];var c=kr(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,a));return Error.captureStackTrace&&Error.captureStackTrace(c,e),c.rule=t,c.value=n,c.cause=r,c.target=i,c}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,Error),e}(),Ir=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Or(this,t),this.chain=e,this.nextRuleModifiers=n}return Er(t,[{key:"_applyRule",value:function(t,e){var n=this;return function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return n.chain.push(new Ar(e,t.apply(n,i),i,n.nextRuleModifiers)),n.nextRuleModifiers=[],n}}},{key:"_applyModifier",value:function(t,e){return this.nextRuleModifiers.push(new Nr(e,t.simple,t.async)),this}},{key:"_clone",value:function(){return new t(this.chain.slice(),this.nextRuleModifiers.slice())}},{key:"test",value:function(t){return this.chain.every((function(e){return e._test(t)}))}},{key:"testAll",value:function(t){var e=[];return this.chain.forEach((function(n){try{n._check(t)}catch(r){e.push(new Dr(n,t,r))}})),e}},{key:"check",value:function(t){this.chain.forEach((function(e){try{e._check(t)}catch(n){throw new Dr(e,t,n)}}))}},{key:"testAsync",value:function(t){var e=this;return new Promise((function(n,r){Lr(t,e.chain.slice(),n,r)}))}}]),t}();function Lr(t,e,n,r){if(e.length){var i=e.shift();i._testAsync(t).then((function(){Lr(t,e,n,r)}),(function(e){r(new Dr(i,t,e))}))}else n(t)}function Cr(){return $r(new Ir)}var Fr={};function $r(t){return new Proxy(t,{get:function(e,n){if(n in e)return e[n];var r=$r(t._clone());return n in Vr?r._applyModifier(Vr[n],n):n in Fr?r._applyRule(Fr[n],n):n in Ur?r._applyRule(Ur[n],n):void 0}})}Cr.extend=function(t){Object.assign(Fr,t)},Cr.clearCustomRules=function(){Fr={}};var Vr={not:{simple:function(t){return function(e){return!t(e)}},async:function(t){return function(e){return Promise.resolve(t(e)).then((function(t){return!t})).catch((function(t){return!0}))}}},some:{simple:function(t){return function(e){return Mr(e).some((function(e){try{return t(e)}catch(t){return!1}}))}},async:function(t){return function(e){return Promise.all(Mr(e).map((function(e){try{return t(e).catch((function(t){return!1}))}catch(t){return!1}}))).then((function(t){return t.some(Boolean)}))}}},every:{simple:function(t){return function(e){return Mr(e).every(t)}},async:function(t){return function(e){return Promise.all(Mr(e).map(t)).then((function(t){return t.every(Boolean)}))}}}};function Mr(t){return"string"==typeof t?t.split(""):t}var Ur={equal:function(t){return function(e){return e==t}},exact:function(t){return function(e){return e===t}},number:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return function(e){return"number"==typeof e&&(t||isFinite(e))}},integer:function(){return function(t){return(Number.isInteger||Wr)(t)}},numeric:function(){return function(t){return!isNaN(parseFloat(t))&&isFinite(t)}},string:function(){return zr("string")},boolean:function(){return zr("boolean")},undefined:function(){return zr("undefined")},null:function(){return zr("null")},array:function(){return zr("array")},object:function(){return zr("object")},instanceOf:function(t){return function(e){return e instanceof t}},pattern:function(t){return function(e){return t.test(e)}},lowercase:function(){return function(t){return/^([a-z]+\s*)+$/.test(t)}},uppercase:function(){return function(t){return/^([A-Z]+\s*)+$/.test(t)}},vowel:function(){return function(t){return/^[aeiou]+$/i.test(t)}},consonant:function(){return function(t){return/^(?=[^aeiou])([a-z]+)$/i.test(t)}},first:function(t){return function(e){return e[0]==t}},last:function(t){return function(e){return e[e.length-1]==t}},empty:function(){return function(t){return 0===t.length}},length:function(t,e){return function(n){return n.length>=t&&n.length<=(e||t)}},minLength:function(t){return function(e){return e.length>=t}},maxLength:function(t){return function(e){return e.length<=t}},negative:function(){return function(t){return t<0}},positive:function(){return function(t){return t>=0}},between:function(t,e){return function(n){return n>=t&&n<=e}},range:function(t,e){return function(n){return n>=t&&n<=e}},lessThan:function(t){return function(e){return e<t}},lessThanOrEqual:function(t){return function(e){return e<=t}},greaterThan:function(t){return function(e){return e>t}},greaterThanOrEqual:function(t){return function(e){return e>=t}},even:function(){return function(t){return t%2==0}},odd:function(){return function(t){return t%2!=0}},includes:function(t){return function(e){return~e.indexOf(t)}},schema:function(t){return function(t){return{simple:function(e){var n=[];if(Object.keys(t).forEach((function(r){var i=t[r];try{i.check((e||{})[r])}catch(t){t.target=r,n.push(t)}})),n.length>0)throw n;return!0},async:function(e){var n=[],r=Object.keys(t).map((function(r){return t[r].testAsync((e||{})[r]).catch((function(t){t.target=r,n.push(t)}))}));return Promise.all(r).then((function(t){if(n.length>0)throw n;return!0}))}}}(t)},passesAnyOf:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return e.some((function(e){return e.test(t)}))}},optional:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(n){return e&&"string"==typeof n&&""===n.trim()||null!=n&&t.check(n),!0}}};function zr(t){return function(e){return Array.isArray(e)&&"array"===t||null===e&&"null"===t||typeof e===t}}function Wr(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}Cr.extend({curieChain:()=>t=>Array.isArray(t)&&t[0]instanceof URL&&t.slice(1).every((t=>"string"==typeof t)),typeOf:t=>e=>typeof e===t});const Br=Cr().schema({clear:Cr().typeOf("function"),getItem:Cr().typeOf("function"),key:Cr().typeOf("function"),length:Cr().number(),removeItem:Cr().typeOf("function"),setItem:Cr().typeOf("function")});class qr extends Error{constructor(t){qr.v8n.constructor.check(t),super(`authentication failed with code ${t.code}`),this.originalError=t.originalError,this.code=t.code}}qr.NEW_PASSWORD_REQUIRED="NEW_PASSWORD_REQUIRED",qr.INVALID_NEW_PASSWORD="INVALID_NEW_PASSWORD",qr.UNAUTHORIZED="UNAUTHORIZED",qr.UNKNOWN="UNKNOWN",qr.v8n={constructor:Cr().schema({code:Cr().passesAnyOf(Cr().exact(qr.NEW_PASSWORD_REQUIRED),Cr().exact(qr.INVALID_NEW_PASSWORD),Cr().exact(qr.UNAUTHORIZED),Cr().exact(qr.UNKNOWN))})};var Hr=u(s((function(t){function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}t.exports=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t},t.exports.default=t.exports,t.exports.__esModule=!0}))),Jr=s((function(t){t.exports=function(t,e){return e.get?e.get.call(t):e.value},t.exports.default=t.exports,t.exports.__esModule=!0})),Gr=s((function(t){t.exports=function(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)},t.exports.default=t.exports,t.exports.__esModule=!0})),Zr=u(s((function(t){t.exports=function(t,e){var n=Gr(t,e,"get");return Jr(t,n)},t.exports.default=t.exports,t.exports.__esModule=!0}))),Kr=new WeakMap,Qr=function(){function t(){Kr.set(this,{writable:!0,value:new Map})}var e=t.prototype;return e.key=function(t){t=Number.parseInt(t,10);for(var e=Zr(this,Kr).keys(),n=0,r=e.next();!r.done;){if(n===t)return r.value;n+=1,r=e.next()}return null},e.getItem=function(t){var e;return null!=(e=Zr(this,Kr).get(""+t))?e:null},e.setItem=function(t,e){Zr(this,Kr).set(""+t,""+e)},e.removeItem=function(t){Zr(this,Kr).delete(""+t)},e.clear=function(){Zr(this,Kr).clear()},Hr(t,[{key:"length",get:function(){return Zr(this,Kr).size}}]),t}();class Xr extends Error{constructor(t){super(),Xr.v8n.constructor.check(t),this.response=t}}Xr.v8n={constructor:Cr().instanceOf(l.Response)};var Yr=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))},ti=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function ei(t){const{json:e}=t,n=ti(t,["json"]);if("_links"in e){const t=e._links;e._links=Object.entries(t).reduce(((t,[e,r])=>{if(Array.isArray(r))return Object.assign(Object.assign({},t),{[e]:r});const i=new ai(Object.assign(Object.assign({},n),{path:[new URL(r.href)]})),o={delete:i.delete.bind(i),follow:i.follow.bind(i),get:i.get.bind(i),patch:i.patch.bind(i),post:i.post.bind(i),put:i.put.bind(i)};return Object.assign(Object.assign({},t),{[e]:Object.assign(Object.assign({},r),o)})}),{})}if("_embedded"in e){const t=e._embedded;e._embedded=Object.entries(t).reduce(((t,[e,r])=>Object.assign(t,{[e]:Array.isArray(r)?r.map((t=>ei(Object.assign(Object.assign({},n),{json:t})))):ei(Object.assign(Object.assign({},n),{json:r}))})),{})}return e}class ni extends l.Response{constructor(t){ni.v8n.constructor.check(t),super(t.body,t),this._console=t.console,this._fetch=t.fetch,this._cache=t.cache}json(){const t=Object.create(null,{json:{get:()=>super.json}});return Yr(this,void 0,void 0,(function*(){const e=yield t.json.call(this),n={cache:this._cache,console:this._console,fetch:this._fetch};return ei(Object.assign({json:e},n))}))}}ni.v8n={constructor:Cr().schema({cache:Br,console:Cr().instanceOf(xr.constructor),fetch:Cr().typeOf("function")})};var ri=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))};function ii(t,e){const n=""===t?"":t+":";return"string"==typeof e?n+e:Array.isArray(e)?e.map((e=>ii(t,e))).join():Object.entries(e).map((([t,e])=>ii(n+t,e))).join()}function oi(t){return"string"==typeof t?t:Array.isArray(t)?t.map((t=>oi(t))).join():Object.entries(t).map((([t,e])=>`${t} ${e}`)).join()}class ai{constructor(t){ai.v8n.classConstructor.check(t),this._path=t.path,this._fetch=t.fetch,this._cache=t.cache,this._console=t.console}get(t){return ri(this,void 0,void 0,(function*(){ai.v8n.get.check(t);const e=yield this._resolve(),{filters:n,fields:r,offset:i,limit:o,order:a,zoom:s}=null!=t?t:{};void 0!==n&&n.forEach((t=>{[...new URLSearchParams(t).entries()].forEach((([t,n])=>e.searchParams.append(t,n)))})),void 0!==r&&e.searchParams.set("fields",r.join(",")),void 0!==i&&e.searchParams.set("offset",String(i)),void 0!==o&&e.searchParams.set("limit",String(o)),void 0!==a&&e.searchParams.set("order",oi(a)),void 0!==s&&e.searchParams.set("zoom",ii("",s));const c=yield this._fetch(new l.Request(e.toString())),u={cache:this._cache,console:this._console,fetch:this._fetch};return new ni(Object.assign(Object.assign(Object.assign({},u),c),{body:yield c.text()}))}))}put(t){return ri(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new l.Request(e.toString(),{body:JSON.stringify(t),method:"PUT"}),r=yield this._fetch(n),i={cache:this._cache,console:this._console,fetch:this._fetch};return new ni(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}post(t){return ri(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new l.Request(e.toString(),{body:JSON.stringify(t),method:"POST"}),r=yield this._fetch(n),i={cache:this._cache,console:this._console,fetch:this._fetch};return new ni(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}patch(t){return ri(this,void 0,void 0,(function*(){const e=yield this._resolve(),n=new l.Request(e.toString(),{body:JSON.stringify(t),method:"PATCH"}),r=yield this._fetch(n),i={cache:this._cache,console:this._console,fetch:this._fetch};return new ni(Object.assign(Object.assign(Object.assign({},i),r),{body:yield r.text()}))}))}delete(){return ri(this,void 0,void 0,(function*(){const t=yield this._resolve(),e=new l.Request(t.toString(),{method:"DELETE"}),n=yield this._fetch(e),r={cache:this._cache,console:this._console,fetch:this._fetch};return new ni(Object.assign(Object.assign(Object.assign({},r),n),{body:yield n.text()}))}))}follow(t){ai.v8n.follow.check(t);const e={cache:this._cache,console:this._console,fetch:this._fetch},n=this._path.concat(t);return new ai(Object.assign(Object.assign({},e),{path:n}))}_resolve(){return ri(this,void 0,void 0,(function*(){if(1===this._path.length)return new URL(this._path[0].toString());const[t,e]=this._path,n=`${t.toString()} > ${e}`,r={cache:this._cache,console:this._console,fetch:this._fetch};this._console.trace(`Trying to resolve ${n}...`);const i=this._cache.getItem(n);if(i){this._console.success(`Resolved ${n} to ${i.toString()} using cache.`);const t=[new URL(i),...this._path.slice(2)];return new ai(Object.assign(Object.assign({},r),{path:t}))._resolve()}const o=yield this._fetch(t.toString());if(o.ok){const t=yield o.json(),i=new URL(t._links[e].href),a=[i,...this._path.slice(2)];return this._cache.setItem(n,i.toString()),this._console.trace(`Cached ${i.toString()} for ${n}.`),this._console.success(`Resolved ${n} to ${i.toString()} online.`),new ai(Object.assign(Object.assign({},r),{path:a}))._resolve()}throw this._console.error(`Failed to resolve ${n}.`),new Xr(o)}))}}ai.v8n={classConstructor:Cr().schema({cache:Br,console:Cr().instanceOf(xr.constructor),fetch:Cr().typeOf("function"),path:Cr().curieChain()}),follow:Cr().string(),get:Cr().optional(Cr().schema({fields:Cr().optional(Cr().array().every.string()),filters:Cr().optional(Cr().array().every.string()),limit:Cr().optional(Cr().number()),offset:Cr().optional(Cr().number()),order:Cr().optional(Cr().passesAnyOf(Cr().string(),Cr().object(),Cr().array())),zoom:Cr().optional(Cr().passesAnyOf(Cr().string(),Cr().object(),Cr().array()))}))},ai.ResolutionError=Xr,ai.Response=ni;var si=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))};class ci extends ai{constructor(t){var e,n,r;ci.v8n.classConstructor.check(t),super({cache:null!==(e=t.cache)&&void 0!==e?e:new Qr,console:xr.create({level:t.level}).withTag("@foxy.io/sdk"),fetch:null!==(n=t.fetch)&&void 0!==n?n:l.fetch,path:[t.base]}),this.console=this._console,this.storage=null!==(r=t.storage)&&void 0!==r?r:new Qr,this.cache=this._cache,this.base=t.base}fetch(...t){return si(this,void 0,void 0,(function*(){return this._fetch(...t)}))}}ci.WHATWGResponse=l.Response,ci.WHATWGRequest=l.Request,ci.WHATWGHeaders=l.Headers,ci.whatwgFetch=l.fetch,ci.AuthError=qr,ci.Node=ai,ci.v8n={classConstructor:Cr().schema({base:Cr().instanceOf(URL),cache:Cr().optional(Br),fetch:Cr().optional(Cr().typeOf("function")),level:Cr().optional(Cr().integer()),storage:Cr().optional(Br)})};export{Ot as $,ci as A,me as B,te as C,M as D,D as E,f as F,lt as G,Nt as H,W as I,C as J,H as K,$ as L,q as M,ut as N,Gt as O,Kt as P,y as Q,Sr as R,z as S,v as T,Zt as U,_t as V,bt as W,mt as X,wt as Y,xt as Z,h as _,At as a,Et as a0,kt as a1,Pt as a2,Tt as a3,jt as a4,It as a5,Lt as a6,Ct as a7,Dt as a8,ce as a9,Cr as aa,Me as ab,Be as ac,He as ad,We as ae,Ge as af,vn as ag,yn as ah,bn as ai,Jn as aj,Bn as ak,zn as al,Gn as am,ar as an,or as ao,fn as ap,sn as aq,on as ar,Wn as as,Se as at,Zn as au,Ze as av,se as aw,mr as ax,Nn as b,ee as c,Q as d,d as e,R as f,Rt as g,pt as h,Ht as i,F as j,_ as k,J as l,_e as m,ct as n,dt as o,Qt as p,ot as q,X as r,Y as s,jr as t,U as u,K as v,B as w,nt as x,et as y,N as z};