enr 0.2.3-alpha.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.
- package/209.mjs +10 -0
- package/209.mjs.map +1 -0
- package/LICENSE +25 -0
- package/README.md +139 -0
- package/client.mjs +10 -0
- package/components/ThemeContext/index.d.ts +11 -0
- package/components/ThemeContext/types.d.ts +26 -0
- package/components/button/button.d.ts +10 -0
- package/components/button/index.d.ts +9 -0
- package/components/image/index.d.ts +11 -0
- package/components/image/types.d.ts +13 -0
- package/components/image/useSrcChange.d.ts +11 -0
- package/components/layout/content.d.ts +17 -0
- package/components/layout/footer.d.ts +21 -0
- package/components/layout/get-value.d.ts +10 -0
- package/components/layout/header.d.ts +23 -0
- package/components/layout/index.d.ts +8 -0
- package/components/layout/is-fragment.d.ts +9 -0
- package/components/layout/layout.d.ts +55 -0
- package/components/layout/sidebar.d.ts +29 -0
- package/components/layout/types.d.ts +99 -0
- package/components/marquee/MarqueeEle.d.ts +15 -0
- package/components/marquee/index.d.ts +7 -0
- package/components/marquee/type.d.ts +9 -0
- package/components/menu/index.d.ts +6 -0
- package/components/menu/menu.d.ts +6 -0
- package/components/ripples/Content.d.ts +8 -0
- package/components/ripples/LazyRippleEle.d.ts +42 -0
- package/components/ripples/RipplesEle.d.ts +42 -0
- package/components/ripples/index.d.ts +11 -0
- package/components/ripples/types.d.ts +17 -0
- package/components/ripples/useOptionUpdate.d.ts +12 -0
- package/components/shared/EnLayoutContent/index.d.ts +19 -0
- package/components/shared/EnLayoutContent/types.d.ts +17 -0
- package/components/switch/SwitchContainer.d.ts +7 -0
- package/components/switch/SwitchContent.d.ts +10 -0
- package/components/switch/SwitchLabel.d.ts +9 -0
- package/components/switch/index.d.ts +14 -0
- package/customHooks/use-xcn/index.d.ts +14 -0
- package/customHooks/useAnimationFrame.d.ts +58 -0
- package/customHooks/useInputIsComposing.d.ts +44 -0
- package/customHooks/useRipples/buildBackground/create-background-color.d.ts +9 -0
- package/customHooks/useRipples/buildBackground/create-linear-gradient.d.ts +9 -0
- package/customHooks/useRipples/buildBackground/default-background/_createImageData.d.ts +13 -0
- package/customHooks/useRipples/buildBackground/default-background/circleDataList.d.ts +24 -0
- package/customHooks/useRipples/buildBackground/default-background/createCanvasElementBySize.d.ts +8 -0
- package/customHooks/useRipples/buildBackground/default-background/createDefault.d.ts +8 -0
- package/customHooks/useRipples/buildBackground/default-background/index.d.ts +18 -0
- package/customHooks/useRipples/buildBackground/load-image.d.ts +19 -0
- package/customHooks/useRipples/buildBackground/run-side.d.ts +15 -0
- package/customHooks/useRipples/buildBackground/type.d.ts +37 -0
- package/customHooks/useRipples/buildBackground/utils/bind-image.d.ts +10 -0
- package/customHooks/useRipples/buildBackground/utils/create-canvas-element.d.ts +9 -0
- package/customHooks/useRipples/buildBackground/utils/create-image-by-src.d.ts +8 -0
- package/customHooks/useRipples/buildBackground/utils/get-background-style.d.ts +9 -0
- package/customHooks/useRipples/buildBackground/utils/hide-css-background.d.ts +16 -0
- package/customHooks/useRipples/buildBackground/utils/restore-css-background.d.ts +13 -0
- package/customHooks/useRipples/callback/can-side.d.ts +14 -0
- package/customHooks/useRipples/callback/destroy.d.ts +9 -0
- package/customHooks/useRipples/callback/drop.d.ts +9 -0
- package/customHooks/useRipples/callback/extract-url.d.ts +8 -0
- package/customHooks/useRipples/callback/fade.d.ts +9 -0
- package/customHooks/useRipples/callback/get-new-image.d.ts +14 -0
- package/customHooks/useRipples/callback/reload-background.d.ts +12 -0
- package/customHooks/useRipples/callback/scale.d.ts +8 -0
- package/customHooks/useRipples/index.d.ts +45 -0
- package/customHooks/useRipples/init/index.d.ts +11 -0
- package/customHooks/useRipples/init/initEvent.d.ts +11 -0
- package/customHooks/useRipples/init/initShaders.d.ts +13 -0
- package/customHooks/useRipples/init/initTexture.d.ts +13 -0
- package/customHooks/useRipples/render/computeTextureBoundaries.d.ts +9 -0
- package/customHooks/useRipples/render/draw.d.ts +13 -0
- package/customHooks/useRipples/render/drawQuad.d.ts +13 -0
- package/customHooks/useRipples/render/dropAtPointer.d.ts +13 -0
- package/customHooks/useRipples/render/index.d.ts +12 -0
- package/customHooks/useRipples/render/swapBufferIndices.d.ts +11 -0
- package/customHooks/useRipples/render/update.d.ts +11 -0
- package/customHooks/useRipples/rippersData/defaultData.d.ts +11 -0
- package/customHooks/useRipples/rippersData/fadeData.d.ts +51 -0
- package/customHooks/useRipples/rippersData/index.d.ts +46 -0
- package/customHooks/useRipples/rippersData/loadConfig.d.ts +25 -0
- package/customHooks/useRipples/rippersData/renderData.d.ts +80 -0
- package/customHooks/useRipples/rippersData/useOptions.d.ts +91 -0
- package/customHooks/useRipples/rippersData/vertexSource.d.ts +34 -0
- package/customHooks/useRipples/ripple.html.d.ts +12 -0
- package/customHooks/useRipples/ripplesClass.d.ts +57 -0
- package/customHooks/useRipples/tools.d.ts +37 -0
- package/customHooks/useRipples/types.d.ts +209 -0
- package/customHooks/useRipples/use-lazy-ripple.d.ts +15 -0
- package/customHooks/useTimeId.d.ts +50 -0
- package/index.client.d.ts +20 -0
- package/index.d.ts +8 -0
- package/index.mjs +3 -0
- package/index.server.d.ts +8 -0
- package/layoutUtil.mjs +10 -0
- package/layoutUtil.mjs.map +1 -0
- package/package.json +82 -0
- package/server.mjs +8 -0
- package/server.mjs.map +1 -0
- package/storage/main-logic .d.ts +26 -0
- package/storage/storage-store.d.ts +14 -0
- package/styles/common.css +1012 -0
- package/styles/common.scss +453 -0
- package/styles/reset.scss +93 -0
- package/styles/respond.scss +54 -0
- package/styles/root.scss +212 -0
- package/styles/vars-color.scss +247 -0
- package/utilities/cookie.d.ts +28 -0
- package/utilities/sys.d.ts +41 -0
package/209.mjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* earthnut@209.mjs
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
"use client";
|
|
9
|
+
export const __webpack_esm_id__=209;export const __webpack_esm_ids__=[209];export const __webpack_esm_modules__={209:(e,t,r)=>{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 o(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,i(n.key),n)}}function i(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+""}r.d(t,{H:()=>a});var a=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(){}}])&&o(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}())({name:"earthnut",type:!1})}};
|
|
10
|
+
//# sourceMappingURL=209.mjs.map
|
package/209.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"209.mjs","mappings":"kzBACO,ICCMA,EAAM,IDDH,WAmBb,O,EAjBD,SAAAC,K,4FAAcC,CAAA,KAAAD,GACZ,IAAME,EAAO,WAAO,EAepB,OAbAC,OAAOC,eAAeF,EAAMG,MAE5BF,OAAOG,iBAAiBJ,EAAM,CAC5BK,KAAM,CAAEC,MAAO,WAAO,EAAGC,cAAc,EAAOC,UAAU,GACxDC,KAAM,CAAEH,MAAO,WAAO,EAAGC,cAAc,EAAOC,UAAU,GACxDE,MAAO,CAAEJ,MAAO,WAAO,EAAGC,cAAc,EAAOC,UAAU,GACzDG,KAAM,CACJL,OAAO,EACPC,cAAc,EACdC,UAAU,KAIPR,CACT,G,EAAC,EAAAY,IAAA,QAAAN,MACD,WAAS,M,6EAAC,CApBI,GCCG,CAAQ,CACzBO,KAAM,WACNF,MAAM,G","sources":["webpack://earthnut/./mocks/log.ts","webpack://earthnut/./dog.ts"],"sourcesContent":["/** 模拟类,用于打包用 */\nexport class Dog {\n /** 模拟类的构建 */\n constructor() {\n const _dev = () => {};\n\n Object.setPrototypeOf(_dev, this);\n\n Object.defineProperties(_dev, {\n info: { value: () => {}, configurable: false, writable: false },\n warn: { value: () => {}, configurable: false, writable: false },\n error: { value: () => {}, configurable: false, writable: false },\n type: {\n value: false,\n configurable: false,\n writable: false,\n },\n });\n\n return _dev as unknown as Dog;\n }\n clear() {}\n}\n","import { Dog } from '@qqi/log';\n/** 开发环境执行,该方法在 env === 'production' 时通过 babel 和 webpack 过滤移除 */\nexport const dog = new Dog({\n name: 'earthnut',\n type: false,\n});\n"],"names":["dog","Dog","_classCallCheck","_dev","Object","setPrototypeOf","this","defineProperties","info","value","configurable","writable","warn","error","type","key","name"],"sourceRoot":""}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) <2025> <earthnut.dev>
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
16
|
+
|
|
17
|
+
# MIT 许可证
|
|
18
|
+
|
|
19
|
+
版权所有 (c) [2025] [花生亻]
|
|
20
|
+
|
|
21
|
+
特此免费授予任何获得本软件及相关文档文件(以下简称“软件”)副本的人不受限制地处置该软件的权利,包括不受限制地使用、复制、修改、合并、发布、分发、再许可和/或出售该软件副本的权利,并允许向其提供该软件的人这样做,但须遵守以下条件:
|
|
22
|
+
|
|
23
|
+
上述版权声明和本许可声明应包含在所有副本或软件的重要部分中。
|
|
24
|
+
|
|
25
|
+
软件按“原样”提供,不附带任何形式的明示或暗示的保证,包括但不限于适销性、特定用途适用性和不侵权的保证。在任何情况下,作者或版权持有人均不对因合同、侵权或其他方式引起的任何索赔、损害或其他责任负责,无论是在与软件或软件的使用或其他交易有关的任何诉讼中。
|
package/README.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# 花生亻 ui
|
|
2
|
+
|
|
3
|
+
嗯,姑且称之为 ui 吧
|
|
4
|
+
|
|
5
|
+
## 安装
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install --save earthnut
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 文档
|
|
12
|
+
|
|
13
|
+
参阅 [earthnut](https://earthnut.dev/quickUse/)
|
|
14
|
+
|
|
15
|
+
## 涟漪背景
|
|
16
|
+
|
|
17
|
+
由于当前组件的开发进度较缓慢,目前:
|
|
18
|
+
|
|
19
|
+
- 尽管接受所有的 style 属性,但是 `position` 还是期待是非 'static' 值,否则将影响涟漪背景的渲染位置和显示状态;
|
|
20
|
+
- 当前如果设置了 `background` 的话,有可能在恢复时使得其覆盖其他子属性;
|
|
21
|
+
- 当前期待使用 `background-color` 设置背景色,而不是在上面的 `background` 中设置背景色。譬如:`background-color: #f0f6;`
|
|
22
|
+
- 当前更期待使用配置参数 `option` 的 'imgUrl' 来配置目标背景图(请注意图源的跨域问题)。譬如:`imgUrl: 'background.png'`
|
|
23
|
+
- 当然,也可以使用标准的 `background-image` 配置符合要求的背景图片(目前仅支持单张图配置)。譬如:`background-image: url(background.png);`
|
|
24
|
+
- 当前可配置 `background-image` 为渐变色,但仅支持从上到下的线性渐变(仅支持单渐变)。譬如: `background-image: linear-gradient(black, transparent);`
|
|
25
|
+
- 在同时配置了 `imgUrl`、`background-image`、`background-color` 时仅会显示一个效果(混合效果暂时并未实现)。优先展示 `imgUrl`,然后是 `background-image`,之后是 `background-color` 。如果都未设置则会展示默认的老式地板砖背景图
|
|
26
|
+
- 尽量不要是使用透明色或是当前的主背景色,否则导致涟漪的效果不明显
|
|
27
|
+
|
|
28
|
+
切换背景最好不好通过设置
|
|
29
|
+
|
|
30
|
+
## 自定义钩子
|
|
31
|
+
|
|
32
|
+
几个简单的自定义钩子,写着玩
|
|
33
|
+
|
|
34
|
+
### useTimeId
|
|
35
|
+
|
|
36
|
+
就是 `useRef` 和 `useEffect` 的简单使用。
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import { useTimeId } from "earthnut";
|
|
40
|
+
|
|
41
|
+
export function Home() {
|
|
42
|
+
const timeId = useTimeId();
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<>
|
|
46
|
+
<button
|
|
47
|
+
onclick={() => {
|
|
48
|
+
timeId.current = setTimeout(
|
|
49
|
+
() => console.log("没有感情的按钮 A 打印了一条没有感情的消息"),
|
|
50
|
+
2500
|
|
51
|
+
);
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
没有感情的按钮 A
|
|
55
|
+
</button>
|
|
56
|
+
<button onclick={() => clearTimeout(timeId.current)}>
|
|
57
|
+
没有感情的按钮 B
|
|
58
|
+
</button>
|
|
59
|
+
</>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### useAnimationFrame
|
|
65
|
+
|
|
66
|
+
使用下一帧动画。
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
import { useAnimationFrame } from 'earthnut';
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## scss 样式
|
|
73
|
+
|
|
74
|
+
导出了一个 `common.css` 作为样式使用,还可以引用其中的 `scss` 文件使用其中的函数。
|
|
75
|
+
|
|
76
|
+
如果使用 `common.css` 建议仅在跟下进行导入即可,避免在
|
|
77
|
+
|
|
78
|
+
在使用 `webpack` 的应用中可以这样引入
|
|
79
|
+
|
|
80
|
+
```javascript
|
|
81
|
+
// webpack.config.js
|
|
82
|
+
module.exports = {
|
|
83
|
+
module: {
|
|
84
|
+
rules: [
|
|
85
|
+
{
|
|
86
|
+
test: /\.scss$/,
|
|
87
|
+
use: [
|
|
88
|
+
'style-loader',
|
|
89
|
+
'css-loader',
|
|
90
|
+
{
|
|
91
|
+
loader: 'sass-loader',
|
|
92
|
+
options: {
|
|
93
|
+
sassOptions: {
|
|
94
|
+
includePaths: [path.resolve(__dirname, 'node_modules/ui-library-a/src/scss')], // UI 库 SCSS 路径
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
在使用 `vite` 的应用中可以这样引入
|
|
106
|
+
|
|
107
|
+
```js
|
|
108
|
+
// vite.config.js
|
|
109
|
+
import { defineConfig } from 'vite';
|
|
110
|
+
import path from 'path';
|
|
111
|
+
|
|
112
|
+
export default defineConfig({
|
|
113
|
+
css: {
|
|
114
|
+
preprocessorOptions: {
|
|
115
|
+
scss: {
|
|
116
|
+
additionalData: `@use "${path.resolve(
|
|
117
|
+
__dirname,
|
|
118
|
+
'node_modules/ui-library-a/src/scss',
|
|
119
|
+
)}" as lib;`,
|
|
120
|
+
includePaths: [path.resolve(__dirname, 'node_modules/ui-library-a/src/scss')],
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
为了防止意外覆盖别人的自定义 css 属性,该样式皆以 `en-` 为前缀。譬如:
|
|
128
|
+
|
|
129
|
+
```tsx
|
|
130
|
+
import { xcn } from 'earthnut';
|
|
131
|
+
|
|
132
|
+
export function Home() {
|
|
133
|
+
return (
|
|
134
|
+
<div>
|
|
135
|
+
<p className={xcn('en-text-in=one-line')}>无论我字数多少,仅会会在同一行就行打印。</p>
|
|
136
|
+
</div>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
```
|
package/client.mjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* earthnut@client.mjs
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
"use client";
|
|
9
|
+
import{createContext as e,forwardRef as t,useCallback as r,useContext as n,useEffect as i,useImperativeHandle as o,useRef as a,useState as l}from"react";import{css as u,styled as c}from"styled-components";import{xcn as s}from"xcn";import*as f from"a-type-of-js";import{setStyle as p}from"a-element-inline-style";import{debounce as d,enArr as h,getRandomInt as m,getRandomString as y}from"a-js-tools";var g,v={98:(f,p,d)=>{d.d(p,{z_:()=>U,Z$:()=>ee,OT:()=>_e,_V:()=>ee,H$:()=>z,dO:()=>_e,rQ:()=>Ee,NR:()=>G,G6:()=>we,t3:()=>$,DZ:()=>v,nC:()=>E,Oe:()=>W});var h=d(362),m=d(209);function y(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(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)?g(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(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}function v(e,t){var r=a(null),n=a(!0),o=a(!1),u=y(l(!1),2),c=u[0],s=u[1],f=y(l(null),2),p=f[0],g=f[1];function v(){n.current=!0,m.H.warn("卸载"),setTimeout(function(){var e;n.current&&(m.H.warn("执行了卸载"),null===(e=r.current)||void 0===e||e.destroy())},0)}return i(function(){return n.current=!1,(0,h.isNull)(e.current)||o.current?(m.H.type=!0,m.H.warn("不执行初始化,因为初始化已经在执行了 ",e.current,o.current),v):(m.H.warn("执行了加载"),s(!0),o.current=!0,Promise.resolve().then(d.bind(d,791)).then(function(i){(0,h.isNull)(e.current)||n.current?(0,m.H)("当前状态值不准确,执行"):(m.H.warn("加载了该项异步,并初始化了值"),r.current=new i.Ripples(e.current,t))}).catch(function(e){g(e)}).finally(function(){s(!1)}),v)},[]),{ripples:r,isLoading:c,error:p}}var b,w=d(791);function E(e,t){var r=a(null);return i(function(){if(!(0,h.isNull)(e.current))return r.current=new w.Ripples(e.current,t),function(){var e;return null===(e=r.current)||void 0===e?void 0:e.destroy()}},[]),r}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 R(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}function S(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 k(e,t,r){return(t=function(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+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T(e,t){var r=a(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?S(Object(r),!0).forEach(function(t){k(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},t));i(function(){m.H.type=!0,t&&e.current&&Object.keys(e.current.defaults).forEach(function(n){var i,o,a,l=t[n],u=(i=l,o=r.current[n],(0,h.isArray)(i)&&(0,h.isArray)(o)&&(i.length!==o.length||!i.every(function(e){return i[e]===o[e]}))||(!(0,h.isArray)(i)||!(0,h.isArray)(o))&&i!==o);e.current&&u&&((0,m.H)("设置值",n,l),r.current[n]=(0,h.isArray)(l)?function(e){if(Array.isArray(e))return R(e)}(a=l)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(a)||function(e,t){if(e){if("string"==typeof e)return R(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)?R(e,t):void 0}}(a)||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.")}():t[n],e.current.set(n,l)),m.H.type=!0})},[t])}var P,A,j=c.div(b||(P=["\n position: relative;\n top: 0px;\n left: 0px;\n z-index: 1;\n width: 100%;\n height: 100%;\n min-width: 1px;\n min-height: 1px;\n contain: layout paint style;\n will-change: transform, opacity;\n"],A||(A=P.slice(0)),b=Object.freeze(Object.defineProperties(P,{raw:{value:Object.freeze(A)}}))));function x(e){return x="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},x(e)}var I=["children","style","option"];function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D.apply(null,arguments)}function _(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 H(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach(function(t){F(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function F(e,t,r){return(t=function(e){var t=function(e){if("object"!=x(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==x(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var U=t(function(e,t){var r=e.children,n=e.style,i=e.option,l=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,I),u=a(null),c=E(u,i);return T(c,i),o(t,function(){return{toggleState:function(){var e;null===(e=c.current)||void 0===e||e.changePlayingState()},get state(){var e,t;return null!==(e=null===(t=c.current)||void 0===t?void 0:t.options.playingState)&&void 0!==e&&e},pause:function(){var e;null===(e=c.current)||void 0===e||e.pause()},set:function(e){if(!(0,h.isUndefined)(e))for(var t=Object.keys(e),r=0,n=t.length;r<n;r++){var i,o=t[r];null===(i=c.current)||void 0===i||i.set(o,e[o])}}}}),React.createElement(j,D({style:H({backgroundRepeat:"round"},n)},l),React.createElement("canvas",{ref:u,"data-earthnut-ui":"canvas",width:0,height:0}),r)});function C(e){return C="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},C(e)}U.displayName="en-background-ripple";var N=["children","style","option"];function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},B.apply(null,arguments)}function M(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 L(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach(function(t){X(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function X(e,t,r){return(t=function(e){var t=function(e){if("object"!=C(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=C(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==C(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var z=t(function(e,t){var r=e.children,n=e.style,i=e.option,l=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,N),u=a(null),c=v(u,i).ripples;return T(c,i),o(t,function(){return{toggleState:function(){var e;null===(e=c.current)||void 0===e||e.changePlayingState()},get state(){var e,t;return null!==(e=null===(t=c.current)||void 0===t?void 0:t.options.playingState)&&void 0!==e&&e},pause:function(){var e;null===(e=c.current)||void 0===e||e.pause()},set:function(e){if(!(0,h.isUndefined)(e))for(var t=Object.keys(e),r=0,n=t.length;r<n;r++){var i,o=t[r];null===(i=c.current)||void 0===i||i.set(o,e[o])}}}}),React.createElement(j,B({style:L({backgroundRepeat:"round"},n)},l),React.createElement("canvas",{ref:u,"data-earthnut-ui":"canvas",width:0,height:0}),r)});function W(){var e=a(void 0);return i(function(){return function(){return e.current&&clearTimeout(e.current)}},[]),e}function G(e){var t,n,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];o=(0,h.isBoolean)(o)?{immediately:o,once:!1}:(0,h.isPlainObject)(o)?{once:!!(0,h.isBoolean)(o.once)&&o.once,immediately:!!(0,h.isBoolean)(o.immediately)&&o.immediately}:{immediately:!1,once:!1};var l=a({id:0,immediately:null===(t=o.immediately)||void 0===t||t,once:null!==(n=o.once)&&void 0!==n&&n,noun:!1,time:0,cancelTime:0,firstRunEffect:!0,isUnmounted:!0,result:{cancel:function(){var e=l.current.id;(0,m.H)("执行取消"),e&&window.cancelAnimationFrame(e),l.current.result.canceled=!0},canceled:!1,render:function(){var e=l.current,t=e.result;e.cancelTime=performance.now(),t.cancel(),t.canceled=!1,e.id=window.requestAnimationFrame(c)}}}),u=l.current,c=r(function(t){var r=u.result,n=t-u.cancelTime;u.time+=n<0?16.7:n,e(t,u.time),u.once||r.render()},[e]);return u.immediately&&!u.noun&&u.result.canceled&&((0,m.H)("重复执行"),u.noun=!0,u.result.render()),i(function(){(0,m.H)("回调更替","此时的是否为第一次执行状态为",u.firstRunEffect,"当前取消执行状态",u.result.canceled),u.once||(u.firstRunEffect?(u.result.render(),u.firstRunEffect=!1,(0,m.H)("第一次执行",",执行后状态",u.result.canceled)):u.firstRunEffect||u.result.canceled||(u.result.render(),(0,m.H)("非首次执行",",执行后状态",u.result.canceled)))},[e]),i(function(){return(0,m.H)("执行"),u.isUnmounted=!1,function(){u.isUnmounted=!0,setTimeout(function(){m.H.warn("退出执行取消"),u.isUnmounted&&u.result.cancel()},0)}},[]),u.result}function $(e){var t=a(!1);return i(function(){var r=e.current;if(r){var n=function(){return t.current=!0},i=function(){return t.current=!1};return r.addEventListener("compositionstart",n),r.addEventListener("compositionend",i),function(){r.removeEventListener("compositionstart",n),r.removeEventListener("compositionend",i)}}},[]),t}z.displayName="en-lazy-background-ripple";const Y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAMAAACeL25MAAAACVBMVEUAAAD///////9zeKVjAAAAA3RSTlP//wDXyg1BAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAEElEQVQImWNkYmBgYGJAIQAAigAKNDhFkwAAAABJRU5ErkJggg==";function q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return V(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)?V(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(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}var J,Z=["loadingSrc","className","src"];function Q(){return Q=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Q.apply(null,arguments)}var K=c.img(J||(J=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n margin: 0;\n padding: 0;\n user-select: none;\n"]))),ee=t(function(e,t){var r=e.loadingSrc,n=void 0===r?Y:r,o=e.className,a=e.src,u=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Z),c=function(e,t){var r=q(l(Y),2),n=r[0],o=r[1],a=q(l(0),2),u=a[0],c=a[1];return i(function(){c(1),(0,h.isString)(e)||(e=Y);var t=new Image;t.onload=function(){c(2),o(e)},t.onerror=function(){o(Y),c(4)},t.src=e,t.crossOrigin="anonymous"},[e,t]),{resultSrc:n,loadComplete:u}}(null!=a?a:n),f=c.resultSrc,p=c.loadComplete;return React.createElement(K,Q({},u,{ref:t,src:f||n,className:s(1===p&&"loading",o)}))});function te(e){var t=localStorage.getItem(e);try{return null!=t&&JSON.parse(t)||""}catch(e){return t||""}}function re(e){return localStorage.removeItem(e)}ee.displayName="en-image";var ne={del:re,set:function(e,t){localStorage.setItem(e,JSON.stringify(t))},get:te,getAndDel:function(e){var t=te(e);return re(e),t},clear:function(){localStorage.clear()},setSession:function(e,t){sessionStorage.setItem(e,JSON.stringify(t))},getSession:function(e){var t=sessionStorage.getItem(e);return null!=t&&JSON.parse(t)||""},delSession:function(e){return sessionStorage.removeItem(e)}},ie={get theme(){return ne.get("theme")},set theme(e){["light","dark"].includes(e)?ne.set("theme",e):(0,h.isBusinessEmptyString)(e)&&ne.del("theme")},get token(){return ne.get("token")},set token(e){(0,h.isString)(e)&&!(0,h.isBusinessEmptyString)(e)&&ne.set("token",e)}},oe={getItem:function(e){return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[-.+*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},setItem:function(e){var t=e.keyItem,r=e.value,n=e.end,i=e.path,o=e.domain,a=e.secure;if(!t||/^(?:expires|max-age|path|domain|secure)$/i.test(t))return!1;var l="";switch((0,h.typeOf)(n)){case"undefined":l="; expires=Fri, 31 Dec 9999 23:59:59 GMT";break;case"number":l=n===1/0?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+n;break;case"string":l="; expires="+n;break;case"date":l="; expires="+n.toUTCString()}return document.cookie=encodeURIComponent(t).concat("=").concat(encodeURIComponent(r)).concat(l).concat(o?"; domain=".concat(o):"").concat(i?"; path=".concat(i):"").concat(a?"; secure":""),!0},deleteItem:function(e,t,r){if(!e||!this.exist(e))return!1;document.cookie=encodeURIComponent(e).concat("=; expires=Thu, 01 Jan 1970 00:00:00 GMT").concat(r?"; domain=".concat(r):"").concat(t?"; path=".concat(t):"")},exist:function(e){return new RegExp("(?:^|;\\s*)"+encodeURIComponent(e).replace(/[-.+*]/g,"\\$&")+"\\s*\\=").test(e)},keys:function(){for(var e=document.cookie.replace(/((?:^|\s*;)[^=]+)(?=;|$)|^\s*|\s*(?:=[^;]*)?(?:1|$)/g,"").split(/\s*(?:=[^;]*)?;\s*/),t=0;t<e.length;t++)e[t]=decodeURIComponent(e[t]);return e}};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 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,ue(n.key),n)}}function ue(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+""}function ce(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 se=new WeakSet,fe=function(){return function(e,t){return t&&le(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}(function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}(this,se)},[{key:"vibrate",value:function(){var e;null!==(e=window)&&void 0!==e&&null!==(e=e.navigator)&&void 0!==e&&e.vibrate&&window.navigator.vibrate(200)}},{key:"share",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"https://letmiseesee.pages.dev",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"慧土灵核";null!==(e=window)&&void 0!==e&&null!==(e=e.navigator)&&void 0!==e&&e.share&&window.navigator.share({url:t,text:r,title:n})}},{key:"isPhone",value:function(){var e;return!ce(se,this,pe).call(this,"any-hover: hover")&&!ce(se,this,pe).call(this,"any-pointer: fine")&&(null===(e=window)||void 0===e||null===(e=e.navigator)||void 0===e?void 0:e.maxTouchPoints)>0}},{key:"isSmallScreen",get:function(){return ce(se,this,pe).call(this,"max-width: 576px")?"small":ce(se,this,pe).call(this,"max-width: 996px")?"middle":"large"}},{key:"isDark",get:function(){return ce(se,this,pe).call(this,"prefers-color-scheme: dark")}},{key:"isOrientation",get:function(){var e=(screen.orientation||{}).type||screen.mozOrientation||screen.msOrientation;return"landscape-primary"!==e&&"landscape-secondary"!==e}}])}();function pe(e){var t,r;return null!==(t=null===(r=window)||void 0===r?void 0:r.matchMedia(/:/.test(e)&&!/\(|\)/.test(e)?"(".concat(e,")"):e).matches)&&void 0!==t&&t}var de=new fe;function he(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,l=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return me(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)?me(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function me(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}var ye,ge,ve,be=e({autoColorMode:!0,colorMode:"light",toggleColorMode:function(){return"light"},setColorMode:function(){return"light"},clearColorMode:function(){}});function we(){return n(be)}function Ee(e){var t=e.children,r=e.initialTheme,n=he(l(r),2),o=n[0],a=n[1],u=he(l(!0),2),c=u[0],s=u[1],f=function(e){return e===o||["light","dark"].indexOf(e)<0?o:(a(e),ie.theme=e,e)};return i(function(){var e=ie.theme;s(!e);var t=de.isDark;e?f(e):a(t?"dark":"light")},[]),i(function(){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=function(e){return!ie.theme&&a(e.matches?"dark":"light")};return e.addEventListener("change",t),function(){return e.removeEventListener("change",t)}},[]),i(function(){oe.setItem({keyItem:"theme",value:o}),window.document.documentElement.setAttribute("data-theme",o),s(!ie.theme)},[o]),React.createElement(be.Provider,{value:{colorMode:o,toggleColorMode:function(){return f("light"===o?"dark":"light")},setColorMode:f,clearColorMode:function(){s(!0),a(de.isDark?"dark":"light"),ie.theme=""},autoColorMode:c}},t)}function Oe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Re,Se,ke,Te,Pe=c.div(ye||(ye=Oe(["\n cursor: pointer;\n position: relative;\n top: 0px;\n left: 0px;\n color: #000;\n display: inline-block;\n width: 54px;\n height: 27px;\n margin: 0;\n padding: 0;\n vertical-align: text-bottom;\n background-color: transparent;\n background-image:\n linear-gradient(to right, rgb(90, 90, 90), rgba(70, 120, 240)),\n radial-gradient(\n circle closest-corner at 100% 50%,\n rgb(90, 90, 90),\n rgb(90, 90, 90) 100%,\n transparent 100%\n ),\n radial-gradient(\n circle closest-corner at 0% 50%,\n rgba(70, 120, 240),\n rgba(70, 120, 240) 100%,\n transparent 100%\n );\n background-size:\n 40% 50%,\n 20% 50%,\n 20% 50%;\n background-position:\n 50% 50%,\n 13.25% 50%,\n 85% 50%;\n background-repeat: no-repeat;\n overflow: hidden;\n\n &::before {\n content: '';\n position: absolute;\n top: 10%;\n width: 40%;\n height: 80%;\n text-align: center;\n line-height: 1.3;\n font-size: 40%;\n border-radius: 50%;\n transition: all 1s;\n ","\n }\n"])),function(e){return"left"===e.$type&&u(ge||(ge=Oe(["\n left: 15%;\n background-color: rgb(120, 120, 120);\n "])))||u(ve||(ve=Oe(["\n left: 45%;\n background-color: rgba(35, 70, 247, 1);\n "])))}),Ae=c.div(Re||(Re=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n display: inline-block;\n padding: 4px 12px;\n"])));function je(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var xe=c.div(Se||(Se=je(["\n display: inline-block;\n vertical-align: super;\n transition: color 1.28s;\n ","\n"])),function(e){return!0===e.$type&&u(ke||(ke=je(["\n color: rgb(55,80,210);\n font-weight: 800;\n "])))||u(Te||(Te=je(["\n color: #666;\n "])))}),Ie=["value","change","children"];function De(){return De=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},De.apply(null,arguments)}function _e(e){var t=e.value,r=e.change,n=e.children,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Ie);return React.createElement(Ae,null,n&&React.createElement(xe,{$type:t},n),React.createElement(Pe,De({$type:t?"right":"left",onClick:function(e){e.preventDefault(),e.stopPropagation(),(0,h.isFunction)(r)&&Reflect.apply(r,null,[e])}},i)))}},362:(e,t,r)=>{var n,i;e.exports=(n={isArray:()=>f.isArray,isBoolean:()=>f.isBoolean,isBusinessEmptyString:()=>f.isBusinessEmptyString,isEmptyArray:()=>f.isEmptyArray,isFalse:()=>f.isFalse,isFunction:()=>f.isFunction,isNull:()=>f.isNull,isPlainObject:()=>f.isPlainObject,isString:()=>f.isString,isUndefined:()=>f.isUndefined,isZero:()=>f.isZero,typeOf:()=>f.typeOf},i={},r.d(i,n),i)},791:(e,t,r)=>{r.d(t,{Ripples:()=>Ke}),r.r(t);var n=r(362);function i(e,t,r,i){function o(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 a,l={id:r.createProgram(),uniforms:{},locations:{}};if(r.attachShader(l.id,o(r.VERTEX_SHADER,e)),r.attachShader(l.id,o(r.FRAGMENT_SHADER,t)),r.linkProgram(l.id),!r.getProgramParameter(l.id,r.LINK_STATUS))throw new Error("link error: "+r.getProgramInfoLog(l.id));r.useProgram(l.id),r.enableVertexAttribArray(0);for(var u=e+t,c=/uniform (\w+) (\w+)/g;!(0,n.isNull)(a=c.exec(u));){var s=a[2];l.locations[s]=r.getUniformLocation(l.id,s)}return l}function o(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 a(e){return"rgba(0, 0, 0, 0)"===e||"#ffffffff"===e||"transport"===e}function l(e){return"none"===e||""===e}function u(){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(),l=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,l),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 u=null,c=0;c<i.length;c++)if(r.texImage2D(r.TEXTURE_2D,0,r.RGBA,32,32,0,r.RGBA,i[c].type,null),r.framebufferTexture2D(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,a,0),r.checkFramebufferStatus(r.FRAMEBUFFER)===r.FRAMEBUFFER_COMPLETE){u=i[c];break}return u}function c(e){return c="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},c(e)}function s(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,g(n.key),n)}}function f(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}var v=f(function e(t){var r,i,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=this,o=!0,(i=g(i="initState"))in r?Object.defineProperty(r,i,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[i]=o,this.canvas=t;var a=t.getContext("webgl");if((0,n.isNull)(a))return this.initState=!1,void(this.config=null);this.gl=a,this.config=Reflect.apply(u,this,[])}),b={imgUrl:null,resolution:360,dropRadius:12,perturbance:.01,interactive:!0,crossOrigin:"no-cors",playingState:!0,accelerating:1,raindropsTimeInterval:3600,idleFluctuations:!0,darkMode:void 0};Object.freeze(b);var w,E=r(209);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 R(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,S(n.key),n)}}function S(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 k(e,t,r){return e.set(P(e,t),r),r}function T(e,t){return e.get(P(e,t))}function P(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 A(e){return function(e){if(Array.isArray(e))return j(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 j(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)?j(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 j(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}var x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r={list:[],diameter:48,radius:0,cells:0};r.diameter%2!=0&&r.diameter++;var n=r.diameter,i=r.list,o=n/2;r.radius=o,r.cells=Math.pow(n,2);for(var a=0;a<n;a++){i[a]=[];for(var l=0;l<n;l++)i[a][l]=[0,0,0,0]}(0,E.H)(t);for(var u=0;u<=o;u++)for(var c=function(){var e=i[u][s],r=Math.ceil(Math.sqrt(Math.pow(u,2)+Math.pow(s,2)))<=o,n=t?10:255,a=t?25:190,l=r?t?160:120:t?160:180,c=r?t?230:160:t?250:240,f=function(){return m(n,a)};e[0]=f(),e[1]=f(),e[2]=f(),e[3]=m(l,c)},s=u;s<=o;s++)c();for(var f=0;f<=o;f++)for(var p=0;p<=f;p++)i[f][p]=i[p][f];for(var d=o;d<n;d++)for(var h=0;h<=o;h++)i[d][h]=i[n-d][h];for(var y=0;y<o;y++)for(var g=o;g<n;g++)i[y][g]=i[y][n-g];for(var v=o;v<n;v++)for(var b=o;b<n;b++)i[v][b]=i[v][n-b];var w=e%n;return r.list=[].concat(A(i.slice(w)),A(i.slice(0,w))),r},I=new(w=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,w,1),t=this,r="data",n=x(),(r=S(r))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n},(t=[{key:"build",value:function(e){T(w,this)>100&&k(w,this,0),this.data=x(k(w,this,T(w,this)+4),e)}}])&&R(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());function D(e,t){(0,E.H)("本次构建的宽度为",e,"高度为",t);var r=document.createElement("canvas"),i=document.createElement("canvas"),o=r.getContext("2d"),a=i.getContext("2d");return(0,n.isNull)(o)||(0,n.isNull)(a)?r:(r.width=i.width=e||1,r.height=i.height=t||1,o.clearRect(0,0,e,t),a.clearRect(0,0,e,t),o.globalAlpha=1,o.putImageData(function(e,t){E.H.type=!1,(0,E.H)("构建默认的纹理尺寸:宽 ".concat(e," 高 ").concat(t));var r=Date.now();E.H.warn(E.H.type),(0,E.H)("开始构建默认的时间",r);for(var n=new ImageData(e||1,t||1),i=n.data,o=I.data,a=o.diameter,l=o.list,u=e*a,c=0;c<i.length;c+=4){var s=c/4%u,f=s%e%a,p=Math.floor(s/e),d=l[f][p];i[c]=d[0],i[c+1]=d[1],i[c+2]=d[2],i[c+3]=d[3]}return(0,E.H)("构建结束的时间",Date.now()-r),E.H.type=!0,n}(e,t),0,0),a.fillStyle="#ffffff",a.fillRect(0,0,e,t),a.drawImage(r,0,0,e||1,t||1),a.globalCompositeOperation="source-over",i)}function _(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];E.H.type=!0;var r=this.fadeData,n=this.options,i=r.backgroundInfo,o=r.toBeList,a=i.width,l=i.height,u=y({length:8,includeNumbers:!0,includeUppercaseLetters:!0});I.build(null!==(e=n.darkMode)&&void 0!==e?e:r.isDark),(0,E.H)("添加默认纹理",u),o.push({resource:D(a,l),width:a,height:l,kind:"default",tag:u}),E.H.type=!0,t&&r.run()}function H(e,t){var r,i,o=e.imgUrl;return(0,n.isString)(o)&&o||(r=t.backgroundImage,i=/url\(["']?([^"']*)["']?\)/.exec(r),(0,n.isNull)(i)?null:i[1])}function F(e,t){return(0,n.isArray)(e.imgUrl)&&1===e.imgUrl.length&&e.imgUrl[0]||t.backgroundColor}function U(){E.H.type=!1;var e=this.renderData,t=this.fadeData,r=this.options;if((0,n.isNull)(e))return(0,E.H)("当前尚未获取到渲染数据"),Reflect.apply(_,this,[]);var i=e.originStyle;if(a(i.backgroundColor)&&(!(0,n.isArray)(r.imgUrl)||1!==r.imgUrl.length))return(0,E.H)("当前没有配置背景色"),Reflect.apply(_,this,[]);var o=document.createElement("canvas"),l=o.getContext("2d");if((0,n.isNull)(l))return(0,E.H)("当前未获取到画布的执行上下文"),Reflect.apply(_,this,[]);var u=t.backgroundInfo,c=u.width,s=u.height;o.width=c,o.height=s,l.clearRect(0,0,c,s);var f=F(r,i);l.beginPath(),l.fillStyle=f,l.fillRect(0,0,c,s),l.fill(),t.isTransitioning&&!(0,n.isEmptyArray)(t.toBeList)?t.toBeList=[t.toBeList[0]]:t.toBeList=[];var p={resource:o,kind:"background-color",tag:f,width:c,height:s};t.toBeList.push(p),(0,E.H)("添加了背景色",f,p),t.run(),(0,E.H)("目前有",t.toBeList),E.H.type=!0}function C(){E.H.type=!1;var e=this.fadeData,t=this.renderData,r=this.options;if((0,n.isNull)(t))return(0,E.H)("暂未获取到执行上下文"),Reflect.apply(U,this,[]);var i=t.originStyle;if(!/linear-gradient\(.*\)/.test(i.backgroundImage)&&!(0,n.isArray)(r.imgUrl))return(0,E.H)("当前不符合渐变配置"),Reflect.apply(U,this,[]);var o=(0,n.isArray)(r.imgUrl)&&r.imgUrl.length>1&&r.imgUrl||i.backgroundImage.replace(/^.*linear-gradient\((.*)\).*$/,"$1").split("),").map(function(e){return(e=e.trim()).endsWith(")")||(e+=")"),e}).filter(function(e){return e.startsWith("rgb")||e.startsWith("#")});if(o.length<2)return(0,E.H)("当前获取的渐变色值数量少于 2"),Reflect.apply(U,this,[]);var a=document.createElement("canvas"),l=a.getContext("2d");if((0,n.isNull)(l))return(0,E.H)("未获取执行上下文"),Reflect.apply(U,this,[]);var u=e.backgroundInfo,c=u.width,s=u.height;a.width=c,a.height=s,l.fillStyle="#fff",l.fillRect(0,0,c,s);var f=l.createLinearGradient(0,0,0,s);o.forEach(function(e,t){return f.addColorStop(t/(o.length-1),e)}),l.fillStyle=f,l.fillRect(0,0,c,s),e.isTransitioning&&!(0,n.isEmptyArray)(e.toBeList)?e.toBeList=[e.toBeList[0]]:e.toBeList=[],e.toBeList.push({resource:a,kind:"linear-gradient",tag:o.join("_"),width:c,height:s}),(0,E.H)("添加了渐变背景",o),e.run(),E.H.type=!0}function N(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}function B(){var e=this;E.H.type=!1,E.H.warn("开始下载图片");var t=this.renderData,r=this.options,i=this.fadeData;if((0,n.isNull)(t))return(0,E.H)("执行绘制时没有渲染数据"),void Reflect.apply(C,this,[]);var o=t.lastUseStyle,a=i.backgroundInfo,l=a.width,u=a.height,c=H(r,o);if((0,E.H)("当前获取的图像资源为",c),t.imageSource=c,!c)return E.H.warn("没有原始图像,开始使用空白自绘"),void Reflect.apply(C,this,[]);var s=function(e,t,r){var n=new Image(t,r);return n.width=t,n.height=r,n.src=e,n}(c,l,u);s.onload=function(){var e;clearTimeout(i.transparentId),(0,E.H)("当前下载背景图",c),(0,E.H)("背景图下载完毕",i.toBeList.length),(0,E.H)("当前是否在渐变",i.isTransitioning),i.isTransitioning&&!(0,n.isEmptyArray)(i.toBeList)?i.toBeList=[i.toBeList[0]].concat(function(e){if(Array.isArray(e))return N(e)}(e=i.toBeList.slice(1).filter(function(e){return"image"===e.kind&&(Math.abs(e.width-l)>2||Math.abs(e.height-u)>2||e.tag!==c)}))||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 N(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)?N(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.")}()):i.toBeList=[],i.toBeList.push({resource:s,width:l,height:u,kind:"image",tag:c}),(0,E.H)("添加后的列表长度",i.toBeList),i.run()},s.onerror=function(){E.H.warn("下载图像错误"),Reflect.apply(C,e,[])},s.crossOrigin=r.crossOrigin,E.H.type=!0}function M(){E.H.type=!1;var e=this.renderData;if(!(0,n.isNull)(e)){var t=e.parentElement;t&&((0,E.H)("重写父级的行内样式"),[["background-image","none"],["background-color","transparent"]].forEach(function(e){return t.style.setProperty(e[0],e[1],"important")}),(0,E.H)("重写后的父级的行内背景样式",t.style.background),(0,E.H)("重写后的父级的行内背景色样式",t.style.backgroundColor),(0,E.H)("重写后的父级的行内背景图样式",t.style.backgroundImage),(0,E.H)("暂存的原始样式",e.originStyle),(0,E.H)("暂存的最后获取样式",e.lastUseStyle),E.H.type=!0)}}function L(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,width:parseInt(t.width),height:parseInt(t.height)}}function X(){var e=this.renderData;if(!(0,n.isNull)(e)){var t=e.parentElement,r=e.originStyle;t.style.setProperty("background-image",r.inlineBackgroundImage),t.style.setProperty("background-color",r.inlineBackgroundColor)}}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 W(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 G(e,t,r){return(t=$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $(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 Y=function(){return e=function e(t,r,i){var o,u=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),G(this,"quad",null),G(this,"lastRaindropsFallTime",0),G(this,"imageSource",""),G(this,"textures",[]),G(this,"backgroundTexture",[]),G(this,"framebuffers",[]),G(this,"bufferWriteIndex",0),G(this,"bufferReadIndex",1),G(this,"events",{}),G(this,"animationFrameId",0),this.parentElement=null!==(o=t.parentElement)&&void 0!==o?o:document.body,Reflect.apply(M,i,[]),this.originStyle=this.lastUseStyle=L(this.parentElement),E.H.type=!1,(0,E.H)("初始化时估计元素的尺寸",this.originStyle),this.mutationObserver=new MutationObserver(function(e){E.H.type=!1,e.forEach(function(e){if(e.target===u.parentElement&&"attributes"===e.type&&i.options.visible){(0,E.H)("父级元素的属性变更"),(0,E.H)("当前父级元素",u.parentElement),(0,E.H)("当前属性监听者",u.mutationObserver),(0,E.H)("当前尺寸变化监听者",u.resizeObserver),(0,E.H)("当前执行的环境",u),(0,E.H)("当前执行的上级",i,i.renderData,i.renderData===u);var t=Object.values(u.lastUseStyle),o=L(u.parentElement),c=Object.values(o);if((0,E.H)("当前获取到的实际值,该值可能不作为使用值被储存",o),(0,n.isEmptyArray)(h.difference(t,c)))return void(0,E.H)("新值与旧值相同");var s=l(o.backgroundImage),f=a(o.backgroundColor);if(s&&f)return void(0,E.H)("新值为空");(0,E.H)("由于样式不同触发了真实的事件回调"),u.lastUseStyle=o,Reflect.apply(r,i,[]),Reflect.apply(M,i,[])}}),E.H.type=!0}),this.mutationObserver.observe(this.parentElement,{subtree:!0,attributes:!0,attributeFilter:["class","style"]}),this.resizeObserver=new ResizeObserver(function(e){e.forEach(function(t){t.target===u.parentElement&&((0,E.H)("变化前的尺寸"),(0,E.H)("监听的父级元素发生了尺寸变化",e),Reflect.apply(r,i,[]))})}),this.resizeObserver.observe(this.parentElement)},t=[{key:"destroy",value:function(){if(this.animationFrameId&&window.cancelAnimationFrame(this.animationFrameId),Reflect.apply(X,{renderData:this},[]),this.parentElement&&this.events){E.H.warn("移除监听的事件");try{var e,t,r,n=this.parentElement,i=this.events;Object.keys(i).forEach(function(e){return n.removeEventListener&&n.removeEventListener(e,i[e])}),n.removeAttribute&&n.removeAttribute("data-ripples"),null===(e=this.mutationObserver)||void 0===e||e.takeRecords(),null===(t=this.mutationObserver)||void 0===t||t.disconnect(),this.mutationObserver=null,(0,E.H)(this.mutationObserver),null===(r=this.resizeObserver)||void 0===r||r.disconnect(),this.resizeObserver=null}catch(e){E.H.warn("移除监听者失败",e)}}}}],t&&W(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function q(){E.H.type=!1;var e=this.renderData,t=this.fadeData;if(!(0,n.isNull)(e)){var r,i,o,a=e.parentElement,l=window.getComputedStyle(a),u=l.backgroundSize,c=l.backgroundAttachment,s=l.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],p={left:0,top:0,width:0,height:0};"fixed"===c?(p.height=window.innerHeight,p.left=window.screenX,p.top=window.screenY,p.width=window.innerWidth):(p.left=0,p.top=0,p.width=a.scrollWidth,p.height=a.scrollHeight);var d=t.backgroundInfo||{width:100,height:100},h=d.width,m=d.height;if("cover"===u){var y=Math.max(p.width/h,p.height/m);i=h*y,o=m*y}else if("contain"===u){var g=Math.min(p.width/h,p.height/m);i=h*g,o=m*g}else{var v=u.split(" ");i=v[0]||"",o=v[1]||i,V(i)?i=p.width*parseFloat(i)/100:"auto"!==i&&(i=parseFloat(i)),V(o)?o=p.height*parseFloat(o)/100:"auto"!==o&&(o=parseFloat(o)),"auto"===i&&"auto"===o?(i=h,o=m):("auto"===i&&(i=h*(Number(o)/m)),"auto"===o&&(o=m*(Number(i)/h)))}var b=f&&f[0]||"0%",w=f&&f[1]||"0%";b=V(b)?(p.left+(p.width-Number(i))*parseFloat(b)/100).toString():(p.left+parseFloat(b)).toString(),w=V(w)?(p.top+(p.height-Number(o))*parseFloat(w)/100).toString():(p.top+parseFloat(w)).toString(),(0,E.H)("计算得到的背景的尺寸的值",i,o,b,w),e.renderProgram.uniforms.topLeft=new Float32Array([-Number(b)/i,-Number(w)/o]),(0,E.H)("父级元素的偏移",a.offsetLeft,a.offsetTop),e.renderProgram.uniforms.bottomRight=new Float32Array([e.renderProgram.uniforms.topLeft[0]+a.clientWidth/i,e.renderProgram.uniforms.topLeft[1]+a.clientHeight/o]);var O=Math.max(this.canvas.width,this.canvas.height);e.renderProgram.uniforms.containerRatio=new Float32Array([this.canvas.width/O,this.canvas.height/O]),E.H.type=!0}}function V(e){return e.endsWith("%")}function J(){var e=this.gl,t=this.renderData;(0,n.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 Z(){E.H.type=!1;var e=this.gl,t=this.renderData,r=this.options;if(!(0,n.isNull)(t)){var i=t.textures,a=t.backgroundTexture,l=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(o,this,[a,0]),Reflect.apply(o,this,[i[0],1]),e.uniform1f(t.renderProgram.locations.perturbance,l),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(J,this,[]),e.disable(e.BLEND),E.H.type=!0}}function Q(){var e=this.renderData;if(!(0,n.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,n.isNull)(t)){var i=t.updateProgram,a=t.textures,l=t.framebuffers,u=t.bufferWriteIndex,c=t.bufferReadIndex,s=r.resolution;e.viewport(0,0,s,s),e.bindFramebuffer(e.FRAMEBUFFER,l[u]),Reflect.apply(o,this,[a[c]]),e.useProgram(i.id),Reflect.apply(J,this,[]),Reflect.apply(Q,this,[])}}function ee(){var e=this,t=this.renderData,r=this.options,i=this.fadeData;if(!(0,n.isNull)(t)){var o=t.parentElement,a=i.isTransitioning,l=r.running,u=r.idleFluctuations,c=r.lastRunningState,s=getComputedStyle(o);i.backgroundInfo={width:parseInt(s.width),height:parseInt(s.height)},Reflect.apply(q,this,[]),l?(c||(r.lastRunningState=!0,this.show()),u&&this.raindropsFall(),a&&this.fade(),Reflect.apply(K,this,[]),Reflect.apply(Z,this,[])):c&&(r.lastRunningState=!1,this.hide()),t.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(ee,e,[])})}}function te(e,t,r){var i=this.renderData;if(!(0,n.isNull)(i)){var o=i.parentElement,a=window.getComputedStyle(o),l=parseInt(a.borderLeftWidth)||0,u=parseInt(a.borderTopWidth)||0,c=o.getBoundingClientRect(),s=e.clientX-c.left-l,f=e.clientY-c.top-u;this.drop(s,f,t,r)}}function re(){var e=this,t=this.renderData,r=this.options;if(!(0,n.isNull)(t)){var i=t.parentElement,o=t.events,a=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(te,e,[n,r.dropRadius*(i?1.5:1),i?.03:.01]))};o.mousemove=function(e){for(var t=r.accelerating;t--;)a(e)},o.touchmove=o.touchstart=function(e){for(var t=e.touches,r=0;r<t.length;r++)a(t[r])},o.mousedown=function(e){return a(e,!0)},Object.keys(o).forEach(function(e){return null==i?void 0:i.addEventListener(e,o[e],{passive:!0})})}}var ne="\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 ie(){var e=this.gl,t=this.renderData;if(!(0,n.isNull)(t)){var r=t.textureDelta;t.dropProgram=i(ne,"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 o=t.updateProgram=i(ne,"\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(o.locations.delta,r),t.renderProgram=i("\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 oe(){var e=this.gl,t=this.renderData;if(!(0,n.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 ae(e){E.H.type=!1;var t=this.gl,r=this.renderData,i=this.fadeData;if((0,n.isNull)(r))(0,E.H)("绑定纹理未找到渲染数据");else{var o=r.backgroundTexture,a=r.parentElement,l=i.backgroundInfo,u=l.width,c=l.height,s=function(e){return(0,n.isZero)(e&e-1)},f=s(u)&&s(c)?t.REPEAT:t.CLAMP_TO_EDGE;t.bindTexture(t.TEXTURE_2D,o),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,f),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,f),(0,E.H)("本次使用的纹理为",e.tag),a.dataset.render_img=e.tag,a.dataset.render_width=e.width+"px",a.dataset.render_height=e.height+"px",t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e.resource),E.H.type=!0}}function le(){var e=this,t=this.renderData,r=this.options,i=this.fadeData;if(!(0,n.isNull)(t)&&this.config){var o=t.textures,a=t.framebuffers,l=r.resolution,u=this.gl,c=1/l;t.textureDelta=new Float32Array([c,c]),this.config.extensions.forEach(function(e){return u.getExtension(e)});for(var s=this.config.arrayType,f=s?new s(l*l*4):null,p=this.config,d=0;d<2;d++){var h=u.createTexture(),m=u.createFramebuffer();u.bindFramebuffer(u.FRAMEBUFFER,m),u.bindTexture(u.TEXTURE_2D,h),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MIN_FILTER,p.linearSupport?u.LINEAR:u.NEAREST),u.texParameteri(u.TEXTURE_2D,u.TEXTURE_MAG_FILTER,p.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,l,l,0,u.RGBA,p.type,f),u.framebufferTexture2D(u.FRAMEBUFFER,u.COLOR_ATTACHMENT0,u.TEXTURE_2D,h,0),o.push(h),a.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(ie,this,[]),Reflect.apply(oe,this,[]),Reflect.apply(B,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(re,this,[]),Reflect.apply(ae,this,[i.lastDrawImage]),t.animationFrameId=requestAnimationFrame(function(){return Reflect.apply(ee,e,[])})}}function ue(){E.H.type=!1;var e=this.renderData,t=this.fadeData;if(!(0,n.isNull)(e)){var r=e.parentElement,i=t.backgroundInfo,o=r.offsetWidth,a=r.offsetHeight;this.canvas.width=i.width=o,this.canvas.height=i.height=a,(0,E.H)("触发再次加载背景"),Reflect.apply(B,this,[]),E.H.type=!0}}function ce(){E.H.type=!0;var e=this.renderData,t=this.fadeData;E.H.warn("执行销毁"),(0,n.isNull)(e)||((0,E.H)("销毁 render 数据"),e.destroy(),Object.keys(e).forEach(function(t){return e[t]=null}),this.renderData=null),(0,E.H)("销毁 fade 数据"),t.destroy(),Object.keys(t).forEach(function(e){return t[e]=null}),this.fadeData=null,this.gl&&(this.gl=null)}function se(e,t,r,i){var a=this.renderData,l=this.options,u=this.gl;if(!(0,n.isNull)(a)){var c=a.parentElement,s=a.dropProgram,f=a.textures,p=a.framebuffers,d=a.bufferWriteIndex,h=a.bufferReadIndex,m=l.resolution,y=c.offsetWidth,g=c.offsetHeight,v=Math.max(y,g);r/=v;var b=new Float32Array([(2*e-y)/v,(g-2*t)/v]);u.viewport(0,0,m,m),u.bindFramebuffer(u.FRAMEBUFFER,p[d]),Reflect.apply(o,this,[f[h]]),u.useProgram(s.id),u.uniform2fv(s.locations.center,b),u.uniform1f(s.locations.radius,r),u.uniform1f(s.locations.strength,i),Reflect.apply(J,this,[]),Reflect.apply(Q,this,[])}}function fe(e){return fe="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},fe(e)}function pe(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,he(n.key),n)}}function de(e,t,r){return(t=he(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function he(e){var t=function(e){if("object"!=fe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=fe(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==fe(t)?t:t+""}function me(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 ye(e,t){return e.get(ve(e,t))}function ge(e,t,r){return e.set(ve(e,t),r),r}function ve(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 be=new WeakMap,we=new WeakMap,Ee=new WeakMap,Oe=new WeakMap,Re=new WeakMap,Se=new WeakMap,ke=new WeakMap,Te=new WeakMap,Pe=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),me(this,be,b.accelerating),me(this,we,b.interactive),me(this,Ee,b.resolution),me(this,Oe,b.perturbance),me(this,Re,b.dropRadius),de(this,"imgUrl",b.imgUrl),me(this,Se,b.idleFluctuations),me(this,ke,b.raindropsTimeInterval),de(this,"crossOrigin","no-cors"),de(this,"visible",!1),de(this,"running",!1),me(this,Te,void 0),de(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.imgUrl=t.imgUrl,this.idleFluctuations=t.idleFluctuations,this.running=Boolean(null===(r=t.playingState)||void 0===r||r),this.crossOrigin=t.crossOrigin,this.darkMode=t.darkMode},(t=[{key:"accelerating",get:function(){return ye(be,this)},set:function(e){e>100||e<2||ge(be,this,e)}},{key:"interactive",get:function(){return ye(we,this)},set:function(e){(0,n.isBoolean)(e)&&ge(we,this,e)}},{key:"resolution",get:function(){return ye(Ee,this)},set:function(e){e<100||e>550||ge(Ee,this,e)}},{key:"perturbance",get:function(){return ye(Oe,this)},set:function(e){e<1e-4||e>1||ge(Oe,this,e)}},{key:"dropRadius",get:function(){return ye(Re,this)},set:function(e){!isFinite(e)||e<10||ge(Re,this,e)}},{key:"idleFluctuations",get:function(){return ye(Se,this)},set:function(e){(0,n.isBoolean)(e)&&ge(Se,this,e)}},{key:"raindropsTimeInterval",get:function(){return ye(ke,this)},set:function(e){e<10||e>12e3||ge(ke,this,e)}},{key:"playingState",get:function(){return this.running},set:function(e){this.running=Boolean(null==e||e)}},{key:"darkMode",get:function(){return ye(Te,this)},set:function(e){(0,E.H)("设置参数的暗黑模式",e),ge(Te,this,(0,n.isUndefined)(e)?void 0:Boolean(e))}}])&&pe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Ae(){var e=this.fadeData,t=this.options,r=this.renderData;if((0,n.isNull)(r))return!0;var i=t.imgUrl,o=r.lastUseStyle,a=e.lastDrawImage,l=e.backgroundInfo,u=l.width,c=l.height,s=a.tag,f=a.kind,p=H(t,o),d=a.width===u,h=a.height===c,m=d&&h;if("image"===f&&m&&(0,n.isString)(p)&&p===s)return!0;(0,E.H)("通过图片校验");var y=(0,n.isArray)(i)&&i.join("_")||"";if("linear-gradient"===f&&m&&y===s)return!0;(0,E.H)("通过渐变校验",y,s);var g=F(t,o);return!("background-color"!==f||!m||s!==g)||((0,E.H)("通过背景色校验"),!1)}function je(){var e=this,t=this.options,r=this.fadeData;r.transparentId=setTimeout(function(){if(clearTimeout(r.transparentId),r.isTransitioning)return Reflect.apply(je,e,[]);(0,E.H)("当前执行的项",r.lastDrawImage),(0,E.H)("尚有未执行的项",r.toBeList.length),Reflect.apply(Ae,e,[])?(0,E.H)("当前禁止执行循环,退出循环",r.lastDrawImage):(r.run(),E.H.type=!0,(0,E.H)("开始渐变"))},2*t.raindropsTimeInterval)}function xe(){E.H.type=!1;var e=this.renderData,t=this.fadeData,r=this.options,i=t.toBeList;if((0,n.isNull)(e))return Reflect.apply(Ie,this,["还没有准备好,即将退出"]);if((0,n.isEmptyArray)(i))return Reflect.apply(Ie,this,["由于缺少当前渲染的背景,退出"]);if(0===t.drawProgress&&((0,E.H)("开始执行渐变,当前尚有可执行",i.length),i.forEach(function(e){return(0,E.H)(e)})),t.drawProgress>1e3){if(t.lastDrawImage=i.shift(),(0,E.H)("执行渐变背景完毕,剩余可执行",i),Reflect.apply(ae,this,[t.lastDrawImage]),(0,n.isEmptyArray)(i)){var o=e.lastUseStyle;((0,n.isNull)(r.imgUrl)||(0,n.isBusinessEmptyString)(r.imgUrl)||(0,n.isZero)(r.imgUrl.length))&&a(o.backgroundColor)&&l(o.backgroundImage)&&Reflect.apply(_,this,[!1])}return Reflect.apply(Ie,this,["当前执行完毕,开启下次执行"])}var u=t.lastDrawImage,c=t.backgroundInfo;t.drawProgress+=18;var s=document.createElement("canvas"),f=s.getContext("2d");if((0,n.isNull)(f)||(0,n.isNull)(u.resource)||(0,n.isEmptyArray)(i))return E.H.warn("是我啦",(0,n.isNull)(f),"-",(0,n.isNull)(u.resource),"-",(0,n.isEmptyArray)(i)),Reflect.apply(Ie,this,"环境值错误");var p=c.width,d=c.height;s.width=p,s.height=d,f.clearRect(0,0,p,d),f.drawImage(u.resource,0,0,p,d),f.globalAlpha=t.drawProgress/1e3,f.drawImage(i[0].resource,0,0,p,d),f.globalAlpha=1;var h={resource:s,width:p,height:d,kind:"mix",tag:"".concat(u.tag," >> ").concat(i[0].tag)};Reflect.apply(ae,this,[h]),i.length>1&&(t.lastDrawImage=h,i.shift(),t.drawProgress=0),E.H.type=!0}function Ie(e){this.fadeData.isTransitioning=!1,E.H.warn(e),Reflect.apply(je,this,[])}function De(e){return De="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},De(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,Ue(n.key),n)}}function He(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Fe(e,t,r){return(t=Ue(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ue(e){var t=function(e){if("object"!=De(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=De(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==De(t)?t:t+""}function Ce(e,t){return e.get(Ne(e,t))}function Ne(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 Be=new WeakMap,Me=new WeakSet,Le=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),He(this,r=Me),r.add(this),Fe(this,"backgroundInfo",{width:0,height:0}),Fe(this,"transparentId",setTimeout(Boolean)),Fe(this,"toBeList",[]),Fe(this,"drawProgress",0),Fe(this,"isTransitioning",!1),function(e,t){He(e,t),t.set(e,void 0)}(this,Be),Fe(this,"isDark",!1);var i,o,a=t.renderData;if((0,n.isNull)(a))i=10,o=10;else{var l=getComputedStyle(a.parentElement);i=parseInt(l.width),o=parseInt(l.height)}this.backgroundInfo={width:i,height:o},this.lastDrawImage={resource:D(i,o),width:i,height:o,kind:"default",tag:""},function(e,t,r){e.set(Ne(e,t),r)}(Be,this,window.matchMedia("(prefers-color-scheme: dark)")),this.isDark=Ce(Be,this).matches,Ce(Be,this).addEventListener("change",Ne(Me,this,Xe));var u=this;Object.defineProperty(Ce(Be,this),"isDark",{get:function(){return u.isDark},set:function(e){u.isDark=e,Reflect.apply(Ae,t,[])||Reflect.apply(_,t,[!0])}})},(t=[{key:"run",value:function(){this.isTransitioning||(this.drawProgress=0,this.isTransitioning=!0)}},{key:"destroy",value:function(){E.H.type=!0,Ce(Be,this).removeEventListener("change",Ne(Me,this,Xe)),(0,E.H)("退出后取消执行",this.transparentId),this.transparentId&&clearTimeout(this.transparentId)}}])&&_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function Xe(e){(0,E.H)("当前获取",e,this),this.isDark=e.matches}function ze(e){return ze="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},ze(e)}function We(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 Ge(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?We(Object(r),!0).forEach(function(t){Je(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):We(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return 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,Ze(n.key),n)}}function Ye(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ye=function(){return!!e})()}function qe(e){return qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},qe(e)}function Ve(e,t){return Ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ve(e,t)}function Je(e,t,r){return(t=Ze(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ze(e){var t=function(e){if("object"!=ze(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=ze(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ze(t)?t:t+""}var Qe=new WeakMap,Ke=function(e){function t(e,r){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Je(i=function(e,t,r){return t=qe(t),function(e,t){if(t&&("object"==ze(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,Ye()?Reflect.construct(t,r||[],qe(e).constructor):t.apply(e,r))}(this,t,[e]),"renderData",null),Je(i,"defaults",b),Je(i,"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)}(i,Qe,d(ue,{this:i})),(0,E.H)("初始化参数",r),Object.defineProperties(i,{defaults:{value:i.defaults,writable:!1,enumerable:!1,configurable:!1}}),i.options=new Pe(Ge(Ge({},i.defaults),r)),i.renderData=new Y(e,i.reloadBackground,i),i.fadeData=new Le(i),(0,n.isFalse)(i.initState)||(0,n.isNull)(e.parentElement)||(0,n.isNull)(i.config)||(0,n.isNull)(i.gl)?i.initState=!1:(function(e){var t=e.parentElement;e.width=t.clientWidth,e.height=t.clientHeight,p(e,{position:"absolute",left:0,top:0,right:0,bottom:0,zIndex:-1,pointerEvents:"none"})}(e),Reflect.apply(le,i,[])),window.matchMedia("(prefers-color-scheme: dark)"),i}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&&Ve(e,t)}(t,e),r=t,(i=[{key:"raindropsFall",value:function(){var e=this.renderData,t=this.options,r=this.fadeData;if(!(0,n.isNull)(e)){var i=r.backgroundInfo,o=e.lastRaindropsFallTime,a=t.raindropsTimeInterval,l=t.dropRadius,u=Date.now();if(!(u-o<a)){e.lastRaindropsFallTime=u;var c=function(e){return m(e||1)},s=i.width,f=i.height;this.drop(c(s),c(f),l,.03)}}}},{key:"drop",value:function(e,t,r,n){Reflect.apply(se,this,[e,t,r,n])}},{key:"fade",value:function(){Reflect.apply(xe,this,[])}},{key:"reloadBackground",value:function(){var e,t;(0,E.H)("触发尺寸变化或属性变化"),(e=Qe,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(M,this,[])}},{key:"hide",value:function(){this.options.visible=!1,this.canvas.style.visibility="hidden",Reflect.apply(X,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;(0,E.H)("当前执行切换状态"),e.running=!e.running,(0,E.H)("更新后的状态",e.running)}},{key:"set",value:function(e,t){(0,E.H)("设置属性",e),"imgUrl"===e?(this.options.imgUrl=t,Reflect.apply(B,this,[])):"darkMode"===e?(this.options.darkMode=t,(0,E.H)(Reflect.apply(Ae,this,[])),Reflect.apply(Ae,this,[])||Reflect.apply(_,this,[!0])):this.options[e]=t}}])&&$e(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,i}(v)}},b={};function w(e){var t=b[e];if(void 0!==t)return t.exports;var r=b[e]={exports:{}};return v[e](r,r.exports,w),r.exports}w.m=v,g=[],w.O=(e,t,r,n)=>{if(!t){var i=1/0;for(u=0;u<g.length;u++){for(var[t,r,n]=g[u],o=!0,a=0;a<t.length;a++)(!1&n||i>=n)&&Object.keys(w.O).every(e=>w.O[e](t[a]))?t.splice(a--,1):(o=!1,n<i&&(i=n));if(o){g.splice(u--,1);var l=r();void 0!==l&&(e=l)}}return e}n=n||0;for(var u=g.length;u>0&&g[u-1][2]>n;u--)g[u]=g[u-1];g[u]=[t,r,n]},w.d=(e,t)=>{for(var r in t)w.o(t,r)&&!w.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},w.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),w.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var E,O=w;export{O as __webpack_require__};E={818:0},w.C=e=>{var t,r,{__webpack_esm_ids__:n,__webpack_esm_modules__:i,__webpack_esm_runtime__:o}=e,a=0;for(t in i)w.o(i,t)&&(w.m[t]=i[t]);for(o&&o(w);a<n.length;a++)r=n[a],w.o(E,r)&&E[r]&&E[r][0](),E[n[a]]=0;w.O()},w.O.j=e=>0===E[e];import*as R from"./209.mjs";w.C(R);var S=w.O(void 0,[209],()=>w(98));const k=(S=w.O(S)).z_,T=S.Z$,P=S.OT,A=S._V,j=S.H$,x=S.dO,I=S.rQ,D=S.NR,_=S.G6,H=S.t3,F=S.DZ,U=S.nC,C=S.Oe;export{k as BackgroundRipple,T as EnImage,P as EnSwitch,A as Image,j as LazyBackgroundRipple,x as Switch,I as ThemeColorModeProvider,D as useAnimationFrame,_ as useColorMode,H as useInputIsComposing,F as useLazyRipples,U as useRipples,C as useTimeId};
|
|
10
|
+
//# sourceMappingURL=client.mjs.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* earthnut@components/ThemeContext/index.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { ThemeColorModeProviderProps, ThemeContextType } from './types';
|
|
8
|
+
/** 使用主题颜色模式 */
|
|
9
|
+
export declare function useColorMode(): ThemeContextType;
|
|
10
|
+
/** */
|
|
11
|
+
export declare function ThemeColorModeProvider({ children, initialTheme, }: ThemeColorModeProviderProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* earthnut@components/ThemeContext/types.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
/** 颜色模式 */
|
|
8
|
+
export type ColorMode = 'light' | 'dark';
|
|
9
|
+
/** 主题 */
|
|
10
|
+
export type ThemeContextType = {
|
|
11
|
+
/** 是否为自动模式 */
|
|
12
|
+
autoColorMode: boolean;
|
|
13
|
+
/** 获取颜色模式 */
|
|
14
|
+
colorMode: ColorMode;
|
|
15
|
+
/** 切换颜色模式 */
|
|
16
|
+
toggleColorMode: () => ColorMode;
|
|
17
|
+
/** 设置颜色模式(仅允许设置为 'dark'、或 `light`) */
|
|
18
|
+
setColorMode: (newColorMode: ColorMode) => ColorMode;
|
|
19
|
+
/** 设置为跟随系统 */
|
|
20
|
+
clearColorMode: () => void;
|
|
21
|
+
};
|
|
22
|
+
export type ThemeColorModeProviderProps = {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
/** 初始化默认的主题值 */
|
|
25
|
+
initialTheme: ColorMode;
|
|
26
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* earthnut@components/image/index.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { EnImageProps } from './types';
|
|
8
|
+
/** 简单的图像 */
|
|
9
|
+
declare const Image: import("react").ForwardRefExoticComponent<Omit<EnImageProps, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
|
|
10
|
+
export { Image };
|
|
11
|
+
export type { EnImageProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* earthnut@components/image/types.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { DetailedHTMLProps, ImgHTMLAttributes } from 'react';
|
|
8
|
+
export type EnImageProps = {
|
|
9
|
+
/** 下载错误时展示的图像 */
|
|
10
|
+
errorSrc?: string;
|
|
11
|
+
/** 加载中的图像 */
|
|
12
|
+
loadingSrc?: string;
|
|
13
|
+
} & DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* earthnut@components/image/useSrcChange.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
/** 当地址触发变更 */
|
|
8
|
+
export declare function useSrcChange(src: string, fallbackSrc?: string): {
|
|
9
|
+
resultSrc: string;
|
|
10
|
+
loadComplete: number;
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* earthnut@components/layout/content.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { HTMLAttributes } from 'react';
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* layout content
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
* @param {string} className 布局的类名
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
declare const InternalValueC: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export { InternalValueC };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* earthnut@components/layout/footer.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { LayoutFooterProps } from './types';
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* layout footer
|
|
11
|
+
*
|
|
12
|
+
* 布局底部
|
|
13
|
+
*
|
|
14
|
+
* @param className 自定义类名
|
|
15
|
+
* @param height 自定义高度
|
|
16
|
+
* @param props 其他属性
|
|
17
|
+
* @returns ReactElement
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
declare const InternalValueF: import("react").ForwardRefExoticComponent<LayoutFooterProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
|
+
export { InternalValueF };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* earthnut@components/layout/header.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { LayoutHeaderProps } from './types';
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* layout header
|
|
11
|
+
*
|
|
12
|
+
* 布局头部
|
|
13
|
+
*
|
|
14
|
+
* @param className 自定义类名
|
|
15
|
+
* @param height 高度
|
|
16
|
+
* 缺省值为 2.8rem,当未在 `Layout` 中使用,该值不起作用
|
|
17
|
+
* @param noSticky 是否取消悬挂粘连
|
|
18
|
+
* 缺省值为 false
|
|
19
|
+
* @param props 其他属性
|
|
20
|
+
* @returns ReactElement
|
|
21
|
+
*/
|
|
22
|
+
declare const InternalValueH: import("react").ForwardRefExoticComponent<LayoutHeaderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
|
+
export { InternalValueH };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* earthnut@components/layout/index.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
export { Layout, Layout as EnLayout, LayoutContent, LayoutContent as EnLayoutContent, LayoutHeader, LayoutHeader as EnLayoutHeader, LayoutFooter, LayoutFooter as EnLayoutFooter, LayoutSideBar, LayoutSideBar as EnLayoutSideBar, } from './layout';
|
|
8
|
+
export type { LayoutProps, LayoutSideBarProps, LayoutHeaderProps, LayoutFooterProps, } from './types';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* earthnut@components/layout/layout.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { InternalValueH as LayoutHeader } from './header';
|
|
8
|
+
import { InternalValueS as LayoutSideBar } from './sidebar';
|
|
9
|
+
import { InternalValueC as LayoutContent } from './content';
|
|
10
|
+
import { InternalValueF as LayoutFooter } from './footer';
|
|
11
|
+
import { LayoutProps } from './types';
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* ## layout
|
|
15
|
+
*
|
|
16
|
+
* 布局组件,用于构建页面布局。
|
|
17
|
+
*
|
|
18
|
+
* ***为了照顾在 next.js 中的服务端组件中使用,在拥有 `side bar` 时 `Layout` 的 `height` 为百分比时会触发 side bar 滚动***
|
|
19
|
+
*
|
|
20
|
+
* @param {string} className 布局的类名
|
|
21
|
+
* @param {CSSProperties} style 布局的样式
|
|
22
|
+
* @param {string | number} width 布局的宽
|
|
23
|
+
* @param {string | number} height 布局的高
|
|
24
|
+
* @example
|
|
25
|
+
*
|
|
26
|
+
* ```jsx
|
|
27
|
+
* <Layout>
|
|
28
|
+
* <LayoutHeader> 头部 </LayoutHeader>
|
|
29
|
+
* <LayoutSideBar> 侧边栏 </LayoutSideBar>
|
|
30
|
+
* <LayoutContent> 内容区 </LayoutContent>
|
|
31
|
+
* <LayoutFooter> 页脚 </LayoutFooter>
|
|
32
|
+
* </Layout>
|
|
33
|
+
*
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* 该组件仅接受 `LayoutHeader`、`LayoutSideBar`、`LayoutContent` 和 `LayoutFooter` 作为(直接)子组件。
|
|
37
|
+
*
|
|
38
|
+
* 可任意搭配使用,但不推荐使用无 `LayoutContent` 使用。
|
|
39
|
+
*
|
|
40
|
+
* 目前已知当 `Layout` 嵌套 `Layout` 时,需要设定内部 `Layout` 的 `width` 和 `height`。
|
|
41
|
+
*
|
|
42
|
+
* ```jsx
|
|
43
|
+
* <Layout width="100%" height="100%">
|
|
44
|
+
* <Layout width="100%" height="100%">
|
|
45
|
+
* <LayoutSideBar width="150px"> 侧边栏 </LayoutSideBar>
|
|
46
|
+
* <LayoutContent> 内容区 </LayoutContent>
|
|
47
|
+
* </Layout>
|
|
48
|
+
* <LayoutFooter> 页脚 </LayoutFooter>
|
|
49
|
+
* </Layout>
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
declare const Layout: import("react").ForwardRefExoticComponent<LayoutProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
55
|
+
export { Layout, LayoutHeader, LayoutSideBar, LayoutContent, LayoutFooter };
|