@loftyshaky/shared-app 1.2.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/_locales/en/messages.json +60 -27
  2. package/_locales/ru/messages.json +53 -29
  3. package/announcement.d.ts +1 -1
  4. package/announcement.js +1 -1
  5. package/app.d.ts +1 -1
  6. package/app.js +1 -1
  7. package/chunk-error.js +5 -0
  8. package/chunk-index.js +5 -0
  9. package/chunk-merge.js +5 -0
  10. package/chunk-pickr.min.js +1 -1
  11. package/chunk-title.js +14 -0
  12. package/chunk-viewport.js +5 -0
  13. package/dependencies.js +1 -1
  14. package/dependencies.txt +75 -87
  15. package/ext.d.ts +1 -1
  16. package/ext.js +1 -1
  17. package/globals.d.ts +17 -14
  18. package/inputs.js +1 -1
  19. package/js/apps.js +8 -1
  20. package/js/dependencies.js +4 -0
  21. package/js/task_scheduler.js +7 -1
  22. package/js/webpack.config.js +2 -0
  23. package/package.json +1 -1
  24. package/scss/settings/ext_version.scss +2 -2
  25. package/scss/settings/main.scss +2 -1
  26. package/scss/settings/sections.scss +1 -0
  27. package/scss/shared/btns.scss +15 -1
  28. package/scss/shared/checkboxes.scss +1 -0
  29. package/scss/shared/colors.scss +1 -1
  30. package/scss/shared/group.scss +17 -0
  31. package/scss/shared/help.scss +5 -0
  32. package/scss/shared/inputs.scss +2 -3
  33. package/scss/shared/offers.scss +19 -1
  34. package/scss/shared/selects.scss +22 -16
  35. package/scss/shared/themes/general/template.scss +32 -28
  36. package/scss/shared/transitions.scss +1 -0
  37. package/settings.d.ts +1 -1
  38. package/settings.js +1 -1
  39. package/shared.d.ts +4 -0
  40. package/shared.js +5 -0
  41. package/shared_clean.d.ts +2 -0
  42. package/shared_clean.js +5 -0
  43. package/ts/announcement/internal.d.ts +0 -1
  44. package/ts/dependencies/scripts/dependencies.d.ts +5 -3
  45. package/ts/error_modules/crash_handler/components/body.d.ts +1 -1
  46. package/ts/error_modules/crash_handler/components/prop_types/body.d.ts +0 -1
  47. package/ts/error_modules/crash_handler/data/visibility.d.ts +5 -3
  48. package/ts/error_modules/crash_handler/scripts/page.d.ts +5 -3
  49. package/ts/error_modules/css/scripts/css.d.ts +10 -0
  50. package/ts/error_modules/css/scripts/index.d.ts +1 -1
  51. package/ts/error_modules/error/components/prop_types/body.d.ts +1 -1
  52. package/ts/error_modules/error/data/error.d.ts +13 -0
  53. package/ts/error_modules/error/data/index.d.ts +1 -1
  54. package/ts/error_modules/error/data/msg.d.ts +5 -3
  55. package/ts/error_modules/error/data/progress.d.ts +5 -3
  56. package/ts/error_modules/error/data/state.d.ts +6 -4
  57. package/ts/error_modules/error/scripts/flash.d.ts +5 -3
  58. package/ts/error_modules/error/scripts/notification.d.ts +7 -5
  59. package/ts/error_modules/internal.d.ts +2 -1
  60. package/ts/error_modules_clean/error/data/error.d.ts +11 -0
  61. package/ts/error_modules_clean/error/data/index.d.ts +1 -0
  62. package/ts/{error_modules → error_modules_clean}/error/interfaces/index.d.ts +4 -0
  63. package/ts/{error_modules → error_modules_clean}/error/interfaces/show_error.d.ts +3 -0
  64. package/ts/error_modules_clean/error/interfaces/show_error_state_1.d.ts +11 -0
  65. package/ts/error_modules_clean/error/interfaces/show_error_state_1_f.d.ts +2 -0
  66. package/ts/error_modules_clean/error/interfaces/show_error_state_2.d.ts +6 -0
  67. package/ts/error_modules_clean/error/interfaces/show_error_state_2_f.d.ts +2 -0
  68. package/ts/error_modules_clean/error/scripts/index.d.ts +1 -0
  69. package/ts/error_modules_clean/internal.d.ts +4 -0
  70. package/ts/inputs/color/data/color.d.ts +10 -9
  71. package/ts/inputs/color/data/visibility.d.ts +6 -4
  72. package/ts/inputs/color/interfaces/index.d.ts +0 -1
  73. package/ts/inputs/color/obj/color.d.ts +1 -1
  74. package/ts/inputs/color/scripts/color_picker.d.ts +6 -4
  75. package/ts/inputs/color/scripts/position.d.ts +5 -3
  76. package/ts/inputs/components/prop_types/checkbox.d.ts +1 -0
  77. package/ts/inputs/components/prop_types/input_item.d.ts +0 -1
  78. package/ts/inputs/components/prop_types/section_btn.d.ts +1 -1
  79. package/ts/inputs/components/prop_types/text_btn.d.ts +1 -1
  80. package/ts/inputs/data/help.d.ts +5 -3
  81. package/ts/inputs/data/index.d.ts +2 -2
  82. package/ts/inputs/data/input_error.d.ts +6 -4
  83. package/ts/inputs/data/input_width.d.ts +21 -18
  84. package/ts/inputs/data/{labelIn_in_putI_iem.d.ts → label_in_input_item.d.ts} +5 -3
  85. package/ts/inputs/data/nested_input.d.ts +7 -5
  86. package/ts/inputs/data/text.d.ts +5 -3
  87. package/ts/inputs/data/upload_box.d.ts +6 -4
  88. package/ts/inputs/data/val.d.ts +6 -4
  89. package/ts/inputs/interfaces/btn_option.d.ts +1 -1
  90. package/ts/inputs/interfaces/state_cond.d.ts +1 -0
  91. package/ts/inputs/interfaces/text_btn.d.ts +1 -1
  92. package/ts/inputs/obj/file.d.ts +1 -1
  93. package/ts/inputs/obj/input_base.d.ts +1 -1
  94. package/ts/inputs/obj/link.d.ts +1 -1
  95. package/ts/inputs/obj/text.d.ts +4 -1
  96. package/ts/inputs/scripts/resolve.d.ts +2 -3
  97. package/ts/inputs/scripts/upload_box.d.ts +5 -3
  98. package/ts/settings/components/prop_types/body.d.ts +1 -1
  99. package/ts/settings/developer_mode/data/developer_mode.d.ts +15 -0
  100. package/ts/settings/developer_mode/data/index.d.ts +1 -1
  101. package/ts/settings/internal.d.ts +2 -2
  102. package/ts/settings/optional_permissions/data/index.d.ts +1 -1
  103. package/ts/settings/optional_permissions/data/permission.d.ts +17 -0
  104. package/ts/settings/optional_permissions/interfaces/index.d.ts +1 -0
  105. package/ts/settings/optional_permissions/interfaces/show_enable_permissions_notification_permission.d.ts +7 -0
  106. package/ts/settings/{data → sections/data}/back_up.d.ts +8 -6
  107. package/ts/settings/sections/data/index.d.ts +2 -0
  108. package/ts/settings/{data → sections/data}/sections.d.ts +22 -20
  109. package/ts/settings/sections/scripts/index.d.ts +1 -0
  110. package/ts/settings/sections/scripts/theme.d.ts +14 -0
  111. package/ts/shared/data/data/cache.d.ts +15 -0
  112. package/ts/shared/data/data/index.d.ts +3 -1
  113. package/ts/shared/data/data/settings.d.ts +11 -0
  114. package/ts/shared/internal.d.ts +1 -17
  115. package/ts/shared/loading_screen/components/prop_types/body.d.ts +1 -1
  116. package/ts/shared/loading_screen/data/index.d.ts +1 -1
  117. package/ts/shared/loading_screen/data/{main.d.ts → visibility.d.ts} +5 -3
  118. package/ts/shared/loading_screen/scripts/roots.d.ts +5 -3
  119. package/ts/shared/loading_screen/scripts/tr.d.ts +5 -3
  120. package/ts/shared/offers/components/ad_label.d.ts +2 -0
  121. package/ts/shared/offers/components/index.d.ts +1 -0
  122. package/ts/shared/offers/data/index.d.ts +1 -1
  123. package/ts/shared/offers/data/{main.d.ts → offers.d.ts} +6 -3
  124. package/ts/shared/offers/obj/offer.d.ts +1 -0
  125. package/ts/shared/offers/scripts/index.d.ts +1 -1
  126. package/ts/shared/offers/scripts/offers.d.ts +11 -0
  127. package/ts/shared/schema/data/index.d.ts +1 -1
  128. package/ts/shared/schema/data/schema.d.ts +14 -0
  129. package/ts/shared/tab_index/scripts/index.d.ts +1 -1
  130. package/ts/shared/tab_index/scripts/{main.d.ts → tab_index.d.ts} +7 -5
  131. package/ts/shared/title/scripts/index.d.ts +1 -1
  132. package/ts/shared/title/scripts/title.d.ts +8 -0
  133. package/ts/shared/tr/components/prop_types/base_tr.d.ts +1 -2
  134. package/ts/shared/tr/data/transition.d.ts +9 -6
  135. package/ts/shared_clean/announcement/scripts/index.d.ts +1 -0
  136. package/ts/shared_clean/announcement/scripts/visibility.d.ts +8 -0
  137. package/ts/{shared → shared_clean}/app.d.ts +5 -3
  138. package/ts/shared_clean/color/interfaces/index.d.ts +1 -0
  139. package/ts/shared_clean/color/scripts/colors.d.ts +9 -0
  140. package/ts/shared_clean/color/scripts/index.d.ts +1 -0
  141. package/ts/{shared/css_vars/scripts/main.d.ts → shared_clean/css_vars/scripts/css_vars.d.ts} +6 -4
  142. package/ts/shared_clean/css_vars/scripts/index.d.ts +1 -0
  143. package/ts/shared_clean/data/data/data.d.ts +1 -0
  144. package/ts/shared_clean/data/data/index.d.ts +2 -0
  145. package/ts/shared_clean/data/data/settings.d.ts +21 -0
  146. package/ts/shared_clean/data/scripts/cache.d.ts +25 -0
  147. package/ts/shared_clean/data/scripts/index.d.ts +3 -0
  148. package/ts/shared_clean/data/scripts/settings.d.ts +12 -0
  149. package/ts/shared_clean/data/scripts/sync.d.ts +11 -0
  150. package/ts/{shared → shared_clean}/ext.d.ts +8 -3
  151. package/ts/shared_clean/functions.d.ts +4 -0
  152. package/ts/shared_clean/globals.d.ts +1 -0
  153. package/ts/shared_clean/internal.d.ts +22 -0
  154. package/ts/shared_clean/no_tr/scripts/index.d.ts +1 -0
  155. package/ts/shared_clean/no_tr/scripts/state.d.ts +14 -0
  156. package/ts/shared_clean/schema/data/index.d.ts +1 -0
  157. package/ts/shared_clean/schema/data/schema.d.ts +21 -0
  158. package/ts/{shared → shared_clean}/schema/obj/transform_item.d.ts +1 -0
  159. package/ts/shared_clean/service_worker/scripts/index.d.ts +1 -0
  160. package/ts/{shared/service_worker/scripts/main.d.ts → shared_clean/service_worker/scripts/service_worker.d.ts} +5 -3
  161. package/ts/shared_clean/theme/scripts/index.d.ts +1 -0
  162. package/ts/shared_clean/theme/scripts/theme.d.ts +13 -0
  163. package/ts/shared_clean/title/scripts/index.d.ts +1 -0
  164. package/ts/shared_clean/title/scripts/title.d.ts +9 -0
  165. package/ts/shared_clean/utils/scripts/index.d.ts +1 -0
  166. package/ts/shared_clean/utils/scripts/utils.d.ts +13 -0
  167. package/ts/shared_clean/viewport/scripts/index.d.ts +1 -0
  168. package/ts/shared_clean/viewport/scripts/viewport.d.ts +10 -0
  169. package/ts/{shared → shared_clean}/x.d.ts +16 -4
  170. package/chunk-main.js +0 -22
  171. package/chunk-main2.js +0 -5
  172. package/chunk-main3.js +0 -5
  173. package/chunk-main4.js +0 -5
  174. package/index.d.ts +0 -3
  175. package/index.js +0 -5
  176. package/ts/announcement/scripts/display.d.ts +0 -6
  177. package/ts/announcement/scripts/index.d.ts +0 -1
  178. package/ts/error_modules/css/scripts/main.d.ts +0 -8
  179. package/ts/error_modules/error/data/main.d.ts +0 -11
  180. package/ts/settings/data/index.d.ts +0 -2
  181. package/ts/settings/developer_mode/data/main.d.ts +0 -13
  182. package/ts/settings/optional_permissions/data/main.d.ts +0 -11
  183. package/ts/settings/scripts/index.d.ts +0 -1
  184. package/ts/settings/scripts/theme.d.ts +0 -12
  185. package/ts/shared/css_vars/scripts/index.d.ts +0 -1
  186. package/ts/shared/functions.d.ts +0 -3
  187. package/ts/shared/header/scripts/index.d.ts +0 -1
  188. package/ts/shared/header/scripts/main.d.ts +0 -6
  189. package/ts/shared/no_tr/scripts/index.d.ts +0 -1
  190. package/ts/shared/no_tr/scripts/main.d.ts +0 -12
  191. package/ts/shared/offers/scripts/main.d.ts +0 -8
  192. package/ts/shared/schema/data/main.d.ts +0 -12
  193. package/ts/shared/service_worker/scripts/index.d.ts +0 -1
  194. package/ts/shared/settings/data/index.d.ts +0 -1
  195. package/ts/shared/settings/data/main.d.ts +0 -15
  196. package/ts/shared/theme/scripts/index.d.ts +0 -1
  197. package/ts/shared/theme/scripts/main.d.ts +0 -11
  198. package/ts/shared/title/scripts/main.d.ts +0 -6
  199. package/ts/shared/utils/scripts/index.d.ts +0 -1
  200. package/ts/shared/utils/scripts/main.d.ts +0 -11
  201. package/ts/shared/viewport/scripts/index.d.ts +0 -1
  202. package/ts/shared/viewport/scripts/main.d.ts +0 -8
  203. /package/ts/{error_modules → error_modules_clean}/error/interfaces/error.d.ts +0 -0
  204. /package/ts/{error_modules → error_modules_clean}/error/interfaces/error_obj.d.ts +0 -0
  205. /package/ts/{error_modules → error_modules_clean}/error/interfaces/notification_type.d.ts +0 -0
  206. /package/ts/{error_modules → error_modules_clean}/error/interfaces/observable_keys.d.ts +0 -0
  207. /package/ts/{error_modules → error_modules_clean}/error/interfaces/show_unable_to_access_settings_error.d.ts +0 -0
  208. /package/ts/{error_modules → error_modules_clean}/error/interfaces/timeout_observable_keys.d.ts +0 -0
  209. /package/ts/{shared → error_modules_clean/error/scripts}/globals.d.ts +0 -0
  210. /package/ts/shared/{app_ext_globals.d.ts → data/data/data.d.ts} +0 -0
  211. /package/ts/{shared/data/data/main.d.ts → shared_clean/app_ext_globals.d.ts} +0 -0
  212. /package/ts/{inputs → shared_clean}/color/interfaces/color.d.ts +0 -0
  213. /package/ts/{shared → shared_clean}/data/interfaces/index.d.ts +0 -0
  214. /package/ts/{shared → shared_clean}/data/interfaces/val.d.ts +0 -0
  215. /package/ts/{shared → shared_clean}/schema/obj/index.d.ts +0 -0
  216. /package/ts/{shared → shared_clean}/t.d.ts +0 -0
  217. /package/ts/{shared → shared_clean}/vars.d.ts +0 -0
@@ -1,4 +1,10 @@
1
1
  {
2
+ "input_min_width_css": {
3
+ "message": "300"
4
+ },
5
+ "input_max_width_css": {
6
+ "message": "600"
7
+ },
2
8
  "an_error_occured_msg": {
3
9
  "message": "An error occured."
4
10
  },
@@ -21,10 +27,10 @@
21
27
  "message": "Reload"
22
28
  },
23
29
  "cant_render_ui_error": {
24
- "message": "Can't render user interface."
30
+ "message": "Unable to render the user interface."
25
31
  },
26
32
  "dependencicies_from_other_page_loaded_into_this_page_alert": {
27
- "message": "DEPENDENCIES FROM THE OTHER PAGE ACCIDENTALLY LOADED INTO THIS PAGE!!!\nCULPRIT PAGE: "
33
+ "message": "DEPENDENCIES FROM ANOTHER PAGE ACCIDENTALLY LOADED INTO THIS PAGE!!!\n\nCULPRIT PAGE: "
28
34
  },
29
35
  "announcement_title_text": {
30
36
  "message": "Announcement"
@@ -32,15 +38,6 @@
32
38
  "dependencies_title_text": {
33
39
  "message": "Dependencies"
34
40
  },
35
- "browse_link_btn_text": {
36
- "message": "Browse"
37
- },
38
- "drag_files_msg_text": {
39
- "message": "or drag files here"
40
- },
41
- "loading_msg_text": {
42
- "message": "Loading..."
43
- },
44
41
  "settings_title_text": {
45
42
  "message": "Settings"
46
43
  },
@@ -50,8 +47,8 @@
50
47
  "links_section_text": {
51
48
  "message": "Links"
52
49
  },
53
- "back_up_section_text": {
54
- "message": "Back up"
50
+ "permissions_section_text": {
51
+ "message": "Permissions"
55
52
  },
56
53
  "restore_section_text": {
57
54
  "message": "Restore"
@@ -62,6 +59,21 @@
62
59
  "offers_section_text": {
63
60
  "message": "Offers"
64
61
  },
62
+ "browse_link_btn_text": {
63
+ "message": "Browse"
64
+ },
65
+ "drag_files_msg_text": {
66
+ "message": "or drag files here"
67
+ },
68
+ "loading_msg_text": {
69
+ "message": "Loading..."
70
+ },
71
+ "tabs_permission_chrome_label_text": {
72
+ "message": "[tabs] Read your browsing history"
73
+ },
74
+ "tabs_permission_edge_label_text": {
75
+ "message": "[tabs] Read your browsing history"
76
+ },
65
77
  "download_back_up_btn_text": {
66
78
  "message": "Download back up"
67
79
  },
@@ -132,22 +144,22 @@
132
144
  "message": "Restore default palette"
133
145
  },
134
146
  "show_content_link_btn_text": {
135
- "message": "Show these settings ⯆"
147
+ "message": "Reveal these settings ⯆"
136
148
  },
137
149
  "hide_content_link_btn_text": {
138
150
  "message": "Hide these settings ⯅"
139
151
  },
140
152
  "color_help_text": {
141
- "message": "Right-click on the main or palette color buttons to choose a custom color. You can also do this by selecting the main or palette color buttons by Tab and then hitting Ctrl/Shift/Alt + Enter."
153
+ "message": "Right-click the main or palette color buttons to select a custom color. Alternatively, you can use the Tab key to navigate to the main or palette color buttons, then press Ctrl/Shift/Alt + Enter to choose a custom color."
142
154
  },
143
155
  "privacy_policy_link_text": {
144
156
  "message": "📜 Privacy policy"
145
157
  },
146
158
  "rate_link_text": {
147
- "message": "⭐️ Rate this extension if you like it"
159
+ "message": "⭐️ Enjoying this extension? Please rate it!"
148
160
  },
149
161
  "help_translating_link_text": {
150
- "message": "🈯 Help translating this extension into the language you know"
162
+ "message": "🈯 Help translate this extension into your language"
151
163
  },
152
164
  "facebook_page_link_text": {
153
165
  "message": "🖼️ Follow my Facebook page"
@@ -161,6 +173,12 @@
161
173
  "dependencies_link_text": {
162
174
  "message": "🧩 Dependencies"
163
175
  },
176
+ "offer_tinkoff_black_text": {
177
+ "message": "Sign up for a Tinkoff Black card using @this link@ and receive 500 rubles."
178
+ },
179
+ "offer_tinkoff_investments_brokerage_account_text": {
180
+ "message": "Open a brokerage account with Tinkoff Investments using @this link@ and get a share of up to 20,000 rubles."
181
+ },
164
182
  "privacy_policy_link_href": {
165
183
  "message": "https://github.com/loftyshaky/extensions-privacy-policy/blob/main/extensions-privacy-policy.md"
166
184
  },
@@ -177,22 +195,22 @@
177
195
  "message": "dependencies.html"
178
196
  },
179
197
  "offer_clear_new_tab_text": {
180
- "message": "Install the @Clear New Tab@ extension to remove everything from the new tab page and display any image, gif or video in it as a wallpaper."
198
+ "message": "Install the @Clear New Tab@ extension to remove everything from the new tab page while keeping your theme background, or use any image, GIF, or video as a custom wallpaper."
181
199
  },
182
200
  "offer_empty_new_tab_page_text": {
183
- "message": "Install the @Empty New Tab Page@ extension to replace the default new tab page with a blank page."
201
+ "message": "Install the @Empty New Tab Page@ extension to replace the default new tab page with a blank page while keeping the default favicon. Supports dark mode."
184
202
  },
185
203
  "offer_search_enhancer_for_google_text": {
186
- "message": "Install the @Search Enhancer for Google™@ extension to add infinite scroll, favicons, server locations, \"View image\" button, \"Download image\" button and more to Google search."
204
+ "message": "Install the @Search Enhancer for Google™@ extension to enhance Google™ search with infinite scroll, server country icons, \"View Image\" and \"Download Image\" buttons, and more."
187
205
  },
188
206
  "offer_scroll_to_top_text": {
189
- "message": "Install the @Scroll to Top@ extension to quickly scroll to top or bottom of the page and then return to the previous position."
207
+ "message": "Install the @Scroll to Top@ extension to scroll to the top or bottom of any page with a click on the left border of the screen, and then return to your previous position."
190
208
  },
191
- "offer_close_other_tabs_text": {
192
- "message": "Install the @Close Other Tabs@ extension to close other tabs with one click on the extension icon, via context menu or with keyboard shortcuts."
209
+ "offer_close_other_tabs_plus_text": {
210
+ "message": "Install the @Close Other Tabs+@ extension to close/pin/unpin/group/ungroup multiple tabs at once, filtering them by a window, pin/group state or URL."
193
211
  },
194
212
  "offer_advanced_extension_reloader_text": {
195
- "message": "Install the @Advanced Extension Reloader@ extension to reload an unpacked extension with one click, hotkey or automatically (extension for developers)."
213
+ "message": "Install the @Advanced Extension Reloader@ extension to reload an unpacked extension with one click, a hotkey or automatically (extension for developers)."
196
214
  },
197
215
  "offer_clear_new_tab_chrome_link_href": {
198
216
  "message": "https://chromewebstore.google.com/detail/felphkbfjadmcejnibcmcncimlappdde"
@@ -227,9 +245,18 @@
227
245
  "offer_scroll_to_top_edge_link_href": {
228
246
  "message": "https://microsoftedge.microsoft.com/addons/detail/cjmbcpckfanombcljcmgnhbdobjblbkk"
229
247
  },
230
- "offer_close_other_tabs_chrome_link_href": {
248
+ "offer_close_other_tabs_plus_chrome_link_href": {
231
249
  "message": "https://chromewebstore.google.com/detail/higiahnfphokonkjalljdfgjhafdjbil"
232
250
  },
251
+ "offer_close_other_tabs_plus_edge_link_href": {
252
+ "message": "https://microsoftedge.microsoft.com/addons/detail/hlgemamghlognmbmipcoapjgkngbbjko"
253
+ },
254
+ "offer_tinkoff_black_link_href": {
255
+ "message": "https://www.tinkoff.ru/baf/5eSsfQ8bbpj"
256
+ },
257
+ "offer_tinkoff_investments_brokerage_account_link_href": {
258
+ "message": "https://www.tinkoff.ru/baf/ArBqfsNc8o9"
259
+ },
233
260
  "restore_defaults_confirm": {
234
261
  "message": "Restore default settings?"
235
262
  },
@@ -239,10 +266,16 @@
239
266
  "youre_now_a_developer_notification": {
240
267
  "message": "You're now a developer!"
241
268
  },
269
+ "backup_permissions_start_notification": {
270
+ "message": "The extension has detected the following permission in your backup: "
271
+ },
272
+ "backup_permissions_end_notification": {
273
+ "message": ". Please navigate to the \"Permissions\" section and enable all required permissions to ensure the extension functions correctly."
274
+ },
242
275
  "invalid_file_type_back_up_error": {
243
- "message": "Invalid file type. Upload a backed up json file."
276
+ "message": "Invalid file type. Upload the previously downloaded JSON backup file."
244
277
  },
245
278
  "unable_to_access_settings_error": {
246
- "message": "Fatal error. Unable to access settings."
279
+ "message": "Fatal error: Unable to access settings. Please try to re-enable or reinstall the extension."
247
280
  }
248
281
  }
@@ -12,7 +12,7 @@
12
12
  "message": "Сообщение ошибки: "
13
13
  },
14
14
  "error_keep_visible_msg_text": {
15
- "message": "Нажмите в любое место чтобы отменить скрытие этого сообщения."
15
+ "message": "Нажмите в любое место, чтобы отменить скрытие этого сообщения."
16
16
  },
17
17
  "error_more_info_btn_text": {
18
18
  "message": "Больше информации"
@@ -21,19 +21,16 @@
21
21
  "message": "Перезагрузить"
22
22
  },
23
23
  "cant_render_ui_error": {
24
- "message": "Не удалось отобразить пользовательский интерфейс."
24
+ "message": "Невозможно отобразить пользовательский интерфейс."
25
25
  },
26
- "browse_link_btn_text": {
27
- "message": "Выберите"
26
+ "dependencicies_from_other_page_loaded_into_this_page_alert": {
27
+ "message": "ЗАВИСИМОСТИ С ДРУГОЙ СТРАНИЦЫ СЛУЧАЙНО ЗАГРУЗИЛИСЬ НА ЭТУ СТРАНИЦУ!!!\n\nСТРАНИЦА-ВИНОВНИК: "
28
28
  },
29
29
  "announcement_title_text": {
30
- "message": "объявление"
31
- },
32
- "drag_files_msg_text": {
33
- "message": "файлы или перетащите их сюда"
30
+ "message": "Объявление"
34
31
  },
35
- "loading_msg_text": {
36
- "message": "Идёт загрузка..."
32
+ "dependencies_title_text": {
33
+ "message": "Зависимости"
37
34
  },
38
35
  "settings_title_text": {
39
36
  "message": "Настройки"
@@ -44,18 +41,33 @@
44
41
  "links_section_text": {
45
42
  "message": "Ссылки"
46
43
  },
47
- "back_up_section_text": {
48
- "message": "Резервное копирование"
44
+ "permissions_section_text": {
45
+ "message": "Разрешения"
49
46
  },
50
47
  "restore_section_text": {
51
48
  "message": "Восстановление"
52
49
  },
53
50
  "admin_section_text": {
54
- "message": "Администрирование"
51
+ "message": "Администратор"
55
52
  },
56
53
  "offers_section_text": {
57
54
  "message": "Предложения"
58
55
  },
56
+ "browse_link_btn_text": {
57
+ "message": "Выберите"
58
+ },
59
+ "drag_files_msg_text": {
60
+ "message": "файлы или перетащите их сюда"
61
+ },
62
+ "loading_msg_text": {
63
+ "message": "Идёт загрузка..."
64
+ },
65
+ "tabs_permission_chrome_label_text": {
66
+ "message": "[tabs] Чтение истории просмотров"
67
+ },
68
+ "tabs_permission_edge_label_text": {
69
+ "message": "[tabs] Чтение вашего журнала браузера"
70
+ },
59
71
  "download_back_up_btn_text": {
60
72
  "message": "Скачать резорвную копию"
61
73
  },
@@ -69,7 +81,7 @@
69
81
  "message": "Перезагрузить расширение"
70
82
  },
71
83
  "options_page_theme_label_text": {
72
- "message": "Тема страницы насроек"
84
+ "message": "Тема страницы настроек"
73
85
  },
74
86
  "transition_duration_label_text": {
75
87
  "message": "Продолжительность анимации (мс)"
@@ -132,16 +144,16 @@
132
144
  "message": "Скрыть эти настройки ⯅"
133
145
  },
134
146
  "color_help_text": {
135
- "message": "Кликните правой кнопкой мыши на основную кнопку цвета или кнопку цвета из палитры чтобы выбрать пользовательский цвет. Вы также можете сделать это, выбрав основную кнопку цвета или кнопку цвета из палитры с помощью Tab и затем нажать Ctrl/Shift/Alt + Enter."
147
+ "message": "Для выбора пользовательского цвета нажмите правой кнопкой мыши на кнопку основного цвета или цвета палитры. Вы также можете использовать клавишу Tab для навигации к этим кнопкам и затем нажать Ctrl/Shift/Alt + Enter, чтобы выбрать пользовательский цвет."
136
148
  },
137
149
  "privacy_policy_link_text": {
138
150
  "message": "📜 Политика конфиденциальности"
139
151
  },
140
152
  "rate_link_text": {
141
- "message": "⭐️ Оцените расширение, если оно вам нравится"
153
+ "message": "⭐️ Понравилось расширение? Пожалуйста, оцените его!"
142
154
  },
143
155
  "help_translating_link_text": {
144
- "message": "🈯 Помогите перевести это расширение на язык, который вы знаете"
156
+ "message": "🈯 Помогите перевести это расширение на ваш язык"
145
157
  },
146
158
  "facebook_page_link_text": {
147
159
  "message": "🖼️ Подписывайтесь на мою страницу в Facebook"
@@ -149,43 +161,55 @@
149
161
  "support_page_link_text": {
150
162
  "message": "📢 Страница поддержки"
151
163
  },
164
+ "theme_path_link_text": {
165
+ "message": "🛠️ Создайте собственную тему для Chrome с помощью приложения ThemePath"
166
+ },
152
167
  "dependencies_link_text": {
153
168
  "message": "🧩 Зависимости"
154
169
  },
155
- "theme_path_link_text": {
156
- "message": "🛠️ Создайте свою собственную тему для Chrome с помощью приложения ThemePath"
170
+ "offer_tinkoff_black_text": {
171
+ "message": "Оформите карту Tinkoff Black по @этой ссылке@ и получите 500 рублей."
172
+ },
173
+ "offer_tinkoff_investments_brokerage_account_text": {
174
+ "message": "Откройте брокерский счёт в Тинькофф Инвестиции по @этой ссылке@ и получите акцию на сумму до 20 000 рублей."
157
175
  },
158
176
  "offer_clear_new_tab_text": {
159
- "message": "Установите расширение @Clear New Tab@ позволяющее убрать все со страницы новой вкладки и отображать любое изображение, гифку или видео в качестве обоев."
177
+ "message": "Установите расширение @Clear New Tab@, позволяющее удалить всё со страницы новой вкладки, сохранив фон темы, или установить любое изображение, GIF или видео в качестве обоев."
160
178
  },
161
179
  "offer_empty_new_tab_page_text": {
162
- "message": "Установите расширение @Пустая новая вкладка@ позволяющее заменить стадартную новую вкладку на пустую страницу."
180
+ "message": "Установите расширение @Пустая новая вкладка@, позволяющее заменить стандартную страницу новой вкладки на пустую страницу, сохранив при этом её стандартный фавикон. Поддерживает тёмный режим."
163
181
  },
164
182
  "offer_search_enhancer_for_google_text": {
165
- "message": "Установите расширение @Search Enhancer for Google™@ чтобы добавить автоматическую загрузку страниц, фавиконы, местоположение серверов, кнопку \"Открыть в полном размере\", кнопку \"Скачать картинку\" и другое к поисковику Google."
183
+ "message": "Установите расширение @Search Enhancer for Google™@ чтобы добавить бесконечнию загрузкиу значки стран серверов, кнопки \"Открыть в полном размере\" и \"Скачать картинку\" и другое для Google™ поиска."
166
184
  },
167
185
  "offer_scroll_to_top_text": {
168
- "message": "Установите расширение @Scroll to Top@ для быстрой прокрутки вверх или вниз страницы и возвращения на предыдущую позицию."
186
+ "message": "Установите расширение @Scroll to Top@, позволяющее прокрутить любую страницу вверх или вниз, нажав на левую границу экрана, и затем вернуться на прежнюю позицию."
169
187
  },
170
- "offer_close_other_tabs_text": {
171
- "message": "Установите расширение @Закрыть другие вкладки@ позволяющее закрывать другие вкладки в один клик на иконку расширения, через контекстное меню или с помощью сочетаний клавиш."
188
+ "offer_close_other_tabs_plus_text": {
189
+ "message": "Установите расширение @Закрыть другие вкладки+@, позволяющее закрывать/закреплять/откреплять/группировать/разгруппировать несколько вкладок сразу, фильтруя их по различным свойствам."
172
190
  },
173
191
  "offer_advanced_extension_reloader_text": {
174
- "message": "Установите расширение @Advanced Extension Reloader@ позволяющее перезагрузагружать распакованное расширение в один клик, горячей клавишей или автоматически (расширение для разработчиков)."
192
+ "message": "Установите расширение @Advanced Extension Reloader@, позволяющее перезагружать распакованное расширение одним кликом, горячей клавишей или автоматически (расширение для разработчиков)."
175
193
  },
176
194
  "restore_defaults_confirm": {
177
195
  "message": "Восстановить настройки по умолчанию?"
178
196
  },
179
197
  "restore_default_palette_confirm": {
180
- "message": "Восстановить палитру по-умолчанию?"
198
+ "message": "Восстановить палитру по умолчанию?"
181
199
  },
182
200
  "youre_now_a_developer_notification": {
183
201
  "message": "Вы стали разработчиком!"
184
202
  },
203
+ "backup_permissions_start_notification": {
204
+ "message": "Расширение обнаружило следующие разрешения в вашей резервной копии: "
205
+ },
206
+ "backup_permissions_end_notification": {
207
+ "message": ". Пожалуйста, перейдите в раздел «Разрешения» и включите все необходимые разрешения, чтобы расширение работало правильно."
208
+ },
185
209
  "invalid_file_type_back_up_error": {
186
- "message": "Недопустимый тип файла. Загрузите ранее скачаный json файл резервной копии."
210
+ "message": "Недопустимый тип файла. Загрузите ранее загруженный файл резервной копии JSON."
187
211
  },
188
212
  "unable_to_access_settings_error": {
189
- "message": "Неустранимая ошибка. Не удалось получить доступ к настройкам."
213
+ "message": "Фатальная ошибка: доступ к настройкам невозможен. Пожалуйста, попробуйте отключить и снова включить расширение или переустановить его."
190
214
  }
191
215
  }
package/announcement.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  import './ts/shared/internal';
2
- export { c_announcement, s_announcement } from './ts/announcement/internal';
2
+ export { c_announcement } from './ts/announcement/internal';
package/announcement.js CHANGED
@@ -2,4 +2,4 @@
2
2
  * Copyright 2024
3
3
  */
4
4
 
5
- "use strict";var main=require("./chunk-main.js"),React=require("react"),main$1=require("./chunk-main4.js");require("react-dom");const Body=main.observer((()=>React.createElement("div",{className:"main"},React.createElement("h1",{className:"header"},main$1.Header.i().get()),React.createElement("div",{className:"msg_to_user",dangerouslySetInnerHTML:{__html:app.msg(`msg_to_user_${env.browser}_text`)}}))));var index$1=Object.freeze({__proto__:null,Body:Body});var index=Object.freeze({__proto__:null,Display:class{static i(){return this.i0||(this.i0=new this)}constructor(){this.display_announcement=()=>err_async((()=>main.__awaiter(this,void 0,void 0,(function*(){we.tabs.create({url:we.runtime.getURL("announcement.html")})}))),"shr_1231")}}});exports.c_announcement=index$1,exports.s_announcement=index;
5
+ "use strict";var title=require("./chunk-title.js"),React=require("react"),viewport=require("./chunk-viewport.js");require("react-dom"),require("./chunk-merge.js");const Body=title.observer((()=>React.createElement("div",{className:"main"},React.createElement("h1",{className:"header"},viewport.Title.get()),React.createElement("div",{className:"msg_to_user",dangerouslySetInnerHTML:{__html:app.msg(`msg_to_user_${env.browser}_text`)}}))));var index=Object.freeze({__proto__:null,Body:Body});exports.c_announcement=index;
package/app.d.ts CHANGED
@@ -1 +1 @@
1
- export { App } from './ts/shared/app';
1
+ export { App } from './ts/shared_clean/app';
package/app.js CHANGED
@@ -2,4 +2,4 @@
2
2
  * Copyright 2024
3
3
  */
4
4
 
5
- "use strict";var main$1=require("./chunk-main.js"),main=require("./chunk-main2.js");require("react"),require("react-dom"),globalThis.page="front_end",globalThis.is_node="undefined"!=typeof process&&"node"===process.release.name;globalThis.misplaced_dependency=culprit_page=>err((()=>{if(page!==culprit_page){const msg=`DEPENDENCIES FROM THE OTHER PAGE ACCIDENTALLY LOADED INTO THIS PAGE!!!\nCULPRIT PAGE: ${culprit_page.toUpperCase()}`;"back_end"===page?console.log(msg):alert(msg)}}),"shr_1193");class App{static i(){return this.i0||(this.i0=new this)}constructor(){this.log_error=(error_obj,error_code)=>{main.Main.i().output_error(error_obj,error_code)},this.origin=globalThis.location?globalThis.location.origin:"",this.app_root="",this.get_app_version=()=>{try{return env.version}catch(error_obj){this.log_error(error_obj,"shr_1238")}return""},this.get_language=()=>n(data)&&n(data.settings)&&data.settings.locale?data.settings.locale:"en",this.content_dir=()=>{try{if(globalThis.is_node){return require("path").join(this.app_root,"public","assets")}return n(env)&&"adonis_app"===env.env?`${this.origin}/assets/`:"dist/"}catch(error_obj){this.log_error(error_obj,"shr_1237")}return""},this.read_data_into_vars=()=>main$1.__awaiter(this,void 0,void 0,(function*(){try{const set_messages_json=({locale:locale})=>main$1.__awaiter(this,void 0,void 0,(function*(){try{if(globalThis.is_node){const path=require("path"),fs=require("fs-extra"),messages_path=path.join(this.content_dir(),"_locales",locale,"messages.json");fs.existsSync(messages_path)&&(this[`messages_${locale}_json`]=fs.readJSONSync(messages_path))}else{const path=`${this.content_dir()}_locales/${locale}/messages.json`;if((yield fetch(path,{method:"HEAD"})).ok){const response=yield fetch(path);this[`messages_${locale}_json`]=yield response.json()}}}catch(error_obj){this.log_error(error_obj,"shr_1233")}}));yield set_messages_json({locale:"en"}),yield set_messages_json({locale:"ru"}),yield set_messages_json({locale:"de"})}catch(error_obj){this.log_error(error_obj,"shr_1191")}return""})),this.msg=msg=>{try{const get_msgs=({user_language:user_language})=>this[`messages_${user_language}_json`]||{},user_language=this.get_language(),is_english=user_language.includes("en"),en_msgs=get_msgs({user_language:"en"}),localized_msgs=is_english?void 0:get_msgs({user_language:user_language});let msg_2=n(en_msgs[msg])&&n(en_msgs[msg].message)?en_msgs[msg].message:"";return is_english||(msg_2=n(localized_msgs)&&n(localized_msgs[msg])&&n(localized_msgs[msg].message)?localized_msgs[msg].message:msg_2),n(msg_2)?msg_2:""}catch(error_obj){this.log_error(error_obj,"shr_1192")}return""},this.read_env_into_global_var=()=>main$1.__awaiter(this,void 0,void 0,(function*(){try{let env_file_text="";if(globalThis.is_node){const path=require("path");env_file_text=require("fs-extra").readFileSync(path.join(this.content_dir(),"env.js"),{encoding:"utf8"})}else{const response=yield fetch(`${this.origin}/env.js`);env_file_text=yield response.text()}globalThis.env=JSON.parse(env_file_text.replace("globalThis.env = ",""))}catch(error_obj){this.log_error(error_obj,"shr_1232")}})),this.get_input_errors=(errors,match_rules)=>{try{const input_errors=[];if(!errors.success)return errors.messages.errors.forEach((error=>{match_rules.forEach((match_rule=>{const exclusion_matched=n(match_rule.rules_exclude)&&match_rule.rules_exclude.some((rule_exclude=>rule_exclude===match_rule.rule));!(error.field!==match_rule.field||n(match_rule.rule)&&error.rule!==match_rule.rule||exclusion_matched)&&input_errors.push(match_rule.input_error)}))})),input_errors}catch(error_obj){this.log_error(error_obj,"shr_1242")}return[]}}}globalThis.app=App.i(),err((()=>{const title=globalThis.document?document.querySelector("title"):void 0;globalThis.page=n(title)&&n(title.dataset.page)?title.dataset.page:"back_end"}),"shr_1190"),exports.App=App;
5
+ "use strict";var viewport=require("./chunk-viewport.js"),error=require("./chunk-error.js");globalThis.page="front_end",globalThis.is_node="undefined"!=typeof process&&"node"===process.release.name;globalThis.misplaced_dependency=culprit_page=>err((()=>{if(page!==culprit_page){const msg=`DEPENDENCIES FROM THE OTHER PAGE ACCIDENTALLY LOADED INTO THIS PAGE!!!\nCULPRIT PAGE: ${culprit_page.toUpperCase()}`;"back_end"===page?console.log(msg):alert(msg)}}),"shr_1193");const App=class{static get_instance(){return this.instance||(this.instance=new this)}constructor(){this.log_error=(error_obj,error_code)=>{error.Error.output(error_obj,error_code)},this.origin=globalThis.location?globalThis.location.origin:"",this.app_root="",this.get_app_version=()=>{try{return env.version}catch(error_obj){this.log_error(error_obj,"shr_1238")}return""},this.get_language=()=>n(data)&&n(data.settings.prefs)&&data.settings.prefs.locale?data.settings.prefs.locale:"en",this.content_dir=()=>{try{if(globalThis.is_node){return require("path").join(this.app_root,"public","assets")}return n(env)&&"adonis_app"===env.env?`${this.origin}/assets/`:"dist/"}catch(error_obj){this.log_error(error_obj,"shr_1237")}return""},this.read_data_into_vars=()=>viewport.__awaiter(this,void 0,void 0,(function*(){try{const set_messages_json=_a=>viewport.__awaiter(this,[_a],void 0,(function*({locale:locale}){try{if(globalThis.is_node){const path=require("path"),fs=require("fs-extra"),messages_path=path.join(this.content_dir(),"_locales",locale,"messages.json");fs.existsSync(messages_path)&&(this[`messages_${locale}_json`]=fs.readJSONSync(messages_path))}else{const path=`${this.content_dir()}_locales/${locale}/messages.json`;if((yield fetch(path,{method:"HEAD"})).ok){const response=yield fetch(path);this[`messages_${locale}_json`]=yield response.json()}}}catch(error_obj){this.log_error(error_obj,"shr_1233")}}));yield set_messages_json({locale:"en"}),yield set_messages_json({locale:"ru"}),yield set_messages_json({locale:"de"})}catch(error_obj){this.log_error(error_obj,"shr_1191")}return""})),this.msg=msg=>{try{const get_msgs=({user_language:user_language})=>this[`messages_${user_language}_json`]||{},user_language=this.get_language(),is_english=user_language.includes("en"),en_msgs=get_msgs({user_language:"en"}),localized_msgs=is_english?void 0:get_msgs({user_language:user_language});let msg_2=n(en_msgs[msg])&&n(en_msgs[msg].message)?en_msgs[msg].message:"";return is_english||(msg_2=n(localized_msgs)&&n(localized_msgs[msg])&&n(localized_msgs[msg].message)?localized_msgs[msg].message:msg_2),n(msg_2)?msg_2:""}catch(error_obj){this.log_error(error_obj,"shr_1192")}return""},this.read_env_into_global_var=()=>viewport.__awaiter(this,void 0,void 0,(function*(){try{let env_file_text="";if(globalThis.is_node){const path=require("path");env_file_text=require("fs-extra").readFileSync(path.join(this.content_dir(),"env.js"),{encoding:"utf8"})}else{const response=yield fetch(`${this.origin}/env.js`);env_file_text=yield response.text()}globalThis.env=JSON.parse(env_file_text.replace("globalThis.env = ",""))}catch(error_obj){this.log_error(error_obj,"shr_1232")}})),this.get_input_errors=(errors,match_rules)=>{try{const input_errors=[];if(!errors.success)return errors.messages.errors.forEach((error=>{match_rules.forEach((match_rule=>{const exclusion_matched=n(match_rule.rules_exclude)&&match_rule.rules_exclude.some((rule_exclude=>rule_exclude===match_rule.rule));!(error.field!==match_rule.field||n(match_rule.rule)&&error.rule!==match_rule.rule||exclusion_matched)&&input_errors.push(match_rule.input_error)}))})),input_errors}catch(error_obj){this.log_error(error_obj,"shr_1242")}return[]}}}.get_instance();globalThis.app=App,err((()=>{const title=globalThis.document?document.querySelector("title"):void 0;globalThis.page=n(title)&&n(title.dataset.page)?title.dataset.page:"back_end"}),"shr_1190"),exports.App=App;
package/chunk-error.js ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Copyright 2024
3
+ */
4
+
5
+ "use strict";var viewport=require("./chunk-viewport.js");globalThis.show_err_ribbon=(error_obj,error_code,{error_msg_key:error_msg_key="",alt_msg:alt_msg="",notification_type:notification_type="error",hide_delay:hide_delay=Error$1.hide_delay,silent:silent=!1,persistent:persistent=!1,exit:exit=!1,is_fullscreen:is_fullscreen=!1,prevent_subsequent_errors:prevent_subsequent_errors=!1}={})=>Error$1.show(error_obj,error_code,{error_msg_key:error_msg_key,alt_msg:alt_msg,notification_type:notification_type,silent:silent,persistent:persistent,exit:exit,hide_delay:hide_delay,is_fullscreen:is_fullscreen,prevent_subsequent_errors:prevent_subsequent_errors}),globalThis.err=(f,error_code,{error_msg_key:error_msg_key="",alt_msg:alt_msg="",silent:silent=!1,persistent:persistent=!1,exit:exit=!1,hide_delay:hide_delay=Error$1.hide_delay,is_fullscreen:is_fullscreen=!1,prevent_subsequent_errors:prevent_subsequent_errors=!1}={})=>{try{return f()}catch(error_obj){Error$1.show(error_obj,error_code,{error_msg_key:error_msg_key,alt_msg:alt_msg,silent:silent,persistent:persistent,exit:exit,hide_delay:hide_delay,is_fullscreen:is_fullscreen,prevent_subsequent_errors:prevent_subsequent_errors})}},globalThis.err_async=(f_1,error_code_1,...args_1)=>viewport.__awaiter(void 0,[f_1,error_code_1,...args_1],void 0,(function*(f,error_code,{error_msg_key:error_msg_key="",alt_msg:alt_msg="",silent:silent=!1,persistent:persistent=!1,exit:exit=!1,hide_delay:hide_delay=Error$1.hide_delay,is_fullscreen:is_fullscreen=!1,prevent_subsequent_errors:prevent_subsequent_errors=!1}={}){try{return yield f()}catch(error_obj){Error$1.show(error_obj,error_code,{error_msg_key:error_msg_key,alt_msg:alt_msg,silent:silent,persistent:persistent,exit:exit,hide_delay:hide_delay,is_fullscreen:is_fullscreen,prevent_subsequent_errors:prevent_subsequent_errors})}})),globalThis.throw_err=msg=>{throw new Error(msg)},globalThis.throw_err_obj=error_obj=>{throw error_obj},globalThis.err_obj=msg=>new Error(msg);const Error$1=class{constructor(){this.hide_delay=5e3,this.prevent_subsequent_errors=!1,this.show=(error_obj,error_code,{error_msg_key:error_msg_key="",alt_msg:alt_msg="",notification_type:notification_type="error",hide_delay:hide_delay=this.hide_delay,silent:silent=!1,persistent:persistent=!1,exit:exit=!1,is_fullscreen:is_fullscreen=!1,prevent_subsequent_errors:prevent_subsequent_errors=!1,show_error_state_1:show_error_state_1,show_error_state_2:show_error_state_2}={})=>{const prevent_subsequent_errors_final=prevent_subsequent_errors||this.prevent_subsequent_errors,silent_final=prevent_subsequent_errors_final?this.prevent_subsequent_errors:silent,persistent_final=!!prevent_subsequent_errors_final||persistent,error_ui_is_visible=!(x.in_service_worker||silent_final||error_obj&&error_obj.silent);if(n(show_error_state_1)&&show_error_state_1(error_obj,{error_msg_key:error_msg_key,alt_msg:alt_msg,notification_type:notification_type,hide_delay:hide_delay,is_fullscreen:is_fullscreen,error_ui_is_visible:error_ui_is_visible,persistent_final:persistent_final,prevent_subsequent_errors:prevent_subsequent_errors}),error_obj&&error_code){if(n(show_error_state_2)&&show_error_state_2(error_obj,error_code,{error_msg_key:error_msg_key,alt_msg:alt_msg,error_ui_is_visible:error_ui_is_visible,silent_final:silent_final}),error_obj.exit||exit){const updated_error_obj=error_obj,set_updated_error_obj_propery=({key:key,undefined_property:undefined_property})=>{updated_error_obj[key]=n(error_obj[key])?error_obj[key]:undefined_property};throw set_updated_error_obj_propery({key:"error_code",undefined_property:error_code}),set_updated_error_obj_propery({key:"error_msg",undefined_property:error_msg_key||alt_msg}),set_updated_error_obj_propery({key:"silent",undefined_property:silent_final}),set_updated_error_obj_propery({key:"persistent",undefined_property:persistent_final}),set_updated_error_obj_propery({key:"exit",undefined_property:exit}),set_updated_error_obj_propery({key:"hide_delay",undefined_property:hide_delay}),updated_error_obj}this.output(error_obj,error_code)}prevent_subsequent_errors&&(this.prevent_subsequent_errors=!0)},this.output=(error_obj,error_code)=>{const line="---------------------------",separator_bottom=`\n${line}`,error_code_and_msg=`${`${line}\n`}Code: ${error_code}\nMessage: ${error_obj.message}`,console_output=error_obj.stack?`${error_code_and_msg}\nStack: ${error_obj.stack+separator_bottom}`:error_code_and_msg+separator_bottom;console.error(console_output)}}static get_instance(){return this.instance||(this.instance=new this)}}.get_instance();exports.Error=Error$1;
package/chunk-index.js ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Copyright 2024
3
+ */
4
+
5
+ "use strict";var viewport=require("./chunk-viewport.js"),t=Object.freeze({__proto__:null});var vars=Object.freeze({__proto__:null,scrollbar_width:17,transpaerent_1px_png:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="});var index$a=Object.freeze({__proto__:null,TransformItem:class{constructor(obj){this.update_existing_val=!1,this.create_property_if_it_doesnt_exist=!0,Object.assign(this,obj),this.old_key=obj.old_key,this.new_key=obj.new_key,this.new_val=obj.new_val}}}),index$9=Object.freeze({__proto__:null,Colors:viewport.Colors}),index$8=Object.freeze({__proto__:null,CssVars:viewport.CssVars}),index$7=Object.freeze({__proto__:null,Cache:viewport.Cache,Class:viewport.Class,Settings:viewport.Settings$1,Sync:viewport.Sync}),index$6=Object.freeze({__proto__:null,State:viewport.State}),index$5=Object.freeze({__proto__:null,ServiceWorker:viewport.ServiceWorker}),index$4=Object.freeze({__proto__:null,Theme:viewport.Theme}),index$3=Object.freeze({__proto__:null,Utils:viewport.Utils}),index$2=Object.freeze({__proto__:null,Viewport:viewport.Viewport}),index$1=Object.freeze({__proto__:null}),index=Object.freeze({__proto__:null});exports.index=index$a,exports.index$1=index$9,exports.index$10=index,exports.index$2=index$8,exports.index$3=index$7,exports.index$4=index$6,exports.index$5=index$5,exports.index$6=index$4,exports.index$7=index$3,exports.index$8=index$2,exports.index$9=index$1,exports.t=t,exports.vars=vars;
package/chunk-merge.js ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Copyright 2024
3
+ */
4
+
5
+ "use strict";var viewport=require("./chunk-viewport.js"),getNative=viewport._getNative,_defineProperty=function(){try{var func=getNative(Object,"defineProperty");return func({},"",{}),func}catch(e){}}(),defineProperty$1=_defineProperty;var _baseAssignValue=function(object,key,value){"__proto__"==key&&defineProperty$1?defineProperty$1(object,key,{configurable:!0,enumerable:!0,value:value,writable:!0}):object[key]=value},baseAssignValue$2=_baseAssignValue,eq$2=viewport.eq_1;var _assignMergeValue=function(object,key,value){(void 0!==value&&!eq$2(object[key],value)||void 0===value&&!(key in object))&&baseAssignValue$2(object,key,value)},_cloneBuffer={exports:{}};!function(module,exports){var root=viewport._root,freeExports=exports&&!exports.nodeType&&exports,freeModule=freeExports&&module&&!module.nodeType&&module,Buffer=freeModule&&freeModule.exports===freeExports?root.Buffer:void 0,allocUnsafe=Buffer?Buffer.allocUnsafe:void 0;module.exports=function(buffer,isDeep){if(isDeep)return buffer.slice();var length=buffer.length,result=allocUnsafe?allocUnsafe(length):new buffer.constructor(length);return buffer.copy(result),result}}(_cloneBuffer,_cloneBuffer.exports);var _cloneBufferExports=_cloneBuffer.exports,Uint8Array=viewport._Uint8Array;var cloneArrayBuffer=function(arrayBuffer){var result=new arrayBuffer.constructor(arrayBuffer.byteLength);return new Uint8Array(result).set(new Uint8Array(arrayBuffer)),result};var _cloneTypedArray=function(typedArray,isDeep){var buffer=isDeep?cloneArrayBuffer(typedArray.buffer):typedArray.buffer;return new typedArray.constructor(buffer,typedArray.byteOffset,typedArray.length)};var _copyArray=function(source,array){var index=-1,length=source.length;for(array||(array=Array(length));++index<length;)array[index]=source[index];return array},isObject$4=viewport.isObject_1,objectCreate=Object.create,_baseCreate=function(){function object(){}return function(proto){if(!isObject$4(proto))return{};if(objectCreate)return objectCreate(proto);object.prototype=proto;var result=new object;return object.prototype=void 0,result}}(),_getPrototype=(0,viewport._overArg)(Object.getPrototypeOf,Object),baseCreate=_baseCreate,getPrototype$1=_getPrototype,isPrototype$1=viewport._isPrototype;var _initCloneObject=function(object){return"function"!=typeof object.constructor||isPrototype$1(object)?{}:baseCreate(getPrototype$1(object))},isArrayLike$2=viewport.isArrayLike_1,isObjectLike$1=viewport.isObjectLike_1;var isArrayLikeObject_1=function(value){return isObjectLike$1(value)&&isArrayLike$2(value)},baseGetTag=viewport._baseGetTag,getPrototype=_getPrototype,isObjectLike=viewport.isObjectLike_1,funcProto=Function.prototype,objectProto$2=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$2=objectProto$2.hasOwnProperty,objectCtorString=funcToString.call(Object);var isPlainObject_1=function(value){if(!isObjectLike(value)||"[object Object]"!=baseGetTag(value))return!1;var proto=getPrototype(value);if(null===proto)return!0;var Ctor=hasOwnProperty$2.call(proto,"constructor")&&proto.constructor;return"function"==typeof Ctor&&Ctor instanceof Ctor&&funcToString.call(Ctor)==objectCtorString};var _safeGet=function(object,key){if(("constructor"!==key||"function"!=typeof object[key])&&"__proto__"!=key)return object[key]},baseAssignValue$1=_baseAssignValue,eq$1=viewport.eq_1,hasOwnProperty$1=Object.prototype.hasOwnProperty;var _assignValue=function(object,key,value){var objValue=object[key];hasOwnProperty$1.call(object,key)&&eq$1(objValue,value)&&(void 0!==value||key in object)||baseAssignValue$1(object,key,value)},assignValue=_assignValue,baseAssignValue=_baseAssignValue;var _copyObject=function(source,props,object,customizer){var isNew=!object;object||(object={});for(var index=-1,length=props.length;++index<length;){var key=props[index],newValue=customizer?customizer(object[key],source[key],key,object,source):void 0;void 0===newValue&&(newValue=source[key]),isNew?baseAssignValue(object,key,newValue):assignValue(object,key,newValue)}return object};var _nativeKeysIn=function(object){var result=[];if(null!=object)for(var key in Object(object))result.push(key);return result},isObject$3=viewport.isObject_1,isPrototype=viewport._isPrototype,nativeKeysIn=_nativeKeysIn,hasOwnProperty=Object.prototype.hasOwnProperty;var _baseKeysIn=function(object){if(!isObject$3(object))return nativeKeysIn(object);var isProto=isPrototype(object),result=[];for(var key in object)("constructor"!=key||!isProto&&hasOwnProperty.call(object,key))&&result.push(key);return result},arrayLikeKeys=viewport._arrayLikeKeys,baseKeysIn=_baseKeysIn,isArrayLike$1=viewport.isArrayLike_1;var keysIn_1=function(object){return isArrayLike$1(object)?arrayLikeKeys(object,!0):baseKeysIn(object)},copyObject=_copyObject,keysIn$1=keysIn_1;var toPlainObject_1=function(value){return copyObject(value,keysIn$1(value))},assignMergeValue$1=_assignMergeValue,cloneBuffer=_cloneBufferExports,cloneTypedArray=_cloneTypedArray,copyArray=_copyArray,initCloneObject=_initCloneObject,isArguments=viewport.isArguments_1,isArray=viewport.isArray_1,isArrayLikeObject=isArrayLikeObject_1,isBuffer=viewport.isBufferExports,isFunction=viewport.isFunction_1,isObject$2=viewport.isObject_1,isPlainObject=isPlainObject_1,isTypedArray=viewport.isTypedArray_1,safeGet$1=_safeGet,toPlainObject=toPlainObject_1;var _baseMergeDeep=function(object,source,key,srcIndex,mergeFunc,customizer,stack){var objValue=safeGet$1(object,key),srcValue=safeGet$1(source,key),stacked=stack.get(srcValue);if(stacked)assignMergeValue$1(object,key,stacked);else{var newValue=customizer?customizer(objValue,srcValue,key+"",object,source,stack):void 0,isCommon=void 0===newValue;if(isCommon){var isArr=isArray(srcValue),isBuff=!isArr&&isBuffer(srcValue),isTyped=!isArr&&!isBuff&&isTypedArray(srcValue);newValue=srcValue,isArr||isBuff||isTyped?isArray(objValue)?newValue=objValue:isArrayLikeObject(objValue)?newValue=copyArray(objValue):isBuff?(isCommon=!1,newValue=cloneBuffer(srcValue,!0)):isTyped?(isCommon=!1,newValue=cloneTypedArray(srcValue,!0)):newValue=[]:isPlainObject(srcValue)||isArguments(srcValue)?(newValue=objValue,isArguments(objValue)?newValue=toPlainObject(objValue):isObject$2(objValue)&&!isFunction(objValue)||(newValue=initCloneObject(srcValue))):isCommon=!1}isCommon&&(stack.set(srcValue,newValue),mergeFunc(newValue,srcValue,srcIndex,customizer,stack),stack.delete(srcValue)),assignMergeValue$1(object,key,newValue)}},Stack=viewport._Stack,assignMergeValue=_assignMergeValue,baseFor=viewport._baseFor,baseMergeDeep=_baseMergeDeep,isObject$1=viewport.isObject_1,keysIn=keysIn_1,safeGet=_safeGet;var _baseMerge=function baseMerge$1(object,source,srcIndex,customizer,stack){object!==source&&baseFor(source,(function(srcValue,key){if(stack||(stack=new Stack),isObject$1(srcValue))baseMergeDeep(object,source,key,srcIndex,baseMerge$1,customizer,stack);else{var newValue=customizer?customizer(safeGet(object,key),srcValue,key+"",object,source,stack):void 0;void 0===newValue&&(newValue=srcValue),assignMergeValue(object,key,newValue)}}),keysIn)};var apply=function(func,thisArg,args){switch(args.length){case 0:return func.call(thisArg);case 1:return func.call(thisArg,args[0]);case 2:return func.call(thisArg,args[0],args[1]);case 3:return func.call(thisArg,args[0],args[1],args[2])}return func.apply(thisArg,args)},nativeMax=Math.max;var _overRest=function(func,start,transform){return start=nativeMax(void 0===start?func.length-1:start,0),function(){for(var args=arguments,index=-1,length=nativeMax(args.length-start,0),array=Array(length);++index<length;)array[index]=args[start+index];index=-1;for(var otherArgs=Array(start+1);++index<start;)otherArgs[index]=args[index];return otherArgs[start]=transform(array),apply(func,this,otherArgs)}};var constant=function(value){return function(){return value}},defineProperty=_defineProperty,identity$1=viewport.identity_1,_baseSetToString=defineProperty?function(func,string){return defineProperty(func,"toString",{configurable:!0,enumerable:!1,value:constant(string),writable:!0})}:identity$1,nativeNow=Date.now;var _setToString=function(func){var count=0,lastCalled=0;return function(){var stamp=nativeNow(),remaining=16-(stamp-lastCalled);if(lastCalled=stamp,remaining>0){if(++count>=800)return arguments[0]}else count=0;return func.apply(void 0,arguments)}}(_baseSetToString),identity=viewport.identity_1,overRest=_overRest,setToString=_setToString;var _baseRest=function(func,start){return setToString(overRest(func,start,identity),func+"")},eq=viewport.eq_1,isArrayLike=viewport.isArrayLike_1,isIndex=viewport._isIndex,isObject=viewport.isObject_1;var baseRest=_baseRest,isIterateeCall=function(value,index,object){if(!isObject(object))return!1;var type=typeof index;return!!("number"==type?isArrayLike(object)&&isIndex(index,object.length):"string"==type&&index in object)&&eq(object[index],value)};var baseMerge=_baseMerge,merge_1=function(assigner){return baseRest((function(object,sources){var index=-1,length=sources.length,customizer=length>1?sources[length-1]:void 0,guard=length>2?sources[2]:void 0;for(customizer=assigner.length>3&&"function"==typeof customizer?(length--,customizer):void 0,guard&&isIterateeCall(sources[0],sources[1],guard)&&(customizer=length<3?void 0:customizer,length=1),object=Object(object);++index<length;){var source=sources[index];source&&assigner(object,source,index,customizer)}return object}))}((function(object,source,srcIndex){baseMerge(object,source,srcIndex)})),merge$1=viewport.getDefaultExportFromCjs(merge_1);exports._assignValue=_assignValue,exports._baseRest=_baseRest,exports.isArrayLikeObject_1=isArrayLikeObject_1,exports.merge=merge$1;
@@ -2,4 +2,4 @@
2
2
  * Copyright 2024
3
3
  */
4
4
 
5
- "use strict";var main=require("./chunk-main.js");function _mergeNamespaces(n,m){return m.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(k){if("default"!==k&&!(k in n)){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:!0,get:function(){return e[k]}})}}))})),Object.freeze(n)}var pickr_min$2={exports:{}};self;var pickr_minExports=pickr_min$2.exports=(()=>(()=>{var t={d:(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.d(e,{default:()=>E});var o={};function n(t,e,o,n,i={}){e instanceof HTMLCollection||e instanceof NodeList?e=Array.from(e):Array.isArray(e)||(e=[e]),Array.isArray(o)||(o=[o]);for(const s of e)for(const e of o)s[t](e,n,{capture:!1,...i});return Array.prototype.slice.call(arguments,1)}t.r(o),t.d(o,{adjustableInputNumbers:()=>p,createElementFromString:()=>r,createFromTemplate:()=>a,eventPath:()=>l,off:()=>s,on:()=>i,resolveElement:()=>c});const i=n.bind(null,"addEventListener"),s=n.bind(null,"removeEventListener");function r(t){const e=document.createElement("div");return e.innerHTML=t.trim(),e.firstElementChild}function a(t){const e=(t,e)=>{const o=t.getAttribute(e);return t.removeAttribute(e),o},o=(t,n={})=>{const i=e(t,":obj"),s=e(t,":ref"),r=i?n[i]={}:n;s&&(n[s]=t);for(const n of Array.from(t.children)){const t=e(n,":arr"),i=o(n,t?{}:r);t&&(r[t]||(r[t]=[])).push(Object.keys(i).length?i:n)}return n};return o(r(t))}function l(t){let e=t.path||t.composedPath&&t.composedPath();if(e)return e;let o=t.target.parentElement;for(e=[t.target,o];o=o.parentElement;)e.push(o);return e.push(document,window),e}function c(t){return t instanceof Element?t:"string"==typeof t?t.split(/>>/g).reduce(((t,e,o,n)=>(t=t.querySelector(e),o<n.length-1?t.shadowRoot:t)),document):null}function p(t,e=(t=>t)){function o(o){const n=[.001,.01,.1][Number(o.shiftKey||2*o.ctrlKey)]*(o.deltaY<0?1:-1);let i=0,s=t.selectionStart;t.value=t.value.replace(/[\d.]+/g,((t,o)=>o<=s&&o+t.length>=s?(s=o,e(Number(t),n,i)):(i++,t))),t.focus(),t.setSelectionRange(s,s),o.preventDefault(),t.dispatchEvent(new Event("input"))}i(t,"focus",(()=>i(window,"wheel",o,{passive:!1}))),i(t,"blur",(()=>s(window,"wheel",o)))}const{min:u,max:h,floor:d,round:m}=Math;function f(t,e,o){e/=100,o/=100;const n=d(t=t/360*6),i=t-n,s=o*(1-e),r=o*(1-i*e),a=o*(1-(1-i)*e),l=n%6;return[255*[o,r,s,s,a,o][l],255*[a,o,o,r,s,s][l],255*[s,s,a,o,o,r][l]]}function v(t,e,o){const n=(2-(e/=100))*(o/=100)/2;return 0!==n&&(e=1===n?0:n<.5?e*o/(2*n):e*o/(2-2*n)),[t,100*e,100*n]}function b(t,e,o){const n=u(t/=255,e/=255,o/=255),i=h(t,e,o),s=i-n;let r,a;if(0===s)r=a=0;else{a=s/i;const n=((i-t)/6+s/2)/s,l=((i-e)/6+s/2)/s,c=((i-o)/6+s/2)/s;t===i?r=c-l:e===i?r=1/3+n-c:o===i&&(r=2/3+l-n),r<0?r+=1:r>1&&(r-=1)}return[360*r,100*a,100*i]}function y(t,e,o,n){return e/=100,o/=100,[...b(255*(1-u(1,(t/=100)*(1-(n/=100))+n)),255*(1-u(1,e*(1-n)+n)),255*(1-u(1,o*(1-n)+n)))]}function g(t,e,o){e/=100;const n=2*(e*=(o/=100)<.5?o:1-o)/(o+e)*100,i=100*(o+e);return[t,isNaN(n)?0:n,i]}function _(t){return b(...t.match(/.{2}/g).map((t=>parseInt(t,16))))}function A(t=0,e=0,o=0,n=1){const i=(t,e)=>(o=-1)=>e(~o?t.map((t=>Number(t.toFixed(o)))):t),s={h:t,s:e,v:o,a:n,toHSVA(){const t=[s.h,s.s,s.v,s.a];return t.toString=i(t,(t=>`hsva(${t[0]}, ${t[1]}%, ${t[2]}%, ${s.a})`)),t},toHSLA(){const t=[...v(s.h,s.s,s.v),s.a];return t.toString=i(t,(t=>`hsla(${t[0]}, ${t[1]}%, ${t[2]}%, ${s.a})`)),t},toRGBA(){const t=[...f(s.h,s.s,s.v),s.a];return t.toString=i(t,(t=>`rgba(${t[0]}, ${t[1]}, ${t[2]}, ${s.a})`)),t},toCMYK(){const t=function(t,e,o){const n=f(t,e,o),i=n[0]/255,s=n[1]/255,r=n[2]/255,a=u(1-i,1-s,1-r);return[100*(1===a?0:(1-i-a)/(1-a)),100*(1===a?0:(1-s-a)/(1-a)),100*(1===a?0:(1-r-a)/(1-a)),100*a]}(s.h,s.s,s.v);return t.toString=i(t,(t=>`cmyk(${t[0]}%, ${t[1]}%, ${t[2]}%, ${t[3]}%)`)),t},toHEXA(){const t=function(t,e,o){return f(t,e,o).map((t=>m(t).toString(16).padStart(2,"0")))}(s.h,s.s,s.v),e=s.a>=1?"":Number((255*s.a).toFixed(0)).toString(16).toUpperCase().padStart(2,"0");return e&&t.push(e),t.toString=()=>`#${t.join("").toUpperCase()}`,t},clone:()=>A(s.h,s.s,s.v,s.a)};return s}const $=t=>Math.max(Math.min(t,1),0);function C(t){const e={options:Object.assign({lock:null,onchange:()=>0,onstop:()=>0},t),_keyboard(t){const{options:o}=e,{type:n,key:i}=t;if(document.activeElement===o.wrapper){const{lock:o}=e.options,s="ArrowUp"===i,r="ArrowRight"===i,a="ArrowDown"===i,l="ArrowLeft"===i;if("keydown"===n&&(s||r||a||l)){let n=0,i=0;"v"===o?n=s||r?1:-1:"h"===o?n=s||r?-1:1:(i=s?-1:a?1:0,n=l?-1:r?1:0),e.update($(e.cache.x+.01*n),$(e.cache.y+.01*i)),t.preventDefault()}else i.startsWith("Arrow")&&(e.options.onstop(),t.preventDefault())}},_tapstart(t){i(document,["mouseup","touchend","touchcancel"],e._tapstop),i(document,["mousemove","touchmove"],e._tapmove),t.cancelable&&t.preventDefault(),e._tapmove(t)},_tapmove(t){const{options:o,cache:n}=e,{lock:i,element:s,wrapper:r}=o,a=r.getBoundingClientRect();let l=0,c=0;if(t){const e=t&&t.touches&&t.touches[0];l=t?(e||t).clientX:0,c=t?(e||t).clientY:0,l<a.left?l=a.left:l>a.left+a.width&&(l=a.left+a.width),c<a.top?c=a.top:c>a.top+a.height&&(c=a.top+a.height),l-=a.left,c-=a.top}else n&&(l=n.x*a.width,c=n.y*a.height);"h"!==i&&(s.style.left=`calc(${l/a.width*100}% - ${s.offsetWidth/2}px)`),"v"!==i&&(s.style.top=`calc(${c/a.height*100}% - ${s.offsetHeight/2}px)`),e.cache={x:l/a.width,y:c/a.height};const p=$(l/a.width),u=$(c/a.height);switch(i){case"v":return o.onchange(p);case"h":return o.onchange(u);default:return o.onchange(p,u)}},_tapstop(){e.options.onstop(),s(document,["mouseup","touchend","touchcancel"],e._tapstop),s(document,["mousemove","touchmove"],e._tapmove)},trigger(){e._tapmove()},update(t=0,o=0){const{left:n,top:i,width:s,height:r}=e.options.wrapper.getBoundingClientRect();"h"===e.options.lock&&(o=t),e._tapmove({clientX:n+s*t,clientY:i+r*o})},destroy(){const{options:t,_tapstart:o,_keyboard:n}=e;s(document,["keydown","keyup"],n),s([t.wrapper,t.element],"mousedown",o),s([t.wrapper,t.element],"touchstart",o,{passive:!1})}},{options:o,_tapstart:n,_keyboard:r}=e;return i([o.wrapper,o.element],"mousedown",n),i([o.wrapper,o.element],"touchstart",n,{passive:!1}),i(document,["keydown","keyup"],r),e}function k(t={}){t=Object.assign({onchange:()=>0,className:"",elements:[]},t);const e=i(t.elements,"click",(e=>{t.elements.forEach((o=>o.classList[e.target===o?"add":"remove"](t.className))),t.onchange(e),e.stopPropagation()}));return{destroy:()=>s(...e)}}const S={variantFlipOrder:{start:"sme",middle:"mse",end:"ems"},positionFlipOrder:{top:"tbrl",right:"rltb",bottom:"btrl",left:"lrbt"},position:"bottom",margin:8,padding:0};class E{static utils=o;static version="1.9.0";static I18N_DEFAULTS={"ui:dialog":"color picker dialog","btn:toggle":"toggle color picker dialog","btn:swatch":"color swatch","btn:last-color":"use previous color","btn:save":"Save","btn:cancel":"Cancel","btn:clear":"Clear","aria:btn:save":"save and close","aria:btn:cancel":"cancel and close","aria:btn:clear":"clear and close","aria:input":"color input field","aria:palette":"color selection area","aria:hue":"hue selection slider","aria:opacity":"selection slider"};static DEFAULT_OPTIONS={appClass:null,theme:"classic",useAsButton:!1,padding:8,disabled:!1,comparison:!0,closeOnScroll:!1,outputPrecision:0,lockOpacity:!1,autoReposition:!0,container:"body",components:{interaction:{}},i18n:{},swatches:null,inline:!1,sliders:null,default:"#42445a",defaultRepresentation:null,position:"bottom-middle",adjustableNumbers:!0,showAlways:!1,closeWithKey:"Escape"};_initializingActive=!0;_recalc=!0;_nanopop=null;_root=null;_color=A();_lastColor=A();_swatchColors=[];_setupAnimationFrame=null;_eventListener={init:[],save:[],hide:[],show:[],clear:[],change:[],changestop:[],cancel:[],swatchselect:[]};constructor(t){this.options=t=Object.assign({...E.DEFAULT_OPTIONS},t);const{swatches:e,components:o,theme:n,sliders:i,lockOpacity:s,padding:r}=t;["nano","monolith"].includes(n)&&!i&&(t.sliders="h"),o.interaction||(o.interaction={});const{preview:a,opacity:l,hue:c,palette:p}=o;o.opacity=!s&&l,o.palette=p||a||l||c,this._preBuild(),this._buildComponents(),this._bindEvents(),this._finalBuild(),e&&e.length&&e.forEach((t=>this.addSwatch(t)));const{button:u,app:h}=this._root;this._nanopop=((t,e,o)=>{const n="object"!=typeof t||t instanceof HTMLElement?{reference:t,popper:e,...o}:t;return{update(t=n){const{reference:e,popper:o}=Object.assign(n,t);if(!o||!e)throw new Error("Popper- or reference-element missing.");return((t,e,o)=>{const{container:n,arrow:i,margin:s,padding:r,position:a,variantFlipOrder:l,positionFlipOrder:c}={container:document.documentElement.getBoundingClientRect(),...S,...o},{left:p,top:u}=e.style;e.style.left="0",e.style.top="0";const h=t.getBoundingClientRect(),d=e.getBoundingClientRect(),m={t:h.top-d.height-s,b:h.bottom+s,r:h.right+s,l:h.left-d.width-s},f={vs:h.left,vm:h.left+h.width/2-d.width/2,ve:h.left+h.width-d.width,hs:h.top,hm:h.bottom-h.height/2-d.height/2,he:h.bottom-d.height},[v,b="middle"]=a.split("-"),y=c[v],g=l[b],{top:_,left:w,bottom:A,right:$}=n;for(const t of y){const o="t"===t||"b"===t;let n=m[t];const[s,a]=o?["top","left"]:["left","top"],[l,c]=o?[d.height,d.width]:[d.width,d.height],[p,u]=o?[A,$]:[$,A],[v,b]=o?[_,w]:[w,_];if(!(n<v||n+l+r>p))for(const p of g){let m=f[(o?"v":"h")+p];if(!(m<b||m+c+r>u)){if(m-=d[a],n-=d[s],e.style[a]=`${m}px`,e.style[s]=`${n}px`,i){const t=o?h.width/2:h.height/2,e=2*t<c?h[a]+t:m+c/2;n<h[s]&&(n+=l),i.style[a]=`${e}px`,i.style[s]=`${n}px`}return t+p}}}return e.style.left=p,e.style.top=u,null})(e,o,n)}}})(u,h,{margin:r}),u.setAttribute("role","button"),u.setAttribute("aria-label",this._t("btn:toggle"));const d=this;this._setupAnimationFrame=requestAnimationFrame((function e(){if(!h.offsetWidth)return requestAnimationFrame(e);d.setColor(t.default),d._rePositioningPicker(),t.defaultRepresentation&&(d._representation=t.defaultRepresentation,d.setColorRepresentation(d._representation)),t.showAlways&&d.show(),d._initializingActive=!1,d._emit("init")}))}static create=t=>new E(t);_preBuild(){const{options:t}=this;for(const e of["el","container"])t[e]=c(t[e]);this._root=(t=>{const{components:e,useAsButton:o,inline:n,appClass:i,theme:s,lockOpacity:r}=t.options,l=t=>t?"":'style="display:none" hidden',c=e=>t._t(e),p=a(`\n <div :ref="root" class="pickr">\n\n ${o?"":'<button type="button" :ref="button" class="pcr-button"></button>'}\n\n <div :ref="app" class="pcr-app ${i||""}" data-theme="${s}" ${n?'style="position: unset"':""} aria-label="${c("ui:dialog")}" role="window">\n <div class="pcr-selection" ${l(e.palette)}>\n <div :obj="preview" class="pcr-color-preview" ${l(e.preview)}>\n <button type="button" :ref="lastColor" class="pcr-last-color" aria-label="${c("btn:last-color")}"></button>\n <div :ref="currentColor" class="pcr-current-color"></div>\n </div>\n\n <div :obj="palette" class="pcr-color-palette">\n <div :ref="picker" class="pcr-picker"></div>\n <div :ref="palette" class="pcr-palette" tabindex="0" aria-label="${c("aria:palette")}" role="listbox"></div>\n </div>\n\n <div :obj="hue" class="pcr-color-chooser" ${l(e.hue)}>\n <div :ref="picker" class="pcr-picker"></div>\n <div :ref="slider" class="pcr-hue pcr-slider" tabindex="0" aria-label="${c("aria:hue")}" role="slider"></div>\n </div>\n\n <div :obj="opacity" class="pcr-color-opacity" ${l(e.opacity)}>\n <div :ref="picker" class="pcr-picker"></div>\n <div :ref="slider" class="pcr-opacity pcr-slider" tabindex="0" aria-label="${c("aria:opacity")}" role="slider"></div>\n </div>\n </div>\n\n <div class="pcr-swatches ${e.palette?"":"pcr-last"}" :ref="swatches"></div>\n\n <div :obj="interaction" class="pcr-interaction" ${l(Object.keys(e.interaction).length)}>\n <input :ref="result" class="pcr-result" type="text" spellcheck="false" ${l(e.interaction.input)} aria-label="${c("aria:input")}">\n\n <input :arr="options" class="pcr-type" data-type="HEXA" value="${r?"HEX":"HEXA"}" type="button" ${l(e.interaction.hex)}>\n <input :arr="options" class="pcr-type" data-type="RGBA" value="${r?"RGB":"RGBA"}" type="button" ${l(e.interaction.rgba)}>\n <input :arr="options" class="pcr-type" data-type="HSLA" value="${r?"HSL":"HSLA"}" type="button" ${l(e.interaction.hsla)}>\n <input :arr="options" class="pcr-type" data-type="HSVA" value="${r?"HSV":"HSVA"}" type="button" ${l(e.interaction.hsva)}>\n <input :arr="options" class="pcr-type" data-type="CMYK" value="CMYK" type="button" ${l(e.interaction.cmyk)}>\n\n <input :ref="save" class="pcr-save" value="${c("btn:save")}" type="button" ${l(e.interaction.save)} aria-label="${c("aria:btn:save")}">\n <input :ref="cancel" class="pcr-cancel" value="${c("btn:cancel")}" type="button" ${l(e.interaction.cancel)} aria-label="${c("aria:btn:cancel")}">\n <input :ref="clear" class="pcr-clear" value="${c("btn:clear")}" type="button" ${l(e.interaction.clear)} aria-label="${c("aria:btn:clear")}">\n </div>\n </div>\n </div>\n `),u=p.interaction;return u.options.find((t=>!t.hidden&&!t.classList.add("active"))),u.type=()=>u.options.find((t=>t.classList.contains("active"))),p})(this),t.useAsButton&&(this._root.button=t.el),t.container.appendChild(this._root.root)}_finalBuild(){const t=this.options,e=this._root;if(t.container.removeChild(e.root),t.inline){const o=t.el.parentElement;t.el.nextSibling?o.insertBefore(e.app,t.el.nextSibling):o.appendChild(e.app)}else t.container.appendChild(e.app);t.useAsButton?t.inline&&t.el.remove():t.el.parentNode.replaceChild(e.root,t.el),t.disabled&&this.disable(),t.comparison||(e.button.style.transition="none",t.useAsButton||(e.preview.lastColor.style.transition="none")),this.hide()}_buildComponents(){const t=this,e=this.options.components,o=(t.options.sliders||"v").repeat(2),[n,i]=o.match(/^[vh]+$/g)?o:[],s=()=>this._color||(this._color=this._lastColor.clone()),r={palette:C({element:t._root.palette.picker,wrapper:t._root.palette.palette,onstop:()=>t._emit("changestop","slider",t),onchange(o,n){if(!e.palette)return;const i=s(),{_root:r,options:a}=t,{lastColor:l,currentColor:c}=r.preview;t._recalc&&(i.s=100*o,i.v=100-100*n,i.v<0&&(i.v=0),t._updateOutput("slider"));const p=i.toRGBA().toString(0);this.element.style.background=p,this.wrapper.style.background=`\n linear-gradient(to top, rgba(0, 0, 0, ${i.a}), transparent),\n linear-gradient(to left, hsla(${i.h}, 100%, 50%, ${i.a}), rgba(255, 255, 255, ${i.a}))\n `,a.comparison?a.useAsButton||t._lastColor||l.style.setProperty("--pcr-color",p):(r.button.style.setProperty("--pcr-color",p),r.button.classList.remove("clear"));const u=i.toHEXA().toString();for(const{el:e,color:o}of t._swatchColors)e.classList[u===o.toHEXA().toString()?"add":"remove"]("pcr-active");c.style.setProperty("--pcr-color",p)}}),hue:C({lock:"v"===i?"h":"v",element:t._root.hue.picker,wrapper:t._root.hue.slider,onstop:()=>t._emit("changestop","slider",t),onchange(o){if(!e.hue||!e.palette)return;const n=s();t._recalc&&(n.h=360*o),this.element.style.backgroundColor=`hsl(${n.h}, 100%, 50%)`,r.palette.trigger()}}),opacity:C({lock:"v"===n?"h":"v",element:t._root.opacity.picker,wrapper:t._root.opacity.slider,onstop:()=>t._emit("changestop","slider",t),onchange(o){if(!e.opacity||!e.palette)return;const n=s();t._recalc&&(n.a=Math.round(100*o)/100),this.element.style.background=`rgba(0, 0, 0, ${n.a})`,r.palette.trigger()}}),selectable:k({elements:t._root.interaction.options,className:"active",onchange(e){t._representation=e.target.getAttribute("data-type").toUpperCase(),t._recalc&&t._updateOutput("swatch")}})};this._components=r}_bindEvents(){const{_root:t,options:e}=this,o=[i(t.interaction.clear,"click",(()=>this._clearColor())),i([t.interaction.cancel,t.preview.lastColor],"click",(()=>{this.setHSVA(...(this._lastColor||this._color).toHSVA(),!0),this._emit("cancel")})),i(t.interaction.save,"click",(()=>{!this.applyColor()&&!e.showAlways&&this.hide()})),i(t.interaction.result,["keyup","input"],(t=>{this.setColor(t.target.value,!0)&&!this._initializingActive&&(this._emit("change",this._color,"input",this),this._emit("changestop","input",this)),t.stopImmediatePropagation()})),i(t.interaction.result,["focus","blur"],(t=>{this._recalc="blur"===t.type,this._recalc&&this._updateOutput(null)})),i([t.palette.palette,t.palette.picker,t.hue.slider,t.hue.picker,t.opacity.slider,t.opacity.picker],["mousedown","touchstart"],(()=>this._recalc=!0),{passive:!0})];if(!e.showAlways){const n=e.closeWithKey;o.push(i(t.button,"click",(()=>this.isOpen()?this.hide():this.show())),i(document,"keyup",(t=>this.isOpen()&&(t.key===n||t.code===n)&&this.hide())),i(document,["touchstart","mousedown"],(e=>{this.isOpen()&&!l(e).some((e=>e===t.app||e===t.button))&&this.hide()}),{capture:!0}))}if(e.adjustableNumbers){const e={rgba:[255,255,255,1],hsva:[360,100,100,1],hsla:[360,100,100,1],cmyk:[100,100,100,100]};p(t.interaction.result,((t,o,n)=>{const i=e[this.getColorRepresentation().toLowerCase()];if(i){const e=i[n],s=t+(e>=100?1e3*o:o);return s<=0?0:Number((s<e?s:e).toPrecision(3))}return t}))}if(e.autoReposition&&!e.inline){let t=null;const n=this;o.push(i(window,["scroll","resize"],(()=>{n.isOpen()&&(e.closeOnScroll&&n.hide(),null===t?(t=setTimeout((()=>t=null),100),requestAnimationFrame((function e(){n._rePositioningPicker(),null!==t&&requestAnimationFrame(e)}))):(clearTimeout(t),t=setTimeout((()=>t=null),100)))}),{capture:!0}))}this._eventBindings=o}_rePositioningPicker(){const{options:t}=this;if(!t.inline&&!this._nanopop.update({container:document.body.getBoundingClientRect(),position:t.position})){const t=this._root.app,e=t.getBoundingClientRect();t.style.top=(window.innerHeight-e.height)/2+"px",t.style.left=(window.innerWidth-e.width)/2+"px"}}_updateOutput(t){const{_root:e,_color:o,options:n}=this;if(e.interaction.type()){const t=`to${e.interaction.type().getAttribute("data-type")}`;e.interaction.result.value="function"==typeof o[t]?o[t]().toString(n.outputPrecision):""}!this._initializingActive&&this._recalc&&this._emit("change",o,t,this)}_clearColor(t=!1){const{_root:e,options:o}=this;o.useAsButton||e.button.style.setProperty("--pcr-color","rgba(0, 0, 0, 0.15)"),e.button.classList.add("clear"),o.showAlways||this.hide(),this._lastColor=null,this._initializingActive||t||(this._emit("save",null),this._emit("clear"))}_parseLocalColor(t){const{values:e,type:o,a:n}=function(t){t=t.match(/^[a-zA-Z]+$/)?function(t){if("black"===t.toLowerCase())return"#000";const e=document.createElement("canvas").getContext("2d");return e.fillStyle=t,"#000"===e.fillStyle?null:e.fillStyle}(t):t;const e={cmyk:/^cmyk\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)/i,rgba:/^rgba?\D+([\d.]+)(%?)\D+([\d.]+)(%?)\D+([\d.]+)(%?)\D*?(([\d.]+)(%?)|$)/i,hsla:/^hsla?\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D*?(([\d.]+)(%?)|$)/i,hsva:/^hsva?\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D*?(([\d.]+)(%?)|$)/i,hexa:/^#?(([\dA-Fa-f]{3,4})|([\dA-Fa-f]{6})|([\dA-Fa-f]{8}))$/i},o=t=>t.map((t=>/^(|\d+)\.\d+|\d+$/.test(t)?Number(t):void 0));let n;t:for(const i in e)if(n=e[i].exec(t))switch(i){case"cmyk":{const[,t,e,s,r]=o(n);if(t>100||e>100||s>100||r>100)break t;return{values:y(t,e,s,r),type:i}}case"rgba":{let[,t,,e,,s,,,r]=o(n);if(t="%"===n[2]?t/100*255:t,e="%"===n[4]?e/100*255:e,s="%"===n[6]?s/100*255:s,r="%"===n[9]?r/100:r,t>255||e>255||s>255||r<0||r>1)break t;return{values:[...b(t,e,s),r],a:r,type:i}}case"hexa":{let[,t]=n;4!==t.length&&3!==t.length||(t=t.split("").map((t=>t+t)).join(""));const e=t.substring(0,6);let o=t.substring(6);return o=o?parseInt(o,16)/255:void 0,{values:[..._(e),o],a:o,type:i}}case"hsla":{let[,t,e,s,,r]=o(n);if(r="%"===n[6]?r/100:r,t>360||e>100||s>100||r<0||r>1)break t;return{values:[...g(t,e,s),r],a:r,type:i}}case"hsva":{let[,t,e,s,,r]=o(n);if(r="%"===n[6]?r/100:r,t>360||e>100||s>100||r<0||r>1)break t;return{values:[t,e,s,r],a:r,type:i}}}return{values:null,type:null}}(t),{lockOpacity:i}=this.options,s=void 0!==n&&1!==n;return e&&3===e.length&&(e[3]=void 0),{values:!e||i&&s?null:e,type:o}}_t(t){return this.options.i18n[t]||E.I18N_DEFAULTS[t]}_emit(t,...e){this._eventListener[t].forEach((t=>t(...e,this)))}on(t,e){return this._eventListener[t].push(e),this}off(t,e){const o=this._eventListener[t]||[],n=o.indexOf(e);return~n&&o.splice(n,1),this}addSwatch(t){const{values:e}=this._parseLocalColor(t);if(e){const{_swatchColors:t,_root:o}=this,n=A(...e),s=r(`<button type="button" style="--pcr-color: ${n.toRGBA().toString(0)}" aria-label="${this._t("btn:swatch")}"/>`);return o.swatches.appendChild(s),t.push({el:s,color:n}),this._eventBindings.push(i(s,"click",(()=>{this.setHSVA(...n.toHSVA(),!0),this._emit("swatchselect",n),this._emit("change",n,"swatch",this)}))),!0}return!1}removeSwatch(t){const e=this._swatchColors[t];if(e){const{el:o}=e;return this._root.swatches.removeChild(o),this._swatchColors.splice(t,1),!0}return!1}applyColor(t=!1){const{preview:e,button:o}=this._root,n=this._color.toRGBA().toString(0);return e.lastColor.style.setProperty("--pcr-color",n),this.options.useAsButton||o.style.setProperty("--pcr-color",n),o.classList.remove("clear"),this._lastColor=this._color.clone(),this._initializingActive||t||this._emit("save",this._color),this}destroy(){cancelAnimationFrame(this._setupAnimationFrame),this._eventBindings.forEach((t=>s(...t))),Object.keys(this._components).forEach((t=>this._components[t].destroy()))}destroyAndRemove(){this.destroy();const{root:t,app:e}=this._root;t.parentElement&&t.parentElement.removeChild(t),e.parentElement.removeChild(e),Object.keys(this).forEach((t=>this[t]=null))}hide(){return!!this.isOpen()&&(this._root.app.classList.remove("visible"),this._emit("hide"),!0)}show(){return!this.options.disabled&&!this.isOpen()&&(this._root.app.classList.add("visible"),this._rePositioningPicker(),this._emit("show",this._color),this)}isOpen(){return this._root.app.classList.contains("visible")}setHSVA(t=360,e=0,o=0,n=1,i=!1){const s=this._recalc;if(this._recalc=!1,t<0||t>360||e<0||e>100||o<0||o>100||n<0||n>1)return!1;this._color=A(t,e,o,n);const{hue:r,opacity:a,palette:l}=this._components;return r.update(t/360),a.update(n),l.update(e/100,1-o/100),i||this.applyColor(),s&&this._updateOutput(),this._recalc=s,!0}setColor(t,e=!1){if(null===t)return this._clearColor(e),!0;const{values:o,type:n}=this._parseLocalColor(t);if(o){const t=n.toUpperCase(),{options:i}=this._root.interaction,s=i.find((e=>e.getAttribute("data-type")===t));if(s&&!s.hidden)for(const t of i)t.classList[t===s?"add":"remove"]("active");return!!this.setHSVA(...o,e)&&this.setColorRepresentation(t)}return!1}setColorRepresentation(t){return t=t.toUpperCase(),!!this._root.interaction.options.find((e=>e.getAttribute("data-type").startsWith(t)&&!e.click()))}getColorRepresentation(){return this._representation}getColor(){return this._color}getSelectedColor(){return this._lastColor}getRoot(){return this._root}disable(){return this.hide(),this.options.disabled=!0,this._root.button.classList.add("disabled"),this}enable(){return this.options.disabled=!1,this._root.button.classList.remove("disabled"),this}}return e.default})())(),pickr_min$1=_mergeNamespaces({__proto__:null,default:main.getDefaultExportFromCjs(pickr_minExports)},[pickr_minExports]);exports.pickr_min=pickr_min$1;
5
+ "use strict";var viewport=require("./chunk-viewport.js");function _mergeNamespaces(n,m){return m.forEach((function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach((function(k){if("default"!==k&&!(k in n)){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:!0,get:function(){return e[k]}})}}))})),Object.freeze(n)}var pickr_min$2={exports:{}};self;var pickr_minExports=pickr_min$2.exports=(()=>(()=>{var t={d:(e,o)=>{for(var n in o)t.o(o,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.d(e,{default:()=>E});var o={};function n(t,e,o,n,i={}){e instanceof HTMLCollection||e instanceof NodeList?e=Array.from(e):Array.isArray(e)||(e=[e]),Array.isArray(o)||(o=[o]);for(const s of e)for(const e of o)s[t](e,n,{capture:!1,...i});return Array.prototype.slice.call(arguments,1)}t.r(o),t.d(o,{adjustableInputNumbers:()=>p,createElementFromString:()=>r,createFromTemplate:()=>a,eventPath:()=>l,off:()=>s,on:()=>i,resolveElement:()=>c});const i=n.bind(null,"addEventListener"),s=n.bind(null,"removeEventListener");function r(t){const e=document.createElement("div");return e.innerHTML=t.trim(),e.firstElementChild}function a(t){const e=(t,e)=>{const o=t.getAttribute(e);return t.removeAttribute(e),o},o=(t,n={})=>{const i=e(t,":obj"),s=e(t,":ref"),r=i?n[i]={}:n;s&&(n[s]=t);for(const n of Array.from(t.children)){const t=e(n,":arr"),i=o(n,t?{}:r);t&&(r[t]||(r[t]=[])).push(Object.keys(i).length?i:n)}return n};return o(r(t))}function l(t){let e=t.path||t.composedPath&&t.composedPath();if(e)return e;let o=t.target.parentElement;for(e=[t.target,o];o=o.parentElement;)e.push(o);return e.push(document,window),e}function c(t){return t instanceof Element?t:"string"==typeof t?t.split(/>>/g).reduce(((t,e,o,n)=>(t=t.querySelector(e),o<n.length-1?t.shadowRoot:t)),document):null}function p(t,e=(t=>t)){function o(o){const n=[.001,.01,.1][Number(o.shiftKey||2*o.ctrlKey)]*(o.deltaY<0?1:-1);let i=0,s=t.selectionStart;t.value=t.value.replace(/[\d.]+/g,((t,o)=>o<=s&&o+t.length>=s?(s=o,e(Number(t),n,i)):(i++,t))),t.focus(),t.setSelectionRange(s,s),o.preventDefault(),t.dispatchEvent(new Event("input"))}i(t,"focus",(()=>i(window,"wheel",o,{passive:!1}))),i(t,"blur",(()=>s(window,"wheel",o)))}const{min:u,max:h,floor:d,round:m}=Math;function f(t,e,o){e/=100,o/=100;const n=d(t=t/360*6),i=t-n,s=o*(1-e),r=o*(1-i*e),a=o*(1-(1-i)*e),l=n%6;return[255*[o,r,s,s,a,o][l],255*[a,o,o,r,s,s][l],255*[s,s,a,o,o,r][l]]}function v(t,e,o){const n=(2-(e/=100))*(o/=100)/2;return 0!==n&&(e=1===n?0:n<.5?e*o/(2*n):e*o/(2-2*n)),[t,100*e,100*n]}function b(t,e,o){const n=u(t/=255,e/=255,o/=255),i=h(t,e,o),s=i-n;let r,a;if(0===s)r=a=0;else{a=s/i;const n=((i-t)/6+s/2)/s,l=((i-e)/6+s/2)/s,c=((i-o)/6+s/2)/s;t===i?r=c-l:e===i?r=1/3+n-c:o===i&&(r=2/3+l-n),r<0?r+=1:r>1&&(r-=1)}return[360*r,100*a,100*i]}function y(t,e,o,n){return e/=100,o/=100,[...b(255*(1-u(1,(t/=100)*(1-(n/=100))+n)),255*(1-u(1,e*(1-n)+n)),255*(1-u(1,o*(1-n)+n)))]}function g(t,e,o){e/=100;const n=2*(e*=(o/=100)<.5?o:1-o)/(o+e)*100,i=100*(o+e);return[t,isNaN(n)?0:n,i]}function _(t){return b(...t.match(/.{2}/g).map((t=>parseInt(t,16))))}function A(t=0,e=0,o=0,n=1){const i=(t,e)=>(o=-1)=>e(~o?t.map((t=>Number(t.toFixed(o)))):t),s={h:t,s:e,v:o,a:n,toHSVA(){const t=[s.h,s.s,s.v,s.a];return t.toString=i(t,(t=>`hsva(${t[0]}, ${t[1]}%, ${t[2]}%, ${s.a})`)),t},toHSLA(){const t=[...v(s.h,s.s,s.v),s.a];return t.toString=i(t,(t=>`hsla(${t[0]}, ${t[1]}%, ${t[2]}%, ${s.a})`)),t},toRGBA(){const t=[...f(s.h,s.s,s.v),s.a];return t.toString=i(t,(t=>`rgba(${t[0]}, ${t[1]}, ${t[2]}, ${s.a})`)),t},toCMYK(){const t=function(t,e,o){const n=f(t,e,o),i=n[0]/255,s=n[1]/255,r=n[2]/255,a=u(1-i,1-s,1-r);return[100*(1===a?0:(1-i-a)/(1-a)),100*(1===a?0:(1-s-a)/(1-a)),100*(1===a?0:(1-r-a)/(1-a)),100*a]}(s.h,s.s,s.v);return t.toString=i(t,(t=>`cmyk(${t[0]}%, ${t[1]}%, ${t[2]}%, ${t[3]}%)`)),t},toHEXA(){const t=function(t,e,o){return f(t,e,o).map((t=>m(t).toString(16).padStart(2,"0")))}(s.h,s.s,s.v),e=s.a>=1?"":Number((255*s.a).toFixed(0)).toString(16).toUpperCase().padStart(2,"0");return e&&t.push(e),t.toString=()=>`#${t.join("").toUpperCase()}`,t},clone:()=>A(s.h,s.s,s.v,s.a)};return s}const $=t=>Math.max(Math.min(t,1),0);function C(t){const e={options:Object.assign({lock:null,onchange:()=>0,onstop:()=>0},t),_keyboard(t){const{options:o}=e,{type:n,key:i}=t;if(document.activeElement===o.wrapper){const{lock:o}=e.options,s="ArrowUp"===i,r="ArrowRight"===i,a="ArrowDown"===i,l="ArrowLeft"===i;if("keydown"===n&&(s||r||a||l)){let n=0,i=0;"v"===o?n=s||r?1:-1:"h"===o?n=s||r?-1:1:(i=s?-1:a?1:0,n=l?-1:r?1:0),e.update($(e.cache.x+.01*n),$(e.cache.y+.01*i)),t.preventDefault()}else i.startsWith("Arrow")&&(e.options.onstop(),t.preventDefault())}},_tapstart(t){i(document,["mouseup","touchend","touchcancel"],e._tapstop),i(document,["mousemove","touchmove"],e._tapmove),t.cancelable&&t.preventDefault(),e._tapmove(t)},_tapmove(t){const{options:o,cache:n}=e,{lock:i,element:s,wrapper:r}=o,a=r.getBoundingClientRect();let l=0,c=0;if(t){const e=t&&t.touches&&t.touches[0];l=t?(e||t).clientX:0,c=t?(e||t).clientY:0,l<a.left?l=a.left:l>a.left+a.width&&(l=a.left+a.width),c<a.top?c=a.top:c>a.top+a.height&&(c=a.top+a.height),l-=a.left,c-=a.top}else n&&(l=n.x*a.width,c=n.y*a.height);"h"!==i&&(s.style.left=`calc(${l/a.width*100}% - ${s.offsetWidth/2}px)`),"v"!==i&&(s.style.top=`calc(${c/a.height*100}% - ${s.offsetHeight/2}px)`),e.cache={x:l/a.width,y:c/a.height};const p=$(l/a.width),u=$(c/a.height);switch(i){case"v":return o.onchange(p);case"h":return o.onchange(u);default:return o.onchange(p,u)}},_tapstop(){e.options.onstop(),s(document,["mouseup","touchend","touchcancel"],e._tapstop),s(document,["mousemove","touchmove"],e._tapmove)},trigger(){e._tapmove()},update(t=0,o=0){const{left:n,top:i,width:s,height:r}=e.options.wrapper.getBoundingClientRect();"h"===e.options.lock&&(o=t),e._tapmove({clientX:n+s*t,clientY:i+r*o})},destroy(){const{options:t,_tapstart:o,_keyboard:n}=e;s(document,["keydown","keyup"],n),s([t.wrapper,t.element],"mousedown",o),s([t.wrapper,t.element],"touchstart",o,{passive:!1})}},{options:o,_tapstart:n,_keyboard:r}=e;return i([o.wrapper,o.element],"mousedown",n),i([o.wrapper,o.element],"touchstart",n,{passive:!1}),i(document,["keydown","keyup"],r),e}function k(t={}){t=Object.assign({onchange:()=>0,className:"",elements:[]},t);const e=i(t.elements,"click",(e=>{t.elements.forEach((o=>o.classList[e.target===o?"add":"remove"](t.className))),t.onchange(e),e.stopPropagation()}));return{destroy:()=>s(...e)}}const S={variantFlipOrder:{start:"sme",middle:"mse",end:"ems"},positionFlipOrder:{top:"tbrl",right:"rltb",bottom:"btrl",left:"lrbt"},position:"bottom",margin:8,padding:0};class E{static utils=o;static version="1.9.1";static I18N_DEFAULTS={"ui:dialog":"color picker dialog","btn:toggle":"toggle color picker dialog","btn:swatch":"color swatch","btn:last-color":"use previous color","btn:save":"Save","btn:cancel":"Cancel","btn:clear":"Clear","aria:btn:save":"save and close","aria:btn:cancel":"cancel and close","aria:btn:clear":"clear and close","aria:input":"color input field","aria:palette":"color selection area","aria:hue":"hue selection slider","aria:opacity":"selection slider"};static DEFAULT_OPTIONS={appClass:null,theme:"classic",useAsButton:!1,padding:8,disabled:!1,comparison:!0,closeOnScroll:!1,outputPrecision:0,lockOpacity:!1,autoReposition:!0,container:"body",components:{interaction:{}},i18n:{},swatches:null,inline:!1,sliders:null,default:"#42445a",defaultRepresentation:null,position:"bottom-middle",adjustableNumbers:!0,showAlways:!1,closeWithKey:"Escape"};_initializingActive=!0;_recalc=!0;_nanopop=null;_root=null;_color=A();_lastColor=A();_swatchColors=[];_setupAnimationFrame=null;_eventListener={init:[],save:[],hide:[],show:[],clear:[],change:[],changestop:[],cancel:[],swatchselect:[]};constructor(t){this.options=t=Object.assign({...E.DEFAULT_OPTIONS},t);const{swatches:e,components:o,theme:n,sliders:i,lockOpacity:s,padding:r}=t;["nano","monolith"].includes(n)&&!i&&(t.sliders="h"),o.interaction||(o.interaction={});const{preview:a,opacity:l,hue:c,palette:p}=o;o.opacity=!s&&l,o.palette=p||a||l||c,this._preBuild(),this._buildComponents(),this._bindEvents(),this._finalBuild(),e&&e.length&&e.forEach((t=>this.addSwatch(t)));const{button:u,app:h}=this._root;this._nanopop=((t,e,o)=>{const n="object"!=typeof t||t instanceof HTMLElement?{reference:t,popper:e,...o}:t;return{update(t=n){const{reference:e,popper:o}=Object.assign(n,t);if(!o||!e)throw new Error("Popper- or reference-element missing.");return((t,e,o)=>{const{container:n,arrow:i,margin:s,padding:r,position:a,variantFlipOrder:l,positionFlipOrder:c}={container:document.documentElement.getBoundingClientRect(),...S,...o},{left:p,top:u}=e.style;e.style.left="0",e.style.top="0";const h=t.getBoundingClientRect(),d=e.getBoundingClientRect(),m={t:h.top-d.height-s,b:h.bottom+s,r:h.right+s,l:h.left-d.width-s},f={vs:h.left,vm:h.left+h.width/2-d.width/2,ve:h.left+h.width-d.width,hs:h.top,hm:h.bottom-h.height/2-d.height/2,he:h.bottom-d.height},[v,b="middle"]=a.split("-"),y=c[v],g=l[b],{top:_,left:w,bottom:A,right:$}=n;for(const t of y){const o="t"===t||"b"===t;let n=m[t];const[s,a]=o?["top","left"]:["left","top"],[l,c]=o?[d.height,d.width]:[d.width,d.height],[p,u]=o?[A,$]:[$,A],[v,b]=o?[_,w]:[w,_];if(!(n<v||n+l+r>p))for(const p of g){let m=f[(o?"v":"h")+p];if(!(m<b||m+c+r>u)){if(m-=d[a],n-=d[s],e.style[a]=`${m}px`,e.style[s]=`${n}px`,i){const e=o?h.width/2:h.height/2,r=c/2,u=e>r,d=m+{s:u?r:e,m:r,e:u?r:c-e}[p],f=n+{t:l,b:0,r:0,l:l}[t];i.style[a]=`${d}px`,i.style[s]=`${f}px`}return t+p}}}return e.style.left=p,e.style.top=u,null})(e,o,n)}}})(u,h,{margin:r}),u.setAttribute("role","button"),u.setAttribute("aria-label",this._t("btn:toggle"));const d=this;this._setupAnimationFrame=requestAnimationFrame((function e(){if(!h.offsetWidth)return requestAnimationFrame(e);d.setColor(t.default),d._rePositioningPicker(),t.defaultRepresentation&&(d._representation=t.defaultRepresentation,d.setColorRepresentation(d._representation)),t.showAlways&&d.show(),d._initializingActive=!1,d._emit("init")}))}static create=t=>new E(t);_preBuild(){const{options:t}=this;for(const e of["el","container"])t[e]=c(t[e]);this._root=(t=>{const{components:e,useAsButton:o,inline:n,appClass:i,theme:s,lockOpacity:r}=t.options,l=t=>t?"":'style="display:none" hidden',c=e=>t._t(e),p=a(`\n <div :ref="root" class="pickr">\n\n ${o?"":'<button type="button" :ref="button" class="pcr-button"></button>'}\n\n <div :ref="app" class="pcr-app ${i||""}" data-theme="${s}" ${n?'style="position: unset"':""} aria-label="${c("ui:dialog")}" role="window">\n <div class="pcr-selection" ${l(e.palette)}>\n <div :obj="preview" class="pcr-color-preview" ${l(e.preview)}>\n <button type="button" :ref="lastColor" class="pcr-last-color" aria-label="${c("btn:last-color")}"></button>\n <div :ref="currentColor" class="pcr-current-color"></div>\n </div>\n\n <div :obj="palette" class="pcr-color-palette">\n <div :ref="picker" class="pcr-picker"></div>\n <div :ref="palette" class="pcr-palette" tabindex="0" aria-label="${c("aria:palette")}" role="listbox"></div>\n </div>\n\n <div :obj="hue" class="pcr-color-chooser" ${l(e.hue)}>\n <div :ref="picker" class="pcr-picker"></div>\n <div :ref="slider" class="pcr-hue pcr-slider" tabindex="0" aria-label="${c("aria:hue")}" role="slider"></div>\n </div>\n\n <div :obj="opacity" class="pcr-color-opacity" ${l(e.opacity)}>\n <div :ref="picker" class="pcr-picker"></div>\n <div :ref="slider" class="pcr-opacity pcr-slider" tabindex="0" aria-label="${c("aria:opacity")}" role="slider"></div>\n </div>\n </div>\n\n <div class="pcr-swatches ${e.palette?"":"pcr-last"}" :ref="swatches"></div>\n\n <div :obj="interaction" class="pcr-interaction" ${l(Object.keys(e.interaction).length)}>\n <input :ref="result" class="pcr-result" type="text" spellcheck="false" ${l(e.interaction.input)} aria-label="${c("aria:input")}">\n\n <input :arr="options" class="pcr-type" data-type="HEXA" value="${r?"HEX":"HEXA"}" type="button" ${l(e.interaction.hex)}>\n <input :arr="options" class="pcr-type" data-type="RGBA" value="${r?"RGB":"RGBA"}" type="button" ${l(e.interaction.rgba)}>\n <input :arr="options" class="pcr-type" data-type="HSLA" value="${r?"HSL":"HSLA"}" type="button" ${l(e.interaction.hsla)}>\n <input :arr="options" class="pcr-type" data-type="HSVA" value="${r?"HSV":"HSVA"}" type="button" ${l(e.interaction.hsva)}>\n <input :arr="options" class="pcr-type" data-type="CMYK" value="CMYK" type="button" ${l(e.interaction.cmyk)}>\n\n <input :ref="save" class="pcr-save" value="${c("btn:save")}" type="button" ${l(e.interaction.save)} aria-label="${c("aria:btn:save")}">\n <input :ref="cancel" class="pcr-cancel" value="${c("btn:cancel")}" type="button" ${l(e.interaction.cancel)} aria-label="${c("aria:btn:cancel")}">\n <input :ref="clear" class="pcr-clear" value="${c("btn:clear")}" type="button" ${l(e.interaction.clear)} aria-label="${c("aria:btn:clear")}">\n </div>\n </div>\n </div>\n `),u=p.interaction;return u.options.find((t=>!t.hidden&&!t.classList.add("active"))),u.type=()=>u.options.find((t=>t.classList.contains("active"))),p})(this),t.useAsButton&&(this._root.button=t.el),t.container.appendChild(this._root.root)}_finalBuild(){const t=this.options,e=this._root;if(t.container.removeChild(e.root),t.inline){const o=t.el.parentElement;t.el.nextSibling?o.insertBefore(e.app,t.el.nextSibling):o.appendChild(e.app)}else t.container.appendChild(e.app);t.useAsButton?t.inline&&t.el.remove():t.el.parentNode.replaceChild(e.root,t.el),t.disabled&&this.disable(),t.comparison||(e.button.style.transition="none",t.useAsButton||(e.preview.lastColor.style.transition="none")),this.hide()}_buildComponents(){const t=this,e=this.options.components,o=(t.options.sliders||"v").repeat(2),[n,i]=o.match(/^[vh]+$/g)?o:[],s=()=>this._color||(this._color=this._lastColor.clone()),r={palette:C({element:t._root.palette.picker,wrapper:t._root.palette.palette,onstop:()=>t._emit("changestop","slider",t),onchange(o,n){if(!e.palette)return;const i=s(),{_root:r,options:a}=t,{lastColor:l,currentColor:c}=r.preview;t._recalc&&(i.s=100*o,i.v=100-100*n,i.v<0&&(i.v=0),t._updateOutput("slider"));const p=i.toRGBA().toString(0);this.element.style.background=p,this.wrapper.style.background=`\n linear-gradient(to top, rgba(0, 0, 0, ${i.a}), transparent),\n linear-gradient(to left, hsla(${i.h}, 100%, 50%, ${i.a}), rgba(255, 255, 255, ${i.a}))\n `,a.comparison?a.useAsButton||t._lastColor||l.style.setProperty("--pcr-color",p):(r.button.style.setProperty("--pcr-color",p),r.button.classList.remove("clear"));const u=i.toHEXA().toString();for(const{el:e,color:o}of t._swatchColors)e.classList[u===o.toHEXA().toString()?"add":"remove"]("pcr-active");c.style.setProperty("--pcr-color",p)}}),hue:C({lock:"v"===i?"h":"v",element:t._root.hue.picker,wrapper:t._root.hue.slider,onstop:()=>t._emit("changestop","slider",t),onchange(o){if(!e.hue||!e.palette)return;const n=s();t._recalc&&(n.h=360*o),this.element.style.backgroundColor=`hsl(${n.h}, 100%, 50%)`,r.palette.trigger()}}),opacity:C({lock:"v"===n?"h":"v",element:t._root.opacity.picker,wrapper:t._root.opacity.slider,onstop:()=>t._emit("changestop","slider",t),onchange(o){if(!e.opacity||!e.palette)return;const n=s();t._recalc&&(n.a=Math.round(100*o)/100),this.element.style.background=`rgba(0, 0, 0, ${n.a})`,r.palette.trigger()}}),selectable:k({elements:t._root.interaction.options,className:"active",onchange(e){t._representation=e.target.getAttribute("data-type").toUpperCase(),t._recalc&&t._updateOutput("swatch")}})};this._components=r}_bindEvents(){const{_root:t,options:e}=this,o=[i(t.interaction.clear,"click",(()=>this._clearColor())),i([t.interaction.cancel,t.preview.lastColor],"click",(()=>{this.setHSVA(...(this._lastColor||this._color).toHSVA(),!0),this._emit("cancel")})),i(t.interaction.save,"click",(()=>{!this.applyColor()&&!e.showAlways&&this.hide()})),i(t.interaction.result,["keyup","input"],(t=>{this.setColor(t.target.value,!0)&&!this._initializingActive&&(this._emit("change",this._color,"input",this),this._emit("changestop","input",this)),t.stopImmediatePropagation()})),i(t.interaction.result,["focus","blur"],(t=>{this._recalc="blur"===t.type,this._recalc&&this._updateOutput(null)})),i([t.palette.palette,t.palette.picker,t.hue.slider,t.hue.picker,t.opacity.slider,t.opacity.picker],["mousedown","touchstart"],(()=>this._recalc=!0),{passive:!0})];if(!e.showAlways){const n=e.closeWithKey;o.push(i(t.button,"click",(()=>this.isOpen()?this.hide():this.show())),i(document,"keyup",(t=>this.isOpen()&&(t.key===n||t.code===n)&&this.hide())),i(document,["touchstart","mousedown"],(e=>{this.isOpen()&&!l(e).some((e=>e===t.app||e===t.button))&&this.hide()}),{capture:!0}))}if(e.adjustableNumbers){const e={rgba:[255,255,255,1],hsva:[360,100,100,1],hsla:[360,100,100,1],cmyk:[100,100,100,100]};p(t.interaction.result,((t,o,n)=>{const i=e[this.getColorRepresentation().toLowerCase()];if(i){const e=i[n],s=t+(e>=100?1e3*o:o);return s<=0?0:Number((s<e?s:e).toPrecision(3))}return t}))}if(e.autoReposition&&!e.inline){let t=null;const n=this;o.push(i(window,["scroll","resize"],(()=>{n.isOpen()&&(e.closeOnScroll&&n.hide(),null===t?(t=setTimeout((()=>t=null),100),requestAnimationFrame((function e(){n._rePositioningPicker(),null!==t&&requestAnimationFrame(e)}))):(clearTimeout(t),t=setTimeout((()=>t=null),100)))}),{capture:!0}))}this._eventBindings=o}_rePositioningPicker(){const{options:t}=this;if(!t.inline&&!this._nanopop.update({container:document.body.getBoundingClientRect(),position:t.position})){const t=this._root.app,e=t.getBoundingClientRect();t.style.top=(window.innerHeight-e.height)/2+"px",t.style.left=(window.innerWidth-e.width)/2+"px"}}_updateOutput(t){const{_root:e,_color:o,options:n}=this;if(e.interaction.type()){const t=`to${e.interaction.type().getAttribute("data-type")}`;e.interaction.result.value="function"==typeof o[t]?o[t]().toString(n.outputPrecision):""}!this._initializingActive&&this._recalc&&this._emit("change",o,t,this)}_clearColor(t=!1){const{_root:e,options:o}=this;o.useAsButton||e.button.style.setProperty("--pcr-color","rgba(0, 0, 0, 0.15)"),e.button.classList.add("clear"),o.showAlways||this.hide(),this._lastColor=null,this._initializingActive||t||(this._emit("save",null),this._emit("clear"))}_parseLocalColor(t){const{values:e,type:o,a:n}=function(t){t=t.match(/^[a-zA-Z]+$/)?function(t){if("black"===t.toLowerCase())return"#000";const e=document.createElement("canvas").getContext("2d");return e.fillStyle=t,"#000"===e.fillStyle?null:e.fillStyle}(t):t;const e={cmyk:/^cmyk\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)/i,rgba:/^rgba?\D+([\d.]+)(%?)\D+([\d.]+)(%?)\D+([\d.]+)(%?)\D*?(([\d.]+)(%?)|$)/i,hsla:/^hsla?\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D*?(([\d.]+)(%?)|$)/i,hsva:/^hsva?\D+([\d.]+)\D+([\d.]+)\D+([\d.]+)\D*?(([\d.]+)(%?)|$)/i,hexa:/^#?(([\dA-Fa-f]{3,4})|([\dA-Fa-f]{6})|([\dA-Fa-f]{8}))$/i},o=t=>t.map((t=>/^(|\d+)\.\d+|\d+$/.test(t)?Number(t):void 0));let n;t:for(const i in e)if(n=e[i].exec(t))switch(i){case"cmyk":{const[,t,e,s,r]=o(n);if(t>100||e>100||s>100||r>100)break t;return{values:y(t,e,s,r),type:i}}case"rgba":{let[,t,,e,,s,,,r]=o(n);if(t="%"===n[2]?t/100*255:t,e="%"===n[4]?e/100*255:e,s="%"===n[6]?s/100*255:s,r="%"===n[9]?r/100:r,t>255||e>255||s>255||r<0||r>1)break t;return{values:[...b(t,e,s),r],a:r,type:i}}case"hexa":{let[,t]=n;4!==t.length&&3!==t.length||(t=t.split("").map((t=>t+t)).join(""));const e=t.substring(0,6);let o=t.substring(6);return o=o?parseInt(o,16)/255:void 0,{values:[..._(e),o],a:o,type:i}}case"hsla":{let[,t,e,s,,r]=o(n);if(r="%"===n[6]?r/100:r,t>360||e>100||s>100||r<0||r>1)break t;return{values:[...g(t,e,s),r],a:r,type:i}}case"hsva":{let[,t,e,s,,r]=o(n);if(r="%"===n[6]?r/100:r,t>360||e>100||s>100||r<0||r>1)break t;return{values:[t,e,s,r],a:r,type:i}}}return{values:null,type:null}}(t),{lockOpacity:i}=this.options,s=void 0!==n&&1!==n;return e&&3===e.length&&(e[3]=void 0),{values:!e||i&&s?null:e,type:o}}_t(t){return this.options.i18n[t]||E.I18N_DEFAULTS[t]}_emit(t,...e){this._eventListener[t].forEach((t=>t(...e,this)))}on(t,e){return this._eventListener[t].push(e),this}off(t,e){const o=this._eventListener[t]||[],n=o.indexOf(e);return~n&&o.splice(n,1),this}addSwatch(t){const{values:e}=this._parseLocalColor(t);if(e){const{_swatchColors:t,_root:o}=this,n=A(...e),s=r(`<button type="button" style="--pcr-color: ${n.toRGBA().toString(0)}" aria-label="${this._t("btn:swatch")}"/>`);return o.swatches.appendChild(s),t.push({el:s,color:n}),this._eventBindings.push(i(s,"click",(()=>{this.setHSVA(...n.toHSVA(),!0),this._emit("swatchselect",n),this._emit("change",n,"swatch",this)}))),!0}return!1}removeSwatch(t){const e=this._swatchColors[t];if(e){const{el:o}=e;return this._root.swatches.removeChild(o),this._swatchColors.splice(t,1),!0}return!1}applyColor(t=!1){const{preview:e,button:o}=this._root,n=this._color.toRGBA().toString(0);return e.lastColor.style.setProperty("--pcr-color",n),this.options.useAsButton||o.style.setProperty("--pcr-color",n),o.classList.remove("clear"),this._lastColor=this._color.clone(),this._initializingActive||t||this._emit("save",this._color),this}destroy(){cancelAnimationFrame(this._setupAnimationFrame),this._eventBindings.forEach((t=>s(...t))),Object.keys(this._components).forEach((t=>this._components[t].destroy()))}destroyAndRemove(){this.destroy();const{root:t,app:e}=this._root;t.parentElement&&t.parentElement.removeChild(t),e.parentElement.removeChild(e),Object.keys(this).forEach((t=>this[t]=null))}hide(){return!!this.isOpen()&&(this._root.app.classList.remove("visible"),this._emit("hide"),!0)}show(){return!this.options.disabled&&!this.isOpen()&&(this._root.app.classList.add("visible"),this._rePositioningPicker(),this._emit("show",this._color),this)}isOpen(){return this._root.app.classList.contains("visible")}setHSVA(t=360,e=0,o=0,n=1,i=!1){const s=this._recalc;if(this._recalc=!1,t<0||t>360||e<0||e>100||o<0||o>100||n<0||n>1)return!1;this._color=A(t,e,o,n);const{hue:r,opacity:a,palette:l}=this._components;return r.update(t/360),a.update(n),l.update(e/100,1-o/100),i||this.applyColor(),s&&this._updateOutput(),this._recalc=s,!0}setColor(t,e=!1){if(null===t)return this._clearColor(e),!0;const{values:o,type:n}=this._parseLocalColor(t);if(o){const t=n.toUpperCase(),{options:i}=this._root.interaction,s=i.find((e=>e.getAttribute("data-type")===t));if(s&&!s.hidden)for(const t of i)t.classList[t===s?"add":"remove"]("active");return!!this.setHSVA(...o,e)&&this.setColorRepresentation(t)}return!1}setColorRepresentation(t){return t=t.toUpperCase(),!!this._root.interaction.options.find((e=>e.getAttribute("data-type").startsWith(t)&&!e.click()))}getColorRepresentation(){return this._representation}getColor(){return this._color}getSelectedColor(){return this._lastColor}getRoot(){return this._root}disable(){return this.hide(),this.options.disabled=!0,this._root.button.classList.add("disabled"),this}enable(){return this.options.disabled=!1,this._root.button.classList.remove("disabled"),this}}return e.default})())(),pickr_min$1=_mergeNamespaces({__proto__:null,default:viewport.getDefaultExportFromCjs(pickr_minExports)},[pickr_minExports]);exports.pickr_min=pickr_min$1;