karin-plugin-kkk 2.36.3 → 2.37.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.
@@ -0,0 +1 @@
1
+ import{F as e,I as t,ft as n,gt as r,mt as i}from"./index-CEplgYEW.js";var a=i({base:`separator`,defaultVariants:{orientation:`horizontal`,variant:`default`},variants:{orientation:{horizontal:`separator--horizontal`,vertical:`separator--vertical`},variant:{default:`separator--default`,secondary:`separator--secondary`,tertiary:`separator--tertiary`}}}),o=r(),s=({className:r,orientation:i,variant:s,...c})=>{let l=n(t),u=i??l?.orientation??`horizontal`;return(0,o.jsx)(e,{"data-orientation":u,"data-slot":`separator`,orientation:u,className:a({orientation:u,variant:s,className:r}),...c})},c=Object.assign(s,{Root:s});export{c as t};
@@ -6,8 +6,8 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <meta name="description" content="KKK Config - Karin 插件配置管理面板" />
8
8
  <title>KKK Config</title>
9
- <script type="module" crossorigin src="/kkk/assets/assets/index-DU0mjeqO.js"></script>
10
- <link rel="stylesheet" crossorigin href="/kkk/assets/assets/index-hQel6cUs.css">
9
+ <script type="module" crossorigin src="/kkk/assets/assets/index-CEplgYEW.js"></script>
10
+ <link rel="stylesheet" crossorigin href="/kkk/assets/assets/index-CDqOqICt.css">
11
11
  </head>
12
12
  <body>
13
13
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "karin-plugin-kkk",
3
- "version": "2.36.3",
3
+ "version": "2.37.1",
4
4
  "description": "Karin 的「抖音」「B 站」视频解析/动态推送插件",
5
5
  "keywords": [
6
6
  "karin",
@@ -89,5 +89,5 @@
89
89
  "web": "./lib/web.config.js",
90
90
  "ts-web": "./src/web.config.ts"
91
91
  },
92
- "timestamp": "2026-07-07T02:03:08.432Z"
92
+ "timestamp": "2026-07-10T10:39:04.827Z"
93
93
  }
@@ -1,172 +0,0 @@
1
- //#region ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/index.d.ts
2
- /**
3
- Levels:
4
- - `0` - All colors disabled.
5
- - `1` - Basic 16 colors support.
6
- - `2` - ANSI 256 colors support.
7
- - `3` - Truecolor 16 million colors support.
8
- */
9
- type ColorSupportLevel = 0 | 1 | 2 | 3;
10
- //#endregion
11
- //#region ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.d.ts
12
- // eslint-disable-line @typescript-eslint/naming-convention
13
- interface ChalkInstance {
14
- (...text: unknown[]): string;
15
- /**
16
- The color support for Chalk.
17
- By default, color support is automatically detected based on the environment.
18
- Levels:
19
- - `0` - All colors disabled.
20
- - `1` - Basic 16 colors support.
21
- - `2` - ANSI 256 colors support.
22
- - `3` - Truecolor 16 million colors support.
23
- */
24
- level: ColorSupportLevel;
25
- /**
26
- Use RGB values to set text color.
27
- @example
28
- ```
29
- import chalk from 'chalk';
30
- chalk.rgb(222, 173, 237);
31
- ```
32
- */
33
- rgb: (red: number, green: number, blue: number) => this;
34
- /**
35
- Use HEX value to set text color.
36
- @param color - Hexadecimal value representing the desired color.
37
- @example
38
- ```
39
- import chalk from 'chalk';
40
- chalk.hex('#DEADED');
41
- ```
42
- */
43
- hex: (color: string) => this;
44
- /**
45
- Use an [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set text color.
46
- @example
47
- ```
48
- import chalk from 'chalk';
49
- chalk.ansi256(201);
50
- ```
51
- */
52
- ansi256: (index: number) => this;
53
- /**
54
- Use RGB values to set background color.
55
- @example
56
- ```
57
- import chalk from 'chalk';
58
- chalk.bgRgb(222, 173, 237);
59
- ```
60
- */
61
- bgRgb: (red: number, green: number, blue: number) => this;
62
- /**
63
- Use HEX value to set background color.
64
- @param color - Hexadecimal value representing the desired color.
65
- @example
66
- ```
67
- import chalk from 'chalk';
68
- chalk.bgHex('#DEADED');
69
- ```
70
- */
71
- bgHex: (color: string) => this;
72
- /**
73
- Use a [8-bit unsigned number](https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit) to set background color.
74
- @example
75
- ```
76
- import chalk from 'chalk';
77
- chalk.bgAnsi256(201);
78
- ```
79
- */
80
- bgAnsi256: (index: number) => this;
81
- /**
82
- Modifier: Reset the current style.
83
- */
84
- readonly reset: this;
85
- /**
86
- Modifier: Make the text bold.
87
- */
88
- readonly bold: this;
89
- /**
90
- Modifier: Make the text have lower opacity.
91
- */
92
- readonly dim: this;
93
- /**
94
- Modifier: Make the text italic. *(Not widely supported)*
95
- */
96
- readonly italic: this;
97
- /**
98
- Modifier: Put a horizontal line below the text. *(Not widely supported)*
99
- */
100
- readonly underline: this;
101
- /**
102
- Modifier: Put a horizontal line above the text. *(Not widely supported)*
103
- */
104
- readonly overline: this;
105
- /**
106
- Modifier: Invert background and foreground colors.
107
- */
108
- readonly inverse: this;
109
- /**
110
- Modifier: Print the text but make it invisible.
111
- */
112
- readonly hidden: this;
113
- /**
114
- Modifier: Puts a horizontal line through the center of the text. *(Not widely supported)*
115
- */
116
- readonly strikethrough: this;
117
- /**
118
- Modifier: Print the text only when Chalk has a color level above zero.
119
- Can be useful for things that are purely cosmetic.
120
- */
121
- readonly visible: this;
122
- readonly black: this;
123
- readonly red: this;
124
- readonly green: this;
125
- readonly yellow: this;
126
- readonly blue: this;
127
- readonly magenta: this;
128
- readonly cyan: this;
129
- readonly white: this;
130
- /*
131
- Alias for `blackBright`.
132
- */
133
- readonly gray: this;
134
- /*
135
- Alias for `blackBright`.
136
- */
137
- readonly grey: this;
138
- readonly blackBright: this;
139
- readonly redBright: this;
140
- readonly greenBright: this;
141
- readonly yellowBright: this;
142
- readonly blueBright: this;
143
- readonly magentaBright: this;
144
- readonly cyanBright: this;
145
- readonly whiteBright: this;
146
- readonly bgBlack: this;
147
- readonly bgRed: this;
148
- readonly bgGreen: this;
149
- readonly bgYellow: this;
150
- readonly bgBlue: this;
151
- readonly bgMagenta: this;
152
- readonly bgCyan: this;
153
- readonly bgWhite: this;
154
- /*
155
- Alias for `bgBlackBright`.
156
- */
157
- readonly bgGray: this;
158
- /*
159
- Alias for `bgBlackBright`.
160
- */
161
- readonly bgGrey: this;
162
- readonly bgBlackBright: this;
163
- readonly bgRedBright: this;
164
- readonly bgGreenBright: this;
165
- readonly bgYellowBright: this;
166
- readonly bgBlueBright: this;
167
- readonly bgMagentaBright: this;
168
- readonly bgCyanBright: this;
169
- readonly bgWhiteBright: this;
170
- }
171
- //#endregion
172
- export { ChalkInstance as t };
@@ -1 +0,0 @@
1
- import{t as e}from"./separator-DSAWGreF.js";import{$ as t,A as n,At as r,B as i,Ct as a,D as o,Dt as s,E as c,Et as l,F as u,Ft as d,G as f,H as p,I as m,It as h,J as g,K as _,Lt as v,M as y,Mt as b,N as x,Nt as S,O as C,Ot as w,P as T,Q as E,R as D,Rt as O,St as k,T as A,Tt as j,V as M,W as N,X as P,Y as F,Z as I,_t as L,at as R,bt as z,c as B,ct as ee,d as V,dt as te,et as ne,f as re,ft as ie,g as ae,gt as oe,h as se,ht as ce,it as le,j as ue,jt as de,k as fe,kt as H,l as pe,lt as me,m as he,mt as ge,nt as _e,ot as ve,p as ye,pt as be,q as xe,r as Se,rt as Ce,st as we,tt as Te,u as U,ut as Ee,v as W,vt as De,w as Oe,wt as ke,x as G,xt as Ae,y as K,yt as je,z as Me}from"./index-DU0mjeqO.js";var Ne=d({base:`header`}),Pe=d({defaultVariants:{fullWidth:!1,variant:`primary`},slots:{base:`number-field`,decrementButton:`number-field__decrement-button`,group:`number-field__group`,incrementButton:`number-field__increment-button`,input:`number-field__input`},variants:{fullWidth:{false:{},true:{base:`number-field--full-width`,group:`number-field__group--full-width`}},variant:{primary:{base:`number-field--primary`},secondary:{base:`number-field--secondary`}}}}),Fe=d({slots:{base:`radio`,content:`radio__content`,control:`radio__control`,indicator:`radio__indicator`}}),Ie=d({base:`radio-group`,defaultVariants:{variant:`primary`},variants:{variant:{primary:`radio-group--primary`,secondary:`radio-group--secondary`}}}),Le=new Map,Re=!1;try{Re=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}var ze=!1;try{ze=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}var Be={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}},Ve=class{constructor(e,t={}){this.numberFormatter=He(e,t),this.options=t}format(e){let t=``;if(t=!Re&&this.options.signDisplay!=null?Ue(this.numberFormatter,this.options.signDisplay,e):this.numberFormatter.format(e),this.options.style===`unit`&&!ze){let{unit:e,unitDisplay:n=`short`,locale:r}=this.resolvedOptions();if(!e)return t;let i=Be[e]?.[n];t+=i[r]||i.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(e,t);if(t<e)throw RangeError(`End date must be >= start date`);return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw RangeError(`End date must be >= start date`);let n=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!Re&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!ze&&this.options.style===`unit`&&(e={...e,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}};function He(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes(`-nu-`)&&(e.includes(`-u-`)||(e+=`-u-`),e+=`-nu-${n}`),t.style===`unit`&&!ze){let{unit:e,unitDisplay:n=`short`}=t;if(!e)throw Error(`unit option must be provided with style: "unit"`);if(!Be[e]?.[n])throw Error(`Unsupported unit ${e} with unitDisplay = ${n}`);t={...t,style:`decimal`}}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(Le.has(r))return Le.get(r);let i=new Intl.NumberFormat(e,t);return Le.set(r,i),i}function Ue(e,t,n){if(t===`auto`)return e.format(n);if(t===`never`)return e.format(Math.abs(n));{let r=!1;if(t===`always`?r=n>0||Object.is(n,0):t===`exceptZero`&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let t=e.format(-n),r=e.format(n),i=t.replace(r,``).replace(/\u200e|\u061C/,``);return[...i].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`),t.replace(r,`!!!`).replace(i,`+`).replace(`!!!`,r)}else return e.format(n)}}var We=RegExp(`^.*\\(.*\\).*$`),Ge=[`latn`,`arab`,`hanidec`,`deva`,`beng`,`fullwide`],Ke=class{constructor(e,t={}){this.locale=e,this.options=t}parse(e){return Je(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return Je(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return Je(this.locale,this.options,e).options.numberingSystem}},qe=new Map;function Je(e,t,n){let r=Ye(e,t);if(!e.includes(`-nu-`)&&!r.isValidPartialNumber(n)){for(let i of Ge)if(i!==r.options.numberingSystem){let r=Ye(e+(e.includes(`-u-`)?`-nu-`:`-u-nu-`)+i,t);if(r.isValidPartialNumber(n))return r}}return r}function Ye(e,t){let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``),r=qe.get(n);return r||(r=new Xe(e,t),qe.set(n,r)),r}var Xe=class{constructor(e,t={}){this.locale=e,t.roundingIncrement!==1&&t.roundingIncrement!=null&&(t.maximumFractionDigits==null&&t.minimumFractionDigits==null?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):t.maximumFractionDigits==null?t.maximumFractionDigits=t.minimumFractionDigits:t.minimumFractionDigits??=t.maximumFractionDigits),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=$e(e,this.formatter,this.options,t),this.options.style===`percent`&&((this.options.minimumFractionDigits??0)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn(`NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.`)}parse(e){let t=this.formatter.resolvedOptions().useGrouping,n=this.sanitize(e);if(!t&&this.symbols.group&&n.includes(this.symbols.group))return NaN;if(this.symbols.group&&(n=n.replaceAll(this.symbols.group,``)),this.symbols.decimal&&(n=n.replace(this.symbols.decimal,`.`)),this.symbols.minusSign&&(n=n.replace(this.symbols.minusSign,`-`)),n=n.replace(this.symbols.numeral,this.symbols.index),this.options.style===`percent`){let e=n.indexOf(`-`);n=n.replace(`-`,``),n=n.replace(`+`,``);let t=n.indexOf(`.`);t===-1&&(t=n.length),n=n.replace(`.`,``),n=t-2==0?`0.${n}`:t-2==-1?`0.0${n}`:t-2==-2?`0.00`:`${n.slice(0,t-2)}.${n.slice(t-2)}`,e>-1&&(n=`-${n}`)}let r=n?+n:NaN;if(isNaN(r))return NaN;if(this.options.style===`percent`){let e={...this.options,style:`decimal`,minimumFractionDigits:Math.min((this.options.minimumFractionDigits??0)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new Ke(this.locale,e).parse(new Ve(this.locale,e).format(r))}return this.options.currencySign===`accounting`&&We.test(e)&&(r=-1*r),r}sanitize(e){let t=this.formatter.resolvedOptions().useGrouping;return this.symbols.noNumeralUnits.length>0&&this.symbols.noNumeralUnits.find(t=>t.unit===e)?this.symbols.noNumeralUnits.find(t=>t.unit===e).value.toString():(e=e.replace(this.symbols.literals,``),this.symbols.minusSign&&(e=e.replace(`-`,this.symbols.minusSign)),this.options.numberingSystem===`arab`&&(this.symbols.decimal&&(e=q(e,`,`,this.symbols.decimal),e=q(e,`،`,this.symbols.decimal)),this.symbols.group&&t&&(e=q(e,`.`,this.symbols.group))),this.symbols.group===`’`&&e.includes(`'`)&&t&&(e=q(e,`'`,this.symbols.group)),this.symbols.group===`'`&&e.includes(`’`)&&t&&(e=q(e,`’`,this.symbols.group)),this.options.locale===`fr-FR`&&this.symbols.group&&t&&(e=q(e,` `,this.symbols.group),e=q(e,/\u00A0/g,this.symbols.group)),e)}isValidPartialNumber(e,t=-1/0,n=1/0){let r=this.formatter.resolvedOptions().useGrouping;return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&r&&(e=q(e,this.symbols.group,``)),e=e.replace(this.symbols.numeral,``),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,``)),e.length===0)}},Ze=new Set([`decimal`,`fraction`,`integer`,`minusSign`,`plusSign`,`group`]),Qe=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function $e(e,t,n,r){let i=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:`auto`,roundingMode:`halfExpand`,useGrouping:!0}),a=i.formatToParts(-10000.111),o=i.formatToParts(10000.111),s=Qe.map(e=>i.formatToParts(e)),c=s.map((e,t)=>{let n=e.find(e=>e.type===`unit`);return n&&!e.some(e=>e.type===`integer`||e.type===`fraction`)?{unit:n.value,value:Qe[t]}:null}).filter(e=>!!e),l=a.find(e=>e.type===`minusSign`)?.value??`-`,u=o.find(e=>e.type===`plusSign`)?.value;!u&&(r?.signDisplay===`exceptZero`||r?.signDisplay===`always`)&&(u=`+`);let d=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(e=>e.type===`decimal`)?.value,f=a.find(e=>e.type===`group`)?.value,p=a.filter(e=>!Ze.has(e.type)).map(e=>et(e.value)),m=s.flatMap(e=>e.filter(e=>!Ze.has(e.type)).map(e=>et(e.value))),h=[...new Set([...p,...m])].sort((e,t)=>t.length-e.length),g=h.length===0?RegExp(`\\p{White_Space}|\\p{Cf}`,`gu`):RegExp(`${h.join(`|`)}|\\p{White_Space}|\\p{Cf}`,`gu`),_=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),v=new Map(_.map((e,t)=>[e,t])),y=RegExp(`[${_.join(``)}]`,`g`);return{minusSign:l,plusSign:u,decimal:d,group:f,literals:g,numeral:y,numerals:_,index:e=>String(v.get(e)),noNumeralUnits:c}}function q(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function et(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}var J=O(v(),1);function tt(e={}){let{locale:t}=De();return(0,J.useMemo)(()=>new Ve(t,e),[t,e])}var Y=xe(),nt=({children:e,className:t,...n})=>(0,Y.jsx)(A,{className:Ne({className:t}),"data-slot":`header`,...n,children:e}),rt=new WeakMap;function it(e,t,r){let{value:i,children:a,"aria-label":o,"aria-labelledby":s,onPressStart:c,onPressEnd:l,onPressChange:u,onPress:d,onPressUp:f,onClick:p}=e,m=e.isDisabled||t.isDisabled,h=t.selectedValue===i,g=e=>{e.stopPropagation(),t.setSelectedValue(i)},{pressProps:_,isPressed:v}=Ce({onPressStart:c,onPressEnd:l,onPressChange:u,onPress:d,onPressUp:f,onClick:p,isDisabled:m}),{pressProps:y,isPressed:b}=Ce({onPressStart:c,onPressEnd:l,onPressChange:u,onPressUp:f,onClick:p,isDisabled:m,onPress(e){d?.(e),t.setSelectedValue(i),r.current?.focus()}}),{focusableProps:x}=ve(H(e,{onFocus:()=>t.setLastFocusedValue(i)}),r),S=H(_,x),w=je(e,{labelable:!0}),T=-1;t.selectedValue==null?(t.lastFocusedValue===i||t.lastFocusedValue==null)&&(T=0):t.selectedValue===i&&(T=0),m&&(T=void 0);let{name:E,form:D,descriptionId:O,errorMessageId:k,validationBehavior:A}=rt.get(t);n(r,t.defaultSelectedValue,t.setSelectedValue),fe({validationBehavior:A},t,r);let j=C();return{labelProps:H(y,(0,J.useMemo)(()=>({onClick:e=>e.preventDefault(),onMouseDown:e=>e.preventDefault()}),[])),inputProps:H(w,{...S,type:`radio`,name:E,form:D,tabIndex:T,disabled:m,required:t.isRequired&&A===`native`,checked:h,value:i,onChange:g,"aria-describedby":[e[`aria-describedby`],j.id,t.isInvalid?k:null,O].filter(Boolean).join(` `)||void 0}),descriptionProps:j,isDisabled:m,isSelected:h,isPressed:v||b}}function at(e,t){let{name:n,form:r,isReadOnly:i,isRequired:a,isDisabled:o,orientation:s=`vertical`,validationBehavior:c=`aria`}=e,{direction:l}=De(),{isInvalid:u,validationErrors:d,validationDetails:f}=t.displayValidation,{labelProps:p,fieldProps:m,descriptionProps:h,errorMessageProps:g}=ue({...e,labelElementType:`span`,isInvalid:t.isInvalid,errorMessage:e.errorMessage||d}),_=je(e,{labelable:!0}),{focusWithinProps:v}=_e({onBlurWithin(n){e.onBlur?.(n),t.selectedValue||t.setLastFocusedValue(null)},onFocusWithin:e.onFocus,onFocusWithinChange:e.onFocusChange}),y=e=>{let n;switch(e.key){case`ArrowRight`:n=l===`rtl`&&s!==`vertical`?`prev`:`next`;break;case`ArrowLeft`:n=l===`rtl`&&s!==`vertical`?`next`:`prev`;break;case`ArrowDown`:n=`next`;break;case`ArrowUp`:n=`prev`;break;default:return}e.preventDefault();let r=Me(e.currentTarget,{from:ie(e),accept:e=>e instanceof be(e).HTMLInputElement&&e.type===`radio`}),i;n===`next`?(i=r.nextNode(),i||=(r.currentNode=e.currentTarget,r.firstChild())):(i=r.previousNode(),i||=(r.currentNode=e.currentTarget,r.lastChild())),i&&(i.focus(),t.setSelectedValue(i.value))},b=de(n);return rt.set(t,{name:b,form:r,descriptionId:h.id,errorMessageId:g.id,validationBehavior:c}),{radioGroupProps:H(_,{role:`radiogroup`,onKeyDown:y,"aria-invalid":t.isInvalid||void 0,"aria-errormessage":e[`aria-errormessage`],"aria-readonly":i||void 0,"aria-required":a||void 0,"aria-disabled":o||void 0,"aria-orientation":s,...m,...v}),labelProps:p,descriptionProps:h,errorMessageProps:g,isInvalid:u,validationErrors:d,validationDetails:f}}var ot=Math.round(Math.random()*1e10),st=0;function ct(e){let t=(0,J.useMemo)(()=>e.name||`radio-group-${ot}-${++st}`,[e.name]),[n,r]=P(e.value,e.defaultValue??null,e.onChange),[i]=(0,J.useState)(n),[a,o]=(0,J.useState)(null),s=T({...e,value:n}),c=t=>{!e.isReadOnly&&!e.isDisabled&&(r(t),s.commitValidation())},l=s.displayValidation.isInvalid;return{...s,name:t,selectedValue:n,defaultSelectedValue:e.value===void 0?e.defaultValue??null:i,setSelectedValue:c,lastFocusedValue:a,setLastFocusedValue:o,isDisabled:e.isDisabled||!1,isReadOnly:e.isReadOnly||!1,isRequired:e.isRequired||!1,validationState:e.validationState||(l?`invalid`:null),isInvalid:l}}var lt=(0,J.createContext)(null),ut=(0,J.createContext)(null),dt=(0,J.createContext)(null),ft=(0,J.forwardRef)(function(e,t){[e,t]=k(e,t,lt);let{validationBehavior:n}=s(y)||{},r=e.validationBehavior??n??`native`,o=ct({...e,validationBehavior:r}),[c,l]=ke(!e[`aria-label`]&&!e[`aria-labelledby`]),{radioGroupProps:d,labelProps:f,descriptionProps:p,errorMessageProps:h,...g}=at({...e,label:l,validationBehavior:r},o),_=a({...e,values:{orientation:e.orientation||`vertical`,isDisabled:o.isDisabled,isReadOnly:o.isReadOnly,isRequired:o.isRequired,isInvalid:o.isInvalid,state:o},defaultClassName:`react-aria-RadioGroup`}),v=je(e,{global:!0});return J.createElement(j.div,{...H(v,_,d),ref:t,slot:e.slot||void 0,"data-orientation":e.orientation||`vertical`,"data-invalid":o.isInvalid||void 0,"data-disabled":o.isDisabled||void 0,"data-readonly":o.isReadOnly||void 0,"data-required":o.isRequired||void 0},J.createElement(Ae,{values:[[dt,o],[z,{...f,ref:c,elementType:`span`}],[m,{slots:{description:p,errorMessage:h}}],[u,g]]},J.createElement(i,null,_.children)))}),pt=(0,J.createContext)(null),mt=(0,J.forwardRef)(function(e,t){let{inputRef:n=null,...i}=e;[e,t]=k(i,t,ut);let o=J.useContext(dt),s=w((0,J.useMemo)(()=>r(n,e.inputRef===void 0?null:e.inputRef),[n,e.inputRef])),c=it({...l(e),children:typeof e.children==`function`?!0:e.children},o,s),{descriptionProps:u,isSelected:d,isDisabled:f}=c,p=a({...e,defaultClassName:`react-aria-RadioField`,values:{isSelected:d,isDisabled:f,isReadOnly:o.isReadOnly,isInvalid:o.isInvalid,isRequired:o.isRequired}}),h=je(e,{global:!0});return delete h.id,delete h.onClick,J.createElement(j.div,{...H(h,p),ref:t,"data-selected":d||void 0,"data-disabled":f||void 0,"data-readonly":o.isReadOnly||void 0,"data-invalid":o.isInvalid||void 0,"data-required":o.isRequired||void 0},J.createElement(Ae,{values:[[Oe,{isSelected:d}],[pt,{...c,inputRef:s,defaultClassName:`react-aria-RadioButton`}],[m,{slots:{description:u}}]]},p.children))}),ht=(0,J.forwardRef)(function(e,t){let{labelProps:n,inputProps:r,isSelected:i,isDisabled:s,isPressed:c,defaultClassName:l,inputRef:u}=(0,J.useContext)(pt),d=J.useContext(dt),{isFocused:f,isFocusVisible:p,focusProps:m}=Te(),h=s||d.isReadOnly,{hoverProps:g,isHovered:_}=ne({...e,isDisabled:h}),v=a({...e,defaultClassName:l,values:{isSelected:i,isPressed:c,isHovered:_,isFocused:f,isFocusVisible:p,isDisabled:s,isReadOnly:d.isReadOnly,isInvalid:d.isInvalid,isRequired:d.isRequired}}),y=je(e,{global:!0});return delete y.id,delete y.onClick,J.createElement(j.label,{...H(y,n,g,v),ref:t,"data-selected":i||void 0,"data-pressed":c||void 0,"data-hovered":_||void 0,"data-focused":f||void 0,"data-focus-visible":p||void 0,"data-disabled":s||void 0,"data-readonly":d.isReadOnly||void 0,"data-invalid":d.isInvalid||void 0,"data-required":d.isRequired||void 0},J.createElement(o,{elementType:`span`},J.createElement(`input`,{...H(r,m),ref:u})),v.children)}),gt=(0,J.createContext)({}),_t=({children:e,className:t,...n})=>{let r=J.useMemo(()=>Fe(),[]);return(0,Y.jsx)(mt,{"data-slot":`radio`,...n,className:F(t,r.base()),children:t=>(0,Y.jsx)(gt,{value:{slots:r,state:t},children:typeof e==`function`?e(t):e})})};_t.displayName=`HeroUI.Radio`;var vt=({children:e,className:t,...n})=>{let{slots:r}=(0,J.useContext)(gt);return(0,Y.jsx)(ht,{"data-slot":`radio-content`,...n,className:F(t,r?.content()),children:e})};vt.displayName=`HeroUI.Radio.Content`;var yt=({children:e,className:t,...n})=>{let{slots:r}=(0,J.useContext)(gt);return(0,Y.jsx)(_.span,{className:g(r?.control,t),"data-slot":`radio-control`,...n,children:e})};yt.displayName=`HeroUI.Radio.Control`;var bt=({children:e,className:t,...n})=>{let{slots:r,state:i}=(0,J.useContext)(gt),a=typeof e==`function`?e(i??{}):e;return(0,Y.jsx)(_.span,{"aria-hidden":`true`,className:g(r?.indicator,t),"data-slot":`radio-indicator`,...n,children:a})};bt.displayName=`HeroUI.Radio.Indicator`;var X=Object.assign(_t,{Root:_t,Content:vt,Control:yt,Indicator:bt}),xt=({children:e,className:t,variant:n,...r})=>{let i=J.useMemo(()=>Ie({variant:n}),[n]);return(0,Y.jsx)(ft,{"data-slot":`radio-group`,...r,className:F(t,i),children:t=>(0,Y.jsx)(Y.Fragment,{children:typeof e==`function`?e(t):e})})},St=Object.assign(xt,{Root:xt}),Ct={};Ct={decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:`حقل رقمي`};var wt={};wt={decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:`Номер на полето`};var Tt={};Tt={decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:`Číselné pole`};var Et={};Et={decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:`Talfelt`};var Dt={};Dt={decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:`Nummernfeld`};var Ot={};Ot={decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:`Πεδίο αριθμού`};var kt={};kt={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:`Number field`};var At={};At={decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo de número`};var jt={};jt={decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:`Numbri väli`};var Mt={};Mt={decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:`Numerokenttä`};var Nt={};Nt={decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:`Champ de nombre`};var Pt={};Pt={decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:`שדה מספר`};var Ft={};Ft={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:`Polje broja`};var It={};It={decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:`Számmező`};var Lt={};Lt={decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:`Campo numero`};var Rt={};Rt={decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:`数値フィールド`};var zt={};zt={decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:`번호 필드`};var Bt={};Bt={decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:`Numerio laukas`};var Vt={};Vt={decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:`Skaitļu lauks`};var Ht={};Ht={decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:`Tallfelt`};var Ut={};Ut={decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:`Getalveld`};var Wt={};Wt={decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:`Pole numeru`};var Gt={};Gt={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo de número`};var Kt={};Kt={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:`Campo numérico`};var qt={};qt={decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:`Câmp numeric`};var Jt={};Jt={decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:`Числовое поле`};var Yt={};Yt={decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:`Číselné pole`};var Xt={};Xt={decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:`Številčno polje`};var Zt={};Zt={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:`Polje broja`};var Qt={};Qt={decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:`Nummerfält`};var $t={};$t={decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:`Sayı alanı`};var en={};en={decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:`Поле номера`};var tn={};tn={decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:`数字字段`};var nn={};nn={decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:`數字欄位`};var rn={};rn={"ar-AE":Ct,"bg-BG":wt,"cs-CZ":Tt,"da-DK":Et,"de-DE":Dt,"el-GR":Ot,"en-US":kt,"es-ES":At,"et-EE":jt,"fi-FI":Mt,"fr-FR":Nt,"he-IL":Pt,"hr-HR":Ft,"hu-HU":It,"it-IT":Lt,"ja-JP":Rt,"ko-KR":zt,"lt-LT":Bt,"lv-LV":Vt,"nb-NO":Ht,"nl-NL":Ut,"pl-PL":Wt,"pt-BR":Gt,"pt-PT":Kt,"ro-RO":qt,"ru-RU":Jt,"sk-SK":Yt,"sl-SI":Xt,"sr-SP":Zt,"sv-SE":Qt,"tr-TR":$t,"uk-UA":en,"zh-CN":tn,"zh-TW":nn};function an(){return typeof window<`u`&&window.InputEvent&&typeof InputEvent.prototype.getTargetRanges==`function`}function on(e,t,n){let r=R(e=>{let r=n.current;if(!r)return;let i=null;switch(e.inputType){case`historyUndo`:case`historyRedo`:return;case`insertLineBreak`:return;case`deleteContent`:case`deleteByCut`:case`deleteByDrag`:i=r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case`deleteContentForward`:i=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd+1):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case`deleteContentBackward`:i=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart-1)+r.value.slice(r.selectionStart):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case`deleteSoftLineBackward`:case`deleteHardLineBackward`:i=r.value.slice(r.selectionStart);break;default:e.data!=null&&(i=r.value.slice(0,r.selectionStart)+e.data+r.value.slice(r.selectionEnd));break}(i==null||!t.validate(i))&&e.preventDefault()});(0,J.useEffect)(()=>{if(!an()||!n.current)return;let e=n.current;return e.addEventListener(`beforeinput`,r,!1),()=>{e.removeEventListener(`beforeinput`,r,!1)}},[n]);let i=an()?null:e=>{let n=ie(e).value.slice(0,ie(e).selectionStart)+e.data+ie(e).value.slice(ie(e).selectionEnd);t.validate(n)||e.preventDefault()},{labelProps:a,inputProps:o,descriptionProps:s,errorMessageProps:c,...l}=he(e,n),u=(0,J.useRef)(null);return{inputProps:H(o,{onBeforeInput:i,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:r}=n.current;u.current={value:e,selectionStart:t,selectionEnd:r}},onCompositionEnd(){if(n.current&&!t.validate(n.current.value)){let{value:e,selectionStart:r,selectionEnd:i}=u.current;n.current.value=e,n.current.setSelectionRange(r,i),t.setInputValue(e)}}}),labelProps:a,descriptionProps:s,errorMessageProps:c,...l}}function sn(e,t){let{onScroll:n,isDisabled:r}=e,i=(0,J.useCallback)(e=>{e.ctrlKey||(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);I(t,`wheel`,r?void 0:i)}var cn={};cn={Empty:`فارغ`};var ln={};ln={Empty:`Изпразни`};var un={};un={Empty:`Prázdné`};var dn={};dn={Empty:`Tom`};var fn={};fn={Empty:`Leer`};var pn={};pn={Empty:`Άδειο`};var mn={};mn={Empty:`Empty`};var hn={};hn={Empty:`Vacío`};var gn={};gn={Empty:`Tühjenda`};var _n={};_n={Empty:`Tyhjä`};var vn={};vn={Empty:`Vide`};var yn={};yn={Empty:`ריק`};var bn={};bn={Empty:`Prazno`};var xn={};xn={Empty:`Üres`};var Sn={};Sn={Empty:`Vuoto`};var Cn={};Cn={Empty:`空`};var wn={};wn={Empty:`비어 있음`};var Tn={};Tn={Empty:`Tuščias`};var En={};En={Empty:`Tukšs`};var Dn={};Dn={Empty:`Tom`};var On={};On={Empty:`Leeg`};var kn={};kn={Empty:`Pusty`};var An={};An={Empty:`Vazio`};var jn={};jn={Empty:`Vazio`};var Mn={};Mn={Empty:`Gol`};var Nn={};Nn={Empty:`Не заполнено`};var Pn={};Pn={Empty:`Prázdne`};var Fn={};Fn={Empty:`Prazen`};var In={};In={Empty:`Prazno`};var Ln={};Ln={Empty:`Tomt`};var Rn={};Rn={Empty:`Boş`};var zn={};zn={Empty:`Пусто`};var Bn={};Bn={Empty:`空`};var Vn={};Vn={Empty:`空白`};var Hn={};Hn={"ar-AE":cn,"bg-BG":ln,"cs-CZ":un,"da-DK":dn,"de-DE":fn,"el-GR":pn,"en-US":mn,"es-ES":hn,"et-EE":gn,"fi-FI":_n,"fr-FR":vn,"he-IL":yn,"hr-HR":bn,"hu-HU":xn,"it-IT":Sn,"ja-JP":Cn,"ko-KR":wn,"lt-LT":Tn,"lv-LV":En,"nb-NO":Dn,"nl-NL":On,"pl-PL":kn,"pt-BR":An,"pt-PT":jn,"ro-RO":Mn,"ru-RU":Nn,"sk-SK":Pn,"sl-SI":Fn,"sr-SP":In,"sv-SE":Ln,"tr-TR":Rn,"uk-UA":zn,"zh-CN":Bn,"zh-TW":Vn};function Un(e){return e&&e.__esModule?e.default:e}var Wn=()=>{};function Gn(e){let t=(0,J.useRef)(void 0),{value:n,textValue:r,minValue:i,maxValue:a,isDisabled:o,isReadOnly:s,isRequired:l,onIncrement:u,onIncrementPage:d,onDecrement:f,onDecrementPage:p,onDecrementToMin:m,onIncrementToMax:h}=e,g=c(Un(Hn),`@react-aria/spinbutton`),_=(0,J.useRef)(!1),v=(0,J.useCallback)(()=>{clearTimeout(t.current),_.current=!1},[]),y=R(()=>{v()});(0,J.useEffect)(()=>()=>y(),[]);let b=e=>{if(!(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||s||e.nativeEvent.isComposing))switch(e.key){case`PageUp`:if(d){e.preventDefault(),d?.();break}case`ArrowUp`:case`Up`:u&&(e.preventDefault(),u?.());break;case`PageDown`:if(p){e.preventDefault(),p?.();break}case`ArrowDown`:case`Down`:f&&(e.preventDefault(),f?.());break;case`Home`:m&&(e.preventDefault(),m?.());break;case`End`:h&&(e.preventDefault(),h?.());break}},x=(0,J.useRef)(!1),S=()=>{x.current=!0},C=()=>{x.current=!1},w=r===``?g.format(`Empty`):(r||`${n}`).replace(`-`,`−`);(0,J.useEffect)(()=>{x.current&&(ce(`assertive`),ge(w,`assertive`))},[w]);let T=(0,J.useCallback)(()=>{v()},[v]),E=R(u??Wn),D=R(f??Wn),O=R(()=>{(a===void 0||isNaN(a)||n===void 0||isNaN(n)||n<a)&&(E(),k(60))}),k=R(e=>{y(),_.current=!0,t.current=window.setTimeout(O,e)}),A=R(()=>{(i===void 0||isNaN(i)||n===void 0||isNaN(n)||n>i)&&(D(),j(60))}),j=R(e=>{y(),_.current=!0,t.current=window.setTimeout(A,e)}),M=e=>{e.preventDefault()},{addGlobalListener:N,removeAllGlobalListeners:P}=le(),F=(0,J.useRef)(!1),[I,L]=(0,J.useState)(null);(0,J.useEffect)(()=>{I===`touch`?k(600):I?k(400):I||y()},[I]);let[z,B]=(0,J.useState)(null);return(0,J.useEffect)(()=>{z===`touch`?j(600):z?j(400):z||y()},[z]),{spinButtonProps:{role:`spinbutton`,"aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":w,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":o||void 0,"aria-readonly":s||void 0,"aria-required":l||void 0,onKeyDown:b,onFocus:S,onBlur:C},incrementButtonProps:{onPressStart:e=>{v(),e.pointerType===`touch`?(N(window,`pointercancel`,T,{capture:!0}),F.current=!1,L(`touch`)):(u?.(),L(`mouse`)),N(window,`contextmenu`,M)},onPressUp:e=>{v(),e.pointerType===`touch`&&(F.current=!0),P(),L(null)},onPressEnd:e=>{v(),e.pointerType===`touch`&&!_.current&&F.current&&u?.(),F.current=!1,L(null)},onFocus:S,onBlur:C},decrementButtonProps:{onPressStart:e=>{v(),e.pointerType===`touch`?(N(window,`pointercancel`,T,{capture:!0}),F.current=!1,B(`touch`)):(f?.(),B(`mouse`))},onPressUp:e=>{v(),e.pointerType===`touch`&&(F.current=!0),P(),B(null)},onPressEnd:e=>{v(),e.pointerType===`touch`&&!_.current&&F.current&&f?.(),F.current=!1,B(null)},onFocus:S,onBlur:C}}}var Kn=O(h(),1);function qn(e){return e&&e.__esModule?e.default:e}function Jn(e,t,r){let{id:i,decrementAriaLabel:a,incrementAriaLabel:o,isDisabled:s,isReadOnly:l,isRequired:u,minValue:d,maxValue:f,autoFocus:p,label:m,formatOptions:h,onBlur:g=()=>{},onFocus:_,onFocusChange:v,onKeyDown:y,onKeyUp:b,description:C,errorMessage:w,isWheelDisabled:T,...E}=e,{increment:D,incrementToMax:O,decrement:k,decrementToMin:A,numberValue:j,inputValue:M,commit:N,commitValidation:P}=t,F=c(qn(rn),`@react-aria/numberfield`),I=(0,J.useCallback)(()=>{let e=r.current?.value??``;(0,Kn.flushSync)(()=>{N()}),r.current?.value!==e&&ge(r.current?.value??``,`assertive`)},[N,r]),L=de(i),{focusProps:R}=we({onBlur(){I()}}),z=tt(h),B=(0,J.useMemo)(()=>z.resolvedOptions(),[z]),V=tt({...h,currencySign:void 0}),{spinButtonProps:ne,incrementButtonProps:re,decrementButtonProps:ae}=Gn({isDisabled:s,isReadOnly:l,isRequired:u,maxValue:f,minValue:d,onIncrement:D,onIncrementToMax:O,onDecrement:k,onDecrementToMin:A,value:j,textValue:(0,J.useMemo)(()=>isNaN(j)?``:V.format(j),[V,j])}),[oe,se]=(0,J.useState)(!1),{focusWithinProps:ce}=_e({isDisabled:s,onFocusWithinChange:se});sn({onScroll:(0,J.useCallback)(e=>{Math.abs(e.deltaY)<=Math.abs(e.deltaX)||(e.deltaY>0?D():e.deltaY<0&&k())},[k,D]),isDisabled:T||s||l||!oe},r);let le=(B.maximumFractionDigits??0)>0,ue=t.minValue===void 0||isNaN(t.minValue)||t.minValue<0,fe=`numeric`;ee()?ue?fe=`text`:le&&(fe=`decimal`):me()&&(ue?fe=`numeric`:le&&(fe=`decimal`));let pe=e=>{t.validate(e)&&t.setInputValue(e)},he=t=>{e.onPaste?.(t);let n=ie(t);n&&(n.selectionEnd??-1)-(n.selectionStart??0)===n.value.length&&(t.preventDefault(),N(t.clipboardData?.getData?.(`text/plain`)?.trim()??``))},ve=je(e),ye=(0,J.useCallback)(e=>{e.nativeEvent.isComposing||(e.key===`Enter`?((0,Kn.flushSync)(()=>{N()}),P()):e.continuePropagation())},[N,P]),{isInvalid:be,validationErrors:xe,validationDetails:Se}=t.displayValidation,{labelProps:Ce,inputProps:Te,descriptionProps:U,errorMessageProps:W}=on({...E,...ve,name:void 0,form:void 0,label:m,autoFocus:p,isDisabled:s,isReadOnly:l,isRequired:u,validate:void 0,[x]:t,value:M,defaultValue:`!`,autoComplete:`off`,"aria-label":e[`aria-label`]||void 0,"aria-labelledby":e[`aria-labelledby`]||void 0,id:L,type:`text`,inputMode:fe,onChange:pe,onBlur:g,onFocus:_,onFocusChange:v,onKeyDown:(0,J.useMemo)(()=>S(ye,y),[ye,y]),onKeyUp:b,onPaste:he,description:C,errorMessage:w},t,r);n(r,t.defaultNumberValue,t.setNumberValue),Yn(t,e.validationBehavior,e.commitBehavior,r,t.minValue,t.maxValue,e.step,t.numberValue);let De=H(ne,R,Te,{role:null,"aria-roledescription":Ee()?null:F.format(`numberField`),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:`off`,spellCheck:`false`});e.validationBehavior===`native`&&(De[`aria-required`]=void 0);let Oe=e=>{te()!==r.current&&(e.pointerType===`mouse`?r.current?.focus():e.target.focus())},ke=e[`aria-label`]||(typeof e.label==`string`?e.label:``),G;ke||(G=e.label==null?e[`aria-labelledby`]:Ce.id);let Ae=de(),K=de(),Me=H(re,{"aria-label":o||F.format(`increase`,{fieldLabel:ke}).trim(),id:G&&!o?Ae:null,"aria-labelledby":G&&!o?`${Ae} ${G}`:null,"aria-controls":L,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:Oe}),Ne=H(ae,{"aria-label":a||F.format(`decrease`,{fieldLabel:ke}).trim(),id:G&&!a?K:null,"aria-labelledby":G&&!a?`${K} ${G}`:null,"aria-controls":L,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:Oe});return{groupProps:{...ce,role:`group`,"aria-disabled":s,"aria-invalid":be?`true`:void 0},labelProps:Ce,inputProps:De,incrementButtonProps:Me,decrementButtonProps:Ne,errorMessageProps:W,descriptionProps:U,isInvalid:be,validationErrors:xe,validationDetails:Se}}var Z=null;function Yn(e,t,n,r,i,a,o,s){b(()=>{let c=r.current;if(n!==`validate`||e.realtimeValidation.isInvalid||!c||c.disabled||(!Z&&typeof document<`u`&&(Z=document.createElement(`input`),Z.type=`number`),!Z))return;Z.min=i!=null&&!isNaN(i)?String(i):``,Z.max=a!=null&&!isNaN(a)?String(a):``,Z.step=o!=null&&!isNaN(o)?String(o):``,Z.value=s!=null&&!isNaN(s)?String(s):``;let l=c.validity.valid&&Z.validity.valid,u=c.validationMessage||Z.validationMessage,d={isInvalid:!l,validationErrors:u?[u]:[],validationDetails:{badInput:c.validity.badInput,customError:c.validity.customError,patternMismatch:c.validity.patternMismatch,rangeOverflow:Z.validity.rangeOverflow,rangeUnderflow:Z.validity.rangeUnderflow,stepMismatch:Z.validity.stepMismatch,tooLong:c.validity.tooLong,tooShort:c.validity.tooShort,typeMismatch:c.validity.typeMismatch,valueMissing:c.validity.valueMissing,valid:l}};e.updateValidation(d),t===`native`&&!Z.validity.valid&&c.setCustomValidity(Z.validationMessage)})}function Xn(e){let{minValue:t,maxValue:n,step:r,formatOptions:i,value:a,defaultValue:o=NaN,onChange:s,locale:c,isDisabled:l,isReadOnly:u,commitBehavior:d=`snap`}=e;a===null&&(a=NaN);let f=(0,J.useCallback)(e=>r===void 0||isNaN(r)?oe(e,t,n):L(e,t,n,r),[r,t,n]);a!==void 0&&!isNaN(a)&&d===`snap`&&(a=f(a)),!isNaN(o)&&d===`snap`&&(o=f(o));let[p,m]=P(a,isNaN(o)?NaN:o,s),[h]=(0,J.useState)(p),[g,_]=(0,J.useState)(()=>isNaN(p)?``:new Ve(c,i).format(p)),v=(0,J.useMemo)(()=>new Ke(c,i),[c,i]),y=(0,J.useMemo)(()=>v.getNumberingSystem(g),[v,g]),b=(0,J.useMemo)(()=>new Ve(c,{...i,numberingSystem:y}),[c,i,y]),x=(0,J.useMemo)(()=>b.resolvedOptions(),[b]),S=(0,J.useCallback)(e=>isNaN(e)||e===null?``:b.format(e),[b]),C=T({...e,value:p}),w=r!==void 0&&!isNaN(r)?r:1;x.style===`percent`&&(r===void 0||isNaN(r))&&(w=.01);let[E,D]=(0,J.useState)(p),[O,k]=(0,J.useState)(c),[A,j]=(0,J.useState)(i);(!Object.is(p,E)||c!==O||!Zn(i,A))&&(_(S(p)),D(p),k(c),j(i));let M=(0,J.useMemo)(()=>v.parse(g),[v,g]),N=e=>{let t=e===void 0?g:e,n=M;if(e!==void 0&&(n=v.parse(t)),!t.length){m(NaN),_(a===void 0?``:S(p));return}if(isNaN(n)){_(S(p));return}let r=d===`snap`?f(n):n;r=v.parse(S(r));let i=r!==p;m(r),_(S(a===void 0?r:p)),i&&C.commitValidation()},F=(e,r=0)=>{let i=M;if(isNaN(i))return L(isNaN(r)?0:r,t,n,w);{let r=L(i,t,n,w);return e===`+`&&r>i||e===`-`&&r<i?r:L(Qn(e,i,w),t,n,w)}},I=()=>{let e=F(`+`,t);e===p&&_(S(e)),m(e),C.commitValidation()},R=()=>{let e=F(`-`,n);e===p&&_(S(e)),m(e),C.commitValidation()},z=()=>{n!=null&&(m(L(n,t,n,w)),C.commitValidation())},B=()=>{t!=null&&(m(t),C.commitValidation())},ee=(0,J.useMemo)(()=>!l&&!u&&(isNaN(M)||n===void 0||isNaN(n)||L(M,t,n,w)>M||Qn(`+`,M,w)<=n),[l,u,t,n,w,M]),V=(0,J.useMemo)(()=>!l&&!u&&(isNaN(M)||t===void 0||isNaN(t)||L(M,t,n,w)<M||Qn(`-`,M,w)>=t),[l,u,t,n,w,M]),te=e=>v.isValidPartialNumber(e,t,n);return{...C,validate:te,increment:I,incrementToMax:z,decrement:R,decrementToMin:B,canIncrement:ee,canDecrement:V,minValue:t,maxValue:n,numberValue:M,defaultNumberValue:isNaN(o)?h:o,setNumberValue:m,setInputValue:_,inputValue:g,commit:N}}function Zn(e,t){if(e===t)return!0;if(!e||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(t[r]!==e[r])return!1;return!0}function Qn(e,t,n){let r=e===`+`?t+n:t-n;if(t%1!=0||n%1!=0){let i=t.toString().split(`.`),a=n.toString().split(`.`),o=i[1]&&i[1].length||0,s=a[1]&&a[1].length||0,c=10**Math.max(o,s);t=Math.round(t*c),n=Math.round(n*c),r=e===`+`?t+n:t-n,r/=c}return r}var $n=(0,J.createContext)(null),er=(0,J.createContext)(null),tr=(0,J.forwardRef)(function(e,t){[e,t]=k(e,t,$n);let{validationBehavior:n}=s(y)||{},r=e.validationBehavior??n??`native`,{locale:i}=De(),o=Xn({...e,locale:i,validationBehavior:r}),c=(0,J.useRef)(null),[d,f]=ke(!e[`aria-label`]&&!e[`aria-labelledby`]),{labelProps:h,groupProps:g,inputProps:_,incrementButtonProps:v,decrementButtonProps:b,descriptionProps:x,errorMessageProps:S,...C}=Jn({...l(e),label:f,validationBehavior:r},o,c),w=a({...e,values:{state:o,isDisabled:e.isDisabled||!1,isInvalid:C.isInvalid||!1,isRequired:e.isRequired||!1,isReadOnly:e.isReadOnly||!1},defaultClassName:`react-aria-NumberField`}),T=je(e,{global:!0});return delete T.id,J.createElement(Ae,{values:[[er,o],[p,g],[se,{..._,ref:c}],[z,{...h,ref:d}],[E,{slots:{increment:v,decrement:b}}],[m,{slots:{description:x,errorMessage:S}}],[u,C]]},J.createElement(j.div,{...T,...w,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-required":e.isRequired||void 0,"data-invalid":C.isInvalid||void 0}),e.name&&J.createElement(`input`,{type:`hidden`,name:e.name,form:e.form,value:isNaN(o.numberValue)?``:o.numberValue,disabled:e.isDisabled||void 0}))}),nr=(0,J.createContext)({}),rr=({children:e,className:t,fullWidth:n,variant:r,...i})=>{let a=J.useMemo(()=>Pe({fullWidth:n,variant:r}),[n,r]);return(0,Y.jsx)(nr,{value:{slots:a},children:(0,Y.jsx)(tr,{"data-slot":`number-field`,...i,className:F(t,a?.base()),children:t=>(0,Y.jsx)(Y.Fragment,{children:typeof e==`function`?e(t):e})})})},Q=Object.assign(rr,{Root:rr,Group:({children:e,className:t,...n})=>{let{slots:r}=(0,J.useContext)(nr);return(0,Y.jsx)(M,{className:F(t,r?.group()),"data-slot":`number-field-group`,...n,children:t=>(0,Y.jsx)(Y.Fragment,{children:typeof e==`function`?e(t):e})})},Input:({className:e,...t})=>{let{slots:n}=(0,J.useContext)(nr);return(0,Y.jsx)(ae,{className:F(e,n?.input()),"data-slot":`number-field-input`,...t})},IncrementButton:({children:e,className:n,...r})=>{let{slots:i}=(0,J.useContext)(nr);return(0,Y.jsx)(t,{className:F(n,i?.incrementButton()),"data-slot":`number-field-increment-button`,slot:`increment`,...r,children:e&&J.isValidElement(e)?e:(0,Y.jsx)(f,{"data-slot":`number-field-increment-button-icon`})})},DecrementButton:({children:e,className:n,...r})=>{let{slots:i}=(0,J.useContext)(nr);return(0,Y.jsx)(t,{className:F(n,i?.decrementButton()),"data-slot":`number-field-decrement-button`,slot:`decrement`,...r,children:e&&J.isValidElement(e)?e:(0,Y.jsx)(N,{"data-slot":`number-field-decrement-button-icon`})})}}),ir=Se(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),ar=`*/10 * * * *`,or=[`周日`,`周一`,`周二`,`周三`,`周四`,`周五`,`周六`],sr=[{title:`高频检查`,presets:[{id:`every5`,label:`每 5 分钟`,description:`更频繁地检查推送,适合更新很密集的账号。`,value:`*/5 * * * *`},{id:`every10`,label:`每 10 分钟`,description:`推荐:全天每 10 分钟检查一次推送。`,value:`*/10 * * * *`},{id:`every15`,label:`每 15 分钟`,description:`兼顾及时性和任务频率,适合大多数推送。`,value:`*/15 * * * *`},{id:`every30`,label:`每 30 分钟`,description:`检查频率较低,适合不太活跃的推送。`,value:`*/30 * * * *`}]},{title:`按小时轮询`,presets:[{id:`hourly`,label:`每小时一次`,description:`每个整点执行,例如 00:00、01:00。`,value:`0 * * * *`},{id:`every2Hours`,label:`每 2 小时`,description:`从 0 点开始,每隔 2 小时执行一次。`,value:`0 */2 * * *`},{id:`every3Hours`,label:`每 3 小时`,description:`从 0 点开始,每隔 3 小时执行一次。`,value:`0 */3 * * *`},{id:`every6Hours`,label:`每 6 小时`,description:`每天 0 点、6 点、12 点、18 点执行。`,value:`0 */6 * * *`}]},{title:`每天固定时间`,presets:[{id:`daily8`,label:`每天上午 8 点`,description:`每天早上固定执行一次。`,value:`0 8 * * *`},{id:`daily9`,label:`每天上午 9 点`,description:`每天固定执行一次。`,value:`0 9 * * *`},{id:`daily12`,label:`每天中午 12 点`,description:`每天午间固定执行一次。`,value:`0 12 * * *`},{id:`daily18`,label:`每天晚上 6 点`,description:`每天傍晚固定执行一次。`,value:`0 18 * * *`},{id:`daily20`,label:`每天晚上 8 点`,description:`适合晚间集中推送。`,value:`0 20 * * *`},{id:`daily22`,label:`每天晚上 10 点`,description:`每天夜间固定执行一次。`,value:`0 22 * * *`}]},{title:`每天多次`,presets:[{id:`daily9And20`,label:`每天 9 点和 20 点`,description:`每天早晚各执行一次。`,value:`0 9,20 * * *`},{id:`daily9And12And18`,label:`每天 9 点、12 点、18 点`,description:`每天早中晚各执行一次。`,value:`0 9,12,18 * * *`}]},{title:`按星期`,presets:[{id:`weekday9`,label:`工作日上午 9 点`,description:`只在周一到周五执行。`,value:`0 9 * * 1,2,3,4,5`},{id:`weekday18`,label:`工作日晚上 6 点`,description:`只在周一到周五的傍晚执行。`,value:`0 18 * * 1,2,3,4,5`},{id:`weekend10`,label:`周末上午 10 点`,description:`只在周六和周日执行。`,value:`0 10 * * 0,6`},{id:`friday20`,label:`每周五晚上 8 点`,description:`每周五固定执行一次。`,value:`0 20 * * 5`}]}],cr=sr.flatMap(e=>e.presets),lr={minuteType:`interval`,minuteInterval:10,specificMinutes:[],hourType:`every`,hourInterval:1,specificHours:[],dayType:`every`,dayInterval:1,specificDays:[],weekType:`every`,specificWeeks:[]},ur=e=>String(e).padStart(2,`0`),dr=(e,t,n,r)=>Number.isFinite(e)?Math.min(n,Math.max(t,Math.trunc(e))):r,$=(e,t,n)=>Array.from(new Set(e.filter(e=>Number.isInteger(e)&&e>=t&&e<=n))).sort((e,t)=>e-t),fr=(e,t,n)=>$(e.split(`,`).map(e=>Number(e.trim())).filter(e=>Number.isFinite(e)),t,n),pr=e=>$(e.split(`,`).map(e=>{let t=Number(e.trim());return t===7?0:t}).filter(e=>Number.isFinite(e)),0,6),mr=(e,t,n,r)=>{if(e===`*`||e===`*/1`)return{type:`every`,interval:r,specific:[]};let i=e.match(/^\*\/(\d+)$/);if(i){let e=dr(Number(i[1]),1,n,r);return e<=1?{type:`every`,interval:r,specific:[]}:{type:`interval`,interval:e,specific:[]}}let a=fr(e,t,n);return a.length>0?{type:`specific`,interval:r,specific:a}:{type:`every`,interval:r,specific:[]}},hr=e=>{let t=(e||ar).trim().split(/\s+/);if(t.length!==5)return{...lr};let[n,r,i,,a]=t,o=mr(n,0,59,10),s=mr(r,0,23,1),c=mr(i,1,31,1),l=a===`*`?[]:pr(a),u=l.length>0;return{minuteType:o.type,minuteInterval:o.interval,specificMinutes:o.specific,hourType:s.type,hourInterval:s.interval,specificHours:s.specific,dayType:u?`every`:c.type,dayInterval:u?1:c.interval,specificDays:u?[]:c.specific,weekType:u?`specific`:`every`,specificWeeks:l}},gr=e=>{let t=`*`,n=`*`,r=`*`,i=`*`;switch(e.minuteType){case`every`:t=`*`;break;case`interval`:t=e.minuteInterval<=1?`*`:`*/${e.minuteInterval}`;break;case`specific`:t=e.specificMinutes.length>0?$(e.specificMinutes,0,59).join(`,`):`0`;break}switch(e.hourType){case`every`:n=`*`;break;case`interval`:n=e.hourInterval<=1?`*`:`*/${e.hourInterval}`;break;case`specific`:n=e.specificHours.length>0?$(e.specificHours,0,23).join(`,`):`0`;break}switch(e.dayType){case`every`:r=`*`;break;case`interval`:r=e.dayInterval<=1?`*`:`*/${e.dayInterval}`;break;case`specific`:r=e.specificDays.length>0?$(e.specificDays,1,31).join(`,`):`1`;break}return e.weekType===`specific`&&(i=e.specificWeeks.length>0?$(e.specificWeeks,0,6).join(`,`):`*`),`${t} ${n} ${r} * ${i}`},_r=e=>{let t=(e||ar).trim().replace(/\s+/g,` `);return cr.find(e=>e.value===t)?.id??null},vr=e=>e.join(`、`),yr=e=>e.map(e=>`${e} 点`).join(`、`),br=e=>{if(e.weekType===`specific`&&e.specificWeeks.length>0){let t=$(e.specificWeeks,0,6);return t.length===5&&t.every(e=>[1,2,3,4,5].includes(e))?`工作日`:t.length===2&&t.every(e=>[0,6].includes(e))?`周末`:`每${t.map(e=>or[e]).join(`、`)}`}return e.dayType===`interval`&&e.dayInterval>1?`每隔 ${e.dayInterval} 天`:e.dayType===`specific`&&e.specificDays.length>0?`每月 ${vr($(e.specificDays,1,31))} 号`:`每天`},xr=e=>e.minuteType===`every`?`每分钟`:e.minuteType===`interval`?e.minuteInterval<=1?`每分钟`:`每 ${e.minuteInterval} 分钟`:`第 ${vr(e.specificMinutes.length>0?$(e.specificMinutes,0,59):[0])} 分钟`,Sr=e=>{let t=xr(e);if(e.hourType===`every`||e.hourType===`interval`&&e.hourInterval<=1)return e.minuteType===`specific`?`每小时的${t}`:`全天${t}`;if(e.hourType===`specific`){let n=e.specificHours.length>0?$(e.specificHours,0,23):[0];return e.minuteType===`specific`?`在 ${yr(n)} 的${t}`:`在 ${yr(n)} 内${t}`}return e.minuteType===`specific`?`从 0 点开始每隔 ${e.hourInterval} 小时,在${t}`:`从 0 点开始每隔 ${e.hourInterval} 小时,该小时内${t}`},Cr=e=>{let t=br(e),n=Sr(e);return`${t},${t===`每天`?n.replace(/^全天/,``):n}执行`},wr=e=>Cr(hr(e)),Tr=e=>{if(e.minuteType===`every`)return Array.from({length:60},(e,t)=>t);if(e.minuteType===`interval`){let t=Math.max(1,e.minuteInterval);return Array.from({length:Math.ceil(60/t)},(e,n)=>n*t).filter(e=>e<=59)}return e.specificMinutes.length>0?$(e.specificMinutes,0,59):[0]},Er=e=>{if(e.hourType===`every`)return Array.from({length:24},(e,t)=>t);if(e.hourType===`interval`){let t=Math.max(1,e.hourInterval);return Array.from({length:Math.ceil(24/t)},(e,n)=>n*t).filter(e=>e<=23)}return e.specificHours.length>0?$(e.specificHours,0,23):[0]},Dr=e=>{let t=[],n=Er(e),r=Tr(e);for(let e of n)for(let n of r)if(t.push(`${ur(e)}:${ur(n)}`),t.length>=6)return t;return t},Or=e=>{let t=Dr(e).join(`、`);return`${e.dayType===`every`&&e.weekType===`every`?`一天内示例`:`符合日期时,一天内示例`}:${t}`},kr=({value:t,onChange:n,disabled:r=!1,device:i=`desktop`})=>{let[a,o]=(0,J.useState)(!1),[s,c]=(0,J.useState)(`quick`),[l,u]=(0,J.useState)(_r(t)),[d,f]=(0,J.useState)(`interval`),[p,m]=(0,J.useState)(10),[h,g]=(0,J.useState)([]),[_,v]=(0,J.useState)(`every`),[y,b]=(0,J.useState)(1),[x,S]=(0,J.useState)([]),[C,w]=(0,J.useState)(`every`),[T,E]=(0,J.useState)(1),[O,k]=(0,J.useState)([]),[A,j]=(0,J.useState)(`every`),[M,N]=(0,J.useState)([]),P=e=>{f(e.minuteType),m(e.minuteInterval),g(e.specificMinutes),v(e.hourType),b(e.hourInterval),S(e.specificHours),w(e.dayType),E(e.dayInterval),k(e.specificDays),j(e.weekType),N(e.specificWeeks)},F=()=>({minuteType:d,minuteInterval:p,specificMinutes:h,hourType:_,hourInterval:y,specificHours:x,dayType:C,dayInterval:T,specificDays:O,weekType:A,specificWeeks:M});(0,J.useEffect)(()=>{if(!a)return;let e=hr(t||ar);P(e),u(_r(gr(e))),c(`quick`)},[t,a]);let I=()=>gr(F()),L=()=>Cr(F()),R=()=>Or(F()),z=()=>Tr({...F(),minuteType:`interval`,minuteInterval:p}).slice(0,5).join(`、`),ee=()=>Er({...F(),hourType:`interval`,hourInterval:y}).slice(0,5).map(e=>`${e} 点`).join(`、`),te=()=>{n(I()),o(!1)},ne=e=>{P(hr(e.value)),u(e.id)},ie=e=>{if(e===null||Array.isArray(e))return;let t=cr.find(t=>t.id===String(e));t&&ne(t)},ae=e=>{u(null),f(e)},oe=e=>{u(null),v(e)},se=e=>{u(null),w(e),e!==`every`&&(j(`every`),N([]))},ce=e=>{u(null),j(e),e!==`every`&&(w(`every`),E(1),k([]))},le=()=>(0,Y.jsxs)(`div`,{className:`min-w-0 space-y-4 overflow-x-hidden`,children:[(0,Y.jsxs)(K,{className:`p-4 rounded-3xl`,variant:`secondary`,children:[(0,Y.jsxs)(`div`,{className:`mb-3 flex min-w-0 flex-col gap-1`,children:[(0,Y.jsx)(V,{className:`block text-base font-semibold`,children:`常用规则`}),(0,Y.jsx)(U,{className:`block leading-relaxed`,children:`不用理解 Cron,直接选一个最接近的执行时间,再看下方预览确认。`})]}),(0,Y.jsxs)(B,{fullWidth:!0,variant:`secondary`,placeholder:`选择常用执行规则`,value:l??``,onChange:ie,children:[(0,Y.jsx)(V,{children:`执行规则`}),(0,Y.jsxs)(B.Trigger,{children:[(0,Y.jsx)(B.Value,{}),(0,Y.jsx)(B.Indicator,{})]}),(0,Y.jsx)(B.Popover,{children:(0,Y.jsx)(pe,{children:sr.map((t,n)=>(0,Y.jsxs)(J.Fragment,{children:[n>0?(0,Y.jsx)(e,{}):null,(0,Y.jsxs)(pe.Section,{children:[(0,Y.jsx)(nt,{children:t.title}),t.presets.map(e=>(0,Y.jsxs)(pe.Item,{id:e.id,textValue:e.label,children:[(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Y.jsx)(V,{children:e.label}),(0,Y.jsx)(U,{children:e.description})]}),(0,Y.jsx)(pe.ItemIndicator,{})]},e.id))]})]},t.title))})})]})]}),(0,Y.jsx)(K,{className:`p-4 rounded-3xl`,variant:`secondary`,children:(0,Y.jsxs)(`div`,{className:`flex flex-row justify-between items-center`,children:[(0,Y.jsx)(V,{className:`text-base font-semibold`,children:`需要更细的规则?`}),(0,Y.jsx)(D,{size:`sm`,variant:`secondary`,onPress:()=>c(`minute`),children:`转到高级`})]})})]}),ue=()=>(0,Y.jsxs)(`div`,{className:`space-y-4`,children:[(0,Y.jsx)(K,{className:`p-4 rounded-3xl`,variant:`secondary`,children:(0,Y.jsxs)(St,{"aria-label":`分钟类型`,variant:`secondary`,value:d,onChange:e=>ae(e),children:[(0,Y.jsx)(V,{className:`text-base font-semibold`,children:`每个小时里,哪些分钟执行?`}),(0,Y.jsx)(U,{className:`mb-3`,children:`例如选“每 10 分钟”,就是 00、10、20、30、40、50 分执行。`}),(0,Y.jsxs)(`div`,{className:`space-y-3`,children:[(0,Y.jsxs)(X,{value:`every`,children:[(0,Y.jsxs)(X.Content,{children:[(0,Y.jsx)(X.Control,{children:(0,Y.jsx)(X.Indicator,{})}),`每分钟`]}),(0,Y.jsx)(U,{children:`该小时里的每一分钟都执行,频率最高。`})]}),(0,Y.jsxs)(X,{value:`interval`,children:[(0,Y.jsxs)(X.Content,{children:[(0,Y.jsx)(X.Control,{children:(0,Y.jsx)(X.Indicator,{})}),`间隔执行`]}),(0,Y.jsx)(U,{children:`从第 0 分钟开始,按固定分钟数重复。`})]}),(0,Y.jsxs)(X,{value:`specific`,children:[(0,Y.jsxs)(X.Content,{children:[(0,Y.jsx)(X.Control,{children:(0,Y.jsx)(X.Indicator,{})}),`指定分钟`]}),(0,Y.jsx)(U,{children:`只在你点选的分钟执行,适合“整点”或“半点”。`})]})]})]})}),d===`interval`&&(0,Y.jsxs)(K,{className:`p-4 rounded-3xl`,variant:`secondary`,children:[(0,Y.jsx)(V,{className:`mb-2 text-base font-semibold`,children:`间隔设置`}),(0,Y.jsxs)(Q,{variant:`secondary`,minValue:1,maxValue:59,value:p,onChange:e=>{u(null),m(dr(e,1,59,10))},children:[(0,Y.jsx)(V,{children:`间隔(分钟)`}),(0,Y.jsxs)(Q.Group,{children:[(0,Y.jsx)(Q.DecrementButton,{}),(0,Y.jsx)(Q.Input,{className:`w-24`}),(0,Y.jsx)(Q.IncrementButton,{})]}),(0,Y.jsx)(U,{children:p<=1?`等价于每分钟执行。`:`每个小时的 ${z()} 分执行。`})]})]}),d===`specific`&&(0,Y.jsxs)(K,{className:`p-4 rounded-3xl`,variant:`secondary`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Y.jsx)(V,{className:`mb-2 text-base font-semibold`,children:`选择分钟`}),(0,Y.jsx)(U,{className:`mb-3`,children:`点击选择要执行的分钟数,可多选。选 0 就是整点执行。`})]}),(0,Y.jsx)(`div`,{className:`grid max-h-80 grid-cols-5 gap-2 overflow-y-auto p-1 md:grid-cols-10`,children:Array.from({length:60},(e,t)=>t).map(e=>(0,Y.jsx)(D,{className:`aspect-square min-w-0 shrink-0 p-0`,size:`sm`,variant:h.includes(e)?`primary`:`secondary`,onPress:()=>{u(null),g(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e].sort((e,t)=>e-t))},children:e},e))}),h.length>0&&(0,Y.jsxs)(U,{className:`mt-2`,children:[`已选择 `,h.length,` 个:`,h.join(`, `)]})]})]}),de=()=>(0,Y.jsxs)(`div`,{className:`space-y-4`,children:[(0,Y.jsx)(K,{className:`p-4 rounded-3xl`,variant:`secondary`,children:(0,Y.jsxs)(St,{"aria-label":`小时类型`,variant:`secondary`,value:_,onChange:e=>oe(e),children:[(0,Y.jsx)(V,{className:`text-base font-semibold`,children:`一天里,哪些小时允许执行?`}),(0,Y.jsx)(U,{className:`mb-3`,children:`如果选择“全部小时”,分钟页的规则会全天生效。`}),(0,Y.jsxs)(`div`,{className:`space-y-3`,children:[(0,Y.jsxs)(X,{value:`every`,children:[(0,Y.jsxs)(X.Content,{children:[(0,Y.jsx)(X.Control,{children:(0,Y.jsx)(X.Indicator,{})}),`全部小时`]}),(0,Y.jsx)(U,{children:`不限制小时。例如分钟为每 10 分钟时,就是全天每 10 分钟。`})]}),(0,Y.jsxs)(X,{value:`interval`,children:[(0,Y.jsxs)(X.Content,{children:[(0,Y.jsx)(X.Control,{children:(0,Y.jsx)(X.Indicator,{})}),`间隔执行`]}),(0,Y.jsx)(U,{children:`从 0 点开始,每隔几个小时开放一次执行时段。`})]}),(0,Y.jsxs)(X,{value:`specific`,children:[(0,Y.jsxs)(X.Content,{children:[(0,Y.jsx)(X.Control,{children:(0,Y.jsx)(X.Indicator,{})}),`指定小时`]}),(0,Y.jsx)(U,{children:`只在你点选的小时内执行。`})]})]})]})}),_===`interval`&&(0,Y.jsxs)(K,{className:`p-4 rounded-3xl`,variant:`secondary`,children:[(0,Y.jsx)(V,{className:`mb-2 text-base font-semibold`,children:`间隔设置`}),(0,Y.jsxs)(Q,{variant:`secondary`,minValue:1,maxValue:23,value:y,onChange:e=>{u(null),b(dr(e,1,23,1))},children:[(0,Y.jsx)(V,{children:`间隔(小时)`}),(0,Y.jsxs)(Q.Group,{children:[(0,Y.jsx)(Q.DecrementButton,{}),(0,Y.jsx)(Q.Input,{className:`w-24`}),(0,Y.jsx)(Q.IncrementButton,{})]}),(0,Y.jsx)(U,{children:y<=1?`间隔 1 小时等价于全部小时,保存时会自动写成 *。`:`只在 ${ee()} 这些小时内执行。`})]})]}),_===`specific`&&(0,Y.jsxs)(K,{className:`p-4 rounded-3xl`,variant:`secondary`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Y.jsx)(V,{className:`mb-2 text-base font-semibold`,children:`选择小时`}),(0,Y.jsx)(U,{className:`mb-3`,children:`点击选择允许执行的小时,可多选。具体分钟仍由“分钟”页决定。`})]}),(0,Y.jsx)(`div`,{className:`grid max-h-80 grid-cols-4 gap-2 overflow-y-auto p-1 md:grid-cols-6`,children:Array.from({length:24},(e,t)=>t).map(e=>(0,Y.jsx)(D,{className:`aspect-square min-w-0 shrink-0 p-0`,size:`sm`,variant:x.includes(e)?`primary`:`secondary`,onPress:()=>{u(null),S(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e].sort((e,t)=>e-t))},children:e},e))}),x.length>0&&(0,Y.jsxs)(U,{className:`mt-2`,children:[`已选择 `,x.length,` 个:`,x.map(e=>`${e}点`).join(`, `)]})]})]}),fe=()=>(0,Y.jsxs)(`div`,{className:`space-y-4`,children:[(0,Y.jsx)(K,{className:`p-4 rounded-3xl`,variant:`secondary`,children:(0,Y.jsxs)(St,{"aria-label":`日期类型`,variant:`secondary`,value:C,onChange:e=>se(e),children:[(0,Y.jsx)(V,{className:`text-base font-semibold`,children:`一个月里,哪些日期允许执行?`}),(0,Y.jsx)(U,{className:`mb-3`,children:`日期和星期只保留一个条件。选择日期后,会自动清空星期条件。`}),(0,Y.jsxs)(`div`,{className:`space-y-3`,children:[(0,Y.jsxs)(X,{value:`every`,children:[(0,Y.jsxs)(X.Content,{children:[(0,Y.jsx)(X.Control,{children:(0,Y.jsx)(X.Indicator,{})}),`全部日期`]}),(0,Y.jsx)(U,{children:`不限制几号执行。`})]}),(0,Y.jsxs)(X,{value:`interval`,children:[(0,Y.jsxs)(X.Content,{children:[(0,Y.jsx)(X.Control,{children:(0,Y.jsx)(X.Indicator,{})}),`间隔执行`]}),(0,Y.jsx)(U,{children:`从每月 1 号开始,每隔几天开放一次执行日期。`})]}),(0,Y.jsxs)(X,{value:`specific`,children:[(0,Y.jsxs)(X.Content,{children:[(0,Y.jsx)(X.Control,{children:(0,Y.jsx)(X.Indicator,{})}),`指定日期`]}),(0,Y.jsx)(U,{children:`只在你点选的几号执行。`})]})]})]})}),C===`interval`&&(0,Y.jsxs)(K,{className:`p-4 rounded-3xl`,variant:`secondary`,children:[(0,Y.jsx)(V,{className:`mb-2 text-base font-semibold`,children:`间隔设置`}),(0,Y.jsxs)(Q,{variant:`secondary`,minValue:1,maxValue:31,value:T,onChange:e=>{u(null),E(dr(e,1,31,1)),j(`every`),N([])},children:[(0,Y.jsx)(V,{children:`间隔(天)`}),(0,Y.jsxs)(Q.Group,{children:[(0,Y.jsx)(Q.DecrementButton,{}),(0,Y.jsx)(Q.Input,{className:`w-24`}),(0,Y.jsx)(Q.IncrementButton,{})]}),(0,Y.jsx)(U,{children:T<=1?`间隔 1 天等价于全部日期,保存时会自动写成 *。`:`每月从 1 号开始,每隔 ${T} 天执行。`})]})]}),C===`specific`&&(0,Y.jsxs)(K,{className:`p-4 rounded-3xl`,variant:`secondary`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Y.jsx)(V,{className:`mb-2 text-base font-semibold`,children:`选择日期`}),(0,Y.jsx)(U,{className:`mb-3`,children:`点击选择允许执行的日期,可多选。月份没有这一天时会自动跳过。`})]}),(0,Y.jsx)(`div`,{className:`grid max-h-80 grid-cols-5 gap-2 overflow-y-auto p-1 md:grid-cols-7`,children:Array.from({length:31},(e,t)=>t+1).map(e=>(0,Y.jsx)(D,{className:`aspect-square min-w-0 shrink-0 p-0`,size:`sm`,variant:O.includes(e)?`primary`:`secondary`,onPress:()=>{u(null),j(`every`),N([]),k(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e].sort((e,t)=>e-t))},children:e},e))}),O.length>0&&(0,Y.jsxs)(U,{className:`mt-2`,children:[`已选择 `,O.length,` 个:`,O.map(e=>`${e}号`).join(`, `)]})]})]}),H=()=>(0,Y.jsxs)(`div`,{className:`space-y-4`,children:[(0,Y.jsx)(K,{className:`p-4 rounded-3xl`,variant:`secondary`,children:(0,Y.jsxs)(St,{"aria-label":`星期类型`,variant:`secondary`,value:A,onChange:e=>ce(e),children:[(0,Y.jsx)(V,{className:`text-base font-semibold`,children:`一周里,哪些星期允许执行?`}),(0,Y.jsx)(U,{className:`mb-3`,children:`日期和星期只保留一个条件。选择星期后,会自动清空日期条件。`}),(0,Y.jsxs)(`div`,{className:`space-y-3`,children:[(0,Y.jsxs)(X,{value:`every`,children:[(0,Y.jsxs)(X.Content,{children:[(0,Y.jsx)(X.Control,{children:(0,Y.jsx)(X.Indicator,{})}),`全部星期`]}),(0,Y.jsx)(U,{children:`不限制星期几执行。`})]}),(0,Y.jsxs)(X,{value:`specific`,children:[(0,Y.jsxs)(X.Content,{children:[(0,Y.jsx)(X.Control,{children:(0,Y.jsx)(X.Indicator,{})}),`指定星期`]}),(0,Y.jsx)(U,{children:`只在你点选的星期执行。`})]})]})]})}),A===`specific`&&(0,Y.jsxs)(K,{className:`p-4 rounded-3xl`,variant:`secondary`,children:[(0,Y.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Y.jsx)(V,{className:`mb-2 text-base font-semibold`,children:`选择星期`}),(0,Y.jsx)(U,{className:`mb-3`,children:`点击选择允许执行的星期,可多选。具体时间仍由分钟和小时页决定。`})]}),(0,Y.jsx)(`div`,{className:`grid grid-cols-7 gap-2 p-1`,children:[`日`,`一`,`二`,`三`,`四`,`五`,`六`].map((e,t)=>(0,Y.jsx)(D,{className:`aspect-square min-w-0 shrink-0 p-0`,size:`sm`,variant:M.includes(t)?`primary`:`secondary`,onPress:()=>{u(null),w(`every`),E(1),k([]),N(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t].sort((e,t)=>e-t))},children:e},t))}),M.length>0&&(0,Y.jsxs)(U,{className:`mt-2`,children:[`已选择 `,M.length,` 天:`,M.map(e=>`周${`日一二三四五六`[e]}`).join(`, `)]})]})]}),me=i===`desktop`?`right`:`bottom`,he=wr(t||ar);return(0,Y.jsxs)(`div`,{className:`space-y-2`,children:[(0,Y.jsxs)(`div`,{className:`flex gap-2 flex-col`,children:[(0,Y.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Y.jsxs)(re,{fullWidth:!0,isDisabled:!0,value:t,children:[(0,Y.jsx)(V,{className:`sr-only`,children:`定时推送时间`}),(0,Y.jsx)(ye,{placeholder:`*/10 * * * *`,variant:`secondary`,"aria-label":`定时任务表达式`})]}),(0,Y.jsxs)(D,{isDisabled:r,variant:`secondary`,onPress:()=>o(!0),children:[(0,Y.jsx)(ir,{className:`size-4`,"aria-hidden":`true`}),(0,Y.jsx)(`span`,{children:`编辑`})]})]}),(0,Y.jsxs)(U,{children:[`当前规则:`,he]})]}),(0,Y.jsx)(G.Backdrop,{isOpen:a,variant:`blur`,onOpenChange:o,children:(0,Y.jsx)(G.Content,{placement:me,children:(0,Y.jsxs)(G.Dialog,{className:i===`desktop`?`h-full w-120 max-w-[90vw]`:`max-h-[85dvh]`,children:[(0,Y.jsx)(G.Handle,{}),(0,Y.jsx)(G.CloseTrigger,{}),(0,Y.jsxs)(G.Header,{children:[(0,Y.jsx)(G.Heading,{children:`定时推送时间`}),(0,Y.jsx)(U,{children:`先选常用规则;需要精细控制时,再进入分钟、小时、日期、星期设置。`})]}),(0,Y.jsxs)(G.Body,{className:`min-w-0 space-y-4 overflow-x-hidden`,children:[(0,Y.jsxs)(W,{className:`min-w-0`,selectedKey:s,onSelectionChange:e=>c(e),children:[(0,Y.jsx)(W.ListContainer,{children:(0,Y.jsxs)(W.List,{children:[(0,Y.jsxs)(W.Tab,{id:`quick`,children:[(0,Y.jsx)(`span`,{children:`常用`}),(0,Y.jsx)(W.Indicator,{})]}),(0,Y.jsxs)(W.Tab,{id:`minute`,children:[(0,Y.jsx)(`span`,{children:`分钟`}),(0,Y.jsx)(W.Indicator,{})]}),(0,Y.jsxs)(W.Tab,{id:`hour`,children:[(0,Y.jsx)(`span`,{children:`小时`}),(0,Y.jsx)(W.Indicator,{})]}),(0,Y.jsxs)(W.Tab,{id:`day`,children:[(0,Y.jsx)(`span`,{children:`日期`}),(0,Y.jsx)(W.Indicator,{})]}),(0,Y.jsxs)(W.Tab,{id:`week`,children:[(0,Y.jsx)(`span`,{children:`星期`}),(0,Y.jsx)(W.Indicator,{})]})]})}),(0,Y.jsx)(`div`,{className:`h-1`}),(0,Y.jsx)(W.Panel,{id:`quick`,className:`p-0`,children:le()}),(0,Y.jsx)(W.Panel,{id:`minute`,className:`p-0`,children:ue()}),(0,Y.jsx)(W.Panel,{id:`hour`,className:`p-0`,children:de()}),(0,Y.jsx)(W.Panel,{id:`day`,className:`p-0`,children:fe()}),(0,Y.jsx)(W.Panel,{id:`week`,className:`p-0`,children:H()})]}),(0,Y.jsx)(K,{className:`p-4 rounded-3xl`,variant:`secondary`,children:(0,Y.jsxs)(`div`,{className:`space-y-3`,children:[(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(V,{className:`text-sm font-medium text-muted`,children:`实际执行时间`}),(0,Y.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed`,children:L()}),(0,Y.jsx)(U,{className:`mt-1`,children:R()})]}),(0,Y.jsxs)(`div`,{children:[(0,Y.jsx)(V,{className:`text-sm font-medium text-muted`,children:`表达式`}),(0,Y.jsx)(`code`,{className:`mt-1 block font-mono text-base font-semibold`,children:I()})]})]})})]}),(0,Y.jsxs)(G.Footer,{children:[(0,Y.jsx)(D,{className:`flex-1`,slot:`close`,variant:`tertiary`,children:`取消`}),(0,Y.jsx)(D,{className:`flex-1`,variant:`primary`,onPress:te,children:`使用这个规则`})]})]})})})]})};export{kr as default};
@@ -1 +0,0 @@
1
- import{t as e}from"./separator-DSAWGreF.js";import{a as t,c as n,i as r,l as i,n as a,o,r as s,s as c,t as l}from"./ThemeSwitch-DMmlpRk7.js";import{Lt as u,Pt as d,R as f,Rt as p,U as m,a as h,b as g,i as _,n as v,o as y,q as b,r as x,s as S}from"./index-DU0mjeqO.js";var C=x(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),w=p(u(),1),T=b(),E=({activeMenu:e})=>(0,T.jsx)(`div`,{className:`mx-auto w-full max-w-7xl px-4`,children:(()=>{switch(e){case`config`:return(0,T.jsx)(v,{device:`desktop`});case`about`:return(0,T.jsx)(s,{});default:return(0,T.jsx)(v,{device:`desktop`})}})()}),D=[{id:`config`,label:`配置管理`,icon:r},{id:`about`,label:`关于插件`,icon:n}],O=({collapsed:t,activeMenu:n,onMenuChange:r})=>{let o=y(()=>{window.open(`https://kkk.karinjs.com`,`_blank`,`noopener,noreferrer`)}),s=y(()=>{h(),window.location.reload()});return t?null:(0,T.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,T.jsx)(`div`,{className:`shrink-0 px-4 pt-3 pb-2`,children:(0,T.jsxs)(g,{children:[(0,T.jsx)(g.Trigger,{"aria-label":`用户信息`,children:(0,T.jsxs)(`div`,{className:`flex w-full items-center gap-3 rounded-lg p-2 transition-colors hover:bg-default-100 cursor-pointer`,tabIndex:0,children:[(0,T.jsxs)(m,{size:`lg`,children:[(0,T.jsx)(m.Image,{src:a}),(0,T.jsx)(m.Fallback,{children:`ikenxuan`})]}),(0,T.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col items-start`,children:[(0,T.jsx)(`p`,{className:`truncate text-lg font-semibold`,children:`炫炫`}),(0,T.jsx)(`p`,{className:`truncate text-md text-muted`,children:`Super Admin`})]})]})}),(0,T.jsx)(g.Content,{className:`w-60`,children:(0,T.jsxs)(g.Dialog,{children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-3 pb-3`,children:[(0,T.jsxs)(m,{size:`md`,children:[(0,T.jsx)(m.Image,{src:a}),(0,T.jsx)(m.Fallback,{children:`U`})]}),(0,T.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,T.jsx)(`p`,{className:`truncate font-medium`,children:`用户`}),(0,T.jsx)(`p`,{className:`truncate text-md text-muted`,children:`Super Admin`})]})]}),(0,T.jsx)(e,{className:`my-2`}),(0,T.jsx)(`p`,{className:`text-xs text-muted`,children:`当前身份:管理员`})]})})]})}),(0,T.jsx)(`nav`,{className:`flex flex-1 flex-col gap-1 overflow-y-auto px-3 py-3`,"aria-label":`主导航`,children:D.map(e=>{let t=e.icon,i=n===e.id;return(0,T.jsxs)(f,{fullWidth:!0,className:`justify-start`,size:`lg`,variant:i?`tertiary`:`ghost`,"aria-label":e.label,"aria-current":i?`page`:void 0,onPress:()=>r(e.id),children:[(0,T.jsx)(t,{size:20,className:d(`shrink-0 mr-3`,!i&&`text-muted`),"aria-hidden":`true`}),(0,T.jsx)(`span`,{className:d(`truncate`,i&&`font-medium`),children:e.label})]},e.id)})}),(0,T.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-1 px-3 py-3`,children:[(0,T.jsxs)(f,{fullWidth:!0,className:`justify-start`,size:`lg`,variant:`ghost`,"aria-label":`查看帮助文档`,onPress:o,children:[(0,T.jsx)(i,{size:20,className:`shrink-0 mr-3 text-muted`,"aria-hidden":`true`}),(0,T.jsx)(`span`,{className:`truncate`,children:`帮助文档`})]}),(0,T.jsxs)(f,{fullWidth:!0,className:`justify-start`,size:`lg`,variant:`ghost`,"aria-label":`登出`,onPress:s,children:[(0,T.jsx)(c,{size:20,className:`shrink-0 mr-3 text-muted`,"aria-hidden":`true`}),(0,T.jsx)(`span`,{className:`truncate`,children:`登出`})]})]})]})},k=({onToggleSidebar:e,sidebarCollapsed:n,currentMenuLabel:r})=>(0,T.jsxs)(`div`,{className:`flex w-full items-center justify-between`,children:[(0,T.jsxs)(`div`,{className:`flex min-w-0 items-center gap-3`,children:[(0,T.jsx)(f,{isIconOnly:!0,variant:`ghost`,onPress:e,"aria-label":n?`展开侧边栏`:`折叠侧边栏`,"aria-expanded":!n,children:n?(0,T.jsx)(o,{size:20,"aria-hidden":`true`}):(0,T.jsx)(C,{size:20,"aria-hidden":`true`})}),n&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(t,{size:24,"aria-hidden":`true`}),(0,T.jsx)(`h1`,{className:`truncate text-lg font-semibold`,children:`KKK Config`})]}),!n&&(0,T.jsx)(`h1`,{className:`truncate text-lg font-semibold`,children:r||`配置管理面板`})]}),(0,T.jsx)(l,{})]}),A=[{id:`config`,label:`配置管理`,icon:r},{id:`about`,label:`关于插件`,icon:n}],j=({activeMenu:e,onMenuChange:t})=>{let[n,{toggle:r}]=S(!1),i=(0,w.useRef)(null);return(0,w.useEffect)(()=>{i.current&&(n?_.to(i.current,{width:0,opacity:0,borderRightWidth:0,duration:.3,ease:`power2.inOut`,onComplete:()=>{i.current&&(i.current.style.display=`none`)}}):(i.current.style.display=`flex`,_.fromTo(i.current,{width:0,opacity:0,borderRightWidth:0},{width:260,opacity:1,borderRightWidth:1,duration:.3,ease:`power2.inOut`})))},[n]),(0,T.jsxs)(`div`,{className:`flex h-screen overflow-hidden`,children:[(0,T.jsx)(`aside`,{ref:i,className:`flex h-full w-65 shrink-0 flex-col border-r border-default-100`,"aria-label":`侧边栏导航`,children:(0,T.jsx)(O,{collapsed:n,activeMenu:e,onMenuChange:t,onToggleCollapse:r})}),(0,T.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col overflow-hidden`,children:[(0,T.jsx)(`header`,{className:`flex h-16 shrink-0 items-center px-6`,children:(0,T.jsx)(k,{onToggleSidebar:r,sidebarCollapsed:n,currentMenuLabel:A.find(t=>t.id===e)?.label})}),(0,T.jsx)(`main`,{className:`scrollbar flex-1 overflow-y-auto p-6`,id:`main-content`,children:(0,T.jsx)(`div`,{"data-scrollbar":`thin`,children:(0,T.jsx)(E,{activeMenu:e})})})]})]})};export{j as default};
@@ -1 +0,0 @@
1
- import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./ThemeSwitch-DMmlpRk7.js";import{Lt as l,Pt as u,R as d,Rt as f,U as p,a as m,n as h,o as g,q as _,r as v,s as y,x as b,y as x}from"./index-DU0mjeqO.js";var S=v(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),C=_(),w=({activeMenu:e})=>(0,C.jsx)(`div`,{className:`w-full max-w-2xl mx-auto`,children:(()=>{switch(e){case`config`:return(0,C.jsx)(h,{device:`mobile`});case`about`:return(0,C.jsx)(o,{});default:return(0,C.jsx)(h,{device:`mobile`})}})()}),T=f(l(),1),E=[{id:`config`,label:`配置管理`,icon:n},{id:`about`,label:`关于插件`,icon:t}],D=({open:e,onClose:t,activeMenu:n,onMenuChange:a})=>{let o=g(()=>{window.open(`https://kkk.karinjs.com`,`_blank`,`noopener,noreferrer`)}),c=g(()=>{m(),window.location.reload()});return(0,T.useEffect)(()=>{let n=n=>{n.key===`Escape`&&e&&t()};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]),(0,T.useEffect)(()=>(e?document.body.style.overflow=`hidden`:document.body.style.overflow=``,()=>{document.body.style.overflow=``}),[e]),(0,C.jsx)(b.Backdrop,{isOpen:e,isDismissable:!0,className:`backdrop-blur-sm`,onOpenChange:e=>{e||t()},children:(0,C.jsx)(b.Content,{placement:`right`,children:(0,C.jsxs)(b.Dialog,{className:`px-4`,children:[(0,C.jsxs)(b.Header,{className:`flex items-center justify-between pb-4`,children:[(0,C.jsx)(b.Heading,{className:`text-lg font-semibold`,children:`菜单`}),(0,C.jsx)(b.CloseTrigger,{"aria-label":`关闭菜单`,className:`mr-2`,children:(0,C.jsx)(S,{size:24,"aria-hidden":`true`})})]}),(0,C.jsxs)(b.Body,{className:`flex flex-col`,children:[(0,C.jsx)(`div`,{className:`shrink-0 pb-5`,children:(0,C.jsxs)(`div`,{className:`flex items-center gap-3 px-1`,children:[(0,C.jsxs)(p,{size:`md`,children:[(0,C.jsx)(p.Image,{src:i}),(0,C.jsx)(p.Fallback,{children:`ikenxuan`})]}),(0,C.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,C.jsx)(`p`,{className:`truncate text-sm font-medium`,children:`炫炫`}),(0,C.jsx)(`p`,{className:`truncate text-xs text-muted`,children:`Super Admin`})]})]})}),(0,C.jsx)(`nav`,{className:`flex flex-1 flex-col gap-2 overflow-y-auto`,"aria-label":`主导航`,children:E.map(e=>{let t=e.icon,r=n===e.id;return(0,C.jsxs)(d,{fullWidth:!0,className:`justify-start`,size:`lg`,variant:r?`tertiary`:`ghost`,"aria-label":e.label,"aria-current":r?`page`:void 0,onPress:()=>a(e.id),children:[(0,C.jsx)(t,{size:20,className:u(`shrink-0 mr-3`,!r&&`text-muted`),"aria-hidden":`true`}),(0,C.jsx)(`span`,{className:u(`truncate`,r&&`font-semibold`),children:e.label})]},e.id)})}),(0,C.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-2`,children:[(0,C.jsxs)(d,{fullWidth:!0,className:`justify-start`,size:`lg`,variant:`ghost`,"aria-label":`查看帮助文档`,onPress:o,children:[(0,C.jsx)(r,{size:20,className:`shrink-0 mr-3 text-muted`,"aria-hidden":`true`}),(0,C.jsx)(`span`,{className:`truncate`,children:`帮助文档`})]}),(0,C.jsxs)(d,{fullWidth:!0,className:`justify-start`,size:`lg`,variant:`ghost`,"aria-label":`登出`,onPress:c,children:[(0,C.jsx)(s,{size:20,className:`shrink-0 mr-3 text-muted`,"aria-hidden":`true`}),(0,C.jsx)(`span`,{className:`truncate`,children:`登出`})]})]})]})]})})})},O=({onOpenDrawer:t})=>(0,C.jsxs)(`div`,{className:`flex h-full items-center justify-between px-4`,children:[(0,C.jsx)(c,{className:`shrink-0`}),(0,C.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center justify-center gap-2 px-2`,children:[(0,C.jsx)(e,{size:22,"aria-hidden":`true`}),(0,C.jsx)(`h1`,{className:`truncate text-base font-semibold`,children:`KKK Config`})]}),(0,C.jsx)(d,{isIconOnly:!0,className:`shrink-0`,variant:`ghost`,onPress:t,"aria-label":`打开菜单`,"aria-expanded":!1,children:(0,C.jsx)(a,{size:24,"aria-hidden":`true`})})]}),k=({activeMenu:e,onMenuChange:t})=>{let[n,{setTrue:r,setFalse:i}]=y(!1),a=g(e=>{t(e),i()});return(0,C.jsxs)(x,{"data-scrollbar":`thin`,className:`flex min-h-screen flex-col`,children:[(0,C.jsx)(`header`,{className:`sticky top-0 z-50 h-14 shrink-0 backdrop-blur-xs mask-[linear-gradient(to_bottom,black_40%,transparent_100%)]`,children:(0,C.jsx)(O,{onOpenDrawer:r})}),(0,C.jsx)(D,{open:n,onClose:i,activeMenu:e,onMenuChange:a}),(0,C.jsx)(`main`,{className:`scrollbar flex-1 overflow-y-auto p-4`,id:`main-content`,children:(0,C.jsx)(w,{activeMenu:e})})]})};export{k as default};
@@ -1 +0,0 @@
1
- import{L as e,R as t,_ as n,q as r,r as i,t as a,u as o}from"./index-DU0mjeqO.js";var s=i(`circle-question-mark`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),c=i(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),l=i(`file-text`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),u=i(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),d=i(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),f=i(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),p=i(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),m=i(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),h=i(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),g=r(),_=()=>{let n=e=>{window.open(e,`_blank`)};return(0,g.jsxs)(e,{className:`mx-auto max-w-3xl`,children:[(0,g.jsxs)(e.Header,{className:`items-center text-center gap-4 pt-8 pb-6`,children:[(0,g.jsx)(p,{size:64,"aria-hidden":`true`}),(0,g.jsx)(e.Title,{children:`karin-plugin-kkk`}),(0,g.jsx)(e.Description,{children:`版本 2.33.0`})]}),(0,g.jsxs)(e.Content,{className:`flex flex-col gap-6 pb-8`,children:[(0,g.jsxs)(`section`,{children:[(0,g.jsx)(`h3`,{className:`mb-3 text-base font-semibold`,children:`插件简介`}),(0,g.jsx)(o,{children:`Karin 的「抖音」「B站」视频解析/动态推送插件。 支持视频解析、动态推送、扫码登录等功能。`})]}),(0,g.jsxs)(`section`,{children:[(0,g.jsx)(`h3`,{className:`mb-3 text-base font-semibold`,children:`开发者`}),(0,g.jsx)(o,{children:`ikenxuan, sj817`})]}),(0,g.jsxs)(`section`,{children:[(0,g.jsx)(`h3`,{className:`mb-3 text-base font-semibold`,children:`相关链接`}),(0,g.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-3`,children:[(0,g.jsxs)(t,{variant:`outline`,onPress:()=>n(`https://github.com/ikenxuan/karin-plugin-kkk`),children:[(0,g.jsx)(c,{size:18,"aria-hidden":`true`}),(0,g.jsx)(`span`,{children:`GitHub 仓库`})]}),(0,g.jsxs)(t,{variant:`outline`,onPress:()=>n(`https://github.com/ikenxuan/karin-plugin-kkk/issues`),children:[(0,g.jsx)(c,{size:18,"aria-hidden":`true`}),(0,g.jsx)(`span`,{children:`反馈问题`})]})]})]})]})]})},v=`https://github.com/ikenxuan.png`,y=({className:e})=>{let{isDark:r,toggleTheme:i}=a();return(0,g.jsxs)(n,{delay:1,closeDelay:1,children:[(0,g.jsx)(t,{isIconOnly:!0,"aria-label":r?`切换到浅色模式`:`切换到深色模式`,className:e,variant:`ghost`,onPress:i,children:r?(0,g.jsx)(h,{size:20,"aria-hidden":`true`}):(0,g.jsx)(f,{size:20,"aria-hidden":`true`})}),(0,g.jsx)(n.Content,{children:r?`浅色模式`:`深色模式`})]})};export{p as a,l as c,m as i,s as l,v as n,d as o,_ as r,u as s,y as t};