@bynder/compact-view 5.2.3 → 5.2.4

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 (253) hide show
  1. package/AccessToken2.js +1 -1
  2. package/ActiveFilters.js +49 -50
  3. package/AddMedia.js +19 -18
  4. package/Advanced.js +13 -13
  5. package/App.js +60 -59
  6. package/Arrow.js +1 -1
  7. package/AssetFilter.js +38 -38
  8. package/AssetItem.js +10 -17
  9. package/AssetList.js +5 -5
  10. package/AssetTypeItem.js +21 -21
  11. package/AssetsView.js +13 -13
  12. package/Axios2.js +82 -76
  13. package/AxiosError.js +36 -35
  14. package/ButtonAction.js +1 -1
  15. package/CanceledError.js +15 -8
  16. package/Card.js +1 -1
  17. package/Chip.js +1 -1
  18. package/CollectionCard.js +22 -22
  19. package/CollectionItem.js +9 -9
  20. package/CollectionList.js +5 -5
  21. package/CollectionView.js +11 -11
  22. package/ColorPicker.js +1 -1
  23. package/ColorPickerSolid.js +3 -3
  24. package/ColorPickerWithOpacity.js +3 -3
  25. package/Component.js +158 -0
  26. package/Component2.js +4 -0
  27. package/ConfigContext.js +7 -8
  28. package/Container.js +1 -1
  29. package/ContextAction.js +1 -1
  30. package/ControlGroup.js +6 -6
  31. package/Dat.js +33 -32
  32. package/DatDropdownItem.js +1 -1
  33. package/DesignSystemProvider.js +7 -7
  34. package/DirectionSelect.js +11 -10
  35. package/DomainInput.js +19 -11
  36. package/Draggable.js +337 -0
  37. package/Draggable2.js +4 -0
  38. package/DraggableCore.js +312 -0
  39. package/DraggableCore2.js +4 -0
  40. package/Dropdown.js +37 -37
  41. package/Dropdown2.js +1 -1
  42. package/DropdownListItem.js +1 -1
  43. package/FieldSelect.js +19 -17
  44. package/FileSelector.js +38 -37
  45. package/FontPicker.js +1 -1
  46. package/Form.js +1 -1
  47. package/Header.js +5 -4
  48. package/HttpStatusCode.js +7 -1
  49. package/InfiniteScroll.js +1 -1
  50. package/InlineBanner.js +1 -1
  51. package/Input.js +1 -1
  52. package/InterceptorManager.js +2 -1
  53. package/Item.js +8 -8
  54. package/Item4.js +2 -2
  55. package/LeftArrow.js +1 -1
  56. package/ListItem2.js +1 -1
  57. package/ModalBase.js +15 -15
  58. package/NoResults.js +1 -1
  59. package/Option_new.js +36 -29
  60. package/ReactPropTypesSecret.js +10 -0
  61. package/RightArrow.js +1 -1
  62. package/SearchInput.js +1 -1
  63. package/SearchInput2.js +1 -1
  64. package/SelectionFooter.js +41 -31
  65. package/Shield.js +2 -2
  66. package/Smartfilters_new.js +107 -98
  67. package/StatefulAssetList.js +50 -50
  68. package/StoreInitializer.js +32 -16
  69. package/SwitchNLS.js +1 -1
  70. package/TagItem.js +15 -15
  71. package/Tags.js +1 -1
  72. package/Toolbar.js +23 -20
  73. package/Tooltip2.js +1 -1
  74. package/ViewSwitch.js +17 -15
  75. package/_commonjsHelpers.js +28 -3
  76. package/adapters.js +54 -42
  77. package/api/filterAssets.d.ts +1 -1
  78. package/api/getAssets.d.ts +1 -1
  79. package/api/getFilters.d.ts +1 -1
  80. package/api/rest/index.d.ts +1 -1
  81. package/api/rest/types.d.ts +1 -1
  82. package/api2.js +1 -1
  83. package/asset.type.js +1 -1
  84. package/autocomplete.js +1 -1
  85. package/axios.js +1 -1
  86. package/bodyScrollLock.esm.js +68 -0
  87. package/buildURL.js +13 -15
  88. package/checkGlobals.js +1 -1
  89. package/cjs.js +7 -0
  90. package/cjs2.js +15 -0
  91. package/cjs3.js +4 -0
  92. package/clsx.m.js +6 -0
  93. package/clsx.m2.js +15 -0
  94. package/combineMetaproperties.js +3 -1
  95. package/composeSignals.js +1 -1
  96. package/cookieStore.js +1 -1
  97. package/cookies.js +13 -11
  98. package/currentScopes.js +1 -1
  99. package/data.js +1 -1
  100. package/devUtils.js +1 -1
  101. package/dispatchRequest.js +5 -5
  102. package/domFns.js +151 -0
  103. package/domFns2.js +4 -0
  104. package/factoryWithThrowingShims.js +52 -0
  105. package/fetch2.js +156 -128
  106. package/filter/AssetFilterContext.d.ts +3 -3
  107. package/filterAssets.js +1 -1
  108. package/getAsset.js +1 -1
  109. package/getAssetCounts.js +1 -1
  110. package/getAssets.js +1 -1
  111. package/getCollections.js +1 -1
  112. package/getFilterOptions.js +1 -1
  113. package/getFilters.js +1 -1
  114. package/getFilters_new.js +1 -1
  115. package/getPrefix.js +35 -0
  116. package/getPrefix2.js +4 -0
  117. package/getSimilarityAssets.js +1 -1
  118. package/goober.modern.js +75 -0
  119. package/handlers.js +1 -1
  120. package/iconBase.js +56 -0
  121. package/iconContext.js +12 -0
  122. package/iconsManifest.js +222 -0
  123. package/index-esm.js +1 -4
  124. package/index.browser.js +1 -1
  125. package/index.m.js +9 -0
  126. package/index.m2.js +17 -0
  127. package/index10.js +18 -2
  128. package/index11.js +181 -15
  129. package/index112.js +1 -1
  130. package/index12.js +313 -36
  131. package/index13.js +5 -2430
  132. package/index14.js +3 -557
  133. package/index15.js +15 -55
  134. package/index16.js +3 -2
  135. package/index17.js +3 -87
  136. package/index18.js +36 -60
  137. package/index19.js +3 -7
  138. package/index20.js +2429 -12
  139. package/index21.js +557 -10
  140. package/index22.js +1 -1
  141. package/index23.js +119 -6
  142. package/index24.js +39 -7
  143. package/index25.js +2 -5
  144. package/index26.js +86 -9
  145. package/index27.js +55 -8
  146. package/index28.js +6 -636
  147. package/index29.js +8692 -74
  148. package/index3.js +1684 -5
  149. package/index30.js +2 -5
  150. package/index31.js +4 -20
  151. package/index310.js +2 -0
  152. package/index32.js +11 -2
  153. package/index33.js +5083 -4
  154. package/index34.js +2 -18
  155. package/index35.js +59 -5
  156. package/index36.js +2 -2
  157. package/index37.js +13 -11
  158. package/index38.js +46 -10
  159. package/index39.js +6 -12
  160. package/index4.js +5 -1684
  161. package/index40.js +8 -11
  162. package/index41.js +26 -18
  163. package/index42.js +2 -64
  164. package/index43.js +63 -5
  165. package/index44.js +9 -55
  166. package/index45.js +7 -67
  167. package/index46.js +8 -31
  168. package/index47.js +5 -11
  169. package/index48.js +10 -121
  170. package/index49.js +9 -86
  171. package/index5.js +215 -23
  172. package/index50.js +636 -7
  173. package/index51.js +74 -11
  174. package/index52.js +4 -13
  175. package/index53.js +19 -13
  176. package/index54.js +4 -6
  177. package/index55.js +18 -7
  178. package/index56.js +5 -14
  179. package/index57.js +10 -28
  180. package/index58.js +10 -15
  181. package/index59.js +15 -0
  182. package/index6.js +250 -299
  183. package/index60.js +13 -0
  184. package/index61.js +21 -0
  185. package/index62.js +8 -0
  186. package/index63.js +57 -0
  187. package/index64.js +4 -0
  188. package/index65.js +69 -0
  189. package/index66.js +33 -0
  190. package/index67.js +13 -0
  191. package/index68.js +123 -0
  192. package/index69.js +88 -0
  193. package/index7.js +22 -5047
  194. package/index70.js +10 -0
  195. package/index71.js +13 -0
  196. package/index72.js +13 -225
  197. package/index73.js +16 -0
  198. package/index74.js +9 -0
  199. package/index75.js +228 -0
  200. package/index76.js +9 -0
  201. package/index77.js +17 -0
  202. package/index78.js +31 -0
  203. package/index79.js +18 -0
  204. package/index8.js +5044 -47
  205. package/index9.js +50 -15
  206. package/isAbsoluteURL.js +1 -1
  207. package/isURLSameOrigin.js +1 -1
  208. package/localization.js +15 -15
  209. package/log.js +14 -0
  210. package/log2.js +4 -0
  211. package/matchRequestUrl.js +1 -1
  212. package/mergeConfig.js +37 -32
  213. package/notify.js +2 -2
  214. package/package.json +1 -1
  215. package/positionFns.js +101 -0
  216. package/positionFns2.js +4 -0
  217. package/react-laag.esm.js +957 -0
  218. package/react.js +8 -8
  219. package/react2.js +9 -9
  220. package/resolveConfig.js +23 -23
  221. package/select/add-media/AddMedia.d.ts +3 -1
  222. package/select/current-selection/SelectedItems.d.ts +1 -1
  223. package/shims.js +29 -0
  224. package/shims2.js +4 -0
  225. package/store/StoreInitializer.d.ts +5 -1
  226. package/store/useAssetFilterStore.d.ts +55 -0
  227. package/store/useSelectionStore.d.ts +47 -0
  228. package/styled-components.browser.esm.js +2 -2
  229. package/throttle.js +1 -1
  230. package/toURLEncodedForm.js +11 -10
  231. package/tokenExpirationHelper.js +1 -1
  232. package/transformData.js +1 -1
  233. package/transitional.js +4 -3
  234. package/useAssetFilterStore.js +152 -0
  235. package/useDatStore.js +1 -1
  236. package/useEffectEvent.js +7 -7
  237. package/useFonts.js +2 -2
  238. package/useOrderingStore.js +1 -1
  239. package/useRouterStore.js +1 -1
  240. package/useSearchStore.js +1 -1
  241. package/useSelectionStore.js +131 -0
  242. package/useSimilaritySearchStore.js +1 -1
  243. package/useTranslate.js +1 -1
  244. package/utils/combineMetaproperties.d.ts +2 -0
  245. package/utils6.js +160 -118
  246. package/utils7.js +7 -68
  247. package/utils8.js +68 -7
  248. package/xhr.js +47 -46
  249. package/AssetFilterContext.js +0 -161
  250. package/SelectionContext.js +0 -143
  251. package/select/SelectionContext.d.ts +0 -30
  252. /package/{Middleware.js → Middleware2.js} +0 -0
  253. /package/{middleware2.js → middleware.js} +0 -0
package/index21.js CHANGED
@@ -1,11 +1,558 @@
1
- import m from "./index23.js";
2
- import a from "./index24.js";
3
- import i from "./index25.js";
4
- function d(t, r) {
5
- i(2, arguments);
6
- var e = a(t).getTime(), o = m(r);
7
- return new Date(e + o);
8
- }
9
- export {
10
- d as default
1
+ import { g as Se } from "./sdk-DhxX43BH.js";
2
+ import "react/jsx-runtime";
3
+ import H, { createContext as me } from "react";
4
+ var re = { exports: {} }, k = {}, ne = { exports: {} }, V = {};
5
+ /**
6
+ * @license React
7
+ * use-sync-external-store-shim.production.js
8
+ *
9
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
10
+ *
11
+ * This source code is licensed under the MIT license found in the
12
+ * LICENSE file in the root directory of this source tree.
13
+ */
14
+ var oe;
15
+ function Pe() {
16
+ if (oe) return V;
17
+ oe = 1;
18
+ var e = H;
19
+ function t(s, c) {
20
+ return s === c && (s !== 0 || 1 / s === 1 / c) || s !== s && c !== c;
21
+ }
22
+ var r = typeof Object.is == "function" ? Object.is : t, n = e.useState, o = e.useEffect, u = e.useLayoutEffect, i = e.useDebugValue;
23
+ function a(s, c) {
24
+ var l = c(), b = n({ inst: { value: l, getSnapshot: c } }), f = b[0].inst, P = b[1];
25
+ return u(
26
+ function() {
27
+ f.value = l, f.getSnapshot = c, d(f) && P({ inst: f });
28
+ },
29
+ [s, l, c]
30
+ ), o(
31
+ function() {
32
+ return d(f) && P({ inst: f }), s(function() {
33
+ d(f) && P({ inst: f });
34
+ });
35
+ },
36
+ [s]
37
+ ), i(l), l;
38
+ }
39
+ function d(s) {
40
+ var c = s.getSnapshot;
41
+ s = s.value;
42
+ try {
43
+ var l = c();
44
+ return !r(s, l);
45
+ } catch {
46
+ return !0;
47
+ }
48
+ }
49
+ function y(s, c) {
50
+ return c();
51
+ }
52
+ var v = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? y : a;
53
+ return V.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : v, V;
54
+ }
55
+ var ue;
56
+ function ge() {
57
+ return ue || (ue = 1, ne.exports = Pe()), ne.exports;
58
+ }
59
+ /**
60
+ * @license React
61
+ * use-sync-external-store-shim/with-selector.production.js
62
+ *
63
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
64
+ *
65
+ * This source code is licensed under the MIT license found in the
66
+ * LICENSE file in the root directory of this source tree.
67
+ */
68
+ var ie;
69
+ function we() {
70
+ if (ie) return k;
71
+ ie = 1;
72
+ var e = H, t = ge();
73
+ function r(y, v) {
74
+ return y === v && (y !== 0 || 1 / y === 1 / v) || y !== y && v !== v;
75
+ }
76
+ var n = typeof Object.is == "function" ? Object.is : r, o = t.useSyncExternalStore, u = e.useRef, i = e.useEffect, a = e.useMemo, d = e.useDebugValue;
77
+ return k.useSyncExternalStoreWithSelector = function(y, v, s, c, l) {
78
+ var b = u(null);
79
+ if (b.current === null) {
80
+ var f = { hasValue: !1, value: null };
81
+ b.current = f;
82
+ } else f = b.current;
83
+ b = a(
84
+ function() {
85
+ function Z(S) {
86
+ if (!$) {
87
+ if ($ = !0, F = S, S = c(S), l !== void 0 && f.hasValue) {
88
+ var E = f.value;
89
+ if (l(E, S))
90
+ return x = E;
91
+ }
92
+ return x = S;
93
+ }
94
+ if (E = x, n(F, S)) return E;
95
+ var te = c(S);
96
+ return l !== void 0 && l(E, te) ? (F = S, E) : (F = S, x = te);
97
+ }
98
+ var $ = !1, F, x, ee = s === void 0 ? null : s;
99
+ return [
100
+ function() {
101
+ return Z(v());
102
+ },
103
+ ee === null ? void 0 : function() {
104
+ return Z(ee());
105
+ }
106
+ ];
107
+ },
108
+ [v, s, c, l]
109
+ );
110
+ var P = o(y, b[0], b[1]);
111
+ return i(
112
+ function() {
113
+ f.hasValue = !0, f.value = P;
114
+ },
115
+ [P]
116
+ ), d(P), P;
117
+ }, k;
118
+ }
119
+ var ae;
120
+ function Oe() {
121
+ return ae || (ae = 1, re.exports = we()), re.exports;
122
+ }
123
+ var Ee = Oe();
124
+ const ze = /* @__PURE__ */ Se(Ee), { useDebugValue: We } = H, { useSyncExternalStoreWithSelector: Ke } = ze;
125
+ var _e = Symbol.for("immer-nothing"), se = Symbol.for("immer-draftable"), p = Symbol.for("immer-state");
126
+ function h(e, ...t) {
127
+ throw new Error(
128
+ `[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`
129
+ );
130
+ }
131
+ var z = Object.getPrototypeOf;
132
+ function D(e) {
133
+ return !!e && !!e[p];
134
+ }
135
+ function w(e) {
136
+ var t;
137
+ return e ? de(e) || Array.isArray(e) || !!e[se] || !!((t = e.constructor) != null && t[se]) || M(e) || R(e) : !1;
138
+ }
139
+ var De = Object.prototype.constructor.toString();
140
+ function de(e) {
141
+ if (!e || typeof e != "object")
142
+ return !1;
143
+ const t = z(e);
144
+ if (t === null)
145
+ return !0;
146
+ const r = Object.hasOwnProperty.call(t, "constructor") && t.constructor;
147
+ return r === Object ? !0 : typeof r == "function" && Function.toString.call(r) === De;
148
+ }
149
+ function C(e, t) {
150
+ L(e) === 0 ? Reflect.ownKeys(e).forEach((r) => {
151
+ t(r, e[r], e);
152
+ }) : e.forEach((r, n) => t(n, r, e));
153
+ }
154
+ function L(e) {
155
+ const t = e[p];
156
+ return t ? t.type_ : Array.isArray(e) ? 1 : M(e) ? 2 : R(e) ? 3 : 0;
157
+ }
158
+ function G(e, t) {
159
+ return L(e) === 2 ? e.has(t) : Object.prototype.hasOwnProperty.call(e, t);
160
+ }
161
+ function ye(e, t, r) {
162
+ const n = L(e);
163
+ n === 2 ? e.set(t, r) : n === 3 ? e.add(r) : e[t] = r;
164
+ }
165
+ function Ae(e, t) {
166
+ return e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t;
167
+ }
168
+ function M(e) {
169
+ return e instanceof Map;
170
+ }
171
+ function R(e) {
172
+ return e instanceof Set;
173
+ }
174
+ function g(e) {
175
+ return e.copy_ || e.base_;
176
+ }
177
+ function Q(e, t) {
178
+ if (M(e))
179
+ return new Map(e);
180
+ if (R(e))
181
+ return new Set(e);
182
+ if (Array.isArray(e))
183
+ return Array.prototype.slice.call(e);
184
+ const r = de(e);
185
+ if (t === !0 || t === "class_only" && !r) {
186
+ const n = Object.getOwnPropertyDescriptors(e);
187
+ delete n[p];
188
+ let o = Reflect.ownKeys(n);
189
+ for (let u = 0; u < o.length; u++) {
190
+ const i = o[u], a = n[i];
191
+ a.writable === !1 && (a.writable = !0, a.configurable = !0), (a.get || a.set) && (n[i] = {
192
+ configurable: !0,
193
+ writable: !0,
194
+ // could live with !!desc.set as well here...
195
+ enumerable: a.enumerable,
196
+ value: e[i]
197
+ });
198
+ }
199
+ return Object.create(z(e), n);
200
+ } else {
201
+ const n = z(e);
202
+ if (n !== null && r)
203
+ return { ...e };
204
+ const o = Object.create(n);
205
+ return Object.assign(o, e);
206
+ }
207
+ }
208
+ function J(e, t = !1) {
209
+ return I(e) || D(e) || !w(e) || (L(e) > 1 && (e.set = e.add = e.clear = e.delete = je), Object.freeze(e), t && Object.entries(e).forEach(([r, n]) => J(n, !0))), e;
210
+ }
211
+ function je() {
212
+ h(2);
213
+ }
214
+ function I(e) {
215
+ return Object.isFrozen(e);
216
+ }
217
+ var Fe = {};
218
+ function O(e) {
219
+ const t = Fe[e];
220
+ return t || h(0, e), t;
221
+ }
222
+ var A;
223
+ function he() {
224
+ return A;
225
+ }
226
+ function xe(e, t) {
227
+ return {
228
+ drafts_: [],
229
+ parent_: e,
230
+ immer_: t,
231
+ // Whenever the modified draft contains a draft from another scope, we
232
+ // need to prevent auto-freezing so the unowned draft can be finalized.
233
+ canAutoFreeze_: !0,
234
+ unfinalizedDrafts_: 0
235
+ };
236
+ }
237
+ function ce(e, t) {
238
+ t && (O("Patches"), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
239
+ }
240
+ function T(e) {
241
+ X(e), e.drafts_.forEach(Ce), e.drafts_ = null;
242
+ }
243
+ function X(e) {
244
+ e === A && (A = e.parent_);
245
+ }
246
+ function fe(e) {
247
+ return A = xe(A, e);
248
+ }
249
+ function Ce(e) {
250
+ const t = e[p];
251
+ t.type_ === 0 || t.type_ === 1 ? t.revoke_() : t.revoked_ = !0;
252
+ }
253
+ function le(e, t) {
254
+ t.unfinalizedDrafts_ = t.drafts_.length;
255
+ const r = t.drafts_[0];
256
+ return e !== void 0 && e !== r ? (r[p].modified_ && (T(t), h(4)), w(e) && (e = U(t, e), t.parent_ || N(t, e)), t.patches_ && O("Patches").generateReplacementPatches_(
257
+ r[p].base_,
258
+ e,
259
+ t.patches_,
260
+ t.inversePatches_
261
+ )) : e = U(t, r, []), T(t), t.patches_ && t.patchListener_(t.patches_, t.inversePatches_), e !== _e ? e : void 0;
262
+ }
263
+ function U(e, t, r) {
264
+ if (I(t))
265
+ return t;
266
+ const n = t[p];
267
+ if (!n)
268
+ return C(
269
+ t,
270
+ (o, u) => pe(e, n, t, o, u, r)
271
+ ), t;
272
+ if (n.scope_ !== e)
273
+ return t;
274
+ if (!n.modified_)
275
+ return N(e, n.base_, !0), n.base_;
276
+ if (!n.finalized_) {
277
+ n.finalized_ = !0, n.scope_.unfinalizedDrafts_--;
278
+ const o = n.copy_;
279
+ let u = o, i = !1;
280
+ n.type_ === 3 && (u = new Set(o), o.clear(), i = !0), C(
281
+ u,
282
+ (a, d) => pe(e, n, o, a, d, r, i)
283
+ ), N(e, o, !1), r && e.patches_ && O("Patches").generatePatches_(
284
+ n,
285
+ r,
286
+ e.patches_,
287
+ e.inversePatches_
288
+ );
289
+ }
290
+ return n.copy_;
291
+ }
292
+ function pe(e, t, r, n, o, u, i) {
293
+ if (D(o)) {
294
+ const a = u && t && t.type_ !== 3 && // Set objects are atomic since they have no keys.
295
+ !G(t.assigned_, n) ? u.concat(n) : void 0, d = U(e, o, a);
296
+ if (ye(r, n, d), D(d))
297
+ e.canAutoFreeze_ = !1;
298
+ else
299
+ return;
300
+ } else i && r.add(o);
301
+ if (w(o) && !I(o)) {
302
+ if (!e.immer_.autoFreeze_ && e.unfinalizedDrafts_ < 1)
303
+ return;
304
+ U(e, o), (!t || !t.scope_.parent_) && typeof n != "symbol" && Object.prototype.propertyIsEnumerable.call(r, n) && N(e, o);
305
+ }
306
+ }
307
+ function N(e, t, r = !1) {
308
+ !e.parent_ && e.immer_.autoFreeze_ && e.canAutoFreeze_ && J(t, r);
309
+ }
310
+ function Ue(e, t) {
311
+ const r = Array.isArray(e), n = {
312
+ type_: r ? 1 : 0,
313
+ // Track which produce call this is associated with.
314
+ scope_: t ? t.scope_ : he(),
315
+ // True for both shallow and deep changes.
316
+ modified_: !1,
317
+ // Used during finalization.
318
+ finalized_: !1,
319
+ // Track which properties have been assigned (true) or deleted (false).
320
+ assigned_: {},
321
+ // The parent draft state.
322
+ parent_: t,
323
+ // The base state.
324
+ base_: e,
325
+ // The base proxy.
326
+ draft_: null,
327
+ // set below
328
+ // The base copy with any updated values.
329
+ copy_: null,
330
+ // Called by the `produce` function.
331
+ revoke_: null,
332
+ isManual_: !1
333
+ };
334
+ let o = n, u = Y;
335
+ r && (o = [n], u = j);
336
+ const { revoke: i, proxy: a } = Proxy.revocable(o, u);
337
+ return n.draft_ = a, n.revoke_ = i, a;
338
+ }
339
+ var Y = {
340
+ get(e, t) {
341
+ if (t === p)
342
+ return e;
343
+ const r = g(e);
344
+ if (!G(r, t))
345
+ return Ne(e, r, t);
346
+ const n = r[t];
347
+ return e.finalized_ || !w(n) ? n : n === W(e.base_, t) ? (K(e), e.copy_[t] = B(n, e)) : n;
348
+ },
349
+ has(e, t) {
350
+ return t in g(e);
351
+ },
352
+ ownKeys(e) {
353
+ return Reflect.ownKeys(g(e));
354
+ },
355
+ set(e, t, r) {
356
+ const n = ve(g(e), t);
357
+ if (n != null && n.set)
358
+ return n.set.call(e.draft_, r), !0;
359
+ if (!e.modified_) {
360
+ const o = W(g(e), t), u = o?.[p];
361
+ if (u && u.base_ === r)
362
+ return e.copy_[t] = r, e.assigned_[t] = !1, !0;
363
+ if (Ae(r, o) && (r !== void 0 || G(e.base_, t)))
364
+ return !0;
365
+ K(e), q(e);
366
+ }
367
+ return e.copy_[t] === r && // special case: handle new props with value 'undefined'
368
+ (r !== void 0 || t in e.copy_) || // special case: NaN
369
+ Number.isNaN(r) && Number.isNaN(e.copy_[t]) || (e.copy_[t] = r, e.assigned_[t] = !0), !0;
370
+ },
371
+ deleteProperty(e, t) {
372
+ return W(e.base_, t) !== void 0 || t in e.base_ ? (e.assigned_[t] = !1, K(e), q(e)) : delete e.assigned_[t], e.copy_ && delete e.copy_[t], !0;
373
+ },
374
+ // Note: We never coerce `desc.value` into an Immer draft, because we can't make
375
+ // the same guarantee in ES5 mode.
376
+ getOwnPropertyDescriptor(e, t) {
377
+ const r = g(e), n = Reflect.getOwnPropertyDescriptor(r, t);
378
+ return n && {
379
+ writable: !0,
380
+ configurable: e.type_ !== 1 || t !== "length",
381
+ enumerable: n.enumerable,
382
+ value: r[t]
383
+ };
384
+ },
385
+ defineProperty() {
386
+ h(11);
387
+ },
388
+ getPrototypeOf(e) {
389
+ return z(e.base_);
390
+ },
391
+ setPrototypeOf() {
392
+ h(12);
393
+ }
394
+ }, j = {};
395
+ C(Y, (e, t) => {
396
+ j[e] = function() {
397
+ return arguments[0] = arguments[0][0], t.apply(this, arguments);
398
+ };
399
+ });
400
+ j.deleteProperty = function(e, t) {
401
+ return j.set.call(this, e, t, void 0);
11
402
  };
403
+ j.set = function(e, t, r) {
404
+ return Y.set.call(this, e[0], t, r, e[0]);
405
+ };
406
+ function W(e, t) {
407
+ const r = e[p];
408
+ return (r ? g(r) : e)[t];
409
+ }
410
+ function Ne(e, t, r) {
411
+ var n;
412
+ const o = ve(t, r);
413
+ return o ? "value" in o ? o.value : (
414
+ // This is a very special case, if the prop is a getter defined by the
415
+ // prototype, we should invoke it with the draft as context!
416
+ (n = o.get) == null ? void 0 : n.call(e.draft_)
417
+ ) : void 0;
418
+ }
419
+ function ve(e, t) {
420
+ if (!(t in e))
421
+ return;
422
+ let r = z(e);
423
+ for (; r; ) {
424
+ const n = Object.getOwnPropertyDescriptor(r, t);
425
+ if (n)
426
+ return n;
427
+ r = z(r);
428
+ }
429
+ }
430
+ function q(e) {
431
+ e.modified_ || (e.modified_ = !0, e.parent_ && q(e.parent_));
432
+ }
433
+ function K(e) {
434
+ e.copy_ || (e.copy_ = Q(
435
+ e.base_,
436
+ e.scope_.immer_.useStrictShallowCopy_
437
+ ));
438
+ }
439
+ var Le = class {
440
+ constructor(e) {
441
+ this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.produce = (t, r, n) => {
442
+ if (typeof t == "function" && typeof r != "function") {
443
+ const u = r;
444
+ r = t;
445
+ const i = this;
446
+ return function(a = u, ...d) {
447
+ return i.produce(a, (y) => r.call(this, y, ...d));
448
+ };
449
+ }
450
+ typeof r != "function" && h(6), n !== void 0 && typeof n != "function" && h(7);
451
+ let o;
452
+ if (w(t)) {
453
+ const u = fe(this), i = B(t, void 0);
454
+ let a = !0;
455
+ try {
456
+ o = r(i), a = !1;
457
+ } finally {
458
+ a ? T(u) : X(u);
459
+ }
460
+ return ce(u, n), le(o, u);
461
+ } else if (!t || typeof t != "object") {
462
+ if (o = r(t), o === void 0 && (o = t), o === _e && (o = void 0), this.autoFreeze_ && J(o, !0), n) {
463
+ const u = [], i = [];
464
+ O("Patches").generateReplacementPatches_(t, o, u, i), n(u, i);
465
+ }
466
+ return o;
467
+ } else
468
+ h(1, t);
469
+ }, this.produceWithPatches = (t, r) => {
470
+ if (typeof t == "function")
471
+ return (u, ...i) => this.produceWithPatches(u, (a) => t(a, ...i));
472
+ let n, o;
473
+ return [this.produce(t, r, (u, i) => {
474
+ n = u, o = i;
475
+ }), n, o];
476
+ }, typeof e?.autoFreeze == "boolean" && this.setAutoFreeze(e.autoFreeze), typeof e?.useStrictShallowCopy == "boolean" && this.setUseStrictShallowCopy(e.useStrictShallowCopy);
477
+ }
478
+ createDraft(e) {
479
+ w(e) || h(8), D(e) && (e = Me(e));
480
+ const t = fe(this), r = B(e, void 0);
481
+ return r[p].isManual_ = !0, X(t), r;
482
+ }
483
+ finishDraft(e, t) {
484
+ const r = e && e[p];
485
+ (!r || !r.isManual_) && h(9);
486
+ const { scope_: n } = r;
487
+ return ce(n, t), le(void 0, n);
488
+ }
489
+ /**
490
+ * Pass true to automatically freeze all copies created by Immer.
491
+ *
492
+ * By default, auto-freezing is enabled.
493
+ */
494
+ setAutoFreeze(e) {
495
+ this.autoFreeze_ = e;
496
+ }
497
+ /**
498
+ * Pass true to enable strict shallow copy.
499
+ *
500
+ * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
501
+ */
502
+ setUseStrictShallowCopy(e) {
503
+ this.useStrictShallowCopy_ = e;
504
+ }
505
+ applyPatches(e, t) {
506
+ let r;
507
+ for (r = t.length - 1; r >= 0; r--) {
508
+ const o = t[r];
509
+ if (o.path.length === 0 && o.op === "replace") {
510
+ e = o.value;
511
+ break;
512
+ }
513
+ }
514
+ r > -1 && (t = t.slice(r + 1));
515
+ const n = O("Patches").applyPatches_;
516
+ return D(e) ? n(e, t) : this.produce(
517
+ e,
518
+ (o) => n(o, t)
519
+ );
520
+ }
521
+ };
522
+ function B(e, t) {
523
+ const r = M(e) ? O("MapSet").proxyMap_(e, t) : R(e) ? O("MapSet").proxySet_(e, t) : Ue(e, t);
524
+ return (t ? t.scope_ : he()).drafts_.push(r), r;
525
+ }
526
+ function Me(e) {
527
+ return D(e) || h(10, e), be(e);
528
+ }
529
+ function be(e) {
530
+ if (!w(e) || I(e))
531
+ return e;
532
+ const t = e[p];
533
+ let r;
534
+ if (t) {
535
+ if (!t.modified_)
536
+ return t.base_;
537
+ t.finalized_ = !0, r = Q(e, t.scope_.immer_.useStrictShallowCopy_);
538
+ } else
539
+ r = Q(e, !0);
540
+ return C(r, (n, o) => {
541
+ ye(r, n, be(o));
542
+ }), t && (t.finalized_ = !1), r;
543
+ }
544
+ var _ = new Le();
545
+ _.produce;
546
+ _.produceWithPatches.bind(
547
+ _
548
+ );
549
+ _.setAutoFreeze.bind(_);
550
+ _.setUseStrictShallowCopy.bind(_);
551
+ _.applyPatches.bind(_);
552
+ _.createDraft.bind(_);
553
+ _.finishDraft.bind(_);
554
+ var m = /* @__PURE__ */ ((e) => (e.Idle = "IDLE", e.Pending = "PENDING", e.Queued = "QUEUED", e.Uploading = "UPLOADING", e.Uploaded = "UPLOADED", e.Cancelled = "CANCELLED", e.Failed = "FAILED", e.Paused = "PAUSED", e))(m || {});
555
+ m.Pending, m.Uploading;
556
+ m.Idle, m.Paused;
557
+ m.Paused, m.Uploading, m.Queued, m.Pending;
558
+ const Re = me(null), { Provider: Ge } = Re;
package/index22.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./index42.js";
1
+ import "./index43.js";
2
2
  import "./RequestHandler.js";
3
3
  import "./cookieStore.js";
4
4
  import "./decorators.js";
package/index23.js CHANGED
@@ -1,9 +1,122 @@
1
- function n(a) {
2
- if (a === null || a === !0 || a === !1)
3
- return NaN;
4
- var e = Number(a);
5
- return isNaN(e) ? e : e < 0 ? Math.ceil(e) : Math.floor(e);
1
+ import * as g from "react";
2
+ var S = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new WeakMap(), A = 0, V = void 0;
3
+ function M(e) {
4
+ return e ? (h.has(e) || (A += 1, h.set(e, A.toString())), h.get(e)) : "0";
5
+ }
6
+ function O(e) {
7
+ return Object.keys(e).sort().filter(
8
+ (t) => e[t] !== void 0
9
+ ).map((t) => `${t}_${t === "root" ? M(e.root) : e[t]}`).toString();
10
+ }
11
+ function T(e) {
12
+ const t = O(e);
13
+ let n = S.get(t);
14
+ if (!n) {
15
+ const u = /* @__PURE__ */ new Map();
16
+ let c;
17
+ const i = new IntersectionObserver((s) => {
18
+ s.forEach((r) => {
19
+ var o;
20
+ const v = r.isIntersecting && c.some((d) => r.intersectionRatio >= d);
21
+ e.trackVisibility && typeof r.isVisible > "u" && (r.isVisible = v), (o = u.get(r.target)) == null || o.forEach((d) => {
22
+ d(v, r);
23
+ });
24
+ });
25
+ }, e);
26
+ c = i.thresholds || (Array.isArray(e.threshold) ? e.threshold : [e.threshold || 0]), n = {
27
+ id: t,
28
+ observer: i,
29
+ elements: u
30
+ }, S.set(t, n);
31
+ }
32
+ return n;
33
+ }
34
+ function x(e, t, n = {}, u = V) {
35
+ if (typeof window.IntersectionObserver > "u" && u !== void 0) {
36
+ const o = e.getBoundingClientRect();
37
+ return t(u, {
38
+ isIntersecting: u,
39
+ target: e,
40
+ intersectionRatio: typeof n.threshold == "number" ? n.threshold : 0,
41
+ time: 0,
42
+ boundingClientRect: o,
43
+ intersectionRect: o,
44
+ rootBounds: o
45
+ }), () => {
46
+ };
47
+ }
48
+ const { id: c, observer: i, elements: s } = T(n), r = s.get(e) || [];
49
+ return s.has(e) || s.set(e, r), r.push(t), i.observe(e), function() {
50
+ r.splice(r.indexOf(t), 1), r.length === 0 && (s.delete(e), i.unobserve(e)), s.size === 0 && (i.disconnect(), S.delete(c));
51
+ };
52
+ }
53
+ function B({
54
+ threshold: e,
55
+ delay: t,
56
+ trackVisibility: n,
57
+ rootMargin: u,
58
+ root: c,
59
+ triggerOnce: i,
60
+ skip: s,
61
+ initialInView: r,
62
+ fallbackInView: o,
63
+ onChange: v
64
+ } = {}) {
65
+ var d;
66
+ const [b, E] = g.useState(null), l = g.useRef(v), [R, y] = g.useState({
67
+ inView: !!r,
68
+ entry: void 0
69
+ });
70
+ l.current = v, g.useEffect(
71
+ () => {
72
+ if (s || !b) return;
73
+ let a;
74
+ return a = x(
75
+ b,
76
+ (p, I) => {
77
+ y({
78
+ inView: p,
79
+ entry: I
80
+ }), l.current && l.current(p, I), I.isIntersecting && i && a && (a(), a = void 0);
81
+ },
82
+ {
83
+ root: c,
84
+ rootMargin: u,
85
+ threshold: e,
86
+ // @ts-ignore
87
+ trackVisibility: n,
88
+ // @ts-ignore
89
+ delay: t
90
+ },
91
+ o
92
+ ), () => {
93
+ a && a();
94
+ };
95
+ },
96
+ // We break the rule here, because we aren't including the actual `threshold` variable
97
+ // eslint-disable-next-line react-hooks/exhaustive-deps
98
+ [
99
+ // If the threshold is an array, convert it to a string, so it won't change between renders.
100
+ Array.isArray(e) ? e.toString() : e,
101
+ b,
102
+ c,
103
+ u,
104
+ i,
105
+ s,
106
+ n,
107
+ o,
108
+ t
109
+ ]
110
+ );
111
+ const w = (d = R.entry) == null ? void 0 : d.target, _ = g.useRef(void 0);
112
+ !b && w && !i && !s && _.current !== w && (_.current = w, y({
113
+ inView: !!r,
114
+ entry: void 0
115
+ }));
116
+ const f = [E, R.inView, R.entry];
117
+ return f.ref = f[0], f.inView = f[1], f.entry = f[2], f;
6
118
  }
7
119
  export {
8
- n as default
120
+ x as observe,
121
+ B as useInView
9
122
  };