@redneckz/wildless-cms-uni-blocks 0.14.5 → 0.14.6

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 (214) hide show
  1. package/bin/migration-scripts/0.13.5.js +14 -11
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +167 -91
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Depository/Depository.d.ts +6 -0
  6. package/bundle/components/Depository/DepositoryContent.d.ts +2 -0
  7. package/bundle/components/Depository/DepositoryItem.d.ts +3 -0
  8. package/bundle/components/Depository/useDepository.d.ts +9 -0
  9. package/bundle/ui-kit/Pagination/Pagination.d.ts +8 -0
  10. package/bundle/ui-kit/Pagination/renderPages.d.ts +3 -0
  11. package/bundle/ui-kit/Pagination/shouldRenderPage.d.ts +1 -0
  12. package/bundle/utils/convertTimestampToDate.d.ts +1 -0
  13. package/dist/components/ApplicationForm/renderRegion.js +1 -1
  14. package/dist/components/ApplicationForm/renderRegionDepartment.js +1 -1
  15. package/dist/components/ApplicationForm/renderWedDataOrganization.js +2 -2
  16. package/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  17. package/dist/components/BenefitsBlock/BenefitsBlock.js +7 -7
  18. package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  19. package/dist/components/Blocks.js +2 -0
  20. package/dist/components/Blocks.js.map +1 -1
  21. package/dist/components/Depository/Depository.d.ts +6 -0
  22. package/dist/components/Depository/Depository.js +19 -0
  23. package/dist/components/Depository/Depository.js.map +1 -0
  24. package/dist/components/Depository/DepositoryContent.d.ts +2 -0
  25. package/dist/components/Depository/DepositoryContent.js +2 -0
  26. package/dist/components/Depository/DepositoryContent.js.map +1 -0
  27. package/dist/components/Depository/DepositoryItem.d.ts +3 -0
  28. package/dist/components/Depository/DepositoryItem.js +12 -0
  29. package/dist/components/Depository/DepositoryItem.js.map +1 -0
  30. package/dist/components/Depository/useDepository.d.ts +9 -0
  31. package/dist/components/Depository/useDepository.js +10 -0
  32. package/dist/components/Depository/useDepository.js.map +1 -0
  33. package/dist/ui-kit/Input/Input.js +7 -1
  34. package/dist/ui-kit/Input/Input.js.map +1 -1
  35. package/dist/ui-kit/Pagination/Pagination.d.ts +8 -0
  36. package/dist/ui-kit/Pagination/Pagination.js +31 -0
  37. package/dist/ui-kit/Pagination/Pagination.js.map +1 -0
  38. package/dist/ui-kit/Pagination/renderPages.d.ts +3 -0
  39. package/dist/ui-kit/Pagination/renderPages.js +18 -0
  40. package/dist/ui-kit/Pagination/renderPages.js.map +1 -0
  41. package/dist/ui-kit/Pagination/shouldRenderPage.d.ts +1 -0
  42. package/dist/ui-kit/Pagination/shouldRenderPage.js +9 -0
  43. package/dist/ui-kit/Pagination/shouldRenderPage.js.map +1 -0
  44. package/dist/ui-kit/Select/filterOptions.js +1 -10
  45. package/dist/ui-kit/Select/filterOptions.js.map +1 -1
  46. package/dist/utils/convertTimestampToDate.d.ts +1 -0
  47. package/dist/utils/convertTimestampToDate.js +16 -0
  48. package/dist/utils/convertTimestampToDate.js.map +1 -0
  49. package/dist/utils/fetchMultitudeJSON.js +1 -1
  50. package/dist/utils/fetchMultitudeJSON.js.map +1 -1
  51. package/lib/common.css +1 -1
  52. package/lib/components/ApplicationForm/renderRegion.js +1 -1
  53. package/lib/components/ApplicationForm/renderRegionDepartment.js +1 -1
  54. package/lib/components/ApplicationForm/renderWedDataOrganization.js +2 -2
  55. package/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  56. package/lib/components/BenefitsBlock/BenefitsBlock.js +7 -7
  57. package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  58. package/lib/components/Blocks.js +2 -0
  59. package/lib/components/Blocks.js.map +1 -1
  60. package/lib/components/Depository/Depository.d.ts +6 -0
  61. package/lib/components/Depository/Depository.fixture.d.ts +6 -0
  62. package/lib/components/Depository/Depository.js +17 -0
  63. package/lib/components/Depository/Depository.js.map +1 -0
  64. package/lib/components/Depository/DepositoryContent.d.ts +2 -0
  65. package/lib/components/Depository/DepositoryContent.js +2 -0
  66. package/lib/components/Depository/DepositoryContent.js.map +1 -0
  67. package/lib/components/Depository/DepositoryItem.d.ts +3 -0
  68. package/lib/components/Depository/DepositoryItem.js +9 -0
  69. package/lib/components/Depository/DepositoryItem.js.map +1 -0
  70. package/lib/components/Depository/useDepository.d.ts +9 -0
  71. package/lib/components/Depository/useDepository.js +7 -0
  72. package/lib/components/Depository/useDepository.js.map +1 -0
  73. package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +1 -0
  74. package/lib/ui-kit/Input/Input.js +8 -2
  75. package/lib/ui-kit/Input/Input.js.map +1 -1
  76. package/lib/ui-kit/Pagination/Pagination.d.ts +8 -0
  77. package/lib/ui-kit/Pagination/Pagination.js +28 -0
  78. package/lib/ui-kit/Pagination/Pagination.js.map +1 -0
  79. package/lib/ui-kit/Pagination/renderPages.d.ts +3 -0
  80. package/lib/ui-kit/Pagination/renderPages.js +15 -0
  81. package/lib/ui-kit/Pagination/renderPages.js.map +1 -0
  82. package/lib/ui-kit/Pagination/shouldRenderPage.d.ts +1 -0
  83. package/lib/ui-kit/Pagination/shouldRenderPage.js +6 -0
  84. package/lib/ui-kit/Pagination/shouldRenderPage.js.map +1 -0
  85. package/lib/ui-kit/Select/filterOptions.js +1 -10
  86. package/lib/ui-kit/Select/filterOptions.js.map +1 -1
  87. package/lib/utils/convertTimestampToDate.d.ts +1 -0
  88. package/lib/utils/convertTimestampToDate.js +13 -0
  89. package/lib/utils/convertTimestampToDate.js.map +1 -0
  90. package/lib/utils/fetchMultitudeJSON.js +1 -1
  91. package/lib/utils/fetchMultitudeJSON.js.map +1 -1
  92. package/mobile/bundle/bundle.umd.js +91 -91
  93. package/mobile/bundle/bundle.umd.min.js +1 -1
  94. package/mobile/bundle/components/Depository/Depository.d.ts +6 -0
  95. package/mobile/bundle/components/Depository/DepositoryContent.d.ts +2 -0
  96. package/mobile/bundle/components/Depository/DepositoryItem.d.ts +3 -0
  97. package/mobile/bundle/components/Depository/useDepository.d.ts +9 -0
  98. package/mobile/bundle/ui-kit/Pagination/Pagination.d.ts +8 -0
  99. package/mobile/bundle/ui-kit/Pagination/renderPages.d.ts +3 -0
  100. package/mobile/bundle/ui-kit/Pagination/shouldRenderPage.d.ts +1 -0
  101. package/mobile/bundle/utils/convertTimestampToDate.d.ts +1 -0
  102. package/mobile/dist/components/ApplicationForm/renderRegion.js +1 -1
  103. package/mobile/dist/components/ApplicationForm/renderRegionDepartment.js +1 -1
  104. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js +2 -2
  105. package/mobile/dist/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  106. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +7 -7
  107. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  108. package/mobile/dist/components/Depository/Depository.d.ts +6 -0
  109. package/mobile/dist/components/Depository/Depository.js +19 -0
  110. package/mobile/dist/components/Depository/Depository.js.map +1 -0
  111. package/mobile/dist/components/Depository/DepositoryContent.d.ts +2 -0
  112. package/mobile/dist/components/Depository/DepositoryContent.js +2 -0
  113. package/mobile/dist/components/Depository/DepositoryContent.js.map +1 -0
  114. package/mobile/dist/components/Depository/DepositoryItem.d.ts +3 -0
  115. package/mobile/dist/components/Depository/DepositoryItem.js +12 -0
  116. package/mobile/dist/components/Depository/DepositoryItem.js.map +1 -0
  117. package/mobile/dist/components/Depository/useDepository.d.ts +9 -0
  118. package/mobile/dist/components/Depository/useDepository.js +10 -0
  119. package/mobile/dist/components/Depository/useDepository.js.map +1 -0
  120. package/mobile/dist/ui-kit/Input/Input.js +7 -1
  121. package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
  122. package/mobile/dist/ui-kit/Pagination/Pagination.d.ts +8 -0
  123. package/mobile/dist/ui-kit/Pagination/Pagination.js +31 -0
  124. package/mobile/dist/ui-kit/Pagination/Pagination.js.map +1 -0
  125. package/mobile/dist/ui-kit/Pagination/renderPages.d.ts +3 -0
  126. package/mobile/dist/ui-kit/Pagination/renderPages.js +18 -0
  127. package/mobile/dist/ui-kit/Pagination/renderPages.js.map +1 -0
  128. package/mobile/dist/ui-kit/Pagination/shouldRenderPage.d.ts +1 -0
  129. package/mobile/dist/ui-kit/Pagination/shouldRenderPage.js +9 -0
  130. package/mobile/dist/ui-kit/Pagination/shouldRenderPage.js.map +1 -0
  131. package/mobile/dist/ui-kit/Select/filterOptions.js +1 -10
  132. package/mobile/dist/ui-kit/Select/filterOptions.js.map +1 -1
  133. package/mobile/dist/utils/convertTimestampToDate.d.ts +1 -0
  134. package/mobile/dist/utils/convertTimestampToDate.js +16 -0
  135. package/mobile/dist/utils/convertTimestampToDate.js.map +1 -0
  136. package/mobile/dist/utils/fetchMultitudeJSON.js +1 -1
  137. package/mobile/dist/utils/fetchMultitudeJSON.js.map +1 -1
  138. package/mobile/lib/common.css +1 -1
  139. package/mobile/lib/components/ApplicationForm/renderRegion.js +1 -1
  140. package/mobile/lib/components/ApplicationForm/renderRegionDepartment.js +1 -1
  141. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js +2 -2
  142. package/mobile/lib/components/ApplicationForm/renderWedDataOrganization.js.map +1 -1
  143. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +7 -7
  144. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  145. package/mobile/lib/components/Depository/Depository.d.ts +6 -0
  146. package/mobile/lib/components/Depository/Depository.js +17 -0
  147. package/mobile/lib/components/Depository/Depository.js.map +1 -0
  148. package/mobile/lib/components/Depository/DepositoryContent.d.ts +2 -0
  149. package/mobile/lib/components/Depository/DepositoryContent.js +2 -0
  150. package/mobile/lib/components/Depository/DepositoryContent.js.map +1 -0
  151. package/mobile/lib/components/Depository/DepositoryItem.d.ts +3 -0
  152. package/mobile/lib/components/Depository/DepositoryItem.js +9 -0
  153. package/mobile/lib/components/Depository/DepositoryItem.js.map +1 -0
  154. package/mobile/lib/components/Depository/useDepository.d.ts +9 -0
  155. package/mobile/lib/components/Depository/useDepository.js +7 -0
  156. package/mobile/lib/components/Depository/useDepository.js.map +1 -0
  157. package/mobile/lib/ui-kit/Input/Input.js +8 -2
  158. package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
  159. package/mobile/lib/ui-kit/Pagination/Pagination.d.ts +8 -0
  160. package/mobile/lib/ui-kit/Pagination/Pagination.js +28 -0
  161. package/mobile/lib/ui-kit/Pagination/Pagination.js.map +1 -0
  162. package/mobile/lib/ui-kit/Pagination/renderPages.d.ts +3 -0
  163. package/mobile/lib/ui-kit/Pagination/renderPages.js +15 -0
  164. package/mobile/lib/ui-kit/Pagination/renderPages.js.map +1 -0
  165. package/mobile/lib/ui-kit/Pagination/shouldRenderPage.d.ts +1 -0
  166. package/mobile/lib/ui-kit/Pagination/shouldRenderPage.js +6 -0
  167. package/mobile/lib/ui-kit/Pagination/shouldRenderPage.js.map +1 -0
  168. package/mobile/lib/ui-kit/Select/filterOptions.js +1 -10
  169. package/mobile/lib/ui-kit/Select/filterOptions.js.map +1 -1
  170. package/mobile/lib/utils/convertTimestampToDate.d.ts +1 -0
  171. package/mobile/lib/utils/convertTimestampToDate.js +13 -0
  172. package/mobile/lib/utils/convertTimestampToDate.js.map +1 -0
  173. package/mobile/lib/utils/fetchMultitudeJSON.js +1 -1
  174. package/mobile/lib/utils/fetchMultitudeJSON.js.map +1 -1
  175. package/mobile/src/components/ApplicationForm/ApplicationFormGrantSupport.tsx +1 -1
  176. package/mobile/src/components/ApplicationForm/renderRegion.tsx +2 -2
  177. package/mobile/src/components/ApplicationForm/renderRegionDepartment.tsx +2 -2
  178. package/mobile/src/components/ApplicationForm/renderWedDataOrganization.tsx +5 -5
  179. package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +24 -22
  180. package/mobile/src/components/Depository/Depository.example.json +1 -0
  181. package/mobile/src/components/Depository/Depository.tsx +43 -0
  182. package/mobile/src/components/Depository/Depository.ui.json +1 -0
  183. package/mobile/src/components/Depository/DepositoryContent.ts +3 -0
  184. package/mobile/src/components/Depository/DepositoryItem.tsx +21 -0
  185. package/mobile/src/components/Depository/useDepository.ts +23 -0
  186. package/mobile/src/ui-kit/Input/Input.tsx +9 -2
  187. package/mobile/src/ui-kit/Pagination/Pagination.tsx +87 -0
  188. package/mobile/src/ui-kit/Pagination/renderPages.tsx +33 -0
  189. package/mobile/src/ui-kit/Pagination/shouldRenderPage.ts +8 -0
  190. package/mobile/src/ui-kit/Select/filterOptions.ts +1 -11
  191. package/mobile/src/utils/convertTimestampToDate.ts +15 -0
  192. package/mobile/src/utils/fetchMultitudeJSON.ts +1 -1
  193. package/package.json +1 -1
  194. package/src/components/ApplicationForm/ApplicationFormGrantSupport.tsx +1 -1
  195. package/src/components/ApplicationForm/renderRegion.tsx +2 -2
  196. package/src/components/ApplicationForm/renderRegionDepartment.tsx +2 -2
  197. package/src/components/ApplicationForm/renderWedDataOrganization.tsx +5 -5
  198. package/src/components/BenefitsBlock/BenefitsBlock.tsx +24 -22
  199. package/src/components/Blocks.ts +2 -0
  200. package/src/components/Depository/Depository.example.json +1 -0
  201. package/src/components/Depository/Depository.fixture.tsx +10 -0
  202. package/src/components/Depository/Depository.tsx +43 -0
  203. package/src/components/Depository/Depository.ui.json +1 -0
  204. package/src/components/Depository/DepositoryContent.ts +3 -0
  205. package/src/components/Depository/DepositoryItem.tsx +21 -0
  206. package/src/components/Depository/useDepository.ts +23 -0
  207. package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +23 -3
  208. package/src/ui-kit/Input/Input.tsx +9 -2
  209. package/src/ui-kit/Pagination/Pagination.tsx +87 -0
  210. package/src/ui-kit/Pagination/renderPages.tsx +33 -0
  211. package/src/ui-kit/Pagination/shouldRenderPage.ts +8 -0
  212. package/src/ui-kit/Select/filterOptions.ts +1 -11
  213. package/src/utils/convertTimestampToDate.ts +15 -0
  214. package/src/utils/fetchMultitudeJSON.ts +1 -1
@@ -0,0 +1 @@
1
+ export declare const shouldRenderPage: (page: number, currentPage: number, totalPages: number) => boolean;
@@ -0,0 +1,6 @@
1
+ const checkPageRange = (page, currentPage, totalPages) => (currentPage <= 3 && page <= currentPage + 3) ||
2
+ (currentPage >= totalPages - 1 && page >= totalPages - 4);
3
+ export const shouldRenderPage = (page, currentPage, totalPages) => (page < currentPage && page >= currentPage - 2) ||
4
+ (page <= currentPage + 2 && page > currentPage) ||
5
+ checkPageRange(page, currentPage, totalPages);
6
+ //# sourceMappingURL=shouldRenderPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shouldRenderPage.js","sourceRoot":"","sources":["../../../src/ui-kit/Pagination/shouldRenderPage.ts"],"names":[],"mappings":"AAAA,MAAM,cAAc,GAAG,CAAC,IAAY,EAAE,WAAmB,EAAE,UAAkB,EAAE,EAAE,CAC/E,CAAC,WAAW,IAAI,CAAC,IAAI,IAAI,IAAI,WAAW,GAAG,CAAC,CAAC;IAC7C,CAAC,WAAW,IAAI,UAAU,GAAG,CAAC,IAAI,IAAI,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC;AAE5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,WAAmB,EAAE,UAAkB,EAAE,EAAE,CACxF,CAAC,IAAI,GAAG,WAAW,IAAI,IAAI,IAAI,WAAW,GAAG,CAAC,CAAC;IAC/C,CAAC,IAAI,IAAI,WAAW,GAAG,CAAC,IAAI,IAAI,GAAG,WAAW,CAAC;IAC/C,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,UAAU,CAAC,CAAC"}
@@ -1,16 +1,7 @@
1
- import { compareBy, desc } from '../../utils/Comparator.js';
2
- import { jaroWinklerDistance } from '../../utils/jaroWinklerDistance.js';
3
- import { zip } from '../../utils/zip.js';
4
1
  export const filterOptions = (options, query) => {
5
2
  if (!options?.length || !query?.trim()) {
6
3
  return options;
7
4
  }
8
- const ranking = options
9
- .map((_) => _.text?.toLowerCase())
10
- .map(jaroWinklerDistance(query?.trim().toLowerCase()));
11
- return zip(options, ranking)
12
- .filter(([, rank]) => rank >= 0.5)
13
- .sort(desc(compareBy(([, rank]) => rank)))
14
- .map(([option]) => option);
5
+ return options.filter((_) => _.text?.toLocaleLowerCase().includes(query?.trim().toLocaleLowerCase()));
15
6
  };
16
7
  //# sourceMappingURL=filterOptions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filterOptions.js","sourceRoot":"","sources":["../../../src/ui-kit/Select/filterOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAGtC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAiB,EAAE,KAAyB,EAAY,EAAE;IACtF,IAAI,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QACtC,OAAO,OAAO,CAAC;KAChB;IAED,MAAM,OAAO,GAAG,OAAO;SACpB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,CAAC;SACjC,GAAG,CAAC,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IAEzD,OAAO,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC;SACzB,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,IAAI,GAAG,CAAC;SACjC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;SACzC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC,CAAC"}
1
+ {"version":3,"file":"filterOptions.js","sourceRoot":"","sources":["../../../src/ui-kit/Select/filterOptions.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAiB,EAAE,KAAyB,EAAY,EAAE;IACtF,IAAI,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QACtC,OAAO,OAAO,CAAC;KAChB;IAED,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,iBAAiB,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAA;AACvG,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const convertTimestampToDate: (timestamp: number) => string;
@@ -0,0 +1,13 @@
1
+ export const convertTimestampToDate = (timestamp) => {
2
+ const date = new Date(timestamp * 1000);
3
+ let dd = date.getDate();
4
+ if (dd < 10) {
5
+ dd = '0' + dd;
6
+ }
7
+ let mm = date.getMonth() + 1;
8
+ if (mm < 10) {
9
+ mm = '0' + mm;
10
+ }
11
+ return dd + '.' + mm + '.' + date.getFullYear();
12
+ };
13
+ //# sourceMappingURL=convertTimestampToDate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertTimestampToDate.js","sourceRoot":"","sources":["../../src/utils/convertTimestampToDate.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,SAAiB,EAAE,EAAE;IAC1D,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAExC,IAAI,EAAE,GAAoB,IAAI,CAAC,OAAO,EAAE,CAAC;IACzC,IAAI,EAAE,GAAG,EAAE,EAAE;QACX,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC;KACf;IAED,IAAI,EAAE,GAAoB,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC9C,IAAI,EAAE,GAAG,EAAE,EAAE;QACX,EAAE,GAAG,GAAG,GAAG,EAAE,CAAC;KACf;IAED,OAAO,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;AAClD,CAAC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { fetchJSON } from './fetchJSON.js';
2
2
  export async function fetchMultitudeJSON(...urls) {
3
3
  const fetchPromises = urls.map((url) => fetchJSON(url));
4
- return await Promise.all(fetchPromises);
4
+ return Promise.all(fetchPromises);
5
5
  }
6
6
  //# sourceMappingURL=fetchMultitudeJSON.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetchMultitudeJSON.js","sourceRoot":"","sources":["../../src/utils/fetchMultitudeJSON.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,GAAG,IAAc;IAEjB,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAI,GAAG,CAAC,CAAC,CAAC;IAE3D,OAAO,MAAM,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;AAC1C,CAAC"}
1
+ {"version":3,"file":"fetchMultitudeJSON.js","sourceRoot":"","sources":["../../src/utils/fetchMultitudeJSON.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,GAAG,IAAc;IAEjB,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAI,GAAG,CAAC,CAAC,CAAC;IAE3D,OAAO,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;AACpC,CAAC"}
@@ -700,14 +700,20 @@
700
700
  };
701
701
 
702
702
  const Input = JSX(({ key, className = '', inputClassName = '', id, name, type = 'text', label, placeholder, value = '', valid = true, children, onChange, onFocus, onBlur, pattern, autoFocus = false, }) => {
703
+ const inputRef = useRef(null);
703
704
  const handleChange = useCallback((e) => {
704
705
  onChange && onChange(e.target?.value || '');
705
706
  }, [onChange]);
707
+ useEffect(() => {
708
+ if (autoFocus) {
709
+ inputRef.current?.focus();
710
+ }
711
+ }, [autoFocus, inputRef]);
706
712
  const paddingStyle = children ? 'pr-3xl' : '';
707
713
  const validStyle = valid
708
714
  ? 'border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text'
709
715
  : 'border-error';
710
- return (jsxs("div", { className: style('relative', className), children: [jsxs("label", { children: [label ? (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", font: "font-light", children: label }) })) : null, jsx("input", { className: style('w-full border rounded-md text-primary-text outline-none p-m', paddingStyle, validStyle, inputClassName), id: id, name: name || id, placeholder: placeholder, type: type, value: value, onInput: handleChange, onFocus: onFocus, onBlur: onBlur, pattern: pattern, autoFocus: autoFocus }, key)] }), children] }));
716
+ return (jsxs("div", { className: style('relative', className), children: [jsxs("label", { children: [label ? (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", font: "font-light", children: label }) })) : null, jsx("input", { ref: inputRef, className: style('w-full border rounded-md text-primary-text outline-none p-m', paddingStyle, validStyle, inputClassName), id: id, name: name || id, placeholder: placeholder, type: type, value: value, onInput: handleChange, onFocus: onFocus, onBlur: onBlur, pattern: pattern }, key)] }), children] }));
711
717
  });
712
718
 
713
719
  const InputControl = JSX(({ className, label, value = '', error, onChange, onBlur }) => (jsxs("div", { className: className, children: [jsx(Input, { type: "text", "aria-label": label, label: label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur }), jsx("div", { className: "h-2", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null })] })));
@@ -827,88 +833,11 @@
827
833
  close: () => defaultEventBus.fire('popup', { type: 'close' }),
828
834
  });
829
835
 
830
- const compareBy = (indexOf) => (a, b) => indexOf(a) - indexOf(b);
831
- const desc = (cmp) => (a, b) => -cmp(a, b);
832
-
833
- const JARO_WINKLER_P = 0.1;
834
- const JARO_WINKLER_MAX_L = 4;
835
- const jaroWinklerDistance = (s1) => (s2) => {
836
- if (s1 === s2) {
837
- return 1;
838
- }
839
- if (!s1 || !s2) {
840
- return 0;
841
- }
842
- const { m, s1Matches, s2Matches } = computeM(s1, s2);
843
- if (m === 0) {
844
- return 0;
845
- }
846
- const t = computeT(s1, s2, { s1Matches, s2Matches });
847
- const jaroWeight = (m / s1.length + m / s2.length + (m - t / 2) / m) / 3;
848
- const winklerWeight = jaroWeight > 0.7 ? computePrefixL(s1, s2) * JARO_WINKLER_P : 0;
849
- return jaroWeight + winklerWeight * (1 - jaroWeight);
850
- };
851
- function computeM(s1, s2) {
852
- const range = Math.max(0, Math.floor(Math.max(s1.length, s2.length) / 2) - 1);
853
- const s1Matches = new Array(s1.length);
854
- const s2Matches = new Array(s2.length);
855
- let m = 0;
856
- for (let i = 0; i < s1.length; i++) {
857
- const low = Math.max(0, i - range);
858
- const high = Math.min(i + range, s2.length - 1);
859
- for (let j = low; j <= high; j++) {
860
- if (s1Matches[i] || s2Matches[j] || s1[i] !== s2[j]) {
861
- continue;
862
- }
863
- m++;
864
- s1Matches[i] = true;
865
- s2Matches[j] = true;
866
- }
867
- }
868
- return { m, s1Matches, s2Matches };
869
- }
870
- function computeT(s1, s2, { s1Matches, s2Matches }) {
871
- let t = 0;
872
- for (let i = 0, k = 0; i < s1.length; i++) {
873
- if (!s1Matches[i]) {
874
- continue;
875
- }
876
- let j = k;
877
- for (; j < s2.length; j++) {
878
- if (s2Matches[j]) {
879
- k = j + 1;
880
- break;
881
- }
882
- }
883
- if (s1[i] !== s2[j]) {
884
- t++;
885
- }
886
- }
887
- return t;
888
- }
889
- function computePrefixL(s1, s2) {
890
- let prefixL = 0;
891
- while (s1[prefixL] === s2[prefixL] && prefixL < JARO_WINKLER_MAX_L) {
892
- prefixL++;
893
- }
894
- return prefixL;
895
- }
896
-
897
- function zip(firstCol, ...restCols) {
898
- return firstCol.map((firstEl, rowIndex) => [firstEl, ...restCols.map((col) => col[rowIndex])]);
899
- }
900
-
901
836
  const filterOptions = (options, query) => {
902
837
  if (!options?.length || !query?.trim()) {
903
838
  return options;
904
839
  }
905
- const ranking = options
906
- .map((_) => _.text?.toLowerCase())
907
- .map(jaroWinklerDistance(query?.trim().toLowerCase()));
908
- return zip(options, ranking)
909
- .filter(([, rank]) => rank >= 0.5)
910
- .sort(desc(compareBy(([, rank]) => rank)))
911
- .map(([option]) => option);
840
+ return options.filter((_) => _.text?.toLocaleLowerCase().includes(query?.trim().toLocaleLowerCase()));
912
841
  };
913
842
 
914
843
  const SelectPopup = JSX(({ popupRef, options, value, query, onChange }) => options?.length ? (jsx("div", { className: "bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-[0_4px_25px_rgba(0,0,0,0.07)]", role: "listbox", ref: popupRef, children: filterOptions(options, query).map((option) => (jsxs("div", { className: "flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative", role: "option", "aria-selected": option.key === value?.key, onClick: () => onChange && onChange(option), children: [jsx("span", { className: "min-h-6", children: formatOption(option) }), jsx(Icon, { name: "DoneSimpleIcon", width: "16", height: "16", className: style('absolute right-4 pt-3xs', option.key === value?.key ? '' : 'hidden') })] }, option.key))) })) : null);
@@ -1016,7 +945,7 @@
1016
945
 
1017
946
  const renderBusinessCardDataOrganization = (field) => (jsxs("div", { className: "@xl:flex @xl:justify-between @xl:gap-lg", children: [jsxs("div", { className: "@xl:w-1/2 space-y-s", children: [jsx(InputControl, { className: "shrink-0 w-full", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { className: "shrink-0 w-full", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })] }), jsxs("div", { className: "@xl:w-1/2 space-y-s", children: [jsx(PhoneInputControl, { className: "shrink-0 w-full", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), jsx(InputControl, { className: "shrink-0 w-full", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) })] })] }));
1018
947
 
1019
- const renderRegion$1 = ({ regions, field }) => (jsx(SelectControl, { className: "w-full", label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }));
948
+ const renderRegion$1 = ({ regions, field }) => (jsx(SelectControl, { className: "w-full", label: "\u0424\u0438\u043B\u0438\u0430\u043B", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }));
1020
949
 
1021
950
  const initialFormState$3 = {
1022
951
  name: '',
@@ -1134,7 +1063,7 @@
1134
1063
 
1135
1064
  const renderCreditParameters = (field) => (jsxs("div", { className: "border-b border-b-main-divider @xl:border-none @xl:flex @xl:justify-between gap-lg", children: [jsxs("div", { className: "@xl:w-1/2", children: [jsx("label", { children: jsx(Text, { size: "text-m", font: "font-light", children: "\u0421\u0443\u043C\u043C\u0430, \u20BD" }) }), jsx(InputRange, { items: ITEMS_CREDIT_AMOUNT, min: MIN_CREDIT_AMOUNT, max: MAX_CREDIT_AMOUNT, ...field('amount') })] }), jsxs("div", { className: "@xl:w-1/2", children: [jsx("label", { children: jsx(Text, { size: "text-m", font: "font-light", children: "\u0421\u0440\u043E\u043A, \u043C\u0435\u0441\u044F\u0446\u0435\u0432" }) }), jsx(InputRange, { items: ITEMS_CREDIT_TERM, min: MIN_CREDIT_TERM, max: MAX_CREDIT_TERM, ...field('term') })] })] }));
1136
1065
 
1137
- const renderRegionDepartment = ({ regions, branches, field }) => (jsxs("div", { className: "@xl:flex @xl:justify-between @xl:gap-lg @xl:mb-2xl @xl:border-none @xl:pb-0", children: [jsx("div", { className: "@xl:w-1/2", children: jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }) }), jsx("div", { className: "@xl:w-1/2", children: jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441", options: branches.map(({ branchCode = '', address = '' }) => ({
1066
+ const renderRegionDepartment = ({ regions, branches, field }) => (jsxs("div", { className: "@xl:flex @xl:justify-between @xl:gap-lg @xl:mb-2xl @xl:border-none @xl:pb-0", children: [jsx("div", { className: "@xl:w-1/2", children: jsx(SelectControl, { label: "\u0424\u0438\u043B\u0438\u0430\u043B", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }) }), jsx("div", { className: "@xl:w-1/2", children: jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441", options: branches.map(({ branchCode = '', address = '' }) => ({
1138
1067
  key: branchCode,
1139
1068
  text: address,
1140
1069
  })), ...withValidator(field('department'), defaultValidator) }) })] }));
@@ -1263,7 +1192,7 @@
1263
1192
 
1264
1193
  const renderWedDataOrganization = (field, regions) => {
1265
1194
  const isCurrencyControl = field('vedTypes').value === 'currencyControl';
1266
- return (jsxs("div", { children: [regions.length && isCurrencyControl ? (jsx(SelectControl, { className: "mb-s", label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) })) : null, jsxs("div", { className: "@xl:grid @xl:grid-cols-2 @xl:gap-x-lg", children: [isCurrencyControl ? (jsx(InputControl, { className: "w-full mb-s", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })) : null, jsx(InputControl, { className: "w-full mb-s", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { className: "w-full mb-s", label: "\u0424\u0418\u041E", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { className: "w-full mb-s", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), !isCurrencyControl ? (jsx(InputControl, { className: "w-full mb-s", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) })) : null] })] }));
1195
+ return (jsxs("div", { children: [isCurrencyControl ? (jsx(SelectControl, { className: "mb-s", label: "\u0424\u0438\u043B\u0438\u0430\u043B", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) })) : null, jsxs("div", { className: "@xl:grid @xl:grid-cols-2 @xl:gap-x-lg", children: [isCurrencyControl ? (jsx(InputControl, { className: "w-full mb-s", label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })) : null, jsx(InputControl, { className: "w-full mb-s", label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { className: "w-full mb-s", label: "\u0424\u0418\u041E", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { className: "w-full mb-s", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), !isCurrencyControl ? (jsx(InputControl, { className: "w-full mb-s", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) })) : null] })] }));
1267
1196
  };
1268
1197
 
1269
1198
  const activeTextareaStyles = 'hover:border-primary-hover active:focus:border-primary-text focus:border-primary-text';
@@ -1374,18 +1303,20 @@
1374
1303
 
1375
1304
  const defaultIconSize = 56;
1376
1305
 
1377
- const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: style('space-y-x', className), defaultPadding: "p-6xl", ...rest, children: [title ? (jsx(Heading, { headingType: "h3", as: "h2", className: "text-left sm:text-center", title: title })) : null, benefitList?.length ? (jsx("div", { className: "flex flex-wrap w-full sm:justify-center mt-xl gap-5xl", role: "list", children: benefitList.map(renderBenefit) })) : null] })));
1378
- const renderBenefit = (benefit, i) => (jsxs("div", { className: "flex gap-m items-center md:basis-1/2 md:max-w-[500px]", role: "listitem", children: [benefit?.icon?.icon ? (jsx(RoundedIcon, { className: "shrink-0", defaultIconSize: defaultIconSize, iconBgVersion: benefit?.iconBgVersion || '', ...benefit?.icon })) : null, benefit?.icon?.src ? jsx(Img, { className: "shrink-0", image: benefit.icon }) : null, benefit?.label ? (jsxs("div", { className: "sm:h-full", children: [jsx(Heading, { headingType: "h6", children: benefit.label }), renderDescription$3(benefit.description)] })) : null] }, String(i)));
1306
+ const AlignStyles = 'text-left';
1307
+
1308
+ const BenefitsBlock = JSX(({ className = '', title, benefitList, ...rest }) => (jsxs(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: [title ? jsx(Heading, { headingType: "h3", as: "h2", className: AlignStyles, title: title }) : null, benefitList?.length ? (jsx("div", { className: "flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl", role: "list", children: benefitList.map(renderBenefit) })) : null] })));
1309
+ const renderBenefit = (benefit, i) => (jsxs("div", { className: "flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]", role: "listitem", children: [benefit?.icon?.icon ? (jsx(RoundedIcon, { className: "shrink-0", defaultIconSize: defaultIconSize, iconBgVersion: benefit?.iconBgVersion || '', ...benefit?.icon })) : null, benefit?.icon?.src ? jsx(Img, { className: "shrink-0", image: benefit.icon }) : null, benefit?.label ? (jsxs("div", { className: "@sm:h-full", children: [jsx(Heading, { headingType: "h6", children: benefit.label }), renderDescription$3(benefit.description)] })) : null] }, String(i)));
1379
1310
  const renderDescription$3 = (description) => {
1380
1311
  const benefitType = description?.benefitType || null;
1381
- return description && benefitType ? (jsx("div", { className: "mt-2xs sm:mt-xs", children: benefitType === 'list'
1312
+ return description && benefitType ? (jsx("div", { className: "mt-xs text-l font-light text-secondary-text group-data-secondary:text-white/80", children: benefitType === 'list'
1382
1313
  ? renderListBenefit(description)
1383
1314
  : renderTextBenefit(description) })) : null;
1384
1315
  };
1385
- const renderTextBenefit = (description) => description?.name ? (jsx(Paragraph, { font: "font-light", size: "text-l", color: "text-secondary-text group-data-secondary:text-white", children: description.name })) : null;
1316
+ const renderTextBenefit = (description) => description?.name ? (jsx(Text, { size: "text-l", color: "text-secondary-text group-data-secondary:text-white/80", font: "font-light", children: description.name })) : null;
1386
1317
  const renderListBenefit = (description) => {
1387
1318
  const listStyleType = description?.bullets ? 'list-disc pl-3xl' : '';
1388
- return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx(Paragraph, { font: "font-light", size: "text-l", color: "text-secondary-text group-data-secondary:text-white", children: _ }, `benefitListItem-${i}`))) })) : null;
1319
+ return description?.items && description.items.length > 0 ? (jsx("ul", { className: listStyleType, children: description.items.map((_, i) => (jsx("li", { children: jsx(Text, { size: "text-l", color: "text-secondary-text group-data-secondary:text-white/80", font: "font-light", children: _ }) }, `benefitListItem-${i}`))) })) : null;
1389
1320
  };
1390
1321
 
1391
1322
  const renderButtonsSection = (buttons, { className, buttonClassName, isVertical } = {}) => buttons?.length && buttons.some((_) => _?.text || _?.icon?.icon) ? (jsx("div", { className: style('flex', isVertical ? 'flex-col gap-xs justify-items-stretch' : 'flex-wrap gap-lg sm:gap-m', className), children: buttons.map(renderButton$1(buttonClassName)) })) : null;
@@ -1458,8 +1389,6 @@
1458
1389
  return (jsxs(BlockWrapper, { className: style(isEmbedded ? '@container-normal' : '', className), defaultPadding: isEmbedded ? '' : 'p-6xl', version: version, isTheme: isTheme, ...rest, children: [title ? (jsx(Heading, { className: style('whitespace-pre-wrap', align), ...versionStyle?.title, as: as || versionStyle?.title.as, title: title })) : null, description ? (jsx(Paragraph, { size: versionStyle.descriptionSize, font: versionStyle.descriptionWeight, align: align, ...descriptionStyle, children: description })) : null] }));
1459
1390
  });
1460
1391
 
1461
- const AlignStyles = 'text-left';
1462
-
1463
1392
  const Bonus = JSX(({ className = '', title, description, bonusItems = [], align = AlignStyles, ...rest }) => (jsx(BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: jsxs("div", { className: "container", children: [jsx(Headline, { className: "mb-xl", isEmbedded: true, title: title, description: description, headlineVersion: "M", align: align }), jsx("div", { className: "flex flex-wrap w-full", children: bonusItems.length > 0
1464
1393
  ? bonusItems.map((_, i) => (jsxs("div", { className: "mb-3xl last:mb-0 sm:space-y-xs flex flex-col grow w-full p-4xl sm:p-m @xl:w-[49%] border border-gray", children: [jsx("div", { className: "grow", children: jsx(Headline, { title: _?.title, description: _?.description, headlineVersion: "S", isEmbedded: true, align: "text-left" }) }), jsxs("div", { className: "flex justify-center sm:justify-between sm:items-end", children: [jsx("div", { className: "hidden sm:block", children: renderButtonsSection(_?.buttons) }), _.bonusItemContent?.bonusType
1465
1394
  ? renderBonusItemContent(_.bonusItemContent)
@@ -3861,6 +3790,70 @@
3861
3790
  return result;
3862
3791
  };
3863
3792
 
3793
+ const JARO_WINKLER_P = 0.1;
3794
+ const JARO_WINKLER_MAX_L = 4;
3795
+ const jaroWinklerDistance = (s1) => (s2) => {
3796
+ if (s1 === s2) {
3797
+ return 1;
3798
+ }
3799
+ if (!s1 || !s2) {
3800
+ return 0;
3801
+ }
3802
+ const { m, s1Matches, s2Matches } = computeM(s1, s2);
3803
+ if (m === 0) {
3804
+ return 0;
3805
+ }
3806
+ const t = computeT(s1, s2, { s1Matches, s2Matches });
3807
+ const jaroWeight = (m / s1.length + m / s2.length + (m - t / 2) / m) / 3;
3808
+ const winklerWeight = jaroWeight > 0.7 ? computePrefixL(s1, s2) * JARO_WINKLER_P : 0;
3809
+ return jaroWeight + winklerWeight * (1 - jaroWeight);
3810
+ };
3811
+ function computeM(s1, s2) {
3812
+ const range = Math.max(0, Math.floor(Math.max(s1.length, s2.length) / 2) - 1);
3813
+ const s1Matches = new Array(s1.length);
3814
+ const s2Matches = new Array(s2.length);
3815
+ let m = 0;
3816
+ for (let i = 0; i < s1.length; i++) {
3817
+ const low = Math.max(0, i - range);
3818
+ const high = Math.min(i + range, s2.length - 1);
3819
+ for (let j = low; j <= high; j++) {
3820
+ if (s1Matches[i] || s2Matches[j] || s1[i] !== s2[j]) {
3821
+ continue;
3822
+ }
3823
+ m++;
3824
+ s1Matches[i] = true;
3825
+ s2Matches[j] = true;
3826
+ }
3827
+ }
3828
+ return { m, s1Matches, s2Matches };
3829
+ }
3830
+ function computeT(s1, s2, { s1Matches, s2Matches }) {
3831
+ let t = 0;
3832
+ for (let i = 0, k = 0; i < s1.length; i++) {
3833
+ if (!s1Matches[i]) {
3834
+ continue;
3835
+ }
3836
+ let j = k;
3837
+ for (; j < s2.length; j++) {
3838
+ if (s2Matches[j]) {
3839
+ k = j + 1;
3840
+ break;
3841
+ }
3842
+ }
3843
+ if (s1[i] !== s2[j]) {
3844
+ t++;
3845
+ }
3846
+ }
3847
+ return t;
3848
+ }
3849
+ function computePrefixL(s1, s2) {
3850
+ let prefixL = 0;
3851
+ while (s1[prefixL] === s2[prefixL] && prefixL < JARO_WINKLER_MAX_L) {
3852
+ prefixL++;
3853
+ }
3854
+ return prefixL;
3855
+ }
3856
+
3864
3857
  const SearchBar$1 = JSX(({ className, searchTerm, onSearch }) => {
3865
3858
  return (jsxs("form", { className: `font-sans relative ${className}`, children: [jsx("div", { className: "absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none", children: searchTerm ? null : (jsx("label", { htmlFor: "search-bar-input", className: `text-secondary-text `, children: "\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0444\u0438\u043B\u0438\u0430\u043B\u0430\u043C" })) }), jsx("input", { id: "search-bar-input", className: `h-12 pl-m w-full peer text-l text-black border border-solid rounded-md box-border
3866
3859
  outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text`, value: searchTerm, onChange: (e) => onSearch(e.target.value.toLowerCase()), type: "text", name: "location-search-bar-input" })] }));
@@ -3925,6 +3918,13 @@
3925
3918
  }, deps);
3926
3919
  }
3927
3920
 
3921
+ const compareBy = (indexOf) => (a, b) => indexOf(a) - indexOf(b);
3922
+ const desc = (cmp) => (a, b) => -cmp(a, b);
3923
+
3924
+ function zip(firstCol, ...restCols) {
3925
+ return firstCol.map((firstEl, rowIndex) => [firstEl, ...restCols.map((col) => col[rowIndex])]);
3926
+ }
3927
+
3928
3928
  const joinMaps = (aggregate, emptyVal) => (acc, map) => {
3929
3929
  for (const [key, b] of map) {
3930
3930
  acc.set(key, aggregate(acc.get(key) || emptyVal, b));
@@ -4553,7 +4553,7 @@
4553
4553
 
4554
4554
  async function fetchMultitudeJSON(...urls) {
4555
4555
  const fetchPromises = urls.map((url) => fetchJSON(url));
4556
- return await Promise.all(fetchPromises);
4556
+ return Promise.all(fetchPromises);
4557
4557
  }
4558
4558
 
4559
4559
  const unique = (list) => [...new Set(list)];
@@ -4912,7 +4912,7 @@
4912
4912
 
4913
4913
  const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
4914
4914
 
4915
- const packageVersion = "0.14.5";
4915
+ const packageVersion = "0.14.6";
4916
4916
 
4917
4917
  exports.Blocks = Blocks;
4918
4918
  exports.ContentPage = ContentPage;