@streamlayer/react 1.23.1 → 1.23.2

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 (159) hide show
  1. package/lib/cjs/Question.js +1 -1
  2. package/lib/cjs/advertisement.js +28 -223
  3. package/lib/cjs/analytics.js +1 -1
  4. package/lib/cjs/auth.js +1 -1
  5. package/lib/cjs/bet-pack.js +1 -1
  6. package/lib/cjs/feature.js +1 -1
  7. package/lib/cjs/gamification-feature.js +1 -1
  8. package/lib/cjs/gamification-feature2.js +1 -1
  9. package/lib/cjs/hooks-WfHlJH12.js +1 -1
  10. package/lib/cjs/index-eShKGO10.js +1 -5
  11. package/lib/cjs/index.js +1 -1
  12. package/lib/cjs/index10.js +1 -1
  13. package/lib/cjs/index11.js +3 -4
  14. package/lib/cjs/index12.js +1 -1
  15. package/lib/cjs/index13.js +3 -1
  16. package/lib/cjs/index14.js +1 -1
  17. package/lib/cjs/index15.js +1 -1
  18. package/lib/cjs/index16.js +3 -5
  19. package/lib/cjs/index2.js +1 -1
  20. package/lib/cjs/index3.js +1 -1
  21. package/lib/cjs/index4.js +3 -5
  22. package/lib/cjs/index5.js +1 -1
  23. package/lib/cjs/index6.js +1 -1
  24. package/lib/cjs/index7.js +1 -1
  25. package/lib/cjs/index8.js +1 -1
  26. package/lib/cjs/index9.js +1 -1
  27. package/lib/cjs/insight.js +1 -1
  28. package/lib/cjs/masters.js +1 -1
  29. package/lib/cjs/masters2.js +1 -13
  30. package/lib/cjs/notification.js +1 -1
  31. package/lib/cjs/pause-ad.js +1 -1
  32. package/lib/cjs/points.js +1 -1
  33. package/lib/cjs/polymarket.js +5 -15
  34. package/lib/cjs/sl-types.js +1 -15
  35. package/lib/cjs/storage.js +1 -1
  36. package/lib/cjs/style.css +1 -0
  37. package/lib/cjs/theme.js +1 -17
  38. package/lib/cjs/useStreamLayerApp.js +1 -1
  39. package/lib/cjs/useStreamLayerApp2.js +3 -17
  40. package/lib/cjs/utils.js +1 -47
  41. package/lib/classic/cjs/Question.js +1 -1
  42. package/lib/classic/cjs/advertisement.js +28 -223
  43. package/lib/classic/cjs/analytics.js +1 -1
  44. package/lib/classic/cjs/auth.js +1 -1
  45. package/lib/classic/cjs/bet-pack.js +3 -5
  46. package/lib/classic/cjs/feature.js +1 -1
  47. package/lib/classic/cjs/gamification-feature.js +1 -1
  48. package/lib/classic/cjs/hooks-WfHlJH12.js +1 -1
  49. package/lib/classic/cjs/index-eShKGO10.js +1 -5
  50. package/lib/classic/cjs/index.js +1 -1
  51. package/lib/classic/cjs/index10.js +1 -1
  52. package/lib/classic/cjs/index11.js +1 -1
  53. package/lib/classic/cjs/index12.js +1 -1
  54. package/lib/classic/cjs/index13.js +3 -4
  55. package/lib/classic/cjs/index2.js +3 -5
  56. package/lib/classic/cjs/index3.js +1 -1
  57. package/lib/classic/cjs/index4.js +1 -1
  58. package/lib/classic/cjs/index5.js +1 -1
  59. package/lib/classic/cjs/index6.js +1 -1
  60. package/lib/classic/cjs/index7.js +1 -1
  61. package/lib/classic/cjs/index8.js +1 -1
  62. package/lib/classic/cjs/index9.js +3 -1
  63. package/lib/classic/cjs/insight.js +1 -1
  64. package/lib/classic/cjs/notification.js +1 -1
  65. package/lib/classic/cjs/notification2.js +1 -1
  66. package/lib/classic/cjs/pause-ad.js +1 -1
  67. package/lib/classic/cjs/points.js +1 -1
  68. package/lib/classic/cjs/polymarket.js +5 -15
  69. package/lib/classic/cjs/sl-types.js +1 -15
  70. package/lib/classic/cjs/style.css +1 -0
  71. package/lib/classic/cjs/useStreamLayerApp.js +1 -1
  72. package/lib/classic/cjs/useStreamLayerApp2.js +3 -17
  73. package/lib/classic/cjs/utils.js +1 -47
  74. package/lib/classic/es/Question.js +277 -264
  75. package/lib/classic/es/advertisement.js +34990 -18881
  76. package/lib/classic/es/analytics.js +58 -56
  77. package/lib/classic/es/auth.js +14 -8
  78. package/lib/classic/es/bet-pack.js +2448 -2419
  79. package/lib/classic/es/feature.js +93 -48
  80. package/lib/classic/es/gamification-feature.js +2 -2
  81. package/lib/classic/es/hooks-WfHlJH12.js +78 -78
  82. package/lib/classic/es/index-eShKGO10.js +948 -948
  83. package/lib/classic/es/index.js +13 -13
  84. package/lib/classic/es/index10.js +68 -67
  85. package/lib/classic/es/index11.js +2903 -2159
  86. package/lib/classic/es/index12.js +124 -119
  87. package/lib/classic/es/index13.js +581 -566
  88. package/lib/classic/es/index2.js +2098 -1763
  89. package/lib/classic/es/index3.js +11 -11
  90. package/lib/classic/es/index4.js +127 -127
  91. package/lib/classic/es/index5.js +3 -4
  92. package/lib/classic/es/index6.js +8 -3
  93. package/lib/classic/es/index7.js +6 -5
  94. package/lib/classic/es/index8.js +8 -7
  95. package/lib/classic/es/index9.js +225 -223
  96. package/lib/classic/es/insight.js +58 -53
  97. package/lib/classic/es/notification.js +3 -3
  98. package/lib/classic/es/notification2.js +764 -722
  99. package/lib/classic/es/pause-ad.js +190 -167
  100. package/lib/classic/es/points.js +55 -48
  101. package/lib/classic/es/polymarket.js +4209 -4031
  102. package/lib/classic/es/sl-types.js +193 -125
  103. package/lib/classic/es/useStreamLayerApp.js +2 -2
  104. package/lib/classic/es/useStreamLayerApp2.js +9714 -7603
  105. package/lib/classic/es/utils.js +28 -28
  106. package/lib/classic/index.d.ts +1 -0
  107. package/lib/classic/style.css +1 -0
  108. package/lib/dist/cjs/gamification-feature.js +1 -1
  109. package/lib/dist/cjs/index-eShKGO10.js +1 -5
  110. package/lib/dist/cjs/index.js +1 -1
  111. package/lib/dist/cjs/masters.js +3 -77
  112. package/lib/dist/es/gamification-feature.js +2 -2
  113. package/lib/dist/es/index-eShKGO10.js +948 -948
  114. package/lib/dist/es/index.js +7 -8
  115. package/lib/dist/es/masters.js +18197 -14750
  116. package/lib/dist/index.d.ts +12 -2
  117. package/lib/dist/style.css +1 -1
  118. package/lib/es/Question.js +108 -106
  119. package/lib/es/advertisement.js +34990 -18881
  120. package/lib/es/analytics.js +58 -56
  121. package/lib/es/auth.js +14 -8
  122. package/lib/es/bet-pack.js +29 -17
  123. package/lib/es/feature.js +93 -48
  124. package/lib/es/gamification-feature.js +2 -2
  125. package/lib/es/gamification-feature2.js +2 -2
  126. package/lib/es/hooks-WfHlJH12.js +78 -78
  127. package/lib/es/index-eShKGO10.js +948 -948
  128. package/lib/es/index.js +14 -13
  129. package/lib/es/index10.js +176 -166
  130. package/lib/es/index11.js +581 -566
  131. package/lib/es/index12.js +124 -119
  132. package/lib/es/index13.js +225 -223
  133. package/lib/es/index14.js +68 -67
  134. package/lib/es/index15.js +2903 -2159
  135. package/lib/es/index16.js +1005 -806
  136. package/lib/es/index2.js +1117 -984
  137. package/lib/es/index3.js +3 -4
  138. package/lib/es/index4.js +2424 -2407
  139. package/lib/es/index5.js +11 -11
  140. package/lib/es/index6.js +127 -127
  141. package/lib/es/index7.js +8 -3
  142. package/lib/es/index8.js +5 -5
  143. package/lib/es/index9.js +8 -7
  144. package/lib/es/insight.js +58 -53
  145. package/lib/es/masters.js +6 -5
  146. package/lib/es/masters2.js +696 -559
  147. package/lib/es/notification.js +696 -655
  148. package/lib/es/pause-ad.js +190 -167
  149. package/lib/es/points.js +56 -49
  150. package/lib/es/polymarket.js +4209 -4031
  151. package/lib/es/sl-types.js +200 -132
  152. package/lib/es/storage.js +75 -74
  153. package/lib/es/theme.js +177 -31
  154. package/lib/es/useStreamLayerApp.js +2 -2
  155. package/lib/es/useStreamLayerApp2.js +9714 -7603
  156. package/lib/es/utils.js +28 -28
  157. package/lib/index.d.ts +1 -0
  158. package/lib/style.css +1 -1
  159. package/package.json +23 -20
@@ -1,22 +1,38 @@
1
- import s from "react";
2
- import { listenKeys as y } from "nanostores";
3
- var v = function() {
4
- const t = Array.prototype.slice.call(arguments).filter(Boolean), r = {}, a = [];
5
- t.forEach((n) => {
6
- (n ? n.split(" ") : []).forEach((o) => {
7
- if (o.startsWith("atm_")) {
8
- const [, f] = o.split("_");
9
- r[f] = o;
10
- } else
11
- a.push(o);
1
+ import React36__default from "react";
2
+ function listenKeys($store, keys, listener) {
3
+ let keysSet = new Set(keys).add(void 0);
4
+ return $store.listen((value, oldValue, changed) => {
5
+ if (keysSet.has(changed)) {
6
+ listener(value, oldValue, changed);
7
+ }
8
+ });
9
+ }
10
+ var cx = function cx2() {
11
+ const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
12
+ const atomicClasses = {};
13
+ const nonAtomicClasses = [];
14
+ presentClassNames.forEach((arg) => {
15
+ const individualClassNames = arg ? arg.split(" ") : [];
16
+ individualClassNames.forEach((className) => {
17
+ if (className.startsWith("atm_")) {
18
+ const [, keyHash] = className.split("_");
19
+ atomicClasses[keyHash] = className;
20
+ } else {
21
+ nonAtomicClasses.push(className);
22
+ }
12
23
  });
13
24
  });
14
- const i = [];
15
- for (const n in r)
16
- Object.prototype.hasOwnProperty.call(r, n) && i.push(r[n]);
17
- return i.push(...a), i.join(" ");
18
- }, N = v;
19
- const P = {
25
+ const result = [];
26
+ for (const keyHash in atomicClasses) {
27
+ if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
28
+ result.push(atomicClasses[keyHash]);
29
+ }
30
+ }
31
+ result.push(...nonAtomicClasses);
32
+ return result.join(" ");
33
+ };
34
+ var cx_default = cx;
35
+ const R = {
20
36
  BLUE_QUESTION_ACTION_BTN: "#1589ee",
21
37
  WHITE: "#FFFFFF",
22
38
  BLUE: "#2d6ffd",
@@ -86,7 +102,7 @@ const P = {
86
102
  IN_APP_QUESTION_RESULT_LINE: "#babfc5",
87
103
  QUOTE_BORDER: "#E8E8E8",
88
104
  QUOTE_TEXT: "rgba(10, 14, 19, 0.70)"
89
- }, L = {
105
+ }, F = {
90
106
  BG_PRIMARY: "#13212b",
91
107
  BG_SECONDARY: "#152430",
92
108
  BG_SECONDARY1: "#435059",
@@ -96,7 +112,7 @@ const P = {
96
112
  TEXT_SECONDARY: "rgba(255, 255, 255, 0.8)",
97
113
  TEXT_SECONDARY1: "#878787",
98
114
  WHITE: "#fff"
99
- }, te = ["#107D57", "#DF2F3B", "#DF2F3B", "#E8E8E8"], re = "#cee5de", ne = "#f9d6d8", ae = "#E8E8E8", ie = {
115
+ }, I = ["#107D57", "#DF2F3B", "#DF2F3B", "#E8E8E8"], O = "#cee5de", N = "#f9d6d8", S = "#E8E8E8", A = {
100
116
  xs: 324,
101
117
  sm: 576,
102
118
  md: 768,
@@ -104,80 +120,108 @@ const P = {
104
120
  xl: 1200,
105
121
  xxl: 1440
106
122
  };
107
- Object.entries(P).reduce((e, [t, r]) => `
108
- ${e}
109
- --color-${t.toLowerCase().replaceAll("_", "-")}: ${r};
123
+ Object.entries(R).reduce((E, [_, T]) => `
124
+ ${E}
125
+ --color-${_.toLowerCase().replaceAll("_", "-")}: ${T};
110
126
  `, "");
111
- Object.entries(L).reduce((e, [t, r]) => `
112
- ${e}
113
- --color-adv-${t.toLowerCase().replaceAll("_", "-")}: ${r};
127
+ Object.entries(F).reduce((E, [_, T]) => `
128
+ ${E}
129
+ --color-adv-${_.toLowerCase().replaceAll("_", "-")}: ${T};
114
130
  `, "");
115
- function x(e) {
116
- var t = /* @__PURE__ */ Object.create(null);
117
- return function(r) {
118
- return t[r] === void 0 && (t[r] = e(r)), t[r];
131
+ function memoize(fn) {
132
+ var cache = /* @__PURE__ */ Object.create(null);
133
+ return function(arg) {
134
+ if (cache[arg] === void 0) cache[arg] = fn(arg);
135
+ return cache[arg];
119
136
  };
120
137
  }
121
- var U = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/, R = /* @__PURE__ */ x(
122
- function(e) {
123
- return U.test(e) || e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && e.charCodeAt(2) < 91;
138
+ var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
139
+ var isPropValid = /* @__PURE__ */ memoize(
140
+ function(prop) {
141
+ return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
124
142
  }
125
143
  /* Z+1 */
126
- ), b = (e) => e.toUpperCase() === e, k = (e) => (t) => e.indexOf(t) === -1, A = (e, t) => {
127
- const r = {};
128
- return Object.keys(e).filter(k(t)).forEach((a) => {
129
- r[a] = e[a];
130
- }), r;
144
+ );
145
+ var isCapital = (ch) => ch.toUpperCase() === ch;
146
+ var filterKey = (keys) => (key) => keys.indexOf(key) === -1;
147
+ var omit = (obj, keys) => {
148
+ const res = {};
149
+ Object.keys(obj).filter(filterKey(keys)).forEach((key) => {
150
+ res[key] = obj[key];
151
+ });
152
+ return res;
131
153
  };
132
- function w(e, t, r) {
133
- const a = A(t, r);
134
- if (!e) {
135
- const i = typeof R == "function" ? { default: R } : R;
136
- Object.keys(a).forEach((n) => {
137
- i.default(n) || delete a[n];
154
+ function filterProps(asIs, props, omitKeys) {
155
+ const filteredProps = omit(props, omitKeys);
156
+ if (!asIs) {
157
+ const interopValidAttr = typeof isPropValid === "function" ? { default: isPropValid } : isPropValid;
158
+ Object.keys(filteredProps).forEach((key) => {
159
+ if (!interopValidAttr.default(key)) {
160
+ delete filteredProps[key];
161
+ }
138
162
  });
139
163
  }
140
- return a;
164
+ return filteredProps;
141
165
  }
142
- var G = (e, t) => {
166
+ var warnIfInvalid = (value, componentName) => {
143
167
  };
144
- function Y(e) {
145
- let t = "";
146
- return (r) => {
147
- const a = (n, c) => {
148
- const { as: o = e, class: f = t } = n, B = r.propsAsIs === void 0 ? !(typeof o == "string" && o.indexOf("-") === -1 && !b(o[0])) : r.propsAsIs, l = w(B, n, [
168
+ function styled(tag) {
169
+ let mockedClass = "";
170
+ return (options) => {
171
+ const render = (props, ref) => {
172
+ const { as: component = tag, class: className = mockedClass } = props;
173
+ const shouldKeepProps = options.propsAsIs === void 0 ? !(typeof component === "string" && component.indexOf("-") === -1 && !isCapital(component[0])) : options.propsAsIs;
174
+ const filteredProps = filterProps(shouldKeepProps, props, [
149
175
  "as",
150
176
  "class"
151
177
  ]);
152
- l.ref = c, l.className = r.atomic ? N(r.class, l.className || f) : N(l.className || f, r.class);
153
- const { vars: _ } = r;
154
- if (_) {
155
- const d = {};
156
- for (const u in _) {
157
- const F = _[u], T = F[0], g = F[1] || "", h = typeof T == "function" ? T(n) : T;
158
- G(h, r.name), d[`--${u}`] = `${h}${g}`;
178
+ filteredProps.ref = ref;
179
+ filteredProps.className = options.atomic ? cx_default(options.class, filteredProps.className || className) : cx_default(filteredProps.className || className, options.class);
180
+ const { vars } = options;
181
+ if (vars) {
182
+ const style = {};
183
+ for (const name in vars) {
184
+ const variable = vars[name];
185
+ const result = variable[0];
186
+ const unit = variable[1] || "";
187
+ const value = typeof result === "function" ? result(props) : result;
188
+ warnIfInvalid(value, options.name);
189
+ style[`--${name}`] = `${value}${unit}`;
159
190
  }
160
- const m = l.style || {}, O = Object.keys(m);
161
- O.length > 0 && O.forEach((u) => {
162
- d[u] = m[u];
163
- }), l.style = d;
191
+ const ownStyle = filteredProps.style || {};
192
+ const keys = Object.keys(ownStyle);
193
+ if (keys.length > 0) {
194
+ keys.forEach((key) => {
195
+ style[key] = ownStyle[key];
196
+ });
197
+ }
198
+ filteredProps.style = style;
199
+ }
200
+ if (tag.__wyw_meta && tag !== component) {
201
+ filteredProps.as = component;
202
+ return React36__default.createElement(tag, filteredProps);
164
203
  }
165
- return e.__wyw_meta && e !== o ? (l.as = o, s.createElement(e, l)) : s.createElement(o, l);
166
- }, i = s.forwardRef ? s.forwardRef(a) : (
204
+ return React36__default.createElement(component, filteredProps);
205
+ };
206
+ const Result = React36__default.forwardRef ? React36__default.forwardRef(render) : (
167
207
  // React.forwardRef won't available on older React versions and in Preact
168
208
  // Fallback to a innerRef prop in that case
169
- (n) => {
170
- const c = A(n, ["innerRef"]);
171
- return a(c, n.innerRef);
209
+ (props) => {
210
+ const rest = omit(props, ["innerRef"]);
211
+ return render(rest, props.innerRef);
172
212
  }
173
213
  );
174
- return i.displayName = r.name, i.__wyw_meta = {
175
- className: r.class || t,
176
- extends: e
177
- }, i;
214
+ Result.displayName = options.name;
215
+ Result.__wyw_meta = {
216
+ className: options.class || mockedClass,
217
+ extends: tag
218
+ };
219
+ return Result;
178
220
  };
179
221
  }
180
- var oe = Y, I = { exports: {} }, D = {};
222
+ var styled_default = styled;
223
+ var shim$1 = { exports: {} };
224
+ var useSyncExternalStoreShim_production = {};
181
225
  /**
182
226
  * @license React
183
227
  * use-sync-external-store-shim.production.js
@@ -187,72 +231,96 @@ var oe = Y, I = { exports: {} }, D = {};
187
231
  * This source code is licensed under the MIT license found in the
188
232
  * LICENSE file in the root directory of this source tree.
189
233
  */
190
- var E = s;
191
- function V(e, t) {
192
- return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t;
234
+ var React = React36__default;
235
+ function is(x, y) {
236
+ return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
193
237
  }
194
- var M = typeof Object.is == "function" ? Object.is : V, K = E.useState, H = E.useEffect, X = E.useLayoutEffect, Q = E.useDebugValue;
195
- function $(e, t) {
196
- var r = t(), a = K({ inst: { value: r, getSnapshot: t } }), i = a[0].inst, n = a[1];
197
- return X(
238
+ var objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue;
239
+ function useSyncExternalStore$2(subscribe, getSnapshot) {
240
+ var value = getSnapshot(), _useState = useState({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
241
+ useLayoutEffect(
198
242
  function() {
199
- i.value = r, i.getSnapshot = t, S(i) && n({ inst: i });
243
+ inst.value = value;
244
+ inst.getSnapshot = getSnapshot;
245
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
200
246
  },
201
- [e, r, t]
202
- ), H(
247
+ [subscribe, value, getSnapshot]
248
+ );
249
+ useEffect(
203
250
  function() {
204
- return S(i) && n({ inst: i }), e(function() {
205
- S(i) && n({ inst: i });
251
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
252
+ return subscribe(function() {
253
+ checkIfSnapshotChanged(inst) && forceUpdate({ inst });
206
254
  });
207
255
  },
208
- [e]
209
- ), Q(r), r;
256
+ [subscribe]
257
+ );
258
+ useDebugValue(value);
259
+ return value;
210
260
  }
211
- function S(e) {
212
- var t = e.getSnapshot;
213
- e = e.value;
261
+ function checkIfSnapshotChanged(inst) {
262
+ var latestGetSnapshot = inst.getSnapshot;
263
+ inst = inst.value;
214
264
  try {
215
- var r = t();
216
- return !M(e, r);
217
- } catch {
218
- return !0;
265
+ var nextValue = latestGetSnapshot();
266
+ return !objectIs(inst, nextValue);
267
+ } catch (error) {
268
+ return true;
219
269
  }
220
270
  }
221
- function j(e, t) {
222
- return t();
271
+ function useSyncExternalStore$1(subscribe, getSnapshot) {
272
+ return getSnapshot();
223
273
  }
224
- var W = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? j : $;
225
- D.useSyncExternalStore = E.useSyncExternalStore !== void 0 ? E.useSyncExternalStore : W;
226
- I.exports = D;
227
- var z = I.exports;
228
- const p = (e, t) => (r) => {
229
- e.current !== r && (e.current = r, t());
230
- };
231
- function q(e, { keys: t, deps: r = [e, t] } = {}) {
232
- const a = s.useRef();
233
- a.current = e.get();
234
- const i = s.useCallback((c) => (p(a, c)(e.value), (t == null ? void 0 : t.length) > 0 ? y(e, t, p(a, c)) : e.listen(p(a, c))), r), n = () => a.current;
235
- return s.useSyncExternalStore ? s.useSyncExternalStore(i, n, n) : z.useSyncExternalStore(i, n, n);
274
+ var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
275
+ useSyncExternalStoreShim_production.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
276
+ {
277
+ shim$1.exports = useSyncExternalStoreShim_production;
236
278
  }
237
- const se = q, Z = () => [
238
- !1,
239
- (e) => {
240
- window.requestAnimationFrame(() => e());
279
+ var shimExports = shim$1.exports;
280
+ const emit = (snapshotRef, onChange) => (value) => {
281
+ if (snapshotRef.current === value)
282
+ return;
283
+ snapshotRef.current = value;
284
+ onChange();
285
+ };
286
+ function useStore$1(store, { keys, deps = [store, keys] } = {}) {
287
+ const snapshotRef = React36__default.useRef();
288
+ snapshotRef.current = store.get();
289
+ const subscribe = React36__default.useCallback((onChange) => {
290
+ emit(snapshotRef, onChange)(store.value);
291
+ return (keys == null ? void 0 : keys.length) > 0 ? listenKeys(store, keys, emit(snapshotRef, onChange)) : store.listen(emit(snapshotRef, onChange));
292
+ }, deps);
293
+ const get = () => snapshotRef.current;
294
+ if (React36__default.useSyncExternalStore) {
295
+ return React36__default.useSyncExternalStore(subscribe, get, get);
241
296
  }
242
- ], le = s.useTransition || Z;
243
- var C;
244
- (function(e) {
245
- e[e.ONBOARDING = 1] = "ONBOARDING", e[e.QUESTION = 2] = "QUESTION", e[e.QUESTION_RESOLVED = 3] = "QUESTION_RESOLVED";
246
- })(C || (C = {}));
297
+ return shimExports.useSyncExternalStore(subscribe, get, get);
298
+ }
299
+ const useStore = useStore$1;
300
+ const legacyUseTransition = () => {
301
+ return [
302
+ false,
303
+ (fn) => {
304
+ window.requestAnimationFrame(() => fn());
305
+ }
306
+ ];
307
+ };
308
+ const useTransition = React36__default.useTransition || legacyUseTransition;
309
+ var NotificationType;
310
+ (function(NotificationType2) {
311
+ NotificationType2[NotificationType2["ONBOARDING"] = 1] = "ONBOARDING";
312
+ NotificationType2[NotificationType2["QUESTION"] = 2] = "QUESTION";
313
+ NotificationType2[NotificationType2["QUESTION_RESOLVED"] = 3] = "QUESTION_RESOLVED";
314
+ })(NotificationType || (NotificationType = {}));
247
315
  export {
248
- ie as A,
249
- te as I,
250
- ne as N,
251
- re as O,
252
- ae as S,
253
- C as a,
254
- le as b,
255
- N as c,
256
- oe as s,
257
- se as u
316
+ A,
317
+ I,
318
+ N,
319
+ O,
320
+ S,
321
+ NotificationType as a,
322
+ useTransition as b,
323
+ cx_default as c,
324
+ styled_default as s,
325
+ useStore as u
258
326
  };
@@ -1,4 +1,4 @@
1
- import { $ as a } from "./useStreamLayerApp2.js";
1
+ import { $ } from "./useStreamLayerApp2.js";
2
2
  export {
3
- a as useStreamLayerApp
3
+ $ as useStreamLayerApp
4
4
  };