earthnut 0.0.0 → 0.0.1

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 (88) hide show
  1. package/BackgroundRipple/index.cjs +1 -0
  2. package/BackgroundRipple/index.mjs +1 -0
  3. package/LICENSE +25 -0
  4. package/Layout/index.cjs +1 -0
  5. package/Layout/index.mjs +1 -0
  6. package/README.md +9 -5
  7. package/components/button/button.d.ts +5 -0
  8. package/components/button/index.d.ts +3 -0
  9. package/components/button/style/index.d.ts +1 -0
  10. package/components/index.d.ts +3 -0
  11. package/components/layout/content.d.ts +11 -0
  12. package/components/layout/footer.d.ts +16 -0
  13. package/components/layout/header.d.ts +18 -0
  14. package/components/layout/index.d.ts +2 -0
  15. package/components/layout/layout.d.ts +50 -0
  16. package/components/layout/sideBar.d.ts +24 -0
  17. package/components/layout/types.d.ts +71 -0
  18. package/components/menu/index.d.ts +0 -0
  19. package/components/menu/menu.d.ts +0 -0
  20. package/components/menu/style/index.d.ts +0 -0
  21. package/components/ripples/RipplesEle.d.ts +36 -0
  22. package/components/ripples/index.d.ts +4 -0
  23. package/components/ripples/style/index.d.ts +0 -0
  24. package/components/ripples/types.d.ts +11 -0
  25. package/components/ripples/useOptionUpdate.d.ts +5 -0
  26. package/customHooks/index.d.ts +5 -0
  27. package/customHooks/useAnimationFrame.d.ts +42 -0
  28. package/customHooks/useInputIsComposing.d.ts +46 -0
  29. package/customHooks/useRipples/buildBackground/default-background/_createImageData.d.ts +7 -0
  30. package/customHooks/useRipples/buildBackground/default-background/circleDataList.d.ts +18 -0
  31. package/customHooks/useRipples/buildBackground/default-background/createCanvasElementBySize.d.ts +2 -0
  32. package/customHooks/useRipples/buildBackground/default-background/createDefault.d.ts +2 -0
  33. package/customHooks/useRipples/buildBackground/default-background/index.d.ts +10 -0
  34. package/customHooks/useRipples/buildBackground/loadImage.d.ts +13 -0
  35. package/customHooks/useRipples/buildBackground/runSide.d.ts +9 -0
  36. package/customHooks/useRipples/buildBackground/type.d.ts +27 -0
  37. package/customHooks/useRipples/buildBackground/utils/bindImage.d.ts +3 -0
  38. package/customHooks/useRipples/buildBackground/utils/createCanvasElement.d.ts +3 -0
  39. package/customHooks/useRipples/buildBackground/utils/createImageBySrc.d.ts +2 -0
  40. package/customHooks/useRipples/buildBackground/utils/getBackgroundStyle.d.ts +3 -0
  41. package/customHooks/useRipples/buildBackground/utils/hideCssBackground.d.ts +10 -0
  42. package/customHooks/useRipples/buildBackground/utils/restore-css-background.d.ts +7 -0
  43. package/customHooks/useRipples/callback/destroy.d.ts +3 -0
  44. package/customHooks/useRipples/callback/drop.d.ts +3 -0
  45. package/customHooks/useRipples/callback/fade.d.ts +3 -0
  46. package/customHooks/useRipples/callback/reload-background.d.ts +6 -0
  47. package/customHooks/useRipples/callback/scale.d.ts +2 -0
  48. package/customHooks/useRipples/index.d.ts +40 -0
  49. package/customHooks/useRipples/init/index.d.ts +5 -0
  50. package/customHooks/useRipples/init/initEvent.d.ts +5 -0
  51. package/customHooks/useRipples/init/initShaders.d.ts +7 -0
  52. package/customHooks/useRipples/init/initTexture.d.ts +7 -0
  53. package/customHooks/useRipples/render/computeTextureBoundaries.d.ts +3 -0
  54. package/customHooks/useRipples/render/draw.d.ts +7 -0
  55. package/customHooks/useRipples/render/drawQuad.d.ts +7 -0
  56. package/customHooks/useRipples/render/dropAtPointer.d.ts +7 -0
  57. package/customHooks/useRipples/render/index.d.ts +6 -0
  58. package/customHooks/useRipples/render/swapBufferIndices.d.ts +5 -0
  59. package/customHooks/useRipples/render/update.d.ts +5 -0
  60. package/customHooks/useRipples/rippersData/defaultData.d.ts +5 -0
  61. package/customHooks/useRipples/rippersData/fadeData.d.ts +29 -0
  62. package/customHooks/useRipples/rippersData/index.d.ts +40 -0
  63. package/customHooks/useRipples/rippersData/loadConfig.d.ts +19 -0
  64. package/customHooks/useRipples/rippersData/renderData.d.ts +72 -0
  65. package/customHooks/useRipples/rippersData/useOptions.d.ts +81 -0
  66. package/customHooks/useRipples/rippersData/vertexSource.d.ts +28 -0
  67. package/customHooks/useRipples/ripple.html.d.ts +6 -0
  68. package/customHooks/useRipples/ripplesClass.d.ts +51 -0
  69. package/customHooks/useRipples/tools.d.ts +31 -0
  70. package/customHooks/useRipples/types.d.ts +192 -0
  71. package/customHooks/useTimeId.d.ts +55 -0
  72. package/dog.d.ts +3 -0
  73. package/index.cjs +1 -0
  74. package/index.d.ts +5 -0
  75. package/index.js.LICENSE.txt +79 -0
  76. package/index.mjs +1 -0
  77. package/package.json +87 -14
  78. package/styles/common.css +360 -0
  79. package/styles/common.scss +444 -0
  80. package/useAnimationFrame/index.cjs +1 -0
  81. package/useAnimationFrame/index.mjs +1 -0
  82. package/useInputIsComposing/index.cjs +1 -0
  83. package/useInputIsComposing/index.mjs +1 -0
  84. package/useRipples/index.cjs +1 -0
  85. package/useRipples/index.mjs +1 -0
  86. package/useTimeId/index.cjs +1 -0
  87. package/useTimeId/index.mjs +1 -0
  88. package/index.js +0 -1
@@ -0,0 +1,444 @@
1
+ @mixin light {
2
+ // 基色
3
+ --primary-white: #ffffff;
4
+ --primary-black: #1b1b1b;
5
+ --primary-dust: #6f6f6f;
6
+ --primary-red: #d30038;
7
+ --primary-green: #007936;
8
+ --primary-blue: #0069c2;
9
+ --primary-yellow: #746a00;
10
+ --primary-super-yellow: #ffff00;
11
+ // 文本色
12
+ --text-primary: #1b1b1b;
13
+ --text-secondary: #4e4e4e;
14
+ --text-invert: var(--primary-white); // 文本反转色
15
+ --text-muted: var(--primary-dust); // 温和文本色
16
+ // 链接文本色
17
+ --text-link: #0069c2;
18
+ --text-visited: #551a8b;
19
+ --text-hover: var(--primary-red);
20
+ --text-visited: #551a8b;
21
+ --text-active: #858585;
22
+ --text-inactive: #9e9e9ea6; // 无效链接色
23
+ // 背景色
24
+ --background-primary: var(--primary-white);
25
+ --background-tab-level-1: var(--primary-black);
26
+ --background-tab-level-2: var(--primary-dust);
27
+ --background-tab-transparent: #6666;
28
+ --table-border-color: #000;
29
+ --curriculum-shadow: 4px 4px 8px 0 #b3b3b32e, -4px 4px 8px 0 #b3b3b326;
30
+ --curriculum-shadow-landing-about-ul: 0 4px 10px 0 #e3642a0f, 0 -2px 4px 0 #b25c350f;
31
+ --box-shadow: 1px 1px 12px #6666;
32
+ --box-shadow-primary: 1px 1px 12px #6666;
33
+ --box-shadow-primary-small: 1px 1px 3px #6666;
34
+ --box-shadow-primary-large: 1px 1px 24px #6666;
35
+ color-scheme: light;
36
+ }
37
+
38
+ @mixin dark {
39
+ // 基色
40
+ --primary-white: #ffffff;
41
+ --primary-black: #1b1b1b;
42
+ --primary-dust: #858585;
43
+ --primary-red: #ff97a0;
44
+ --primary-green: #00d061;
45
+ --primary-blue: #8cb4ff;
46
+ --primary-yellow: #c7b700;
47
+ // 文本色
48
+ --text-primary: #fff;
49
+ --text-secondary: #cdcdcd;
50
+ --text-invert: var(--primary-black); // 文本反转色
51
+ --text-muted: var(--primary-dust); // 温和文本色
52
+ // 普通链接文本色
53
+ --text-link: #8cb4ff;
54
+ --text-visited: #ffadff;
55
+ --text-hover: var(--primary-red);
56
+ --text-active: #858585;
57
+ --text-inactive: #cdcdcda6; // 无效链接色
58
+ // 背景色
59
+ --background-primary: var(--primary-black);
60
+ --background-tab-level-1: #666666;
61
+ --background-tab-level-2: var(--primary-dust);
62
+ --background-tab-transparent: #6666;
63
+ --table-border-color: #ff3663;
64
+ --box-shadow: 1px 1px 12px #6666;
65
+ --box-shadow-primary: 1px 1px 12px #6666;
66
+ --box-shadow-primary-small: 1px 1px 3px #6666;
67
+ --box-shadow-primary-large: 1px 1px 24px #6666;
68
+ color-scheme: dark;
69
+ }
70
+
71
+ :root {
72
+ @include light();
73
+ }
74
+
75
+ @media (prefers-color-scheme: light) {
76
+ :root:not(.en-light):not(.en-dark) {
77
+ @include light();
78
+ }
79
+ }
80
+ @media (prefers-color-scheme: dark) {
81
+ :root:not(.en-light):not(.en-dark) {
82
+ @include dark();
83
+ }
84
+ }
85
+
86
+ .en-light {
87
+ @include light();
88
+ }
89
+
90
+ .en-dark {
91
+ @include dark();
92
+ }
93
+
94
+ .en-center {
95
+ position: absolute;
96
+ left: 50%;
97
+ top: 50%;
98
+ transform: translate(-50%, -50%);
99
+ }
100
+
101
+ /** 文本显示一行,超出点点点 */
102
+ .en-text-in-one-line {
103
+ white-space: nowrap;
104
+ text-overflow: ellipsis;
105
+ overflow: hidden;
106
+ word-break: break-all;
107
+ }
108
+
109
+ .en-text-in-one-line-hide {
110
+ white-space: nowrap;
111
+ text-overflow: clip;
112
+ overflow: hidden;
113
+ word-break: break-all;
114
+ }
115
+
116
+ /** 文本显示两行,超出点点点 */
117
+ .en-text-in-two-line {
118
+ overflow: hidden;
119
+ text-overflow: ellipsis;
120
+ display: -webkit-box;
121
+ -webkit-line-clamp: 2;
122
+ line-clamp: 2;
123
+ -webkit-box-orient: vertical;
124
+ }
125
+
126
+ /* 彩色字 */
127
+ .en-color-text {
128
+ color: transparent;
129
+ background-image: linear-gradient(45deg, #ff0, #0f0, #f00, #0ff, #00f, #f0f, #ff0);
130
+ background-position: 0% 0%;
131
+ background-size: 400% 200%;
132
+ background-clip: text;
133
+ animation: 6s ease-in 0s infinite colorText alternate;
134
+ }
135
+
136
+ .en-red-bg {
137
+ background-color: #f12;
138
+ }
139
+
140
+ .en-float-left {
141
+ float: left;
142
+ }
143
+
144
+ .en-float-right,
145
+ .en-float {
146
+ float: right;
147
+ }
148
+
149
+ .en-clear-float,
150
+ .en-clear {
151
+ clear: both;
152
+ }
153
+
154
+ .en-loading {
155
+ position: relative;
156
+ width: 100%;
157
+ height: 100%;
158
+ background-color: transparent;
159
+ background-image:
160
+ radial-gradient(#f00, #f00 50%, transparent 50%, transparent),
161
+ radial-gradient(#af1, #af1 50%, transparent 50%, transparent),
162
+ radial-gradient(#0ff, #0ff 50%, transparent 50%, transparent),
163
+ radial-gradient(#f0f, #f0f 50%, transparent 50%, transparent);
164
+ background-repeat: no-repeat;
165
+ animation: 2.4s ease-in-out 0s infinite loading;
166
+ }
167
+
168
+ // 文本剧中
169
+ .en-text-center {
170
+ text-align: center;
171
+ }
172
+
173
+ // 文本靠右
174
+ .en-text-right {
175
+ text-align: end;
176
+ }
177
+ //小文本
178
+ .en-text-small {
179
+ font-size: 0.6rem;
180
+ }
181
+ @keyframes loading {
182
+ // 45 - 25 * Math.sin((Math.PI * 5) / 12)
183
+ // 位置公式 35 - 25 * Math.cos((Math.PI * 5) / 12)
184
+
185
+ 100%,
186
+ 0% {
187
+ background-size:
188
+ 10% 10%,
189
+ 10% 10%,
190
+ 10% 10%,
191
+ 10% 10%;
192
+ background-position:
193
+ 25% 45%,
194
+ 41.7% 45%,
195
+ 58.3% 45%,
196
+ 75% 45%;
197
+ }
198
+
199
+ 20%,
200
+ 80% {
201
+ background-size: 2.5% 2.5%;
202
+ background-position: 25% 45%;
203
+ }
204
+
205
+ 22% {
206
+ background-size:
207
+ 3.75% 3.75%,
208
+ 2.5% 2.5%,
209
+ 2.5% 2.5%,
210
+ 2.5% 2.5%;
211
+ background-position:
212
+ // 位置 1
213
+ 25.85% 38.53%,
214
+ 25% 45%,
215
+ 25% 45%,
216
+ 25% 45%;
217
+ }
218
+
219
+ 24% {
220
+ background-size:
221
+ 5% 5%,
222
+ 2.5% 2.5%,
223
+ 2.5% 2.5%,
224
+ 2.5% 2.5%;
225
+ background-position:
226
+ // 位置 2
227
+ 28.35% 32.5%,
228
+ 25% 45%,
229
+ 25% 45%,
230
+ 25% 45%;
231
+ }
232
+
233
+ 26% {
234
+ background-size:
235
+ 6.25% 6.25%,
236
+ 2.5% 2.5%,
237
+ 2.5% 2.5%,
238
+ 2.5% 2.5%;
239
+ background-position:
240
+ // 位置 3
241
+ 32.32% 27.32%,
242
+ 25% 45%,
243
+ 25% 45%,
244
+ 25% 45%;
245
+ }
246
+
247
+ 28% {
248
+ background-size:
249
+ 7.5% 7.5%,
250
+ 3.75% 3.75%,
251
+ 2.5% 2.5%,
252
+ 2.5% 2.5%;
253
+ background-position:
254
+ // 位置 4
255
+ 37.5% 23.35%,
256
+ // 位置 1
257
+ 25.85% 38.53%,
258
+ 25% 45%,
259
+ 25% 45%;
260
+ }
261
+
262
+ 30% {
263
+ background-size:
264
+ 8.75% 8.75%,
265
+ 5% 5%,
266
+ 2.5% 2.5%,
267
+ 2.5% 2.5%;
268
+ background-position:
269
+ // 位置 5
270
+ 43.53% 20.85%,
271
+ // 位置 2
272
+ 28.35% 32.5%,
273
+ 25% 45%,
274
+ 25% 45%;
275
+ }
276
+
277
+ 32% {
278
+ background-size:
279
+ 10% 10%,
280
+ 6.25% 6.25%,
281
+ 3.75% 3.75%,
282
+ 2.5% 2.5%;
283
+ background-position:
284
+ // 位置 6
285
+ 50% 20%,
286
+ // 位置 3
287
+ 32.32% 27.32%,
288
+ // 位置 1
289
+ 25.85% 38.53%,
290
+ 25% 45%;
291
+ }
292
+
293
+ 34% {
294
+ background-size:
295
+ 10% 10%,
296
+ 7.5% 7.5%,
297
+ 5% 5%,
298
+ 2.5% 2.5%;
299
+ background-position:
300
+ // 位置 7
301
+ 56.47% 20.85%,
302
+ // 位置 4
303
+ 37.32% 23.35%,
304
+ // 位置 2
305
+ 28.35% 32.5%,
306
+ // 位置 1
307
+ 25.85% 38.53%;
308
+ }
309
+
310
+ $Pi: 3.1415926;
311
+
312
+ @for $i from 18 through 33 {
313
+ #{calc($i / 50 * 100%)} {
314
+ background-position:
315
+ #{(50 - (25 * cos(($Pi * ($i - 10)) / 12))) *
316
+ 1%}
317
+ #{(45 - 25 * sin(($Pi * ($i - 10)) / 12)) *
318
+ 1%},
319
+ #{(50 - (25 * cos(($Pi * ($i - 13)) / 12))) *
320
+ 1%}
321
+ #{(45 - 25 * sin(($Pi * ($i - 13)) / 12)) *
322
+ 1%},
323
+ #{(50 - (25 * cos(($Pi * ($i - 15)) / 12))) *
324
+ 1%}
325
+ #{(45 - 25 * sin(($Pi * ($i - 15)) / 12)) *
326
+ 1%},
327
+ #{(50 - (25 * cos(($Pi * ($i - 17)) / 12))) *
328
+ 1%}
329
+ #{(45 - 25 * sin(($Pi * ($i - 17)) / 12)) *
330
+ 1%};
331
+ }
332
+ }
333
+
334
+ 68% {
335
+ background-size:
336
+ 10% 10%,
337
+ 7.5% 7.5%,
338
+ 5% 5%,
339
+ 2.5% 2.5%;
340
+ background-position:
341
+ // 位置 0
342
+ 25% 45%,
343
+ // 位置 22
344
+ 28.35% 57.45%,
345
+ // 位置 20
346
+ 37.45% 66.65%,
347
+ // 位置 18
348
+ 48% 70%;
349
+ }
350
+
351
+ 70% {
352
+ background-size:
353
+ 8.75% 8.75%,
354
+ 7.5% 7.5%,
355
+ 5% 5%,
356
+ 2.5% 2.5%;
357
+ background-position:
358
+ // 位置 0
359
+ 25% 45%,
360
+ // 位置 23
361
+ 25.85% 51.47%,
362
+ // 位置 21
363
+ 32.32% 62.68%,
364
+ // 位置 19
365
+ 43.53% 69.15%;
366
+ }
367
+
368
+ 72% {
369
+ background-size:
370
+ 7.5% 7.5%,
371
+ 7.5% 7.5%,
372
+ 5% 5%,
373
+ 2.5% 2.5%;
374
+ background-position:
375
+ // 位置 0
376
+ 25% 45%,
377
+ // 位置 0
378
+ 25% 45%,
379
+ // 位置 22
380
+ 28.35% 57.45%,
381
+ // 位置 20
382
+ 37.45% 66.65%;
383
+ }
384
+ 74% {
385
+ background-size:
386
+ 6.25% 6.25%,
387
+ 6.25% 6.25%,
388
+ 5% 5%,
389
+ 2.5% 2.5%;
390
+ background-position:
391
+ // 位置 0
392
+ 25% 45%,
393
+ // 位置 0
394
+ 25% 45%,
395
+ // 位置 23
396
+ 25.85% 51.47%,
397
+ // 位置 21
398
+ 32.32% 62.68%;
399
+ }
400
+
401
+ 76% {
402
+ background-size:
403
+ 5% 5%,
404
+ 5% 5%,
405
+ 5% 5%,
406
+ 2.5% 2.5%;
407
+ background-position:
408
+ // 位置 0
409
+ 25% 45%,
410
+ // 位置 0
411
+ 25% 45%,
412
+ // 位置 0
413
+ 25% 45%,
414
+ // 位置 22
415
+ 28.35% 57.45%;
416
+ }
417
+
418
+ 78% {
419
+ background-size:
420
+ 3.75% 3.75%,
421
+ 3.75% 3.75%,
422
+ 3.75% 3.75%,
423
+ 2.5% 2.5%;
424
+ background-position:
425
+ // 位置 0
426
+ 25% 45%,
427
+ // 位置 0
428
+ 25% 45%,
429
+ // 位置 0
430
+ 25% 45%,
431
+ // 位置 23
432
+ 25.85% 51.47%;
433
+ }
434
+ }
435
+
436
+ @keyframes colorText {
437
+ 0% {
438
+ background-position: 400% 0%;
439
+ }
440
+
441
+ 100% {
442
+ background-position: 0% 0%;
443
+ }
444
+ }
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e={953:e=>{e.exports=require("react")}},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var u=r[o]={exports:{}};return e[o](u,u.exports,t),u.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};t.r(o),t.d(o,{useAnimationFrameId:()=>u});var n=t(953);function u(){var e=(0,n.useRef)(0);return(0,n.useEffect)((function(){return function(){e.current&&window.cancelAnimationFrame(e.current)}}),[]),e}module.exports.earthnut=o})();
@@ -0,0 +1 @@
1
+ import*as e from"react";var r={649:(r,t,n)=>{var o,a;r.exports=(o={useEffect:()=>e.useEffect,useRef:()=>e.useRef},a={},n.d(a,o),a)}},t={};function n(e){var o=t[e];if(void 0!==o)return o.exports;var a=t[e]={exports:{}};return r[e](a,a.exports,n),a.exports}n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var o={};n.d(o,{M:()=>u});var a=n(649);function u(){var e=(0,a.useRef)(0);return(0,a.useEffect)((function(){return function(){e.current&&window.cancelAnimationFrame(e.current)}}),[]),e}const f=o.M;export{f as useAnimationFrameId};
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e={953:e=>{e.exports=require("react")}},r={};function t(n){var o=r[n];if(void 0!==o)return o.exports;var u=r[n]={exports:{}};return e[n](u,u.exports,t),u.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};t.r(n),t.d(n,{useInputIsComposing:()=>u});var o=t(953);function u(e){var r=(0,o.useRef)(!1);return(0,o.useEffect)((function(){var t=e.current;if(t){var n=function(){return r.current=!0},o=function(){return r.current=!1};return t.addEventListener("compositionstart",n),t.addEventListener("compositionend",o),function(){t.removeEventListener("compositionstart",n),t.removeEventListener("compositionend",o)}}}),[]),r}module.exports.earthnut=n})();
@@ -0,0 +1 @@
1
+ import*as e from"react";var t={649:(t,r,n)=>{var o,s;t.exports=(o={useEffect:()=>e.useEffect,useRef:()=>e.useRef},s={},n.d(s,o),s)}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var s=r[e]={exports:{}};return t[e](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o={};n.d(o,{t:()=>i});var s=n(649);function i(e){var t=(0,s.useRef)(!1);return(0,s.useEffect)((function(){var r=e.current;if(r){var n=function(){return t.current=!0},o=function(){return t.current=!1};return r.addEventListener("compositionstart",n),r.addEventListener("compositionend",o),function(){r.removeEventListener("compositionstart",n),r.removeEventListener("compositionend",o)}}}),[]),t}const u=o.t;export{u as useInputIsComposing};
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e={570:e=>{e.exports=require("a-type-of-js")},953:e=>{e.exports=require("react")}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{useRipples:()=>Xe});var i=r(953);const o=require("a-element-inline-style");var a=r(570);function u(e,t,r,n){function i(e,t){var n=r.createShader(e);if(r.shaderSource(n,t),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw new Error("compile error: "+r.getShaderInfoLog(n));return n}var o,u={id:r.createProgram(),uniforms:{},locations:{}};if(r.attachShader(u.id,i(r.VERTEX_SHADER,e)),r.attachShader(u.id,i(r.FRAGMENT_SHADER,t)),r.linkProgram(u.id),!r.getProgramParameter(u.id,r.LINK_STATUS))throw new Error("link error: "+r.getProgramInfoLog(u.id));r.useProgram(u.id),r.enableVertexAttribArray(0);for(var l=e+t,s=/uniform (\w+) (\w+)/g;!(0,a.isNull)(o=s.exec(l));){var f=o[2];u.locations[f]=r.getUniformLocation(u.id,f)}return u}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.gl;r.activeTexture(r.TEXTURE0+(t||0)),r.bindTexture(r.TEXTURE_2D,e)}function s(){var e=this,t=function(){return e.initState=!1,null};if(!this.gl)return t();var r=this.gl,n=Object.fromEntries(["OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear"].reduce((function(e,t){var n=r.getExtension(t);return n&&e.push([t,n]),e}),[]));if(!n.OES_texture_float)return t();var i=[];function o(e,t,r){var i="OES_texture_"+e,o=i+"_linear",a=o in n;return{type:t,linearSupport:a,arrayType:r,extensions:a?[i,o]:[i]}}i.push(o("float",r.FLOAT,Float32Array)),n.OES_texture_half_float&&i.push(o("half_float",n.OES_texture_half_float.HALF_FLOAT_OES,null));var a=r.createTexture(),u=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,u),r.bindTexture(r.TEXTURE_2D,a),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE);for(var l=null,s=0;s<i.length;s++)if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,32,32,0,r.RGBA,i[s].type,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,a,0),r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE){l=i[s];break}return l}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,d(n.key),n)}}function p(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t,r){return(t=d(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=f(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}var v=p((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),h(this,"canvas",void 0),h(this,"gl",void 0),h(this,"config",void 0),h(this,"initState",!0),this.canvas=t;var r=t.getContext("webgl");if((0,a.isNull)(r))return this.initState=!1,void(this.config=null);this.gl=r,this.config=Reflect.apply(s,this,[])}));const m=require("a-js-tools");var g,b={imageUrl:"",resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0};function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function E(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,R(n.key),n)}}function R(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function T(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,P(n.key),n)}}function P(e){var t=function(e){if("object"!=w(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==w(t)?t:t+""}function S(e,t,r){return e.set(_(e,t),r),r}function x(e,t){return e.get(_(e,t))}function _(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function O(e){return function(e){if(Array.isArray(e))return D(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return D(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?D(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}Object.freeze(b),new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(){};return Object.setPrototypeOf(t,this),Object.defineProperties(t,{info:{value:function(){},configurable:!1,writable:!1},warn:{value:function(){},configurable:!1,writable:!1},error:{value:function(){},configurable:!1,writable:!1},type:{value:!1,configurable:!1,writable:!1}}),t},(t=[{key:"clear",value:function(){}}])&&E(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}())({name:"earthnut",type:!1});var k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t={list:[],diameter:48,radius:0,cells:0};t.diameter%2!=0&&t.diameter++;var r=t.diameter,n=t.list,i=r/2;t.radius=i,t.cells=Math.pow(r,2);for(var o=0;o<r;o++){n[o]=[];for(var a=0;a<r;a++)n[o][a]=[0,0,0,0]}for(var u=0;u<=i;u++)for(var l=u;l<=i;l++){var s=n[u][l],f=function(){return(0,m.getRandomInt)(255,190)};s[0]=f(),s[1]=f(),s[2]=f(),s[3]=Math.ceil(Math.sqrt(Math.pow(u,2)+Math.pow(l,2)))<=i?(0,m.getRandomInt)(120,180):(0,m.getRandomInt)(160,240)}for(var c=0;c<=i;c++)for(var p=0;p<=c;p++)n[c][p]=n[p][c];for(var h=i;h<r;h++)for(var d=0;d<=i;d++)n[h][d]=n[r-h][d];for(var v=0;v<i;v++)for(var g=i;g<r;g++)n[v][g]=n[v][r-g];for(var b=i;b<r;b++)for(var y=i;y<r;y++)n[b][y]=n[b][r-y];var E=e%r;return t.list=[].concat(O(n.slice(E)),O(n.slice(0,E))),t},A=new(g=new WeakMap,function(){return e=function e(){var t,r,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}(this,g,1),t=this,r="data",n=k(),(r=P(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n},(t=[{key:"build",value:function(){x(g,this)>100&&S(g,this,0),this.data=k(S(g,this,x(g,this)+3))}}])&&T(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());function F(e,t){var r=document.createElement("canvas"),n=document.createElement("canvas"),i=r.getContext("2d"),o=n.getContext("2d");return(0,a.isNull)(i)||(0,a.isNull)(o)?r:(r.width=n.width=e,r.height=n.height=t,i.clearRect(0,0,e,t),o.clearRect(0,0,e,t),i.globalAlpha=1,i.putImageData(function(e,t){Date.now();for(var r=new ImageData(e,t),n=r.data,i=A.data,o=i.diameter,a=i.list,u=e*o,l=0;l<n.length;l+=4){var s=l/4%u,f=s%e%o,c=Math.floor(s/e),p=a[f][c];n[l]=p[0],n[l+1]=p[1],n[l+2]=p[2],n[l+3]=p[3]}return r}(e,t),0,0),o.fillStyle="#ffffff",o.fillRect(0,0,e,t),o.drawImage(r,0,0,e,t),o.globalCompositeOperation="source-over",n)}function I(){var e=this.fadeData,t=e.backgroundInfo,r=t.width,n=t.height;A.build(),e.toBeList.push(F(r,n)),e.run()}function j(){var e=this,t=this.renderData,r=this.options,n=this.fadeData;if((0,a.isNull)(t))Reflect.apply(I,this,[]);else{var i,o,u=t.lastUseStyle,l=n.backgroundInfo,s=l.width,f=l.height,c=r.imageUrl||(i=u.backgroundImage,o=/url\(["']?([^"']*)["']?\)/.exec(i),(0,a.isNull)(o)?null:o[1]);if(t.imageSource=c,c){var p=function(e,t,r){var n=new Image(t,r);return n.width=t,n.height=r,n.src=e,n}(c,s,f);p.onload=function(){clearTimeout(n.transparentId),n.toBeList=n.toBeList.filter((function(e){return"img"===e.tagName.toLowerCase()&&e.getAttribute("src")!==c&&e.width===s&&e.height===f})),n.toBeList.push(p),n.run()},p.onerror=function(){Reflect.apply(I,e,[])},p.crossOrigin=r.crossOrigin}else Reflect.apply(I,this,[])}}function U(){var e=this.renderData;if(!(0,a.isNull)(e)){var t=e.parentElement;t&&[["background-image","none"],["background-color","transparent"]].forEach((function(e){return t.style.setProperty(e[0],e[1],"important")}))}}function C(e){var t=window.getComputedStyle(e),r=e.style;return{inlineBackground:r.background,inlineBackgroundColor:r.backgroundColor,inlineBackgroundImage:r.backgroundImage,backgroundColor:t.backgroundColor,backgroundImage:t.backgroundImage,backgroundSize:t.backgroundSize,backgroundPosition:t.backgroundPosition,backgroundRepeat:t.backgroundRepeat,backgroundClip:t.backgroundClip,backgroundOrigin:t.backgroundOrigin,backgroundAttachment:t.backgroundAttachment,position:t.position}}function N(e){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},N(e)}function L(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,X(n.key),n)}}function B(e,t,r){return t&&L(e.prototype,t),r&&L(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function M(e,t,r){return(t=X(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X(e){var t=function(e){if("object"!=N(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=N(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==N(t)?t:t+""}var W=B((function e(t,r,n){var i,o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),M(this,"quad",null),M(this,"lastRaindropsFallTime",0),M(this,"parentElement",void 0),M(this,"mutationObserver",void 0),M(this,"resizeObserver",void 0),M(this,"renderProgram",void 0),M(this,"imageSource",""),M(this,"dropProgram",void 0),M(this,"updateProgram",void 0),M(this,"textures",[]),M(this,"backgroundTexture",[]),M(this,"textureDelta",void 0),M(this,"framebuffers",[]),M(this,"bufferWriteIndex",0),M(this,"bufferReadIndex",1),M(this,"originStyle",void 0),M(this,"lastUseStyle",void 0),M(this,"events",{}),M(this,"animationFrameId",0),this.parentElement=null!==(i=t.parentElement)&&void 0!==i?i:document.body,Reflect.apply(U,n,[]),this.originStyle=this.lastUseStyle=C(this.parentElement),this.mutationObserver=new MutationObserver((function(e){e.forEach((function(e){var t,i;if(e.target===o.parentElement&&"attributes"===e.type&&n.options.visible){var u=Object.values(o.lastUseStyle),l=C(o.parentElement),s=Object.values(l);if((0,a.isEmptyArray)(m.enArr.difference(u,s)))return;var f="none"===(i=l.backgroundImage)||""===i,c="rgba(0, 0, 0, 0)"===(t=l.backgroundColor)||"#ffffffff"===t||"transport"===t;if(f&&c)return;o.lastUseStyle=l,Reflect.apply(r,n,[]),Reflect.apply(U,n,[])}}))})),this.mutationObserver.observe(this.parentElement,{subtree:!0,attributes:!0,attributeFilter:["class","style"]}),this.resizeObserver=new ResizeObserver((function(){Reflect.apply(r,n,[])})),this.resizeObserver.observe(this.parentElement)}));function z(){var e=this.renderData,t=this.fadeData;if(!(0,a.isNull)(e)){var r,n,i,o=e.parentElement,u=window.getComputedStyle(o),l=u.backgroundSize,s=u.backgroundAttachment,f=u.backgroundPosition,c=/\s+/.test(r=f)?r.replace(/center/,"50%").replace(/top|left/,"0%").replace(/bottom/,"100%").replace(/\s+/," ").split(" "):G(r)?[r,"50%"]:{center:["50%","50%"],top:["50%","0%"],bottom:["50%","100%"],left:["0%","50%"],right:["100%","50%"]}[r],p={left:0,top:0,width:0,height:0};"fixed"===s?(p.height=window.innerHeight,p.left=window.screenX,p.top=window.screenY,p.width=window.innerWidth):(p.left=0,p.top=0,p.width=o.scrollWidth,p.height=o.scrollHeight);var h=t.backgroundInfo||{width:100,height:100},d=h.width,v=h.height;if("cover"===l){var m=Math.max(p.width/d,p.height/v);n=d*m,i=v*m}else if("contain"===l){var g=Math.min(p.width/d,p.height/v);n=d*g,i=v*g}else{var b=l.split(" ");n=b[0]||"",i=b[1]||n,G(n)?n=p.width*parseFloat(n)/100:"auto"!==n&&(n=parseFloat(n)),G(i)?i=p.height*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),"auto"===n&&"auto"===i?(n=d,i=v):("auto"===n&&(n=d*(Number(i)/v)),"auto"===i&&(i=v*(Number(n)/d)))}var y=c&&c[0]||"0%",E=c&&c[1]||"0%";y=G(y)?(p.left+(p.width-Number(n))*parseFloat(y)/100).toString():(p.left+parseFloat(y)).toString(),E=G(E)?(p.top+(p.height-Number(i))*parseFloat(E)/100).toString():(p.top+parseFloat(E)).toString(),e.renderProgram.uniforms.topLeft=new Float32Array([(o.offsetLeft-Number(y))/n,(o.offsetTop-Number(E))/i]),e.renderProgram.uniforms.bottomRight=new Float32Array([e.renderProgram.uniforms.topLeft[0]+o.clientWidth/n,e.renderProgram.uniforms.topLeft[1]+o.clientHeight/i]);var R=Math.max(this.canvas.width,this.canvas.height);e.renderProgram.uniforms.containerRatio=new Float32Array([this.canvas.width/R,this.canvas.height/R])}}function G(e){return e.endsWith("%")}function H(){var e=this.gl,t=this.renderData;(0,a.isNull)(t)||(e.bindBuffer(e.ARRAY_BUFFER,t.quad),e.vertexAttribPointer(0,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLE_FAN,0,4))}function q(){var e=this.gl,t=this.renderData,r=this.options;if(!(0,a.isNull)(t)){var n=t.textures,i=t.backgroundTexture,o=r.perturbance;e.bindFramebuffer(e.FRAMEBUFFER,null),e.viewport(0,0,this.canvas.width,this.canvas.height),e.enable(e.BLEND),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),e.useProgram(t.renderProgram.id),Reflect.apply(l,this,[i,0]),Reflect.apply(l,this,[n[0],1]),e.uniform1f(t.renderProgram.locations.perturbance,o),e.uniform2fv(t.renderProgram.locations.topLeft,t.renderProgram.uniforms.topLeft),e.uniform2fv(t.renderProgram.locations.bottomRight,t.renderProgram.uniforms.bottomRight),e.uniform2fv(t.renderProgram.locations.containerRatio,t.renderProgram.uniforms.containerRatio),e.uniform1i(t.renderProgram.locations.samplerBackground,0),e.uniform1i(t.renderProgram.locations.samplerRipples,1),Reflect.apply(H,this,[]),e.disable(e.BLEND)}}function Y(){var e=this.renderData;if(!(0,a.isNull)(e)){var t=e.bufferWriteIndex,r=e.bufferReadIndex;e.bufferWriteIndex=1-t,e.bufferReadIndex=1-r}}function K(){var e=this.gl,t=this.renderData,r=this.options;if(!(0,a.isNull)(t)){var n=t.updateProgram,i=t.textures,o=t.framebuffers,u=t.bufferWriteIndex,s=t.bufferReadIndex,f=r.resolution;e.viewport(0,0,f,f),e.bindFramebuffer(e.FRAMEBUFFER,o[u]),Reflect.apply(l,this,[i[s]]),e.useProgram(n.id),Reflect.apply(H,this,[]),Reflect.apply(Y,this,[])}}function V(){var e=this,t=this.renderData,r=this.options,n=this.fadeData;if(!(0,a.isNull)(t)){var i=t.parentElement,o=n.isTransitioning,u=r.running,l=r.idleFluctuations,s=r.lastRunningState,f=getComputedStyle(i);n.backgroundInfo={width:parseInt(f.width),height:parseInt(f.height)},Reflect.apply(z,this,[]),u?(s||(r.lastRunningState=!0,this.show()),l&&this.raindropsFall(),o&&this.fade(),Reflect.apply(K,this,[]),Reflect.apply(q,this,[])):s&&(r.lastRunningState=!1,this.hide()),t.animationFrameId=requestAnimationFrame((function(){return Reflect.apply(V,e,[])}))}}function Z(e,t,r){var n=this.renderData;if(!(0,a.isNull)(n)){var i=n.parentElement,o=window.getComputedStyle(i),u=parseInt(o.borderLeftWidth)||0,l=parseInt(o.borderTopWidth)||0,s=i.getBoundingClientRect(),f=e.clientX-s.left-u,c=e.clientY-s.top-l;this.drop(f,c,t,r)}}function $(){var e=this,t=this.renderData,r=this.options;if(!(0,a.isNull)(t)){var n=t.parentElement,i=t.events,o=function(n){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.visible&&r.running&&r.interactive&&(t.lastRaindropsFallTime=Date.now(),Reflect.apply(Z,e,[n,r.dropRadius*(i?1.5:1),i?.03:.01]))};i.mousemove=function(e){for(var t=r.accelerating;t--;)o(e)},i.touchmove=i.touchstart=function(e){for(var t=e.touches,r=0;r<t.length;r++)o(t[r])},i.mousedown=function(e){return o(e,!0)},Object.keys(i).forEach((function(e){return null==n?void 0:n.addEventListener(e,i[e],{passive:!0})}))}}var J="\n attribute vec2 vertex;\n varying vec2 coord;\n void main() {\n coord = vertex * 0.5 + 0.5;\n gl_Position = vec4(vertex, 0.0, 1.0);\n }";function Q(){var e=this.gl,t=this.renderData;if(!(0,a.isNull)(t)){var r=t.textureDelta;t.dropProgram=u(J,"precision highp float;\n\n const float PI = 3.141592653589793;\n uniform sampler2D texture;\n uniform vec2 center;\n uniform float radius;\n uniform float strength;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n\n float drop = max(0.0, 1.0 - length(center * 0.5 + 0.5 - coord) / radius);\n drop = 0.5 - cos(drop * PI) * 0.5;\n info.r += drop * strength;\n gl_FragColor = info;\n }",e);var n=t.updateProgram=u(J,"\n precision highp float;\n\n uniform sampler2D texture;\n uniform vec2 delta;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n \n vec2 dx = vec2(delta.x, 0.0);\n vec2 dy = vec2(0.0, delta.y);\n \n float average = (\n texture2D(texture, coord - dx).r +\n texture2D(texture, coord - dy).r +\n texture2D(texture, coord + dx).r +\n texture2D(texture, coord + dy).r\n ) * 0.25;\n \n info.g += (average - info.r) * 2.0;\n info.g *= 0.995;\n info.r += info.g;\n \n gl_FragColor = info;\n }\n ",this.gl);e.uniform2fv(n.locations.delta,r),t.renderProgram=u("\n precision highp float;\n\n attribute vec2 vertex;\n uniform vec2 topLeft;\n uniform vec2 bottomRight;\n uniform vec2 containerRatio;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n void main() {\n backgroundCoord = mix(topLeft, bottomRight, vertex * 0.5 + 0.5);\n backgroundCoord.y = 1.0 - backgroundCoord.y;\n ripplesCoord = vec2(vertex.x, -vertex.y) * containerRatio * 0.5 + 0.5;\n gl_Position = vec4(vertex.x, -vertex.y, 0.0, 1.0);\n }\n ","\n precision highp float;\n\n uniform sampler2D samplerBackground;\n uniform sampler2D samplerRipples;\n uniform vec2 delta;\n\n uniform float perturbance;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n\n void main() {\n float height = texture2D(samplerRipples, ripplesCoord).r;\n float heightX = texture2D(samplerRipples, vec2(ripplesCoord.x + delta.x, ripplesCoord.y)).r;\n float heightY = texture2D(samplerRipples, vec2(ripplesCoord.x, ripplesCoord.y + delta.y)).r;\n vec3 dx = vec3(delta.x, heightX - height, 0.0);\n vec3 dy = vec3(0.0, heightY - height, delta.y);\n vec2 offset = -normalize(cross(dy, dx)).xz;\n float specular = pow(max(0.0, dot(offset, normalize(vec2(-0.6, 1.0)))), 4.0);\n gl_FragColor = texture2D(samplerBackground, backgroundCoord + offset * perturbance) + specular;\n }",e),e.uniform2fv(t.renderProgram.locations.delta,r)}}function ee(){var e=this.gl,t=this.renderData;if(!(0,a.isNull)(t)){var r=t.backgroundTexture=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR)}}function te(e){var t=this.gl,r=this.renderData,n=this.fadeData;if(!(0,a.isNull)(r)){var i=r.backgroundTexture,o=n.backgroundInfo,u=o.width,l=o.height,s=function(e){return(0,a.isZero)(e&e-1)},f=s(u)&&s(l)?t.REPEAT:t.CLAMP_TO_EDGE;t.bindTexture(t.TEXTURE_2D,i),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,f),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,f),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e)}}function re(){var e=this,t=this.renderData,r=this.options,n=this.fadeData;if(!(0,a.isNull)(t)&&this.config){var i=t.textures,o=t.framebuffers,u=r.resolution,l=this.gl,s=1/u;t.textureDelta=new Float32Array([s,s]),this.config.extensions.forEach((function(e){return l.getExtension(e)}));for(var f=this.config.arrayType,c=f?new f(u*u*4):null,p=this.config,h=0;h<2;h++){var d=l.createTexture(),v=l.createFramebuffer();l.bindFramebuffer(l.FRAMEBUFFER,v),l.bindTexture(l.TEXTURE_2D,d),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MIN_FILTER,p.linearSupport?l.LINEAR:l.NEAREST),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_MAG_FILTER,p.linearSupport?l.LINEAR:l.NEAREST),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_S,l.CLAMP_TO_EDGE),l.texParameteri(l.TEXTURE_2D,l.TEXTURE_WRAP_T,l.CLAMP_TO_EDGE),l.texImage2D(l.TEXTURE_2D,0,l.RGBA,u,u,0,l.RGBA,p.type,c),l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_2D,d,0),i.push(d),o.push(v)}t.quad=l.createBuffer(),l.bindBuffer(l.ARRAY_BUFFER,t.quad),l.bufferData(l.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),l.STATIC_DRAW),Reflect.apply(Q,this,[]),Reflect.apply(ee,this,[]),Reflect.apply(I,this,[]),Reflect.apply(j,this,[]),l.clearColor(0,0,0,0),l.blendFunc(l.SRC_ALPHA,l.ONE_MINUS_SRC_ALPHA),r.visible=!0,r.running=!0,Reflect.apply($,this,[]),Reflect.apply(te,this,[n.lastDrawImage]),t.animationFrameId=requestAnimationFrame((function(){return Reflect.apply(V,e,[])}))}}function ne(){var e=this.renderData,t=this.fadeData;if(!(0,a.isNull)(e)){var r=e.parentElement,n=t.backgroundInfo,i=r.offsetWidth,o=r.offsetHeight;this.canvas.width=n.width=i,this.canvas.height=n.height=o,Reflect.apply(j,this,[])}}function ie(){var e=this.renderData;if(!(0,a.isNull)(e)){var t=e.parentElement,r=e.originStyle;t.style.setProperty("background-image",r.inlineBackgroundImage),t.style.setProperty("background-color",r.inlineBackgroundColor)}}function oe(){var e=this.renderData,t=this.fadeData;if(!(0,a.isNull)(e)){if(e.animationFrameId&&window.cancelAnimationFrame(e.animationFrameId),t.transparentId&&clearTimeout(t.transparentId),null!=e&&e.parentElement&&null!=e&&e.events){var r,n,i,o=e.parentElement,u=e.events;Object.keys(u).forEach((function(e){return o.removeEventListener&&o.removeEventListener(e,u[e])})),o.removeAttribute&&o.removeAttribute("data-ripples"),null===(r=e.mutationObserver)||void 0===r||r.takeRecords(),null===(n=e.mutationObserver)||void 0===n||n.disconnect(),e.mutationObserver=null,null===(i=e.resizeObserver)||void 0===i||i.disconnect(),e.resizeObserver=null}this.gl=null,Reflect.apply(ie,this,[]),Object.keys(e).forEach((function(t){return e[t]=null})),this.renderData=null,this.gl&&(this.gl=null)}}function ae(e,t,r,n){var i=this.renderData,o=this.options,u=this.gl;if(!(0,a.isNull)(i)){var s=i.parentElement,f=i.dropProgram,c=i.textures,p=i.framebuffers,h=i.bufferWriteIndex,d=i.bufferReadIndex,v=o.resolution,m=s.offsetWidth,g=s.offsetHeight,b=Math.max(m,g);r/=b;var y=new Float32Array([(2*e-m)/b,(g-2*t)/b]);u.viewport(0,0,v,v),u.bindFramebuffer(u.FRAMEBUFFER,p[h]),Reflect.apply(l,this,[c[d]]),u.useProgram(f.id),u.uniform2fv(f.locations.center,y),u.uniform1f(f.locations.radius,r),u.uniform1f(f.locations.strength,n),Reflect.apply(H,this,[]),Reflect.apply(Y,this,[])}}function ue(e){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ue(e)}function le(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,fe(n.key),n)}}function se(e,t,r){return(t=fe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function fe(e){var t=function(e){if("object"!=ue(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ue(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ue(t)?t:t+""}function ce(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}function pe(e,t){return e.get(de(e,t))}function he(e,t,r){return e.set(de(e,t),r),r}function de(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var ve=new WeakMap,me=new WeakMap,ge=new WeakMap,be=new WeakMap,ye=new WeakMap,Ee=new WeakMap,Re=new WeakMap,we=function(){return e=function e(t){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ce(this,ve,b.accelerating),ce(this,me,b.interactive),ce(this,ge,b.resolution),ce(this,be,b.perturbance),ce(this,ye,b.dropRadius),se(this,"imageUrl",b.imageUrl),ce(this,Ee,b.idleFluctuations),ce(this,Re,b.raindropsTimeInterval),se(this,"crossOrigin","no-cors"),se(this,"visible",!1),se(this,"running",!1),se(this,"lastRunningState",!1),this.perturbance=t.perturbance,this.resolution=t.resolution,this.raindropsTimeInterval=t.raindropsTimeInterval,this.accelerating=t.accelerating,this.interactive=t.interactive,this.dropRadius=t.dropRadius,this.imageUrl=t.imageUrl,this.idleFluctuations=t.idleFluctuations,this.running=Boolean(null===(r=t.playingState)||void 0===r||r),this.crossOrigin=t.crossOrigin},(t=[{key:"accelerating",get:function(){return pe(ve,this)},set:function(e){e>100||e<2||he(ve,this,e)}},{key:"interactive",get:function(){return pe(me,this)},set:function(e){(0,a.isBoolean)(e)&&he(me,this,e)}},{key:"resolution",get:function(){return pe(ge,this)},set:function(e){e<100||e>550||he(ge,this,e)}},{key:"perturbance",get:function(){return pe(be,this)},set:function(e){e<1e-4||e>1||he(be,this,e)}},{key:"dropRadius",get:function(){return pe(ye,this)},set:function(e){!isFinite(e)||e<10||he(ye,this,e)}},{key:"idleFluctuations",get:function(){return pe(Ee,this)},set:function(e){(0,a.isBoolean)(e)&&he(Ee,this,e)}},{key:"raindropsTimeInterval",get:function(){return pe(Re,this)},set:function(e){e<10||e>12e3||he(Re,this,e)}},{key:"playingState",get:function(){return this.running},set:function(e){this.running=Boolean(null==e||e)}}])&&le(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Te(){var e=this,t=this.options,r=this.fadeData;r.transparentId=setTimeout((function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(Te,e,[]);r.drawProgress=0,r.isTransitioning=!0}),2*t.raindropsTimeInterval)}function Pe(){var e=this.renderData,t=this.fadeData,r=t.toBeList,n=t.drawProgress,i=t.lastDrawImage,o=t.backgroundInfo;if(!(0,a.isNull)(e)&&!(0,a.isEmptyArray)(r)){if(t.drawProgress>1e3)return t.isTransitioning=!1,t.lastDrawImage=r.shift(),Reflect.apply(te,this,[t.lastDrawImage]),void((0,a.isEmptyArray)(r)||Reflect.apply(Te,this,[]));t.drawProgress+=18;var u=document.createElement("canvas"),l=u.getContext("2d");if(!((0,a.isNull)(l)||(0,a.isNull)(i)||(0,a.isEmptyArray)(r))){var s=o.width,f=o.height;u.width=s,u.height=f,l.clearRect(0,0,s,f),l.drawImage(i,0,0,s,f),l.globalAlpha=n/1e3,l.drawImage(r[0],0,0,s,f),l.globalAlpha=1,Reflect.apply(te,this,[u])}}}function Se(e){return Se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Se(e)}function xe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Oe(n.key),n)}}function _e(e,t,r){return(t=Oe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Oe(e){var t=function(e){if("object"!=Se(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Se(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Se(t)?t:t+""}var De=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),_e(this,"backgroundInfo",{width:0,height:0}),_e(this,"transparentId",setTimeout(Boolean)),_e(this,"lastDrawImage",void 0),_e(this,"toBeList",[]),_e(this,"drawProgress",0),_e(this,"isTransitioning",!1);var r,n,i=t.renderData;if((0,a.isNull)(i))r=10,n=10;else{var o=getComputedStyle(i.parentElement);r=parseInt(o.width),n=parseInt(o.height)}this.backgroundInfo={width:r,height:n},this.lastDrawImage=F(r,n)},(t=[{key:"run",value:function(){this.isTransitioning||(this.drawProgress=0,this.isTransitioning=!0)}}])&&xe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function ke(e){return ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ke(e)}function Ae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(r),!0).forEach((function(t){Ne(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ae(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ie(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Le(n.key),n)}}function je(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(je=function(){return!!e})()}function Ue(e){return Ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ue(e)}function Ce(e,t){return Ce=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ce(e,t)}function Ne(e,t,r){return(t=Le(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Le(e){var t=function(e){if("object"!=ke(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ke(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ke(t)?t:t+""}var Be=new WeakMap,Me=function(e){function t(e,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Ne(n=function(e,t,r){return t=Ue(t),function(e,t){if(t&&("object"==ke(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,je()?Reflect.construct(t,r||[],Ue(e).constructor):t.apply(e,r))}(this,t,[e]),"renderData",null),Ne(n,"options",void 0),Ne(n,"fadeData",void 0),Ne(n,"defaults",b),Ne(n,"initialized",!1),function(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}(n,Be,(0,m.debounce)(ne,{this:n})),Object.defineProperties(n,{defaults:{value:n.defaults,writable:!1,enumerable:!1,configurable:!1}}),n.options=new we(Fe(Fe({},n.defaults),r)),n.renderData=new W(e,n.reloadBackground,n),n.fadeData=new De(n),(0,a.isFalse)(n.initState)||(0,a.isNull)(e.parentElement)||(0,a.isNull)(n.config)||(0,a.isNull)(n.gl)?n.initState=!1:(function(e){var t=e.parentElement;e.width=t.clientWidth,e.height=t.clientHeight,(0,o.setStyle)(e,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(e),Reflect.apply(re,n,[])),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ce(e,t)}(t,e),r=t,(n=[{key:"raindropsFall",value:function(){var e=this.renderData,t=this.options,r=this.fadeData;if(!(0,a.isNull)(e)){var n=r.backgroundInfo,i=e.lastRaindropsFallTime,o=t.raindropsTimeInterval,u=t.dropRadius,l=Date.now();if(!(l-i<o)){e.lastRaindropsFallTime=l;var s=function(e){return(0,m.getRandomInt)(e)},f=n.width,c=n.height;this.drop(s(f),s(c),u,.03)}}}},{key:"drop",value:function(e,t,r,n){Reflect.apply(ae,this,[e,t,r,n])}},{key:"fade",value:function(){Reflect.apply(Pe,this,[])}},{key:"reloadBackground",value:function(){var e,t;(e=Be,t=this,e.get(function(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}(e,t))).call(this)}},{key:"destroy",value:function(){Reflect.apply(oe,this,[])}},{key:"show",value:function(){this.options.visible=!0,this.canvas.style.visibility="visible",Reflect.apply(U,this,[])}},{key:"hide",value:function(){this.options.visible=!1,this.canvas.style.visibility="hidden",Reflect.apply(ie,this,[])}},{key:"pause",value:function(){this.options.running=!1}},{key:"play",value:function(){this.options.running=!0}},{key:"changePlayingState",value:function(){var e=this.options;e.running=!e.running}},{key:"set",value:function(e,t){"imageUrl"===e?(this.options.imageUrl=t,Reflect.apply(j,this,[])):this.options[e]=t}}])&&Ie(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(v);function Xe(e,t){var r=(0,i.useRef)(null);return(0,i.useEffect)((function(){if(!(0,a.isNull)(e.current))return r.current=new Me(e.current,t&&t.option),function(){var e,t;return null!==(e=null===(t=r.current)||void 0===t?void 0:t.destroy())&&void 0!==e?e:void 0}}),[]),r}module.exports.earthnut=n})();
@@ -0,0 +1 @@
1
+ import*as e from"a-type-of-js";import*as t from"react";import*as r from"a-element-inline-style";import*as n from"a-js-tools";var i={362:(t,r,n)=>{var i,o;t.exports=(i={isBoolean:()=>e.isBoolean,isEmptyArray:()=>e.isEmptyArray,isFalse:()=>e.isFalse,isNull:()=>e.isNull,isZero:()=>e.isZero},o={},n.d(o,i),o)},649:(e,r,n)=>{var i,o;e.exports=(i={useEffect:()=>t.useEffect,useRef:()=>t.useRef},o={},n.d(o,i),o)}},o={};function a(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={exports:{}};return i[e](r,r.exports,a),r.exports}a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var u={};a.d(u,{n:()=>qe});var l=a(649);const s=(f={setStyle:()=>r.setStyle},c={},a.d(c,f),c);var f,c,p=a(362);function h(e,t,r,n){function i(e,t){var n=r.createShader(e);if(r.shaderSource(n,t),r.compileShader(n),!r.getShaderParameter(n,r.COMPILE_STATUS))throw new Error("compile error: "+r.getShaderInfoLog(n));return n}var o,a={id:r.createProgram(),uniforms:{},locations:{}};if(r.attachShader(a.id,i(r.VERTEX_SHADER,e)),r.attachShader(a.id,i(r.FRAGMENT_SHADER,t)),r.linkProgram(a.id),!r.getProgramParameter(a.id,r.LINK_STATUS))throw new Error("link error: "+r.getProgramInfoLog(a.id));r.useProgram(a.id),r.enableVertexAttribArray(0);for(var u=e+t,l=/uniform (\w+) (\w+)/g;!(0,p.isNull)(o=l.exec(u));){var s=o[2];a.locations[s]=r.getUniformLocation(a.id,s)}return a}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.gl;r.activeTexture(r.TEXTURE0+(t||0)),r.bindTexture(r.TEXTURE_2D,e)}function m(){var e=this,t=function(){return e.initState=!1,null};if(!this.gl)return t();var r=this.gl,n=Object.fromEntries(["OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear"].reduce((function(e,t){var n=r.getExtension(t);return n&&e.push([t,n]),e}),[]));if(!n.OES_texture_float)return t();var i=[];function o(e,t,r){var i="OES_texture_"+e,o=i+"_linear",a=o in n;return{type:t,linearSupport:a,arrayType:r,extensions:a?[i,o]:[i]}}i.push(o("float",r.FLOAT,Float32Array)),n.OES_texture_half_float&&i.push(o("half_float",n.OES_texture_half_float.HALF_FLOAT_OES,null));var a=r.createTexture(),u=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,u),r.bindTexture(r.TEXTURE_2D,a),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE);for(var l=null,s=0;s<i.length;s++)if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,32,32,0,r.RGBA,i[s].type,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,a,0),r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE){l=i[s];break}return l}function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}function b(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function y(e,t,r){return(t=E(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e){var t=function(e){if("object"!=v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}var R=b((function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),y(this,"canvas",void 0),y(this,"gl",void 0),y(this,"config",void 0),y(this,"initState",!0),this.canvas=t;var r=t.getContext("webgl");if((0,p.isNull)(r))return this.initState=!1,void(this.config=null);this.gl=r,this.config=Reflect.apply(m,this,[])}));const w=(e=>{var t={};return a.d(t,e),t})({debounce:()=>n.debounce,enArr:()=>n.enArr,getRandomInt:()=>n.getRandomInt});var T,P={imageUrl:"",resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0};function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_(n.key),n)}}function _(e){var t=function(e){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function D(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,k(n.key),n)}}function k(e){var t=function(e){if("object"!=O(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=O(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==O(t)?t:t+""}function A(e,t,r){return e.set(I(e,t),r),r}function F(e,t){return e.get(I(e,t))}function I(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}function j(e){return function(e){if(Array.isArray(e))return U(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return U(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?U(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function U(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}Object.freeze(P),new(function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t=function(){};return Object.setPrototypeOf(t,this),Object.defineProperties(t,{info:{value:function(){},configurable:!1,writable:!1},warn:{value:function(){},configurable:!1,writable:!1},error:{value:function(){},configurable:!1,writable:!1},type:{value:!1,configurable:!1,writable:!1}}),t},(t=[{key:"clear",value:function(){}}])&&x(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}())({name:"earthnut",type:!1});var C=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t={list:[],diameter:48,radius:0,cells:0};t.diameter%2!=0&&t.diameter++;var r=t.diameter,n=t.list,i=r/2;t.radius=i,t.cells=Math.pow(r,2);for(var o=0;o<r;o++){n[o]=[];for(var a=0;a<r;a++)n[o][a]=[0,0,0,0]}for(var u=0;u<=i;u++)for(var l=u;l<=i;l++){var s=n[u][l],f=function(){return(0,w.getRandomInt)(255,190)};s[0]=f(),s[1]=f(),s[2]=f(),s[3]=Math.ceil(Math.sqrt(Math.pow(u,2)+Math.pow(l,2)))<=i?(0,w.getRandomInt)(120,180):(0,w.getRandomInt)(160,240)}for(var c=0;c<=i;c++)for(var p=0;p<=c;p++)n[c][p]=n[p][c];for(var h=i;h<r;h++)for(var d=0;d<=i;d++)n[h][d]=n[r-h][d];for(var m=0;m<i;m++)for(var v=i;v<r;v++)n[m][v]=n[m][r-v];for(var g=i;g<r;g++)for(var b=i;b<r;b++)n[g][b]=n[g][r-b];var y=e%r;return t.list=[].concat(j(n.slice(y)),j(n.slice(0,y))),t},N=new(T=new WeakMap,function(){return e=function e(){var t,r,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}(this,T,1),t=this,r="data",n=C(),(r=k(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n},(t=[{key:"build",value:function(){F(T,this)>100&&A(T,this,0),this.data=C(A(T,this,F(T,this)+3))}}])&&D(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());function B(e,t){var r=document.createElement("canvas"),n=document.createElement("canvas"),i=r.getContext("2d"),o=n.getContext("2d");return(0,p.isNull)(i)||(0,p.isNull)(o)?r:(r.width=n.width=e,r.height=n.height=t,i.clearRect(0,0,e,t),o.clearRect(0,0,e,t),i.globalAlpha=1,i.putImageData(function(e,t){Date.now();for(var r=new ImageData(e,t),n=r.data,i=N.data,o=i.diameter,a=i.list,u=e*o,l=0;l<n.length;l+=4){var s=l/4%u,f=s%e%o,c=Math.floor(s/e),p=a[f][c];n[l]=p[0],n[l+1]=p[1],n[l+2]=p[2],n[l+3]=p[3]}return r}(e,t),0,0),o.fillStyle="#ffffff",o.fillRect(0,0,e,t),o.drawImage(r,0,0,e,t),o.globalCompositeOperation="source-over",n)}function L(){var e=this.fadeData,t=e.backgroundInfo,r=t.width,n=t.height;N.build(),e.toBeList.push(B(r,n)),e.run()}function M(){var e=this,t=this.renderData,r=this.options,n=this.fadeData;if((0,p.isNull)(t))Reflect.apply(L,this,[]);else{var i,o,a=t.lastUseStyle,u=n.backgroundInfo,l=u.width,s=u.height,f=r.imageUrl||(i=a.backgroundImage,o=/url\(["']?([^"']*)["']?\)/.exec(i),(0,p.isNull)(o)?null:o[1]);if(t.imageSource=f,f){var c=function(e,t,r){var n=new Image(t,r);return n.width=t,n.height=r,n.src=e,n}(f,l,s);c.onload=function(){clearTimeout(n.transparentId),n.toBeList=n.toBeList.filter((function(e){return"img"===e.tagName.toLowerCase()&&e.getAttribute("src")!==f&&e.width===l&&e.height===s})),n.toBeList.push(c),n.run()},c.onerror=function(){Reflect.apply(L,e,[])},c.crossOrigin=r.crossOrigin}else Reflect.apply(L,this,[])}}function X(){var e=this.renderData;if(!(0,p.isNull)(e)){var t=e.parentElement;t&&[["background-image","none"],["background-color","transparent"]].forEach((function(e){return t.style.setProperty(e[0],e[1],"important")}))}}function W(e){var t=window.getComputedStyle(e),r=e.style;return{inlineBackground:r.background,inlineBackgroundColor:r.backgroundColor,inlineBackgroundImage:r.backgroundImage,backgroundColor:t.backgroundColor,backgroundImage:t.backgroundImage,backgroundSize:t.backgroundSize,backgroundPosition:t.backgroundPosition,backgroundRepeat:t.backgroundRepeat,backgroundClip:t.backgroundClip,backgroundOrigin:t.backgroundOrigin,backgroundAttachment:t.backgroundAttachment,position:t.position}}function z(e){return z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},z(e)}function G(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,q(n.key),n)}}function H(e,t,r){return t&&G(e.prototype,t),r&&G(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Y(e,t,r){return(t=q(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function q(e){var t=function(e){if("object"!=z(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=z(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==z(t)?t:t+""}var Z=H((function e(t,r,n){var i,o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Y(this,"quad",null),Y(this,"lastRaindropsFallTime",0),Y(this,"parentElement",void 0),Y(this,"mutationObserver",void 0),Y(this,"resizeObserver",void 0),Y(this,"renderProgram",void 0),Y(this,"imageSource",""),Y(this,"dropProgram",void 0),Y(this,"updateProgram",void 0),Y(this,"textures",[]),Y(this,"backgroundTexture",[]),Y(this,"textureDelta",void 0),Y(this,"framebuffers",[]),Y(this,"bufferWriteIndex",0),Y(this,"bufferReadIndex",1),Y(this,"originStyle",void 0),Y(this,"lastUseStyle",void 0),Y(this,"events",{}),Y(this,"animationFrameId",0),this.parentElement=null!==(i=t.parentElement)&&void 0!==i?i:document.body,Reflect.apply(X,n,[]),this.originStyle=this.lastUseStyle=W(this.parentElement),this.mutationObserver=new MutationObserver((function(e){e.forEach((function(e){var t,i;if(e.target===o.parentElement&&"attributes"===e.type&&n.options.visible){var a=Object.values(o.lastUseStyle),u=W(o.parentElement),l=Object.values(u);if((0,p.isEmptyArray)(w.enArr.difference(a,l)))return;var s="none"===(i=u.backgroundImage)||""===i,f="rgba(0, 0, 0, 0)"===(t=u.backgroundColor)||"#ffffffff"===t||"transport"===t;if(s&&f)return;o.lastUseStyle=u,Reflect.apply(r,n,[]),Reflect.apply(X,n,[])}}))})),this.mutationObserver.observe(this.parentElement,{subtree:!0,attributes:!0,attributeFilter:["class","style"]}),this.resizeObserver=new ResizeObserver((function(){Reflect.apply(r,n,[])})),this.resizeObserver.observe(this.parentElement)}));function K(){var e=this.renderData,t=this.fadeData;if(!(0,p.isNull)(e)){var r,n,i,o=e.parentElement,a=window.getComputedStyle(o),u=a.backgroundSize,l=a.backgroundAttachment,s=a.backgroundPosition,f=/\s+/.test(r=s)?r.replace(/center/,"50%").replace(/top|left/,"0%").replace(/bottom/,"100%").replace(/\s+/," ").split(" "):V(r)?[r,"50%"]:{center:["50%","50%"],top:["50%","0%"],bottom:["50%","100%"],left:["0%","50%"],right:["100%","50%"]}[r],c={left:0,top:0,width:0,height:0};"fixed"===l?(c.height=window.innerHeight,c.left=window.screenX,c.top=window.screenY,c.width=window.innerWidth):(c.left=0,c.top=0,c.width=o.scrollWidth,c.height=o.scrollHeight);var h=t.backgroundInfo||{width:100,height:100},d=h.width,m=h.height;if("cover"===u){var v=Math.max(c.width/d,c.height/m);n=d*v,i=m*v}else if("contain"===u){var g=Math.min(c.width/d,c.height/m);n=d*g,i=m*g}else{var b=u.split(" ");n=b[0]||"",i=b[1]||n,V(n)?n=c.width*parseFloat(n)/100:"auto"!==n&&(n=parseFloat(n)),V(i)?i=c.height*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),"auto"===n&&"auto"===i?(n=d,i=m):("auto"===n&&(n=d*(Number(i)/m)),"auto"===i&&(i=m*(Number(n)/d)))}var y=f&&f[0]||"0%",E=f&&f[1]||"0%";y=V(y)?(c.left+(c.width-Number(n))*parseFloat(y)/100).toString():(c.left+parseFloat(y)).toString(),E=V(E)?(c.top+(c.height-Number(i))*parseFloat(E)/100).toString():(c.top+parseFloat(E)).toString(),e.renderProgram.uniforms.topLeft=new Float32Array([(o.offsetLeft-Number(y))/n,(o.offsetTop-Number(E))/i]),e.renderProgram.uniforms.bottomRight=new Float32Array([e.renderProgram.uniforms.topLeft[0]+o.clientWidth/n,e.renderProgram.uniforms.topLeft[1]+o.clientHeight/i]);var R=Math.max(this.canvas.width,this.canvas.height);e.renderProgram.uniforms.containerRatio=new Float32Array([this.canvas.width/R,this.canvas.height/R])}}function V(e){return e.endsWith("%")}function $(){var e=this.gl,t=this.renderData;(0,p.isNull)(t)||(e.bindBuffer(e.ARRAY_BUFFER,t.quad),e.vertexAttribPointer(0,2,e.FLOAT,!1,0,0),e.drawArrays(e.TRIANGLE_FAN,0,4))}function J(){var e=this.gl,t=this.renderData,r=this.options;if(!(0,p.isNull)(t)){var n=t.textures,i=t.backgroundTexture,o=r.perturbance;e.bindFramebuffer(e.FRAMEBUFFER,null),e.viewport(0,0,this.canvas.width,this.canvas.height),e.enable(e.BLEND),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT),e.useProgram(t.renderProgram.id),Reflect.apply(d,this,[i,0]),Reflect.apply(d,this,[n[0],1]),e.uniform1f(t.renderProgram.locations.perturbance,o),e.uniform2fv(t.renderProgram.locations.topLeft,t.renderProgram.uniforms.topLeft),e.uniform2fv(t.renderProgram.locations.bottomRight,t.renderProgram.uniforms.bottomRight),e.uniform2fv(t.renderProgram.locations.containerRatio,t.renderProgram.uniforms.containerRatio),e.uniform1i(t.renderProgram.locations.samplerBackground,0),e.uniform1i(t.renderProgram.locations.samplerRipples,1),Reflect.apply($,this,[]),e.disable(e.BLEND)}}function Q(){var e=this.renderData;if(!(0,p.isNull)(e)){var t=e.bufferWriteIndex,r=e.bufferReadIndex;e.bufferWriteIndex=1-t,e.bufferReadIndex=1-r}}function ee(){var e=this.gl,t=this.renderData,r=this.options;if(!(0,p.isNull)(t)){var n=t.updateProgram,i=t.textures,o=t.framebuffers,a=t.bufferWriteIndex,u=t.bufferReadIndex,l=r.resolution;e.viewport(0,0,l,l),e.bindFramebuffer(e.FRAMEBUFFER,o[a]),Reflect.apply(d,this,[i[u]]),e.useProgram(n.id),Reflect.apply($,this,[]),Reflect.apply(Q,this,[])}}function te(){var e=this,t=this.renderData,r=this.options,n=this.fadeData;if(!(0,p.isNull)(t)){var i=t.parentElement,o=n.isTransitioning,a=r.running,u=r.idleFluctuations,l=r.lastRunningState,s=getComputedStyle(i);n.backgroundInfo={width:parseInt(s.width),height:parseInt(s.height)},Reflect.apply(K,this,[]),a?(l||(r.lastRunningState=!0,this.show()),u&&this.raindropsFall(),o&&this.fade(),Reflect.apply(ee,this,[]),Reflect.apply(J,this,[])):l&&(r.lastRunningState=!1,this.hide()),t.animationFrameId=requestAnimationFrame((function(){return Reflect.apply(te,e,[])}))}}function re(e,t,r){var n=this.renderData;if(!(0,p.isNull)(n)){var i=n.parentElement,o=window.getComputedStyle(i),a=parseInt(o.borderLeftWidth)||0,u=parseInt(o.borderTopWidth)||0,l=i.getBoundingClientRect(),s=e.clientX-l.left-a,f=e.clientY-l.top-u;this.drop(s,f,t,r)}}function ne(){var e=this,t=this.renderData,r=this.options;if(!(0,p.isNull)(t)){var n=t.parentElement,i=t.events,o=function(n){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];r.visible&&r.running&&r.interactive&&(t.lastRaindropsFallTime=Date.now(),Reflect.apply(re,e,[n,r.dropRadius*(i?1.5:1),i?.03:.01]))};i.mousemove=function(e){for(var t=r.accelerating;t--;)o(e)},i.touchmove=i.touchstart=function(e){for(var t=e.touches,r=0;r<t.length;r++)o(t[r])},i.mousedown=function(e){return o(e,!0)},Object.keys(i).forEach((function(e){return null==n?void 0:n.addEventListener(e,i[e],{passive:!0})}))}}var ie="\n attribute vec2 vertex;\n varying vec2 coord;\n void main() {\n coord = vertex * 0.5 + 0.5;\n gl_Position = vec4(vertex, 0.0, 1.0);\n }";function oe(){var e=this.gl,t=this.renderData;if(!(0,p.isNull)(t)){var r=t.textureDelta;t.dropProgram=h(ie,"precision highp float;\n\n const float PI = 3.141592653589793;\n uniform sampler2D texture;\n uniform vec2 center;\n uniform float radius;\n uniform float strength;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n\n float drop = max(0.0, 1.0 - length(center * 0.5 + 0.5 - coord) / radius);\n drop = 0.5 - cos(drop * PI) * 0.5;\n info.r += drop * strength;\n gl_FragColor = info;\n }",e);var n=t.updateProgram=h(ie,"\n precision highp float;\n\n uniform sampler2D texture;\n uniform vec2 delta;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n \n vec2 dx = vec2(delta.x, 0.0);\n vec2 dy = vec2(0.0, delta.y);\n \n float average = (\n texture2D(texture, coord - dx).r +\n texture2D(texture, coord - dy).r +\n texture2D(texture, coord + dx).r +\n texture2D(texture, coord + dy).r\n ) * 0.25;\n \n info.g += (average - info.r) * 2.0;\n info.g *= 0.995;\n info.r += info.g;\n \n gl_FragColor = info;\n }\n ",this.gl);e.uniform2fv(n.locations.delta,r),t.renderProgram=h("\n precision highp float;\n\n attribute vec2 vertex;\n uniform vec2 topLeft;\n uniform vec2 bottomRight;\n uniform vec2 containerRatio;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n void main() {\n backgroundCoord = mix(topLeft, bottomRight, vertex * 0.5 + 0.5);\n backgroundCoord.y = 1.0 - backgroundCoord.y;\n ripplesCoord = vec2(vertex.x, -vertex.y) * containerRatio * 0.5 + 0.5;\n gl_Position = vec4(vertex.x, -vertex.y, 0.0, 1.0);\n }\n ","\n precision highp float;\n\n uniform sampler2D samplerBackground;\n uniform sampler2D samplerRipples;\n uniform vec2 delta;\n\n uniform float perturbance;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n\n void main() {\n float height = texture2D(samplerRipples, ripplesCoord).r;\n float heightX = texture2D(samplerRipples, vec2(ripplesCoord.x + delta.x, ripplesCoord.y)).r;\n float heightY = texture2D(samplerRipples, vec2(ripplesCoord.x, ripplesCoord.y + delta.y)).r;\n vec3 dx = vec3(delta.x, heightX - height, 0.0);\n vec3 dy = vec3(0.0, heightY - height, delta.y);\n vec2 offset = -normalize(cross(dy, dx)).xz;\n float specular = pow(max(0.0, dot(offset, normalize(vec2(-0.6, 1.0)))), 4.0);\n gl_FragColor = texture2D(samplerBackground, backgroundCoord + offset * perturbance) + specular;\n }",e),e.uniform2fv(t.renderProgram.locations.delta,r)}}function ae(){var e=this.gl,t=this.renderData;if(!(0,p.isNull)(t)){var r=t.backgroundTexture=e.createTexture();e.bindTexture(e.TEXTURE_2D,r),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR)}}function ue(e){var t=this.gl,r=this.renderData,n=this.fadeData;if(!(0,p.isNull)(r)){var i=r.backgroundTexture,o=n.backgroundInfo,a=o.width,u=o.height,l=function(e){return(0,p.isZero)(e&e-1)},s=l(a)&&l(u)?t.REPEAT:t.CLAMP_TO_EDGE;t.bindTexture(t.TEXTURE_2D,i),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,s),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,s),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e)}}function le(){var e=this,t=this.renderData,r=this.options,n=this.fadeData;if(!(0,p.isNull)(t)&&this.config){var i=t.textures,o=t.framebuffers,a=r.resolution,u=this.gl,l=1/a;t.textureDelta=new Float32Array([l,l]),this.config.extensions.forEach((function(e){return u.getExtension(e)}));for(var s=this.config.arrayType,f=s?new s(a*a*4):null,c=this.config,h=0;h<2;h++){var d=u.createTexture(),m=u.createFramebuffer();u.bindFramebuffer(u.FRAMEBUFFER,m),u.bindTexture(u.TEXTURE_2D,d),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,c.linearSupport?u.LINEAR:u.NEAREST),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,c.linearSupport?u.LINEAR:u.NEAREST),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_S,u.CLAMP_TO_EDGE),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_WRAP_T,u.CLAMP_TO_EDGE),u.texImage2D(u.TEXTURE_2D,0,u.RGBA,a,a,0,u.RGBA,c.type,f),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,d,0),i.push(d),o.push(m)}t.quad=u.createBuffer(),u.bindBuffer(u.ARRAY_BUFFER,t.quad),u.bufferData(u.ARRAY_BUFFER,new Float32Array([-1,-1,1,-1,1,1,-1,1]),u.STATIC_DRAW),Reflect.apply(oe,this,[]),Reflect.apply(ae,this,[]),Reflect.apply(L,this,[]),Reflect.apply(M,this,[]),u.clearColor(0,0,0,0),u.blendFunc(u.SRC_ALPHA,u.ONE_MINUS_SRC_ALPHA),r.visible=!0,r.running=!0,Reflect.apply(ne,this,[]),Reflect.apply(ue,this,[n.lastDrawImage]),t.animationFrameId=requestAnimationFrame((function(){return Reflect.apply(te,e,[])}))}}function se(){var e=this.renderData,t=this.fadeData;if(!(0,p.isNull)(e)){var r=e.parentElement,n=t.backgroundInfo,i=r.offsetWidth,o=r.offsetHeight;this.canvas.width=n.width=i,this.canvas.height=n.height=o,Reflect.apply(M,this,[])}}function fe(){var e=this.renderData;if(!(0,p.isNull)(e)){var t=e.parentElement,r=e.originStyle;t.style.setProperty("background-image",r.inlineBackgroundImage),t.style.setProperty("background-color",r.inlineBackgroundColor)}}function ce(){var e=this.renderData,t=this.fadeData;if(!(0,p.isNull)(e)){if(e.animationFrameId&&window.cancelAnimationFrame(e.animationFrameId),t.transparentId&&clearTimeout(t.transparentId),null!=e&&e.parentElement&&null!=e&&e.events){var r,n,i,o=e.parentElement,a=e.events;Object.keys(a).forEach((function(e){return o.removeEventListener&&o.removeEventListener(e,a[e])})),o.removeAttribute&&o.removeAttribute("data-ripples"),null===(r=e.mutationObserver)||void 0===r||r.takeRecords(),null===(n=e.mutationObserver)||void 0===n||n.disconnect(),e.mutationObserver=null,null===(i=e.resizeObserver)||void 0===i||i.disconnect(),e.resizeObserver=null}this.gl=null,Reflect.apply(fe,this,[]),Object.keys(e).forEach((function(t){return e[t]=null})),this.renderData=null,this.gl&&(this.gl=null)}}function pe(e,t,r,n){var i=this.renderData,o=this.options,a=this.gl;if(!(0,p.isNull)(i)){var u=i.parentElement,l=i.dropProgram,s=i.textures,f=i.framebuffers,c=i.bufferWriteIndex,h=i.bufferReadIndex,m=o.resolution,v=u.offsetWidth,g=u.offsetHeight,b=Math.max(v,g);r/=b;var y=new Float32Array([(2*e-v)/b,(g-2*t)/b]);a.viewport(0,0,m,m),a.bindFramebuffer(a.FRAMEBUFFER,f[c]),Reflect.apply(d,this,[s[h]]),a.useProgram(l.id),a.uniform2fv(l.locations.center,y),a.uniform1f(l.locations.radius,r),a.uniform1f(l.locations.strength,n),Reflect.apply($,this,[]),Reflect.apply(Q,this,[])}}function he(e){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},he(e)}function de(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ve(n.key),n)}}function me(e,t,r){return(t=ve(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ve(e){var t=function(e){if("object"!=he(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=he(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==he(t)?t:t+""}function ge(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}function be(e,t){return e.get(Ee(e,t))}function ye(e,t,r){return e.set(Ee(e,t),r),r}function Ee(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}var Re=new WeakMap,we=new WeakMap,Te=new WeakMap,Pe=new WeakMap,Se=new WeakMap,xe=new WeakMap,_e=new WeakMap,Oe=function(){return e=function e(t){var r;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ge(this,Re,P.accelerating),ge(this,we,P.interactive),ge(this,Te,P.resolution),ge(this,Pe,P.perturbance),ge(this,Se,P.dropRadius),me(this,"imageUrl",P.imageUrl),ge(this,xe,P.idleFluctuations),ge(this,_e,P.raindropsTimeInterval),me(this,"crossOrigin","no-cors"),me(this,"visible",!1),me(this,"running",!1),me(this,"lastRunningState",!1),this.perturbance=t.perturbance,this.resolution=t.resolution,this.raindropsTimeInterval=t.raindropsTimeInterval,this.accelerating=t.accelerating,this.interactive=t.interactive,this.dropRadius=t.dropRadius,this.imageUrl=t.imageUrl,this.idleFluctuations=t.idleFluctuations,this.running=Boolean(null===(r=t.playingState)||void 0===r||r),this.crossOrigin=t.crossOrigin},(t=[{key:"accelerating",get:function(){return be(Re,this)},set:function(e){e>100||e<2||ye(Re,this,e)}},{key:"interactive",get:function(){return be(we,this)},set:function(e){(0,p.isBoolean)(e)&&ye(we,this,e)}},{key:"resolution",get:function(){return be(Te,this)},set:function(e){e<100||e>550||ye(Te,this,e)}},{key:"perturbance",get:function(){return be(Pe,this)},set:function(e){e<1e-4||e>1||ye(Pe,this,e)}},{key:"dropRadius",get:function(){return be(Se,this)},set:function(e){!isFinite(e)||e<10||ye(Se,this,e)}},{key:"idleFluctuations",get:function(){return be(xe,this)},set:function(e){(0,p.isBoolean)(e)&&ye(xe,this,e)}},{key:"raindropsTimeInterval",get:function(){return be(_e,this)},set:function(e){e<10||e>12e3||ye(_e,this,e)}},{key:"playingState",get:function(){return this.running},set:function(e){this.running=Boolean(null==e||e)}}])&&de(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function De(){var e=this,t=this.options,r=this.fadeData;r.transparentId=setTimeout((function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(De,e,[]);r.drawProgress=0,r.isTransitioning=!0}),2*t.raindropsTimeInterval)}function ke(){var e=this.renderData,t=this.fadeData,r=t.toBeList,n=t.drawProgress,i=t.lastDrawImage,o=t.backgroundInfo;if(!(0,p.isNull)(e)&&!(0,p.isEmptyArray)(r)){if(t.drawProgress>1e3)return t.isTransitioning=!1,t.lastDrawImage=r.shift(),Reflect.apply(ue,this,[t.lastDrawImage]),void((0,p.isEmptyArray)(r)||Reflect.apply(De,this,[]));t.drawProgress+=18;var a=document.createElement("canvas"),u=a.getContext("2d");if(!((0,p.isNull)(u)||(0,p.isNull)(i)||(0,p.isEmptyArray)(r))){var l=o.width,s=o.height;a.width=l,a.height=s,u.clearRect(0,0,l,s),u.drawImage(i,0,0,l,s),u.globalAlpha=n/1e3,u.drawImage(r[0],0,0,l,s),u.globalAlpha=1,Reflect.apply(ue,this,[a])}}}function Ae(e){return Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(e)}function Fe(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,je(n.key),n)}}function Ie(e,t,r){return(t=je(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function je(e){var t=function(e){if("object"!=Ae(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ae(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ae(t)?t:t+""}var Ue=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),Ie(this,"backgroundInfo",{width:0,height:0}),Ie(this,"transparentId",setTimeout(Boolean)),Ie(this,"lastDrawImage",void 0),Ie(this,"toBeList",[]),Ie(this,"drawProgress",0),Ie(this,"isTransitioning",!1);var r,n,i=t.renderData;if((0,p.isNull)(i))r=10,n=10;else{var o=getComputedStyle(i.parentElement);r=parseInt(o.width),n=parseInt(o.height)}this.backgroundInfo={width:r,height:n},this.lastDrawImage=B(r,n)},(t=[{key:"run",value:function(){this.isTransitioning||(this.drawProgress=0,this.isTransitioning=!0)}}])&&Fe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function Ne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ne(Object(r),!0).forEach((function(t){ze(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ne(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Le(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ge(n.key),n)}}function Me(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Me=function(){return!!e})()}function Xe(e){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Xe(e)}function We(e,t){return We=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},We(e,t)}function ze(e,t,r){return(t=Ge(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ge(e){var t=function(e){if("object"!=Ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=Ce(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ce(t)?t:t+""}var He=new WeakMap,Ye=function(){function e(t,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),ze(n=function(e,t,r){return t=Xe(t),function(e,t){if(t&&("object"==Ce(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Me()?Reflect.construct(t,r||[],Xe(e).constructor):t.apply(e,r))}(this,e,[t]),"renderData",null),ze(n,"options",void 0),ze(n,"fadeData",void 0),ze(n,"defaults",P),ze(n,"initialized",!1),function(e,t,r){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,r)}(n,He,(0,w.debounce)(se,{this:n})),Object.defineProperties(n,{defaults:{value:n.defaults,writable:!1,enumerable:!1,configurable:!1}}),n.options=new Oe(Be(Be({},n.defaults),r)),n.renderData=new Z(t,n.reloadBackground,n),n.fadeData=new Ue(n),(0,p.isFalse)(n.initState)||(0,p.isNull)(t.parentElement)||(0,p.isNull)(n.config)||(0,p.isNull)(n.gl)?n.initState=!1:(function(e){var t=e.parentElement;e.width=t.clientWidth,e.height=t.clientHeight,(0,s.setStyle)(e,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(t),Reflect.apply(le,n,[])),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&We(e,t)}(e,R),t=e,r=[{key:"raindropsFall",value:function(){var e=this.renderData,t=this.options,r=this.fadeData;if(!(0,p.isNull)(e)){var n=r.backgroundInfo,i=e.lastRaindropsFallTime,o=t.raindropsTimeInterval,a=t.dropRadius,u=Date.now();if(!(u-i<o)){e.lastRaindropsFallTime=u;var l=function(e){return(0,w.getRandomInt)(e)},s=n.width,f=n.height;this.drop(l(s),l(f),a,.03)}}}},{key:"drop",value:function(e,t,r,n){Reflect.apply(pe,this,[e,t,r,n])}},{key:"fade",value:function(){Reflect.apply(ke,this,[])}},{key:"reloadBackground",value:function(){var e,t;(e=He,t=this,e.get(function(e,t,r){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:r;throw new TypeError("Private element is not present on this object")}(e,t))).call(this)}},{key:"destroy",value:function(){Reflect.apply(ce,this,[])}},{key:"show",value:function(){this.options.visible=!0,this.canvas.style.visibility="visible",Reflect.apply(X,this,[])}},{key:"hide",value:function(){this.options.visible=!1,this.canvas.style.visibility="hidden",Reflect.apply(fe,this,[])}},{key:"pause",value:function(){this.options.running=!1}},{key:"play",value:function(){this.options.running=!0}},{key:"changePlayingState",value:function(){var e=this.options;e.running=!e.running}},{key:"set",value:function(e,t){"imageUrl"===e?(this.options.imageUrl=t,Reflect.apply(M,this,[])):this.options[e]=t}}],r&&Le(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}();function qe(e,t){var r=(0,l.useRef)(null);return(0,l.useEffect)((function(){if(!(0,p.isNull)(e.current))return r.current=new Ye(e.current,t&&t.option),function(){var e,t;return null!==(e=null===(t=r.current)||void 0===t?void 0:t.destroy())&&void 0!==e?e:void 0}}),[]),r}const Ze=u.n;export{Ze as useRipples};
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e={953:e=>{e.exports=require("react")}},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var u=r[o]={exports:{}};return e[o](u,u.exports,t),u.exports}t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};t.r(o),t.d(o,{useTimeId:()=>u});var n=t(953);function u(){var e=(0,n.useRef)(void 0);return(0,n.useEffect)((function(){return function(){e.current&&clearTimeout(e.current)}}),[]),e}module.exports.earthnut=o})();
@@ -0,0 +1 @@
1
+ import*as e from"react";var r={649:(r,t,o)=>{var n,u;r.exports=(n={useEffect:()=>e.useEffect,useRef:()=>e.useRef},u={},o.d(u,n),u)}},t={};function o(e){var n=t[e];if(void 0!==n)return n.exports;var u=t[e]={exports:{}};return r[e](u,u.exports,o),u.exports}o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r);var n={};o.d(n,{O:()=>f});var u=o(649);function f(){var e=(0,u.useRef)(void 0);return(0,u.useEffect)((function(){return function(){e.current&&clearTimeout(e.current)}}),[]),e}const s=n.O;export{s as useTimeId};
package/index.js DELETED
@@ -1 +0,0 @@
1
- console.log("hello ,iggg!");