cross-country 1.2.21 → 1.2.22

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 (259) hide show
  1. package/dist/Color-F6OSRLHC-BbLcUd-T.js +575 -0
  2. package/dist/{bolt-Bw4E_fgS.js → bolt-BLbYxvOV.js} +6 -5
  3. package/dist/bundle.css +36 -31
  4. package/dist/colour-util-Bzfca_cM.js +775 -0
  5. package/dist/components/atoms/circle/__tests__/circle.test.js +2 -2
  6. package/dist/components/atoms/column/__tests__/column.test.js +2 -2
  7. package/dist/components/atoms/index.js +1 -1
  8. package/dist/components/atoms/list/index.js +4 -0
  9. package/dist/components/atoms/list/list-item/index.js +4 -0
  10. package/dist/components/atoms/list/list-item/list-item.js +20 -0
  11. package/dist/components/atoms/list/list.js +33 -0
  12. package/dist/components/atoms/radio/index.js +2 -2
  13. package/dist/components/atoms/radio/radio.js +42 -3
  14. package/dist/components/atoms/text/animate-number/animate-number.js +1 -1
  15. package/dist/components/atoms/text/index.js +1 -1
  16. package/dist/components/atoms/text/input/__stories__/state-machine-fetch-dragons.js +3 -3
  17. package/dist/components/atoms/text/input/input-text-machine.js +3 -3
  18. package/dist/components/atoms/text/input/state-machine-text-input.js +1 -1
  19. package/dist/components/atoms/text/span/__stories__/span-story.js +6 -5
  20. package/dist/components/index.js +116 -116
  21. package/dist/components/molecules/autocomplete/autocomplete-machine.js +3 -3
  22. package/dist/components/molecules/autocomplete/autocomplete.js +1 -1
  23. package/dist/components/molecules/card/amazon/amazon-card.js +7 -6
  24. package/dist/components/molecules/card/builder/card-builder-machine/card-builder-machine.js +1 -1
  25. package/dist/components/molecules/card/builder/card-builder-machine/card-service-events.js +2 -2
  26. package/dist/components/molecules/card/builder/card-builder-machine/platform-states-amazon.js +1 -1
  27. package/dist/components/molecules/card/builder/card-builder-machine/platform-states-common.js +1 -1
  28. package/dist/components/molecules/card/builder/card-builder.js +1 -1
  29. package/dist/components/molecules/card/builder/card-editor.js +7 -6
  30. package/dist/components/molecules/card/card.js +6 -5
  31. package/dist/components/molecules/carousel/carousel.js +6 -5
  32. package/dist/components/molecules/day-number/day-number.js +6 -5
  33. package/dist/components/molecules/field/field.js +6 -5
  34. package/dist/components/molecules/gold-leaf/gold-leaf-view/__tests__/gold-leaf-view.test.js +3 -3
  35. package/dist/components/molecules/gold-leaf/gold-leaf-view/controls/gold-leaf-view-controls.js +8 -7
  36. package/dist/components/molecules/gold-leaf/gold-leaf-view/email/gold-leaf-email-view.js +7 -6
  37. package/dist/components/molecules/gold-leaf/gold-leaf-view/gold-leaf-view.js +7 -6
  38. package/dist/components/molecules/gold-leaf/gold-leaf-view/index.js +1 -1
  39. package/dist/components/molecules/gold-leaf/gold-leaf-view/title-image/gold-leaf-image.js +7 -6
  40. package/dist/components/molecules/gold-leaf/gold-leaf-view/title-image/gold-title-card.js +40 -0
  41. package/dist/components/molecules/gold-leaf/gold-leaf-view/title-image/gold-title-image-card.js +8 -7
  42. package/dist/components/molecules/gold-leaf/gold-leaf.js +1 -1
  43. package/dist/components/molecules/header/Header.js +10 -9
  44. package/dist/components/molecules/hero/hero.js +7 -6
  45. package/dist/components/molecules/icons/index.js +4 -3
  46. package/dist/components/molecules/icons/x/x.js +6 -5
  47. package/dist/components/molecules/index.js +8 -7
  48. package/dist/components/molecules/key-value-pairs/__tests__/key-value-pairs.js +1 -1
  49. package/dist/components/molecules/key-value-pairs/key-value-pairs.js +10 -9
  50. package/dist/components/molecules/keywords/keywords.js +6 -5
  51. package/dist/components/molecules/loading/__tests__/loading.test.js +1 -1
  52. package/dist/components/molecules/log-error-boundary/__stories__/log-error-boundary-story.js +1 -1
  53. package/dist/components/molecules/log-error-boundary/__tests__/log-error-boundary.test.js +2 -2
  54. package/dist/components/molecules/log-error-boundary/log-error-boundary.js +6 -5
  55. package/dist/components/molecules/modal/modal.js +6 -5
  56. package/dist/components/molecules/policies/index.js +4 -3
  57. package/dist/components/molecules/policies/privacy-policy.js +8 -7
  58. package/dist/components/molecules/policies/terms-of-use.js +8 -7
  59. package/dist/components/molecules/quote/quote.js +6 -5
  60. package/dist/components/molecules/radiogroup/__stories__/radio-group-form-story.js +12 -11
  61. package/dist/components/molecules/radiogroup/__stories__/radio-group-react-hook-form-story.js +15 -14
  62. package/dist/components/molecules/radiogroup/radiogroup.js +9 -9
  63. package/dist/components/molecules/related-articles/related-articles.js +15 -14
  64. package/dist/components/molecules/search/search.js +6 -5
  65. package/dist/components/molecules/stagger/stagger.js +6 -5
  66. package/dist/components/molecules/tile/corners.js +1 -1
  67. package/dist/components/molecules/tile/index.js +1 -1
  68. package/dist/components/molecules/tile/tile-interactive.js +5 -4
  69. package/dist/components/molecules/tile/tile.js +1 -1
  70. package/dist/components/molecules/time-progress/__tests__/progress.test.js +1 -1
  71. package/dist/components/molecules/time-progress/pilot/index.js +2 -3
  72. package/dist/components/molecules/time-progress/progress-over-year.js +6 -5
  73. package/dist/components/molecules/time-progress/progress.js +6 -5
  74. package/dist/components/molecules/user/anon-user.js +6 -5
  75. package/dist/components/molecules/user/user.js +7 -6
  76. package/dist/components/molecules/venn-diagram/__tests__/venn-diagram.tests.js +2 -2
  77. package/dist/components/molecules/venn-diagram/venn-diagram-circle.js +6 -5
  78. package/dist/components/molecules/venn-diagram/venn-diagram.js +6 -5
  79. package/dist/components/molecules/wallpaper/__tests__/wallpaper.tests.js +2 -2
  80. package/dist/components/molecules/wallpaper/wallpaper.js +1 -1
  81. package/dist/components/molecules/wrapper/__stories__/wrapper-children-story.js +6 -5
  82. package/dist/components/organisms/actors/actor/actor-builder-machine.js +2 -2
  83. package/dist/components/organisms/actors/actor/actor-builder.js +6 -5
  84. package/dist/components/organisms/actors/actor/actor.js +5 -4
  85. package/dist/components/organisms/actors/actor/index.js +1 -1
  86. package/dist/components/organisms/actors/animal/animal.js +1 -1
  87. package/dist/components/organisms/actors/monsters/troll/troll-machine.js +2 -2
  88. package/dist/components/organisms/actors/monsters/troll/troll.js +6 -5
  89. package/dist/components/organisms/actors/party/cleric/cleric.js +1 -1
  90. package/dist/components/organisms/actors/party/hunter/hunter.js +1 -1
  91. package/dist/components/organisms/actors/party/warrior/warrior.js +1 -1
  92. package/dist/components/organisms/actors/party/wizard/wizard.js +1 -1
  93. package/dist/components/organisms/actors/wisp/wisp.js +1 -1
  94. package/dist/components/organisms/ads/ad-card.js +6 -5
  95. package/dist/components/organisms/animation/animate-actor/animate-actor.js +6 -5
  96. package/dist/components/organisms/animation/one-day/one-day.js +15 -14
  97. package/dist/components/organisms/animation/reverse-text-animation/reverse-text-animation.js +6 -5
  98. package/dist/components/organisms/bento/layouts/five-by-four/bento-five-by-four.js +9 -8
  99. package/dist/components/organisms/bento/layouts/four-by-four/bento-four-by-four.js +6 -5
  100. package/dist/components/organisms/bento/layouts/three-by-three/bento-three-by-three.js +6 -5
  101. package/dist/components/organisms/bento/layouts/two-by-two/bento-two-by-two.js +6 -5
  102. package/dist/components/organisms/blog/__stories__/blog-story.js +9 -8
  103. package/dist/components/organisms/blog/blog-post/__stories__/blog-post-story.js +6 -5
  104. package/dist/components/organisms/blog/blog-post/blog-post-machine/build-listicle-machine.js +1 -1
  105. package/dist/components/organisms/blog/blog-post/blog-post-machine/delete-listicle-item.js +2 -2
  106. package/dist/components/organisms/blog/blog-post/blog-post-machine/load-listicle.js +2 -2
  107. package/dist/components/organisms/blog/blog-post/blog-post-machine/manage-listicle-items.js +1 -1
  108. package/dist/components/organisms/blog/blog-post/blog-post-machine/save-listicle-item.js +2 -2
  109. package/dist/components/organisms/blog/blog-post/blog-post-machine/save-listicle.js +2 -2
  110. package/dist/components/organisms/blog/blog-post/blog-post-machine/update-listice-item.js +2 -2
  111. package/dist/components/organisms/blog/blog-post/blog-post.js +6 -5
  112. package/dist/components/organisms/blog/blog-post-list.js +12 -11
  113. package/dist/components/organisms/blog/blog.js +6 -5
  114. package/dist/components/organisms/branch/branch.js +6 -5
  115. package/dist/components/organisms/branches/__tests__/branch-list.test.js +6 -4
  116. package/dist/components/organisms/branches/branch-list.js +61 -39
  117. package/dist/components/organisms/branches/branches.js +7 -6
  118. package/dist/components/organisms/calendar/calendar.js +6 -5
  119. package/dist/components/organisms/charts/chart/__stories__/data-set.js +1 -1
  120. package/dist/components/organisms/charts/chart/chart-gold-leaf/chart-gold-leaf.js +4 -3
  121. package/dist/components/organisms/clusters/cluster.js +6 -5
  122. package/dist/components/organisms/json-map-tile-grid/index.js +1 -1
  123. package/dist/components/organisms/json-map-tile-grid/json-map-tile-grid.js +6 -4
  124. package/dist/components/organisms/listicle/__stories__/andor-right-click-story.js +6 -5
  125. package/dist/components/organisms/listicle/__stories__/listicle-fb-v-canada-story.js +6 -5
  126. package/dist/components/organisms/listicle/__stories__/listicle-story.js +6 -5
  127. package/dist/components/organisms/listicle/build-listicle-machine/build-listicle-machine.js +1 -1
  128. package/dist/components/organisms/listicle/build-listicle-machine/delete-listicle-item.js +2 -2
  129. package/dist/components/organisms/listicle/build-listicle-machine/load-listicle.js +2 -2
  130. package/dist/components/organisms/listicle/build-listicle-machine/manage-listicle-items.js +1 -1
  131. package/dist/components/organisms/listicle/build-listicle-machine/save-listicle-item.js +2 -2
  132. package/dist/components/organisms/listicle/build-listicle-machine/save-listicle.js +2 -2
  133. package/dist/components/organisms/listicle/build-listicle-machine/update-listice-item.js +2 -2
  134. package/dist/components/organisms/listicle/edit-listicle/edit-listicle.js +13 -12
  135. package/dist/components/organisms/listicle/edit-listicle-item-list/edit-listicle-item-list.js +6 -5
  136. package/dist/components/organisms/listicle/edit-listicle-item-list/listicle-item-input.js +12 -11
  137. package/dist/components/organisms/listicle/edit-listicle-item-list/listicle-item.js +6 -5
  138. package/dist/components/organisms/listicle/listicle-builder.js +14 -13
  139. package/dist/components/organisms/listicle/listicle-item-list.js +12 -11
  140. package/dist/components/organisms/listicle/listicle.js +6 -5
  141. package/dist/components/organisms/listicle/post-link.js +7 -6
  142. package/dist/components/organisms/login/__stories__/login-story.js +6 -5
  143. package/dist/components/organisms/login/login-fetching-transition.js +6 -5
  144. package/dist/components/organisms/login/login-fields-transition.js +21 -20
  145. package/dist/components/organisms/login/login-response-transition.js +66 -11
  146. package/dist/components/organisms/login/login-submit-transition.js +6 -5
  147. package/dist/components/organisms/login/login-view.js +7 -6
  148. package/dist/components/organisms/metrics/metrics.js +6 -5
  149. package/dist/components/organisms/palettes/palettes.js +14 -12
  150. package/dist/components/organisms/player/player.js +6 -5
  151. package/dist/components/organisms/registration/password-strength-helper.js +11 -10
  152. package/dist/components/organisms/registration/post-registration.js +2 -2
  153. package/dist/components/organisms/registration/registration-form.js +6 -5
  154. package/dist/components/organisms/registration/registration-machine.js +2 -2
  155. package/dist/components/organisms/registration/registration-response.js +6 -5
  156. package/dist/components/organisms/registration/registration.js +7 -6
  157. package/dist/components/organisms/stage/stage.js +9 -8
  158. package/dist/components/organisms/survey/__stories__/build-form-story.js +6 -5
  159. package/dist/components/organisms/survey/build-form-machine.js +2 -2
  160. package/dist/components/organisms/survey/build-form.js +8 -7
  161. package/dist/components/organisms/survey/final-form.js +8 -7
  162. package/dist/components/organisms/survey/question/edit/__stories__/edit-question-story.js +6 -5
  163. package/dist/components/organisms/survey/question/edit/add-media.js +6 -5
  164. package/dist/components/organisms/survey/question/edit/add-question/__stories__/add-question-story.js +6 -5
  165. package/dist/components/organisms/survey/question/edit/add-question/add-question.js +30 -29
  166. package/dist/components/organisms/survey/question/edit/answer/answer-input.js +6 -5
  167. package/dist/components/organisms/survey/question/edit/answer-input.js +6 -5
  168. package/dist/components/organisms/survey/question/edit/edit-multiple-choice.js +6 -5
  169. package/dist/components/organisms/survey/question/edit/edit-option-list/edit-option-list-machine.js +2 -2
  170. package/dist/components/organisms/survey/question/edit/edit-option-list/edit-option-list.js +7 -6
  171. package/dist/components/organisms/survey/question/edit/edit-option-list/option-input.js +6 -5
  172. package/dist/components/organisms/survey/question/edit/edit-option-list/option.js +7 -6
  173. package/dist/components/organisms/survey/question/edit/question-answer-input.js +6 -5
  174. package/dist/components/organisms/survey/question/take/__stories__/multiple-choice-story.js +6 -5
  175. package/dist/components/organisms/survey/question/take/__stories__/take-answer-date-time-input-story.js +6 -5
  176. package/dist/components/organisms/survey/question/take/__stories__/take-answer-input-story.js +6 -5
  177. package/dist/components/organisms/survey/question/take/inputs/input-manager.js +6 -5
  178. package/dist/components/organisms/survey/question/take/multiple-choice.js +6 -5
  179. package/dist/components/organisms/survey/question/take/take-answer-input.js +12 -11
  180. package/dist/components/organisms/tile-grid/__tests__/tile-grid.tests.js +3 -3
  181. package/dist/components/organisms/tile-grid/grid-row.js +6 -5
  182. package/dist/components/organisms/tile-grid/index.js +1 -1
  183. package/dist/components/organisms/tile-grid/island-tile-grid.js +12 -11
  184. package/dist/components/organisms/tile-grid/tile-grid.js +6 -4
  185. package/dist/components/organisms/worlds/area-of-effect/__stories__/area-of-affect-story.js +6 -5
  186. package/dist/components/organisms/worlds/area-of-effect/area-of-affect.js +31 -29
  187. package/dist/components/organisms/worlds/island/__stories__/island-story.js +18 -16
  188. package/dist/components/organisms/worlds/island/__stories__/island-util.js +25 -23
  189. package/dist/components/pages/home/headwinds/header/headwinds-header.js +6 -5
  190. package/dist/components/pages/home/headwinds/headwinds-footer.js +6 -5
  191. package/dist/components/pages/home/headwinds/headwinds-hero.js +6 -5
  192. package/dist/components/pages/home/headwinds/headwinds-sidequest.js +35 -34
  193. package/dist/components/pages/home/headwinds/home.js +9 -8
  194. package/dist/components/pages/index.js +6 -5
  195. package/dist/components/pages/profile/headwinds/headwinds-profile.js +21 -20
  196. package/dist/components/pages/profile/index.js +4 -3
  197. package/dist/components/templates/articles/article/article.js +6 -5
  198. package/dist/components/templates/home/headwinds/headwinds-home-hero.js +6 -5
  199. package/dist/components/templates/home/headwinds/headwinds-home.js +6 -5
  200. package/dist/components/templates/home/home.js +10 -9
  201. package/dist/fp-util-DZLSTUg5.js +8 -0
  202. package/dist/gold-leaf-view-CgRraK2i.js +183 -0
  203. package/dist/gold-leaf-view.module-p3mWnO60.js +17 -0
  204. package/dist/headline-DzDFQZ3e.js +11 -0
  205. package/dist/image-find-util-DMX6BcO-.js +1036 -0
  206. package/dist/index-BTF1caLu.js +2529 -0
  207. package/dist/{index-COQaJqs5.js → index-OdyFkztm.js} +3670 -2660
  208. package/dist/{index-DsigmIMS.js → index-_cvPLH70.js} +1 -1
  209. package/dist/index.esm-DGm91C_6.js +944 -0
  210. package/dist/index.js +143 -140
  211. package/dist/lib/components/atoms/list/index.d.ts +2 -0
  212. package/dist/lib/components/atoms/list/list-item/index.d.ts +2 -0
  213. package/dist/lib/components/atoms/list/list-item/list-item.d.ts +10 -0
  214. package/dist/lib/components/atoms/list/list.d.ts +12 -0
  215. package/dist/lib/components/molecules/gold-leaf/gold-leaf-view/title-image/gold-title-card.d.ts +4 -0
  216. package/dist/lib/components/organisms/branch/branch.d.ts +3 -1
  217. package/dist/lib/components/organisms/branches/__stories__/branches.stories.d.ts +7 -0
  218. package/dist/lib/components/organisms/branches/branch-list.d.ts +4 -1
  219. package/dist/lib/models/TreeModel.d.ts +12 -0
  220. package/dist/lib/models/index.d.ts +1 -0
  221. package/dist/lib/utils/golds/feed-util.d.ts +17 -0
  222. package/dist/lib/utils/index.d.ts +5 -0
  223. package/dist/list.module-pjS_KHqp.js +10 -0
  224. package/dist/{log-2a4cc478.esm-HFv7vQ7j.js → log-2a4cc478.esm-BdzQp5f-.js} +15 -15
  225. package/dist/{log-error-boundary-story-BF8rmHhr.js → log-error-boundary-story-CcyM__Yt.js} +6541 -7185
  226. package/dist/{magic-string.es-VsGWiGpd.js → magic-string.es-QkQE39Zh.js} +11 -6
  227. package/dist/{radio-BTUtRmLM.js → mobile-detect-CWVWWCSg.js} +12 -51
  228. package/dist/models/TreeModel.js +12 -0
  229. package/dist/models/index.js +3 -2
  230. package/dist/{react-spring_web.modern-nSq5Xzxb.js → react-spring_web.modern-ClBJWBW2.js} +281 -273
  231. package/dist/{react.esm-BEaxtOYu.js → react.esm-BpVcViTQ.js} +2197 -2181
  232. package/dist/string-util-D7tmqJRS.js +35 -0
  233. package/dist/table-data-BnRZ5F7y.js +16 -0
  234. package/dist/utils/golds/feed-util.js +240 -0
  235. package/dist/utils/index.js +12 -0
  236. package/dist/{vi.YFlodzP_-CjWVzrI3.js → vi.YFlodzP_-C3qjkUdf.js} +2 -2
  237. package/dist/{xstate-actors.esm-Ba6reXm_.js → xstate-actors.esm-CcLF5JHw.js} +1 -1
  238. package/dist/{xstate-react.esm-Ct8KIFgA.js → xstate-react.esm-DWdE0_Ay.js} +1 -1
  239. package/dist/{xstate.esm-Bo02HSs2.js → xstate.esm-COAqQ2fq.js} +11 -11
  240. package/package.json +4 -2
  241. package/dist/Color-ERTF36HU-DRLqcX19.js +0 -358
  242. package/dist/_getTag-CqbPZ7Cl.js +0 -449
  243. package/dist/components/organisms/branches/__stories__/branches-story.js +0 -6
  244. package/dist/components/organisms/branches/branch-list.types.js +0 -1
  245. package/dist/feed-util-CZfVh6cR.js +0 -244
  246. package/dist/fp-util-4N0NK_eU.js +0 -8
  247. package/dist/gold-leaf-view-BAGw5McJ.js +0 -117
  248. package/dist/gold-leaf-view.module-BTNjKEeW.js +0 -17
  249. package/dist/headline-DuHL8hAt.js +0 -11
  250. package/dist/image-find-util-Cl2ZJHfC.js +0 -41
  251. package/dist/index-BsYJgl86.js +0 -3853
  252. package/dist/index-Cdg9lY68.js +0 -542
  253. package/dist/index.esm-BrPDxyfz.js +0 -933
  254. package/dist/lib/components/organisms/branches/__stories__/branches-story.d.ts +0 -2
  255. package/dist/lib/components/organisms/branches/branch-list.types.d.ts +0 -5
  256. package/dist/list-BkQjCFcb.js +0 -14
  257. package/dist/list-item-DyDjznkQ.js +0 -8
  258. package/dist/login-response-transition-Dws0eBbH.js +0 -123
  259. package/dist/table-data-PGM-_ef9.js +0 -16
@@ -1,358 +0,0 @@
1
- import { P as k, t as ue, r as ye, x as we, Q as Ce, U as $e } from "./log-error-boundary-story-BF8rmHhr.js";
2
- import c, { useRef as $, useMemo as U, useEffect as O, useState as L, useCallback as P, useLayoutEffect as ke } from "react";
3
- import { g as se } from "./index-DukGzmpD.js";
4
- import { r as Ne } from "./index-Cdg9lY68.js";
5
- import { _ as Ie, i as Me, a as Oe, b as ce } from "./_getTag-CqbPZ7Cl.js";
6
- var Se = Ie, Te = Me, He = "[object Symbol]";
7
- function Le(e) {
8
- return typeof e == "symbol" || Te(e) && Se(e) == He;
9
- }
10
- var Re = Le, Pe = Ne();
11
- const E = /* @__PURE__ */ se(Pe);
12
- var je = Oe, ze = function() {
13
- return je.Date.now();
14
- }, Be = ze, Xe = /\s/;
15
- function We(e) {
16
- for (var r = e.length; r-- && Xe.test(e.charAt(r)); )
17
- ;
18
- return r;
19
- }
20
- var De = We, Ge = De, Ve = /^\s+/;
21
- function Ae(e) {
22
- return e && e.slice(0, Ge(e) + 1).replace(Ve, "");
23
- }
24
- var qe = Ae, Fe = qe, ee = ce, Ke = Re, re = NaN, Ue = /^[-+]0x[0-9a-f]+$/i, Ye = /^0b[01]+$/i, Qe = /^0o[0-7]+$/i, Je = parseInt;
25
- function Ze(e) {
26
- if (typeof e == "number")
27
- return e;
28
- if (Ke(e))
29
- return re;
30
- if (ee(e)) {
31
- var r = typeof e.valueOf == "function" ? e.valueOf() : e;
32
- e = ee(r) ? r + "" : r;
33
- }
34
- if (typeof e != "string")
35
- return e === 0 ? e : +e;
36
- e = Fe(e);
37
- var t = Ye.test(e);
38
- return t || Qe.test(e) ? Je(e.slice(2), t ? 2 : 8) : Ue.test(e) ? re : +e;
39
- }
40
- var er = Ze, rr = ce, G = Be, te = er, tr = "Expected a function", nr = Math.max, ar = Math.min;
41
- function or(e, r, t) {
42
- var n, a, i, l, o, u, s = 0, h = !1, d = !1, f = !0;
43
- if (typeof e != "function")
44
- throw new TypeError(tr);
45
- r = te(r) || 0, rr(t) && (h = !!t.leading, d = "maxWait" in t, i = d ? nr(te(t.maxWait) || 0, r) : i, f = "trailing" in t ? !!t.trailing : f);
46
- function b(g) {
47
- var C = n, H = a;
48
- return n = a = void 0, s = g, l = e.apply(H, C), l;
49
- }
50
- function T(g) {
51
- return s = g, o = setTimeout(m, r), h ? b(g) : l;
52
- }
53
- function w(g) {
54
- var C = g - u, H = g - s, Z = r - C;
55
- return d ? ar(Z, i - H) : Z;
56
- }
57
- function v(g) {
58
- var C = g - u, H = g - s;
59
- return u === void 0 || C >= r || C < 0 || d && H >= i;
60
- }
61
- function m() {
62
- var g = G();
63
- if (v(g))
64
- return x(g);
65
- o = setTimeout(m, w(g));
66
- }
67
- function x(g) {
68
- return o = void 0, f && n ? b(g) : (n = a = void 0, l);
69
- }
70
- function y() {
71
- o !== void 0 && clearTimeout(o), s = 0, n = u = a = o = void 0;
72
- }
73
- function _() {
74
- return o === void 0 ? l : x(G());
75
- }
76
- function N() {
77
- var g = G(), C = v(g);
78
- if (n = arguments, a = this, u = g, C) {
79
- if (o === void 0)
80
- return T(u);
81
- if (d)
82
- return clearTimeout(o), o = setTimeout(m, r), b(u);
83
- }
84
- return o === void 0 && (o = setTimeout(m, r)), l;
85
- }
86
- return N.cancel = y, N.flush = _, N;
87
- }
88
- var ir = or;
89
- const lr = /* @__PURE__ */ se(ir);
90
- function I() {
91
- return (I = Object.assign || function(e) {
92
- for (var r = 1; r < arguments.length; r++) {
93
- var t = arguments[r];
94
- for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
95
- }
96
- return e;
97
- }).apply(this, arguments);
98
- }
99
- function Y(e, r) {
100
- if (e == null) return {};
101
- var t, n, a = {}, i = Object.keys(e);
102
- for (n = 0; n < i.length; n++) r.indexOf(t = i[n]) >= 0 || (a[t] = e[t]);
103
- return a;
104
- }
105
- function V(e) {
106
- var r = $(e), t = $(function(n) {
107
- r.current && r.current(n);
108
- });
109
- return r.current = e, t.current;
110
- }
111
- var S = function(e, r, t) {
112
- return r === void 0 && (r = 0), t === void 0 && (t = 1), e > t ? t : e < r ? r : e;
113
- }, R = function(e) {
114
- return "touches" in e;
115
- }, A = function(e) {
116
- return e && e.ownerDocument.defaultView || self;
117
- }, ne = function(e, r, t) {
118
- var n = e.getBoundingClientRect(), a = R(r) ? function(i, l) {
119
- for (var o = 0; o < i.length; o++) if (i[o].identifier === l) return i[o];
120
- return i[0];
121
- }(r.touches, t) : r;
122
- return { left: S((a.pageX - (n.left + A(e).pageXOffset)) / n.width), top: S((a.pageY - (n.top + A(e).pageYOffset)) / n.height) };
123
- }, ae = function(e) {
124
- !R(e) && e.preventDefault();
125
- }, Q = c.memo(function(e) {
126
- var r = e.onMove, t = e.onKey, n = Y(e, ["onMove", "onKey"]), a = $(null), i = V(r), l = V(t), o = $(null), u = $(!1), s = U(function() {
127
- var b = function(v) {
128
- ae(v), (R(v) ? v.touches.length > 0 : v.buttons > 0) && a.current ? i(ne(a.current, v, o.current)) : w(!1);
129
- }, T = function() {
130
- return w(!1);
131
- };
132
- function w(v) {
133
- var m = u.current, x = A(a.current), y = v ? x.addEventListener : x.removeEventListener;
134
- y(m ? "touchmove" : "mousemove", b), y(m ? "touchend" : "mouseup", T);
135
- }
136
- return [function(v) {
137
- var m = v.nativeEvent, x = a.current;
138
- if (x && (ae(m), !function(_, N) {
139
- return N && !R(_);
140
- }(m, u.current) && x)) {
141
- if (R(m)) {
142
- u.current = !0;
143
- var y = m.changedTouches || [];
144
- y.length && (o.current = y[0].identifier);
145
- }
146
- x.focus(), i(ne(x, m, o.current)), w(!0);
147
- }
148
- }, function(v) {
149
- var m = v.which || v.keyCode;
150
- m < 37 || m > 40 || (v.preventDefault(), l({ left: m === 39 ? 0.05 : m === 37 ? -0.05 : 0, top: m === 40 ? 0.05 : m === 38 ? -0.05 : 0 }));
151
- }, w];
152
- }, [l, i]), h = s[0], d = s[1], f = s[2];
153
- return O(function() {
154
- return f;
155
- }, [f]), c.createElement("div", I({}, n, { onTouchStart: h, onMouseDown: h, className: "react-colorful__interactive", ref: a, onKeyDown: d, tabIndex: 0, role: "slider" }));
156
- }), j = function(e) {
157
- return e.filter(Boolean).join(" ");
158
- }, J = function(e) {
159
- var r = e.color, t = e.left, n = e.top, a = n === void 0 ? 0.5 : n, i = j(["react-colorful__pointer", e.className]);
160
- return c.createElement("div", { className: i, style: { top: 100 * a + "%", left: 100 * t + "%" } }, c.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: r } }));
161
- }, p = function(e, r, t) {
162
- return r === void 0 && (r = 0), t === void 0 && (t = Math.pow(10, r)), Math.round(t * e) / t;
163
- }, ur = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, sr = function(e) {
164
- return he(q(e));
165
- }, q = function(e) {
166
- return e[0] === "#" && (e = e.substring(1)), e.length < 6 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ? p(parseInt(e[3] + e[3], 16) / 255, 2) : 1 } : { r: parseInt(e.substring(0, 2), 16), g: parseInt(e.substring(2, 4), 16), b: parseInt(e.substring(4, 6), 16), a: e.length === 8 ? p(parseInt(e.substring(6, 8), 16) / 255, 2) : 1 };
167
- }, cr = function(e, r) {
168
- return r === void 0 && (r = "deg"), Number(e) * (ur[r] || 1);
169
- }, fr = function(e) {
170
- var r = /hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);
171
- return r ? dr({ h: cr(r[1], r[2]), s: Number(r[3]), l: Number(r[4]), a: r[5] === void 0 ? 1 : Number(r[5]) / (r[6] ? 100 : 1) }) : { h: 0, s: 0, v: 0, a: 1 };
172
- }, dr = function(e) {
173
- var r = e.s, t = e.l;
174
- return { h: e.h, s: (r *= (t < 50 ? t : 100 - t) / 100) > 0 ? 2 * r / (t + r) * 100 : 0, v: t + r, a: e.a };
175
- }, hr = function(e) {
176
- return gr(de(e));
177
- }, fe = function(e) {
178
- var r = e.s, t = e.v, n = e.a, a = (200 - r) * t / 100;
179
- return { h: p(e.h), s: p(a > 0 && a < 200 ? r * t / 100 / (a <= 100 ? a : 200 - a) * 100 : 0), l: p(a / 2), a: p(n, 2) };
180
- }, F = function(e) {
181
- var r = fe(e);
182
- return "hsl(" + r.h + ", " + r.s + "%, " + r.l + "%)";
183
- }, W = function(e) {
184
- var r = fe(e);
185
- return "hsla(" + r.h + ", " + r.s + "%, " + r.l + "%, " + r.a + ")";
186
- }, de = function(e) {
187
- var r = e.h, t = e.s, n = e.v, a = e.a;
188
- r = r / 360 * 6, t /= 100, n /= 100;
189
- var i = Math.floor(r), l = n * (1 - t), o = n * (1 - (r - i) * t), u = n * (1 - (1 - r + i) * t), s = i % 6;
190
- return { r: p(255 * [n, o, l, l, u, n][s]), g: p(255 * [u, n, n, o, l, l][s]), b: p(255 * [l, l, u, n, n, o][s]), a: p(a, 2) };
191
- }, mr = function(e) {
192
- var r = /rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);
193
- return r ? he({ r: Number(r[1]) / (r[2] ? 100 / 255 : 1), g: Number(r[3]) / (r[4] ? 100 / 255 : 1), b: Number(r[5]) / (r[6] ? 100 / 255 : 1), a: r[7] === void 0 ? 1 : Number(r[7]) / (r[8] ? 100 : 1) }) : { h: 0, s: 0, v: 0, a: 1 };
194
- }, z = function(e) {
195
- var r = e.toString(16);
196
- return r.length < 2 ? "0" + r : r;
197
- }, gr = function(e) {
198
- var r = e.r, t = e.g, n = e.b, a = e.a, i = a < 1 ? z(p(255 * a)) : "";
199
- return "#" + z(r) + z(t) + z(n) + i;
200
- }, he = function(e) {
201
- var r = e.r, t = e.g, n = e.b, a = e.a, i = Math.max(r, t, n), l = i - Math.min(r, t, n), o = l ? i === r ? (t - n) / l : i === t ? 2 + (n - r) / l : 4 + (r - t) / l : 0;
202
- return { h: p(60 * (o < 0 ? o + 6 : o)), s: p(i ? l / i * 100 : 0), v: p(i / 255 * 100), a };
203
- }, me = c.memo(function(e) {
204
- var r = e.hue, t = e.onChange, n = j(["react-colorful__hue", e.className]);
205
- return c.createElement("div", { className: n }, c.createElement(Q, { onMove: function(a) {
206
- t({ h: 360 * a.left });
207
- }, onKey: function(a) {
208
- t({ h: S(r + 360 * a.left, 0, 360) });
209
- }, "aria-label": "Hue", "aria-valuenow": p(r), "aria-valuemax": "360", "aria-valuemin": "0" }, c.createElement(J, { className: "react-colorful__hue-pointer", left: r / 360, color: F({ h: r, s: 100, v: 100, a: 1 }) })));
210
- }), ge = c.memo(function(e) {
211
- var r = e.hsva, t = e.onChange, n = { backgroundColor: F({ h: r.h, s: 100, v: 100, a: 1 }) };
212
- return c.createElement("div", { className: "react-colorful__saturation", style: n }, c.createElement(Q, { onMove: function(a) {
213
- t({ s: 100 * a.left, v: 100 - 100 * a.top });
214
- }, onKey: function(a) {
215
- t({ s: S(r.s + 100 * a.left, 0, 100), v: S(r.v - 100 * a.top, 0, 100) });
216
- }, "aria-label": "Color", "aria-valuetext": "Saturation " + p(r.s) + "%, Brightness " + p(r.v) + "%" }, c.createElement(J, { className: "react-colorful__saturation-pointer", top: 1 - r.v / 100, left: r.s / 100, color: F(r) })));
217
- }), ve = function(e, r) {
218
- if (e === r) return !0;
219
- for (var t in e) if (e[t] !== r[t]) return !1;
220
- return !0;
221
- }, pe = function(e, r) {
222
- return e.replace(/\s/g, "") === r.replace(/\s/g, "");
223
- }, vr = function(e, r) {
224
- return e.toLowerCase() === r.toLowerCase() || ve(q(e), q(r));
225
- };
226
- function be(e, r, t) {
227
- var n = V(t), a = L(function() {
228
- return e.toHsva(r);
229
- }), i = a[0], l = a[1], o = $({ color: r, hsva: i });
230
- O(function() {
231
- if (!e.equal(r, o.current.color)) {
232
- var s = e.toHsva(r);
233
- o.current = { hsva: s, color: r }, l(s);
234
- }
235
- }, [r, e]), O(function() {
236
- var s;
237
- ve(i, o.current.hsva) || e.equal(s = e.fromHsva(i), o.current.color) || (o.current = { hsva: i, color: s }, n(s));
238
- }, [i, e, n]);
239
- var u = P(function(s) {
240
- l(function(h) {
241
- return Object.assign({}, h, s);
242
- });
243
- }, []);
244
- return [i, u];
245
- }
246
- var pr = typeof window < "u" ? ke : O, br = function() {
247
- return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0;
248
- }, oe = /* @__PURE__ */ new Map(), xe = function(e) {
249
- pr(function() {
250
- var r = e.current ? e.current.ownerDocument : document;
251
- if (r !== void 0 && !oe.has(r)) {
252
- var t = r.createElement("style");
253
- t.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, oe.set(r, t);
254
- var n = br();
255
- n && t.setAttribute("nonce", n), r.head.appendChild(t);
256
- }
257
- }, []);
258
- }, xr = function(e) {
259
- var r = e.className, t = e.colorModel, n = e.color, a = n === void 0 ? t.defaultColor : n, i = e.onChange, l = Y(e, ["className", "colorModel", "color", "onChange"]), o = $(null);
260
- xe(o);
261
- var u = be(t, a, i), s = u[0], h = u[1], d = j(["react-colorful", r]);
262
- return c.createElement("div", I({}, l, { ref: o, className: d }), c.createElement(ge, { hsva: s, onChange: h }), c.createElement(me, { hue: s.h, onChange: h, className: "react-colorful__last-control" }));
263
- }, _r = { defaultColor: "000", toHsva: sr, fromHsva: function(e) {
264
- return hr({ h: e.h, s: e.s, v: e.v, a: 1 });
265
- }, equal: vr }, Er = function(e) {
266
- return c.createElement(xr, I({}, e, { colorModel: _r }));
267
- }, yr = function(e) {
268
- var r = e.className, t = e.hsva, n = e.onChange, a = { backgroundImage: "linear-gradient(90deg, " + W(Object.assign({}, t, { a: 0 })) + ", " + W(Object.assign({}, t, { a: 1 })) + ")" }, i = j(["react-colorful__alpha", r]), l = p(100 * t.a);
269
- return c.createElement("div", { className: i }, c.createElement("div", { className: "react-colorful__alpha-gradient", style: a }), c.createElement(Q, { onMove: function(o) {
270
- n({ a: o.left });
271
- }, onKey: function(o) {
272
- n({ a: S(t.a + o.left) });
273
- }, "aria-label": "Alpha", "aria-valuetext": l + "%", "aria-valuenow": l, "aria-valuemin": "0", "aria-valuemax": "100" }, c.createElement(J, { className: "react-colorful__alpha-pointer", left: t.a, color: W(t) })));
274
- }, _e = function(e) {
275
- var r = e.className, t = e.colorModel, n = e.color, a = n === void 0 ? t.defaultColor : n, i = e.onChange, l = Y(e, ["className", "colorModel", "color", "onChange"]), o = $(null);
276
- xe(o);
277
- var u = be(t, a, i), s = u[0], h = u[1], d = j(["react-colorful", r]);
278
- return c.createElement("div", I({}, l, { ref: o, className: d }), c.createElement(ge, { hsva: s, onChange: h }), c.createElement(me, { hue: s.h, onChange: h }), c.createElement(yr, { hsva: s, onChange: h, className: "react-colorful__last-control" }));
279
- }, wr = { defaultColor: "hsla(0, 0%, 0%, 1)", toHsva: fr, fromHsva: W, equal: pe }, Cr = function(e) {
280
- return c.createElement(_e, I({}, e, { colorModel: wr }));
281
- }, $r = { defaultColor: "rgba(0, 0, 0, 1)", toHsva: mr, fromHsva: function(e) {
282
- var r = de(e);
283
- return "rgba(" + r.r + ", " + r.g + ", " + r.b + ", " + r.a + ")";
284
- }, equal: pe }, kr = function(e) {
285
- return c.createElement(_e, I({}, e, { colorModel: $r }));
286
- }, Nr = k.div({ position: "relative", maxWidth: 250, '&[aria-readonly="true"]': { opacity: 0.5 } }), Ir = k(ue)({ position: "absolute", zIndex: 1, top: 4, left: 4, "[aria-readonly=true] &": { cursor: "not-allowed" } }), Mr = k.div({ width: 200, margin: 5, ".react-colorful__saturation": { borderRadius: "4px 4px 0 0" }, ".react-colorful__hue": { boxShadow: "inset 0 0 0 1px rgb(0 0 0 / 5%)" }, ".react-colorful__last-control": { borderRadius: "0 0 4px 4px" } }), Or = k(ye)(({ theme: e }) => ({ fontFamily: e.typography.fonts.base })), Sr = k.div({ display: "grid", gridTemplateColumns: "repeat(9, 16px)", gap: 6, padding: 3, marginTop: 5, width: 200 }), Tr = k.div(({ theme: e, active: r }) => ({ width: 16, height: 16, boxShadow: r ? `${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px` : `${e.appBorderColor} 0 0 0 1px inset`, borderRadius: e.appBorderRadius })), Hr = `url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')`, ie = ({ value: e, style: r, ...t }) => {
287
- let n = `linear-gradient(${e}, ${e}), ${Hr}, linear-gradient(#fff, #fff)`;
288
- return c.createElement(Tr, { ...t, style: { ...r, backgroundImage: n } });
289
- }, Lr = k(we.Input)(({ theme: e, readOnly: r }) => ({ width: "100%", paddingLeft: 30, paddingRight: 30, boxSizing: "border-box", fontFamily: e.typography.fonts.base })), Rr = k(Ce)(({ theme: e }) => ({ position: "absolute", zIndex: 1, top: 6, right: 7, width: 20, height: 20, padding: 4, boxSizing: "border-box", cursor: "pointer", color: e.input.color })), Ee = ((e) => (e.RGB = "rgb", e.HSL = "hsl", e.HEX = "hex", e))(Ee || {}), B = Object.values(Ee), Pr = /\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/, jr = /^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i, zr = /^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i, K = /^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i, Br = /^\s*#?([0-9a-f]{3})\s*$/i, Xr = { hex: Er, rgb: kr, hsl: Cr }, X = { hex: "transparent", rgb: "rgba(0, 0, 0, 0)", hsl: "hsla(0, 0%, 0%, 0)" }, le = (e) => {
290
- let r = e == null ? void 0 : e.match(Pr);
291
- if (!r) return [0, 0, 0, 1];
292
- let [, t, n, a, i = 1] = r;
293
- return [t, n, a, i].map(Number);
294
- }, M = (e) => {
295
- if (!e) return;
296
- let r = !0;
297
- if (jr.test(e)) {
298
- let [l, o, u, s] = le(e), [h, d, f] = E.rgb.hsl([l, o, u]) || [0, 0, 0];
299
- return { valid: r, value: e, keyword: E.rgb.keyword([l, o, u]), colorSpace: "rgb", rgb: e, hsl: `hsla(${h}, ${d}%, ${f}%, ${s})`, hex: `#${E.rgb.hex([l, o, u]).toLowerCase()}` };
300
- }
301
- if (zr.test(e)) {
302
- let [l, o, u, s] = le(e), [h, d, f] = E.hsl.rgb([l, o, u]) || [0, 0, 0];
303
- return { valid: r, value: e, keyword: E.hsl.keyword([l, o, u]), colorSpace: "hsl", rgb: `rgba(${h}, ${d}, ${f}, ${s})`, hsl: e, hex: `#${E.hsl.hex([l, o, u]).toLowerCase()}` };
304
- }
305
- let t = e.replace("#", ""), n = E.keyword.rgb(t) || E.hex.rgb(t), a = E.rgb.hsl(n), i = e;
306
- if (/[^#a-f0-9]/i.test(e) ? i = t : K.test(e) && (i = `#${t}`), i.startsWith("#")) r = K.test(i);
307
- else try {
308
- E.keyword.hex(i);
309
- } catch {
310
- r = !1;
311
- }
312
- return { valid: r, value: i, keyword: E.rgb.keyword(n), colorSpace: "hex", rgb: `rgba(${n[0]}, ${n[1]}, ${n[2]}, 1)`, hsl: `hsla(${a[0]}, ${a[1]}%, ${a[2]}%, 1)`, hex: i };
313
- }, Wr = (e, r, t) => {
314
- if (!e || !(r != null && r.valid)) return X[t];
315
- if (t !== "hex") return (r == null ? void 0 : r[t]) || X[t];
316
- if (!r.hex.startsWith("#")) try {
317
- return `#${E.keyword.hex(r.hex)}`;
318
- } catch {
319
- return X.hex;
320
- }
321
- let n = r.hex.match(Br);
322
- if (!n) return K.test(r.hex) ? r.hex : X.hex;
323
- let [a, i, l] = n[1].split("");
324
- return `#${a}${a}${i}${i}${l}${l}`;
325
- }, Dr = (e, r) => {
326
- let [t, n] = L(e || ""), [a, i] = L(() => M(t)), [l, o] = L((a == null ? void 0 : a.colorSpace) || "hex");
327
- O(() => {
328
- let d = e || "", f = M(d);
329
- n(d), i(f), o((f == null ? void 0 : f.colorSpace) || "hex");
330
- }, [e]);
331
- let u = U(() => Wr(t, a, l).toLowerCase(), [t, a, l]), s = P((d) => {
332
- let f = M(d), b = (f == null ? void 0 : f.value) || d || "";
333
- n(b), b === "" && (i(void 0), r(void 0)), f && (i(f), o(f.colorSpace), r(f.value));
334
- }, [r]), h = P(() => {
335
- let d = B.indexOf(l) + 1;
336
- d >= B.length && (d = 0), o(B[d]);
337
- let f = (a == null ? void 0 : a[B[d]]) || "";
338
- n(f), r(f);
339
- }, [a, l, r]);
340
- return { value: t, realValue: u, updateValue: s, color: a, colorSpace: l, cycleColorSpace: h };
341
- }, D = (e) => e.replace(/\s*/, "").toLowerCase(), Gr = (e, r, t) => {
342
- let [n, a] = L(r != null && r.valid ? [r] : []);
343
- O(() => {
344
- r === void 0 && a([]);
345
- }, [r]);
346
- let i = U(() => (e || []).map((o) => typeof o == "string" ? M(o) : o.title ? { ...M(o.color), keyword: o.title } : M(o.color)).concat(n).filter(Boolean).slice(-27), [e, n]), l = P((o) => {
347
- o != null && o.valid && (i.some((u) => D(u[t]) === D(o[t])) || a((u) => u.concat(o)));
348
- }, [t, i]);
349
- return { presets: i, addPreset: l };
350
- }, Vr = ({ name: e, value: r, onChange: t, onFocus: n, onBlur: a, presetColors: i, startOpen: l = !1, argType: o }) => {
351
- var y;
352
- let u = P(lr(t, 200), [t]), { value: s, realValue: h, updateValue: d, color: f, colorSpace: b, cycleColorSpace: T } = Dr(r, u), { presets: w, addPreset: v } = Gr(i, f, b), m = Xr[b], x = !!((y = o == null ? void 0 : o.table) != null && y.readonly);
353
- return c.createElement(Nr, { "aria-readonly": x }, c.createElement(Ir, { startOpen: l, trigger: x ? [null] : void 0, closeOnOutsideClick: !0, onVisibleChange: () => v(f), tooltip: c.createElement(Mr, null, c.createElement(m, { color: h === "transparent" ? "#000000" : h, onChange: d, onFocus: n, onBlur: a }), w.length > 0 && c.createElement(Sr, null, w.map((_, N) => c.createElement(ue, { key: `${_.value}-${N}`, hasChrome: !1, tooltip: c.createElement(Or, { note: _.keyword || _.value }) }, c.createElement(ie, { value: _[b], active: f && D(_[b]) === D(f[b]), onClick: () => d(_.value) }))))) }, c.createElement(ie, { value: h, style: { margin: 4 } })), c.createElement(Lr, { id: $e(e), value: s, onChange: (_) => d(_.target.value), onFocus: (_) => _.target.select(), readOnly: x, placeholder: "Choose color..." }), s ? c.createElement(Rr, { onClick: T }) : null);
354
- }, Yr = Vr;
355
- export {
356
- Vr as ColorControl,
357
- Yr as default
358
- };