@phillips/seldon 1.53.1 → 1.54.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 (38) hide show
  1. package/dist/_virtual/Breakpoints.js +4 -0
  2. package/dist/_virtual/DynamicResponsive.js +4 -0
  3. package/dist/_virtual/Interactions.js +4 -0
  4. package/dist/_virtual/Media.js +4 -0
  5. package/dist/_virtual/MediaQueries.js +4 -0
  6. package/dist/_virtual/Utils.js +4 -0
  7. package/dist/_virtual/index2.js +2 -2
  8. package/dist/_virtual/index3.js +2 -2
  9. package/dist/_virtual/index4.js +2 -2
  10. package/dist/_virtual/index6.js +4 -0
  11. package/dist/components/Header/Header.d.ts +1 -1
  12. package/dist/components/Header/Header.js +20 -20
  13. package/dist/components/LanguageSelector/LanguageSelector.js +38 -37
  14. package/dist/components/Navigation/Navigation.d.ts +1 -1
  15. package/dist/components/Navigation/Navigation.js +23 -23
  16. package/dist/index.d.ts +1 -0
  17. package/dist/index.js +27 -25
  18. package/dist/node_modules/@artsy/fresnel/dist/Breakpoints.js +281 -0
  19. package/dist/node_modules/@artsy/fresnel/dist/DynamicResponsive.js +151 -0
  20. package/dist/node_modules/@artsy/fresnel/dist/Interactions.js +138 -0
  21. package/dist/node_modules/@artsy/fresnel/dist/Media.js +167 -0
  22. package/dist/node_modules/@artsy/fresnel/dist/MediaQueries.js +130 -0
  23. package/dist/node_modules/@artsy/fresnel/dist/Utils.js +94 -0
  24. package/dist/node_modules/@artsy/fresnel/dist/index.js +21 -0
  25. package/dist/node_modules/exenv/index.js +1 -1
  26. package/dist/node_modules/prop-types/index.js +1 -1
  27. package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  28. package/dist/node_modules/react-modal/lib/index.js +1 -1
  29. package/dist/providers/SeldonProvider.d.ts +7 -0
  30. package/dist/providers/SeldonProvider.js +9 -0
  31. package/dist/providers/utils.d.ts +5 -0
  32. package/dist/providers/utils.js +8 -0
  33. package/dist/scss/_vars.scss +1 -1
  34. package/dist/scss/components/Header/_header.scss +0 -9
  35. package/dist/scss/components/LanguageSelector/_languageSelector.scss +5 -22
  36. package/dist/utils/constants.d.ts +8 -0
  37. package/dist/utils/constants.js +10 -0
  38. package/package.json +2 -1
@@ -0,0 +1,281 @@
1
+ import { __exports as y } from "../../../../_virtual/Breakpoints.js";
2
+ import "./Utils.js";
3
+ import { __exports as O } from "../../../../_virtual/Utils.js";
4
+ Object.defineProperty(y, "__esModule", {
5
+ value: !0
6
+ });
7
+ y.Breakpoints = y.BreakpointConstraint = void 0;
8
+ var g = O;
9
+ function x(t) {
10
+ for (var r = 1; r < arguments.length; r++) {
11
+ var e = arguments[r] != null ? Object(arguments[r]) : {}, n = Object.keys(e);
12
+ typeof Object.getOwnPropertySymbols == "function" && n.push.apply(n, Object.getOwnPropertySymbols(e).filter(function(s) {
13
+ return Object.getOwnPropertyDescriptor(e, s).enumerable;
14
+ })), n.forEach(function(s) {
15
+ h(t, s, e[s]);
16
+ });
17
+ }
18
+ return t;
19
+ }
20
+ function p(t) {
21
+ return Q(t) || A(t) || w(t) || E();
22
+ }
23
+ function E() {
24
+ throw new TypeError(`Invalid attempt to spread non-iterable instance.
25
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
26
+ }
27
+ function A(t) {
28
+ if (typeof Symbol != "undefined" && t[Symbol.iterator] != null || t["@@iterator"] != null) return Array.from(t);
29
+ }
30
+ function Q(t) {
31
+ if (Array.isArray(t)) return k(t);
32
+ }
33
+ function B(t, r) {
34
+ return j(t) || M(t, r) || w(t, r) || S();
35
+ }
36
+ function S() {
37
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
38
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
39
+ }
40
+ function w(t, r) {
41
+ if (t) {
42
+ if (typeof t == "string") return k(t, r);
43
+ var e = Object.prototype.toString.call(t).slice(8, -1);
44
+ if (e === "Object" && t.constructor && (e = t.constructor.name), e === "Map" || e === "Set") return Array.from(t);
45
+ if (e === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)) return k(t, r);
46
+ }
47
+ }
48
+ function k(t, r) {
49
+ (r == null || r > t.length) && (r = t.length);
50
+ for (var e = 0, n = new Array(r); e < r; e++)
51
+ n[e] = t[e];
52
+ return n;
53
+ }
54
+ function M(t, r) {
55
+ var e = t == null ? null : typeof Symbol != "undefined" && t[Symbol.iterator] || t["@@iterator"];
56
+ if (e != null) {
57
+ var n = [], s = !0, a = !1, i, u;
58
+ try {
59
+ for (e = e.call(t); !(s = (i = e.next()).done) && (n.push(i.value), !(r && n.length === r)); s = !0)
60
+ ;
61
+ } catch (o) {
62
+ a = !0, u = o;
63
+ } finally {
64
+ try {
65
+ !s && e.return != null && e.return();
66
+ } finally {
67
+ if (a) throw u;
68
+ }
69
+ }
70
+ return n;
71
+ }
72
+ }
73
+ function j(t) {
74
+ if (Array.isArray(t)) return t;
75
+ }
76
+ function q(t, r) {
77
+ if (!(t instanceof r))
78
+ throw new TypeError("Cannot call a class as a function");
79
+ }
80
+ function T(t, r) {
81
+ for (var e = 0; e < r.length; e++) {
82
+ var n = r[e];
83
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n);
84
+ }
85
+ }
86
+ function b(t, r, e) {
87
+ return r && T(t.prototype, r), e && T(t, e), t;
88
+ }
89
+ function h(t, r, e) {
90
+ return r in t ? Object.defineProperty(t, r, { value: e, enumerable: !0, configurable: !0, writable: !0 }) : t[r] = e, t;
91
+ }
92
+ function I(t) {
93
+ return Array.isArray(t) ? t.join("-") : t;
94
+ }
95
+ var l;
96
+ y.BreakpointConstraint = l;
97
+ (function(t) {
98
+ t.at = "at", t.lessThan = "lessThan", t.greaterThan = "greaterThan", t.greaterThanOrEqual = "greaterThanOrEqual", t.between = "between";
99
+ })(l || (y.BreakpointConstraint = l = {}));
100
+ var C = /* @__PURE__ */ function() {
101
+ b(t, null, [{
102
+ key: "validKeys",
103
+ value: function() {
104
+ return [l.at, l.lessThan, l.greaterThan, l.greaterThanOrEqual, l.between];
105
+ }
106
+ }]);
107
+ function t(r) {
108
+ var e = this, n;
109
+ q(this, t), h(this, "_sortedBreakpoints", void 0), h(this, "_breakpoints", void 0), h(this, "_mediaQueries", void 0), h(this, "findBreakpointsForWidths", function(a, i) {
110
+ var u = e.findBreakpointAtWidth(a);
111
+ if (u) {
112
+ var o = e.findBreakpointAtWidth(i);
113
+ return !o || u === o ? [u] : e._sortedBreakpoints.slice(e._sortedBreakpoints.indexOf(u), e._sortedBreakpoints.indexOf(o) + 1);
114
+ }
115
+ }), h(this, "findBreakpointAtWidth", function(a) {
116
+ return e._sortedBreakpoints.find(function(i, u) {
117
+ var o = e._sortedBreakpoints[u + 1];
118
+ return o ? a >= e._breakpoints[i] && a < e._breakpoints[o] : a >= e._breakpoints[i];
119
+ });
120
+ }), h(this, "valuesWithBreakpointProps", function(a) {
121
+ var i = a.length, u = [], o;
122
+ return e._sortedBreakpoints.forEach(function(f, d) {
123
+ var _ = a[d];
124
+ d < i && (!o || o[0] !== _) ? (o = [_, [f]], u.push(o)) : o[1].push(f);
125
+ }), u.map(function(f, d) {
126
+ var _ = B(f, 2), m = _[0], v = _[1], c = {};
127
+ return d === u.length - 1 ? c.greaterThanOrEqual = v[0] : v.length === 1 ? c.at = v[0] : c.between = [v[0], u[d + 1][1][0]], [m, c];
128
+ });
129
+ }), this._breakpoints = r, this._sortedBreakpoints = Object.keys(r).map(function(a) {
130
+ return [a, r[a]];
131
+ }).sort(function(a, i) {
132
+ return a[1] < i[1] ? -1 : 1;
133
+ }).map(function(a) {
134
+ return a[0];
135
+ });
136
+ var s = this._sortedBreakpoints.slice(0, -1).reduce(function(a, i, u) {
137
+ return p(a).concat(p(e._sortedBreakpoints.slice(u + 1).map(function(o) {
138
+ return [i, o];
139
+ })));
140
+ }, []);
141
+ this._mediaQueries = (n = {}, h(n, l.at, this._createBreakpointQueries(l.at, this._sortedBreakpoints)), h(n, l.lessThan, this._createBreakpointQueries(l.lessThan, this._sortedBreakpoints.slice(1))), h(n, l.greaterThan, this._createBreakpointQueries(l.greaterThan, this._sortedBreakpoints.slice(0, -1))), h(n, l.greaterThanOrEqual, this._createBreakpointQueries(l.greaterThanOrEqual, this._sortedBreakpoints)), h(n, l.between, this._createBreakpointQueries(l.between, s)), n);
142
+ }
143
+ return b(t, [{
144
+ key: "toVisibleAtBreakpointSet",
145
+ value: function(e) {
146
+ if (e = this._normalizeProps(e), e.lessThan) {
147
+ var n = this.sortedBreakpoints.findIndex(function(f) {
148
+ return f === e.lessThan;
149
+ });
150
+ return this.sortedBreakpoints.slice(0, n);
151
+ } else if (e.greaterThan) {
152
+ var s = this.sortedBreakpoints.findIndex(function(f) {
153
+ return f === e.greaterThan;
154
+ });
155
+ return this.sortedBreakpoints.slice(s + 1);
156
+ } else if (e.greaterThanOrEqual) {
157
+ var a = this.sortedBreakpoints.findIndex(function(f) {
158
+ return f === e.greaterThanOrEqual;
159
+ });
160
+ return this.sortedBreakpoints.slice(a);
161
+ } else if (e.between) {
162
+ var i = e.between, u = this.sortedBreakpoints.findIndex(function(f) {
163
+ return f === i[0];
164
+ }), o = this.sortedBreakpoints.findIndex(function(f) {
165
+ return f === i[1];
166
+ });
167
+ return this.sortedBreakpoints.slice(u, o);
168
+ }
169
+ return [];
170
+ }
171
+ }, {
172
+ key: "toRuleSets",
173
+ value: function() {
174
+ var e = this, n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : t.validKeys(), s = n.reduce(function(a, i) {
175
+ return a[i] = e._mediaQueries[i], a;
176
+ }, {});
177
+ return Object.entries(s).reduce(function(a, i) {
178
+ var u = B(i, 2), o = u[0], f = u[1];
179
+ return f.forEach(function(d, _) {
180
+ a.push((0, g.createRuleSet)((0, g.createClassName)(o, _), "not all and ".concat(d)));
181
+ }), a;
182
+ }, []);
183
+ }
184
+ }, {
185
+ key: "shouldRenderMediaQuery",
186
+ value: function(e, n) {
187
+ var s = this;
188
+ if (e = this._normalizeProps(e), e.lessThan) {
189
+ var a = this._breakpoints[e.lessThan], i = Math.min.apply(Math, p(n.map(function(c) {
190
+ return s._breakpoints[c];
191
+ })));
192
+ return i < a;
193
+ } else if (e.greaterThan) {
194
+ var u = this._breakpoints[this._findNextBreakpoint(e.greaterThan)], o = Math.max.apply(Math, p(n.map(function(c) {
195
+ return s._breakpoints[c];
196
+ })));
197
+ return o >= u;
198
+ } else if (e.greaterThanOrEqual) {
199
+ var f = this._breakpoints[e.greaterThanOrEqual], d = Math.max.apply(Math, p(n.map(function(c) {
200
+ return s._breakpoints[c];
201
+ })));
202
+ return d >= f;
203
+ } else if (e.between) {
204
+ var _ = this._breakpoints[e.between[0]], m = this._breakpoints[e.between[1]], v = n.map(function(c) {
205
+ return s._breakpoints[c];
206
+ });
207
+ return !(Math.max.apply(Math, p(v)) < _ || Math.min.apply(Math, p(v)) >= m);
208
+ }
209
+ return !1;
210
+ }
211
+ }, {
212
+ key: "_normalizeProps",
213
+ value: function(e) {
214
+ if (e.at) {
215
+ var n = this._sortedBreakpoints.indexOf(e.at), s = this._sortedBreakpoints[n + 1];
216
+ return s ? {
217
+ between: [e.at, s]
218
+ } : {
219
+ greaterThanOrEqual: e.at
220
+ };
221
+ }
222
+ return e;
223
+ }
224
+ }, {
225
+ key: "_createBreakpointQuery",
226
+ value: function(e) {
227
+ if (e = this._normalizeProps(e), e.lessThan) {
228
+ var n = this._breakpoints[e.lessThan];
229
+ return "(max-width:".concat(n - 0.02, "px)");
230
+ } else if (e.greaterThan) {
231
+ var s = this._breakpoints[this._findNextBreakpoint(e.greaterThan)];
232
+ return "(min-width:".concat(s, "px)");
233
+ } else if (e.greaterThanOrEqual) {
234
+ var a = this._breakpoints[e.greaterThanOrEqual];
235
+ return "(min-width:".concat(a, "px)");
236
+ } else if (e.between) {
237
+ var i = this._breakpoints[e.between[0]], u = this._breakpoints[e.between[1]];
238
+ return "(min-width:".concat(i, "px) and (max-width:").concat(u - 0.02, "px)");
239
+ }
240
+ throw new Error("Unexpected breakpoint props: ".concat(JSON.stringify(e)));
241
+ }
242
+ }, {
243
+ key: "_createBreakpointQueries",
244
+ value: function(e, n) {
245
+ var s = this;
246
+ return n.reduce(function(a, i) {
247
+ return a.set(I(i), s._createBreakpointQuery(h({}, e, i))), a;
248
+ }, /* @__PURE__ */ new Map());
249
+ }
250
+ }, {
251
+ key: "_findNextBreakpoint",
252
+ value: function(e) {
253
+ var n = this._sortedBreakpoints[this._sortedBreakpoints.indexOf(e) + 1];
254
+ if (!n)
255
+ throw new Error("There is no breakpoint larger than ".concat(e));
256
+ return n;
257
+ }
258
+ }, {
259
+ key: "sortedBreakpoints",
260
+ get: function() {
261
+ return this._sortedBreakpoints;
262
+ }
263
+ }, {
264
+ key: "dynamicResponsiveMediaQueries",
265
+ get: function() {
266
+ return Array.from(this._mediaQueries[l.at].entries()).reduce(function(e, n) {
267
+ var s = B(n, 2), a = s[0], i = s[1];
268
+ return x({}, e, h({}, a, i));
269
+ }, {});
270
+ }
271
+ }, {
272
+ key: "largestBreakpoint",
273
+ get: function() {
274
+ return this._sortedBreakpoints[this._sortedBreakpoints.length - 1];
275
+ }
276
+ }]), t;
277
+ }();
278
+ y.Breakpoints = C;
279
+ export {
280
+ y as default
281
+ };
@@ -0,0 +1,151 @@
1
+ import { __exports as b } from "../../../../_virtual/DynamicResponsive.js";
2
+ import _ from "react";
3
+ function d(e) {
4
+ "@babel/helpers - typeof";
5
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? d = function(n) {
6
+ return typeof n;
7
+ } : d = function(n) {
8
+ return n && typeof Symbol == "function" && n.constructor === Symbol && n !== Symbol.prototype ? "symbol" : typeof n;
9
+ }, d(e);
10
+ }
11
+ Object.defineProperty(b, "__esModule", {
12
+ value: !0
13
+ });
14
+ b.createResponsiveComponents = C;
15
+ var y = M(_);
16
+ function M(e) {
17
+ return e && e.__esModule ? e : { default: e };
18
+ }
19
+ function m(e) {
20
+ for (var t = 1; t < arguments.length; t++) {
21
+ var n = arguments[t] != null ? Object(arguments[t]) : {}, r = Object.keys(n);
22
+ typeof Object.getOwnPropertySymbols == "function" && r.push.apply(r, Object.getOwnPropertySymbols(n).filter(function(o) {
23
+ return Object.getOwnPropertyDescriptor(n, o).enumerable;
24
+ })), r.forEach(function(o) {
25
+ f(e, o, n[o]);
26
+ });
27
+ }
28
+ return e;
29
+ }
30
+ function O(e, t) {
31
+ if (!(e instanceof t))
32
+ throw new TypeError("Cannot call a class as a function");
33
+ }
34
+ function w(e, t) {
35
+ for (var n = 0; n < t.length; n++) {
36
+ var r = t[n];
37
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
38
+ }
39
+ }
40
+ function Q(e, t, n) {
41
+ return t && w(e.prototype, t), e;
42
+ }
43
+ function g(e, t) {
44
+ if (t && (d(t) === "object" || typeof t == "function"))
45
+ return t;
46
+ if (t !== void 0)
47
+ throw new TypeError("Derived constructors may only return object or undefined");
48
+ return c(e);
49
+ }
50
+ function p(e) {
51
+ return p = Object.setPrototypeOf ? Object.getPrototypeOf : function(n) {
52
+ return n.__proto__ || Object.getPrototypeOf(n);
53
+ }, p(e);
54
+ }
55
+ function P(e, t) {
56
+ if (typeof t != "function" && t !== null)
57
+ throw new TypeError("Super expression must either be null or a function");
58
+ e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && v(e, t);
59
+ }
60
+ function v(e, t) {
61
+ return v = Object.setPrototypeOf || function(r, o) {
62
+ return r.__proto__ = o, r;
63
+ }, v(e, t);
64
+ }
65
+ function c(e) {
66
+ if (e === void 0)
67
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
68
+ return e;
69
+ }
70
+ function f(e, t, n) {
71
+ return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
72
+ }
73
+ var S = function(t, n) {
74
+ for (var r in t)
75
+ if (t[r] !== n[r]) return !1;
76
+ return !0;
77
+ };
78
+ function C() {
79
+ var e = y.default.createContext({});
80
+ e.displayName = "Media.DynamicContext";
81
+ var t = e.Consumer;
82
+ return {
83
+ Consumer: t,
84
+ Provider: /* @__PURE__ */ function(n) {
85
+ P(r, n);
86
+ function r(o) {
87
+ var i;
88
+ O(this, r), i = g(this, p(r).call(this, o)), f(c(c(i)), "isSupportedEnvironment", function() {
89
+ return typeof window != "undefined" && typeof window.matchMedia != "undefined";
90
+ }), f(c(c(i)), "setupMatchers", function(a) {
91
+ return Object.keys(a).reduce(function(s, l) {
92
+ return m({}, s, f({}, l, window.matchMedia(a[l])));
93
+ }, {});
94
+ }), f(c(c(i)), "checkMatchers", function(a) {
95
+ return Object.keys(a).reduce(function(s, l) {
96
+ return m({}, s, f({}, l, a[l].matches));
97
+ }, {});
98
+ }), f(c(c(i)), "mediaQueryStatusChangedCallback", function() {
99
+ var a = i.checkMatchers(i.state.mediaQueryMatchers);
100
+ i.setState({
101
+ mediaQueryMatches: a
102
+ });
103
+ });
104
+ var u = void 0, h;
105
+ return i.isSupportedEnvironment() ? (u = i.setupMatchers(o.mediaQueries), h = i.checkMatchers(u)) : h = Object.keys(o.mediaQueries).reduce(function(a, s) {
106
+ return m({}, a, f({}, s, !!o.initialMatchingMediaQueries && o.initialMatchingMediaQueries.includes(s)));
107
+ }, {}), i.state = {
108
+ mediaQueryMatchers: u,
109
+ mediaQueryMatches: h
110
+ }, i;
111
+ }
112
+ return Q(r, [{
113
+ key: "componentDidMount",
114
+ // Lifecycle methods
115
+ value: function() {
116
+ if (this.state.mediaQueryMatchers) {
117
+ var i = this.mediaQueryStatusChangedCallback;
118
+ Object.values(this.state.mediaQueryMatchers).forEach(function(u) {
119
+ u.addListener(i);
120
+ });
121
+ }
122
+ }
123
+ }, {
124
+ key: "componentWillUnmount",
125
+ value: function() {
126
+ if (this.state.mediaQueryMatchers) {
127
+ var i = this.mediaQueryStatusChangedCallback;
128
+ Object.values(this.state.mediaQueryMatchers).forEach(function(u) {
129
+ return u.removeListener(i);
130
+ });
131
+ }
132
+ }
133
+ }, {
134
+ key: "shouldComponentUpdate",
135
+ value: function(i, u) {
136
+ return this.state.mediaQueryMatchers ? i.children !== this.props.children ? !0 : !S(this.state.mediaQueryMatches, u.mediaQueryMatches) : !1;
137
+ }
138
+ }, {
139
+ key: "render",
140
+ value: function() {
141
+ return y.default.createElement(e.Provider, {
142
+ value: this.state.mediaQueryMatches
143
+ }, this.props.children);
144
+ }
145
+ }]), r;
146
+ }(y.default.Component)
147
+ };
148
+ }
149
+ export {
150
+ b as default
151
+ };
@@ -0,0 +1,138 @@
1
+ import { __exports as u } from "../../../../_virtual/Interactions.js";
2
+ import "./Utils.js";
3
+ import { __exports as p } from "../../../../_virtual/Utils.js";
4
+ Object.defineProperty(u, "__esModule", {
5
+ value: !0
6
+ });
7
+ u.Interactions = u.InteractionKey = void 0;
8
+ var y = p;
9
+ function h(e) {
10
+ for (var r = 1; r < arguments.length; r++) {
11
+ var t = arguments[r] != null ? Object(arguments[r]) : {}, n = Object.keys(t);
12
+ typeof Object.getOwnPropertySymbols == "function" && n.push.apply(n, Object.getOwnPropertySymbols(t).filter(function(a) {
13
+ return Object.getOwnPropertyDescriptor(t, a).enumerable;
14
+ })), n.forEach(function(a) {
15
+ f(e, a, t[a]);
16
+ });
17
+ }
18
+ return e;
19
+ }
20
+ function g(e) {
21
+ return A(e) || O(e) || _(e) || I();
22
+ }
23
+ function I() {
24
+ throw new TypeError(`Invalid attempt to spread non-iterable instance.
25
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
26
+ }
27
+ function O(e) {
28
+ if (typeof Symbol != "undefined" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
29
+ }
30
+ function A(e) {
31
+ if (Array.isArray(e)) return c(e);
32
+ }
33
+ function b(e, r) {
34
+ return w(e) || j(e, r) || _(e, r) || S();
35
+ }
36
+ function S() {
37
+ throw new TypeError(`Invalid attempt to destructure non-iterable instance.
38
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
39
+ }
40
+ function _(e, r) {
41
+ if (e) {
42
+ if (typeof e == "string") return c(e, r);
43
+ var t = Object.prototype.toString.call(e).slice(8, -1);
44
+ if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set") return Array.from(e);
45
+ if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return c(e, r);
46
+ }
47
+ }
48
+ function c(e, r) {
49
+ (r == null || r > e.length) && (r = e.length);
50
+ for (var t = 0, n = new Array(r); t < r; t++)
51
+ n[t] = e[t];
52
+ return n;
53
+ }
54
+ function j(e, r) {
55
+ var t = e == null ? null : typeof Symbol != "undefined" && e[Symbol.iterator] || e["@@iterator"];
56
+ if (t != null) {
57
+ var n = [], a = !0, i = !1, o, s;
58
+ try {
59
+ for (t = t.call(e); !(a = (o = t.next()).done) && (n.push(o.value), !(r && n.length === r)); a = !0)
60
+ ;
61
+ } catch (v) {
62
+ i = !0, s = v;
63
+ } finally {
64
+ try {
65
+ !a && t.return != null && t.return();
66
+ } finally {
67
+ if (i) throw s;
68
+ }
69
+ }
70
+ return n;
71
+ }
72
+ }
73
+ function w(e) {
74
+ if (Array.isArray(e)) return e;
75
+ }
76
+ function k(e, r) {
77
+ if (!(e instanceof r))
78
+ throw new TypeError("Cannot call a class as a function");
79
+ }
80
+ function m(e, r) {
81
+ for (var t = 0; t < r.length; t++) {
82
+ var n = r[t];
83
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
84
+ }
85
+ }
86
+ function d(e, r, t) {
87
+ return r && m(e.prototype, r), t && m(e, t), e;
88
+ }
89
+ function f(e, r, t) {
90
+ return r in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e;
91
+ }
92
+ var l;
93
+ u.InteractionKey = l;
94
+ (function(e) {
95
+ e.interaction = "interaction";
96
+ })(l || (u.InteractionKey = l = {}));
97
+ var T = /* @__PURE__ */ function() {
98
+ d(e, null, [{
99
+ key: "validKeys",
100
+ value: function() {
101
+ return [l.interaction];
102
+ }
103
+ }]);
104
+ function e(r) {
105
+ k(this, e), f(this, "_interactions", void 0), this._interactions = r;
106
+ }
107
+ return d(e, [{
108
+ key: "toRuleSets",
109
+ value: function() {
110
+ return Object.entries(this._interactions).reduce(function(t, n) {
111
+ var a = b(n, 2), i = a[0], o = a[1];
112
+ return g(t).concat([(0, y.createRuleSet)((0, y.createClassName)(l.interaction, i), o)]);
113
+ }, []);
114
+ }
115
+ }, {
116
+ key: "shouldRenderMediaQuery",
117
+ value: function(t, n) {
118
+ return !!(n && n.includes(t));
119
+ }
120
+ }, {
121
+ key: "interactions",
122
+ get: function() {
123
+ return Object.keys(this._interactions);
124
+ }
125
+ }, {
126
+ key: "dynamicResponsiveMediaQueries",
127
+ get: function() {
128
+ return Object.entries(this._interactions).reduce(function(t, n) {
129
+ var a = b(n, 2), i = a[0], o = a[1];
130
+ return h({}, t, f({}, i, o));
131
+ }, {});
132
+ }
133
+ }]), e;
134
+ }();
135
+ u.Interactions = T;
136
+ export {
137
+ u as default
138
+ };