warqadui 0.0.46 → 0.0.48

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/dist/index.js CHANGED
@@ -72,6 +72,7 @@ __export(index_exports, {
72
72
  generatePdf: () => generatePdf,
73
73
  storage: () => storage,
74
74
  useA4StatementView: () => useA4DataView_default,
75
+ useAntdImageUpload: () => useAntdImageUpload_default,
75
76
  useApi: () => useApis_default,
76
77
  useModal: () => useModal,
77
78
  useSearchApiContext: () => useSearchApiContext,
@@ -4838,6 +4839,1429 @@ var storage = {
4838
4839
  return keys;
4839
4840
  }
4840
4841
  };
4842
+
4843
+ // src/hooks/uploads/useAntdImageUpload.tsx
4844
+ var import_react23 = require("react");
4845
+
4846
+ // ../../node_modules/@ant-design/icons/es/components/Context.js
4847
+ var import_react21 = require("react");
4848
+ var IconContext = /* @__PURE__ */ (0, import_react21.createContext)({});
4849
+ var Context_default = IconContext;
4850
+
4851
+ // ../../node_modules/@ant-design/icons/es/components/AntdIcon.js
4852
+ var React14 = __toESM(require("react"));
4853
+ var import_clsx2 = require("clsx");
4854
+
4855
+ // ../../node_modules/@ant-design/fast-color/es/presetColors.js
4856
+ var presetColors_default = {
4857
+ aliceblue: "9ehhb",
4858
+ antiquewhite: "9sgk7",
4859
+ aqua: "1ekf",
4860
+ aquamarine: "4zsno",
4861
+ azure: "9eiv3",
4862
+ beige: "9lhp8",
4863
+ bisque: "9zg04",
4864
+ black: "0",
4865
+ blanchedalmond: "9zhe5",
4866
+ blue: "73",
4867
+ blueviolet: "5e31e",
4868
+ brown: "6g016",
4869
+ burlywood: "8ouiv",
4870
+ cadetblue: "3qba8",
4871
+ chartreuse: "4zshs",
4872
+ chocolate: "87k0u",
4873
+ coral: "9yvyo",
4874
+ cornflowerblue: "3xael",
4875
+ cornsilk: "9zjz0",
4876
+ crimson: "8l4xo",
4877
+ cyan: "1ekf",
4878
+ darkblue: "3v",
4879
+ darkcyan: "rkb",
4880
+ darkgoldenrod: "776yz",
4881
+ darkgray: "6mbhl",
4882
+ darkgreen: "jr4",
4883
+ darkgrey: "6mbhl",
4884
+ darkkhaki: "7ehkb",
4885
+ darkmagenta: "5f91n",
4886
+ darkolivegreen: "3bzfz",
4887
+ darkorange: "9yygw",
4888
+ darkorchid: "5z6x8",
4889
+ darkred: "5f8xs",
4890
+ darksalmon: "9441m",
4891
+ darkseagreen: "5lwgf",
4892
+ darkslateblue: "2th1n",
4893
+ darkslategray: "1ugcv",
4894
+ darkslategrey: "1ugcv",
4895
+ darkturquoise: "14up",
4896
+ darkviolet: "5rw7n",
4897
+ deeppink: "9yavn",
4898
+ deepskyblue: "11xb",
4899
+ dimgray: "442g9",
4900
+ dimgrey: "442g9",
4901
+ dodgerblue: "16xof",
4902
+ firebrick: "6y7tu",
4903
+ floralwhite: "9zkds",
4904
+ forestgreen: "1cisi",
4905
+ fuchsia: "9y70f",
4906
+ gainsboro: "8m8kc",
4907
+ ghostwhite: "9pq0v",
4908
+ goldenrod: "8j4f4",
4909
+ gold: "9zda8",
4910
+ gray: "50i2o",
4911
+ green: "pa8",
4912
+ greenyellow: "6senj",
4913
+ grey: "50i2o",
4914
+ honeydew: "9eiuo",
4915
+ hotpink: "9yrp0",
4916
+ indianred: "80gnw",
4917
+ indigo: "2xcoy",
4918
+ ivory: "9zldc",
4919
+ khaki: "9edu4",
4920
+ lavenderblush: "9ziet",
4921
+ lavender: "90c8q",
4922
+ lawngreen: "4vk74",
4923
+ lemonchiffon: "9zkct",
4924
+ lightblue: "6s73a",
4925
+ lightcoral: "9dtog",
4926
+ lightcyan: "8s1rz",
4927
+ lightgoldenrodyellow: "9sjiq",
4928
+ lightgray: "89jo3",
4929
+ lightgreen: "5nkwg",
4930
+ lightgrey: "89jo3",
4931
+ lightpink: "9z6wx",
4932
+ lightsalmon: "9z2ii",
4933
+ lightseagreen: "19xgq",
4934
+ lightskyblue: "5arju",
4935
+ lightslategray: "4nwk9",
4936
+ lightslategrey: "4nwk9",
4937
+ lightsteelblue: "6wau6",
4938
+ lightyellow: "9zlcw",
4939
+ lime: "1edc",
4940
+ limegreen: "1zcxe",
4941
+ linen: "9shk6",
4942
+ magenta: "9y70f",
4943
+ maroon: "4zsow",
4944
+ mediumaquamarine: "40eju",
4945
+ mediumblue: "5p",
4946
+ mediumorchid: "79qkz",
4947
+ mediumpurple: "5r3rv",
4948
+ mediumseagreen: "2d9ip",
4949
+ mediumslateblue: "4tcku",
4950
+ mediumspringgreen: "1di2",
4951
+ mediumturquoise: "2uabw",
4952
+ mediumvioletred: "7rn9h",
4953
+ midnightblue: "z980",
4954
+ mintcream: "9ljp6",
4955
+ mistyrose: "9zg0x",
4956
+ moccasin: "9zfzp",
4957
+ navajowhite: "9zest",
4958
+ navy: "3k",
4959
+ oldlace: "9wq92",
4960
+ olive: "50hz4",
4961
+ olivedrab: "472ub",
4962
+ orange: "9z3eo",
4963
+ orangered: "9ykg0",
4964
+ orchid: "8iu3a",
4965
+ palegoldenrod: "9bl4a",
4966
+ palegreen: "5yw0o",
4967
+ paleturquoise: "6v4ku",
4968
+ palevioletred: "8k8lv",
4969
+ papayawhip: "9zi6t",
4970
+ peachpuff: "9ze0p",
4971
+ peru: "80oqn",
4972
+ pink: "9z8wb",
4973
+ plum: "8nba5",
4974
+ powderblue: "6wgdi",
4975
+ purple: "4zssg",
4976
+ rebeccapurple: "3zk49",
4977
+ red: "9y6tc",
4978
+ rosybrown: "7cv4f",
4979
+ royalblue: "2jvtt",
4980
+ saddlebrown: "5fmkz",
4981
+ salmon: "9rvci",
4982
+ sandybrown: "9jn1c",
4983
+ seagreen: "1tdnb",
4984
+ seashell: "9zje6",
4985
+ sienna: "6973h",
4986
+ silver: "7ir40",
4987
+ skyblue: "5arjf",
4988
+ slateblue: "45e4t",
4989
+ slategray: "4e100",
4990
+ slategrey: "4e100",
4991
+ snow: "9zke2",
4992
+ springgreen: "1egv",
4993
+ steelblue: "2r1kk",
4994
+ tan: "87yx8",
4995
+ teal: "pds",
4996
+ thistle: "8ggk8",
4997
+ tomato: "9yqfb",
4998
+ turquoise: "2j4r4",
4999
+ violet: "9b10u",
5000
+ wheat: "9ld4j",
5001
+ white: "9zldr",
5002
+ whitesmoke: "9lhpx",
5003
+ yellow: "9zl6o",
5004
+ yellowgreen: "61fzm"
5005
+ };
5006
+
5007
+ // ../../node_modules/@ant-design/fast-color/es/FastColor.js
5008
+ var round = Math.round;
5009
+ function splitColorStr(str, parseNum) {
5010
+ const match = str.replace(/^[^(]*\((.*)/, "$1").replace(/\).*/, "").match(/\d*\.?\d+%?/g) || [];
5011
+ const numList = match.map((item) => parseFloat(item));
5012
+ for (let i = 0; i < 3; i += 1) {
5013
+ numList[i] = parseNum(numList[i] || 0, match[i] || "", i);
5014
+ }
5015
+ if (match[3]) {
5016
+ numList[3] = match[3].includes("%") ? numList[3] / 100 : numList[3];
5017
+ } else {
5018
+ numList[3] = 1;
5019
+ }
5020
+ return numList;
5021
+ }
5022
+ var parseHSVorHSL = (num, _, index) => index === 0 ? num : num / 100;
5023
+ function limitRange(value, max) {
5024
+ const mergedMax = max || 255;
5025
+ if (value > mergedMax) {
5026
+ return mergedMax;
5027
+ }
5028
+ if (value < 0) {
5029
+ return 0;
5030
+ }
5031
+ return value;
5032
+ }
5033
+ var FastColor = class _FastColor {
5034
+ /**
5035
+ * All FastColor objects are valid. So isValid is always true. This property is kept to be compatible with TinyColor.
5036
+ */
5037
+ isValid = true;
5038
+ /**
5039
+ * Red, R in RGB
5040
+ */
5041
+ r = 0;
5042
+ /**
5043
+ * Green, G in RGB
5044
+ */
5045
+ g = 0;
5046
+ /**
5047
+ * Blue, B in RGB
5048
+ */
5049
+ b = 0;
5050
+ /**
5051
+ * Alpha/Opacity, A in RGBA/HSLA
5052
+ */
5053
+ a = 1;
5054
+ // HSV privates
5055
+ _h;
5056
+ _hsl_s;
5057
+ _hsv_s;
5058
+ _l;
5059
+ _v;
5060
+ // intermediate variables to calculate HSL/HSV
5061
+ _max;
5062
+ _min;
5063
+ _brightness;
5064
+ constructor(input) {
5065
+ function matchFormat(str) {
5066
+ return str[0] in input && str[1] in input && str[2] in input;
5067
+ }
5068
+ if (!input) {
5069
+ } else if (typeof input === "string") {
5070
+ let matchPrefix2 = function(prefix) {
5071
+ return trimStr.startsWith(prefix);
5072
+ };
5073
+ var matchPrefix = matchPrefix2;
5074
+ const trimStr = input.trim();
5075
+ if (/^#?[A-F\d]{3,8}$/i.test(trimStr)) {
5076
+ this.fromHexString(trimStr);
5077
+ } else if (matchPrefix2("rgb")) {
5078
+ this.fromRgbString(trimStr);
5079
+ } else if (matchPrefix2("hsl")) {
5080
+ this.fromHslString(trimStr);
5081
+ } else if (matchPrefix2("hsv") || matchPrefix2("hsb")) {
5082
+ this.fromHsvString(trimStr);
5083
+ } else {
5084
+ const presetColor = presetColors_default[trimStr.toLowerCase()];
5085
+ if (presetColor) {
5086
+ this.fromHexString(
5087
+ // Convert 36 hex to 16 hex
5088
+ parseInt(presetColor, 36).toString(16).padStart(6, "0")
5089
+ );
5090
+ }
5091
+ }
5092
+ } else if (input instanceof _FastColor) {
5093
+ this.r = input.r;
5094
+ this.g = input.g;
5095
+ this.b = input.b;
5096
+ this.a = input.a;
5097
+ this._h = input._h;
5098
+ this._hsl_s = input._hsl_s;
5099
+ this._hsv_s = input._hsv_s;
5100
+ this._l = input._l;
5101
+ this._v = input._v;
5102
+ } else if (matchFormat("rgb")) {
5103
+ this.r = limitRange(input.r);
5104
+ this.g = limitRange(input.g);
5105
+ this.b = limitRange(input.b);
5106
+ this.a = typeof input.a === "number" ? limitRange(input.a, 1) : 1;
5107
+ } else if (matchFormat("hsl")) {
5108
+ this.fromHsl(input);
5109
+ } else if (matchFormat("hsv")) {
5110
+ this.fromHsv(input);
5111
+ } else {
5112
+ throw new Error("@ant-design/fast-color: unsupported input " + JSON.stringify(input));
5113
+ }
5114
+ }
5115
+ // ======================= Setter =======================
5116
+ setR(value) {
5117
+ return this._sc("r", value);
5118
+ }
5119
+ setG(value) {
5120
+ return this._sc("g", value);
5121
+ }
5122
+ setB(value) {
5123
+ return this._sc("b", value);
5124
+ }
5125
+ setA(value) {
5126
+ return this._sc("a", value, 1);
5127
+ }
5128
+ setHue(value) {
5129
+ const hsv = this.toHsv();
5130
+ hsv.h = value;
5131
+ return this._c(hsv);
5132
+ }
5133
+ // ======================= Getter =======================
5134
+ /**
5135
+ * Returns the perceived luminance of a color, from 0-1.
5136
+ * @see http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
5137
+ */
5138
+ getLuminance() {
5139
+ function adjustGamma(raw) {
5140
+ const val = raw / 255;
5141
+ return val <= 0.03928 ? val / 12.92 : Math.pow((val + 0.055) / 1.055, 2.4);
5142
+ }
5143
+ const R = adjustGamma(this.r);
5144
+ const G = adjustGamma(this.g);
5145
+ const B = adjustGamma(this.b);
5146
+ return 0.2126 * R + 0.7152 * G + 0.0722 * B;
5147
+ }
5148
+ getHue() {
5149
+ if (typeof this._h === "undefined") {
5150
+ const delta = this.getMax() - this.getMin();
5151
+ if (delta === 0) {
5152
+ this._h = 0;
5153
+ } else {
5154
+ this._h = round(60 * (this.r === this.getMax() ? (this.g - this.b) / delta + (this.g < this.b ? 6 : 0) : this.g === this.getMax() ? (this.b - this.r) / delta + 2 : (this.r - this.g) / delta + 4));
5155
+ }
5156
+ }
5157
+ return this._h;
5158
+ }
5159
+ /**
5160
+ * @deprecated should use getHSVSaturation or getHSLSaturation instead
5161
+ */
5162
+ getSaturation() {
5163
+ return this.getHSVSaturation();
5164
+ }
5165
+ getHSVSaturation() {
5166
+ if (typeof this._hsv_s === "undefined") {
5167
+ const delta = this.getMax() - this.getMin();
5168
+ if (delta === 0) {
5169
+ this._hsv_s = 0;
5170
+ } else {
5171
+ this._hsv_s = delta / this.getMax();
5172
+ }
5173
+ }
5174
+ return this._hsv_s;
5175
+ }
5176
+ getHSLSaturation() {
5177
+ if (typeof this._hsl_s === "undefined") {
5178
+ const delta = this.getMax() - this.getMin();
5179
+ if (delta === 0) {
5180
+ this._hsl_s = 0;
5181
+ } else {
5182
+ const l = this.getLightness();
5183
+ this._hsl_s = delta / 255 / (1 - Math.abs(2 * l - 1));
5184
+ }
5185
+ }
5186
+ return this._hsl_s;
5187
+ }
5188
+ getLightness() {
5189
+ if (typeof this._l === "undefined") {
5190
+ this._l = (this.getMax() + this.getMin()) / 510;
5191
+ }
5192
+ return this._l;
5193
+ }
5194
+ getValue() {
5195
+ if (typeof this._v === "undefined") {
5196
+ this._v = this.getMax() / 255;
5197
+ }
5198
+ return this._v;
5199
+ }
5200
+ /**
5201
+ * Returns the perceived brightness of the color, from 0-255.
5202
+ * Note: this is not the b of HSB
5203
+ * @see http://www.w3.org/TR/AERT#color-contrast
5204
+ */
5205
+ getBrightness() {
5206
+ if (typeof this._brightness === "undefined") {
5207
+ this._brightness = (this.r * 299 + this.g * 587 + this.b * 114) / 1e3;
5208
+ }
5209
+ return this._brightness;
5210
+ }
5211
+ // ======================== Func ========================
5212
+ darken(amount = 10) {
5213
+ const h = this.getHue();
5214
+ const s = this.getSaturation();
5215
+ let l = this.getLightness() - amount / 100;
5216
+ if (l < 0) {
5217
+ l = 0;
5218
+ }
5219
+ return this._c({
5220
+ h,
5221
+ s,
5222
+ l,
5223
+ a: this.a
5224
+ });
5225
+ }
5226
+ lighten(amount = 10) {
5227
+ const h = this.getHue();
5228
+ const s = this.getSaturation();
5229
+ let l = this.getLightness() + amount / 100;
5230
+ if (l > 1) {
5231
+ l = 1;
5232
+ }
5233
+ return this._c({
5234
+ h,
5235
+ s,
5236
+ l,
5237
+ a: this.a
5238
+ });
5239
+ }
5240
+ /**
5241
+ * Mix the current color a given amount with another color, from 0 to 100.
5242
+ * 0 means no mixing (return current color).
5243
+ */
5244
+ mix(input, amount = 50) {
5245
+ const color = this._c(input);
5246
+ const p = amount / 100;
5247
+ const calc = (key) => (color[key] - this[key]) * p + this[key];
5248
+ const rgba = {
5249
+ r: round(calc("r")),
5250
+ g: round(calc("g")),
5251
+ b: round(calc("b")),
5252
+ a: round(calc("a") * 100) / 100
5253
+ };
5254
+ return this._c(rgba);
5255
+ }
5256
+ /**
5257
+ * Mix the color with pure white, from 0 to 100.
5258
+ * Providing 0 will do nothing, providing 100 will always return white.
5259
+ */
5260
+ tint(amount = 10) {
5261
+ return this.mix({
5262
+ r: 255,
5263
+ g: 255,
5264
+ b: 255,
5265
+ a: 1
5266
+ }, amount);
5267
+ }
5268
+ /**
5269
+ * Mix the color with pure black, from 0 to 100.
5270
+ * Providing 0 will do nothing, providing 100 will always return black.
5271
+ */
5272
+ shade(amount = 10) {
5273
+ return this.mix({
5274
+ r: 0,
5275
+ g: 0,
5276
+ b: 0,
5277
+ a: 1
5278
+ }, amount);
5279
+ }
5280
+ onBackground(background) {
5281
+ const bg = this._c(background);
5282
+ const alpha = this.a + bg.a * (1 - this.a);
5283
+ const calc = (key) => {
5284
+ return round((this[key] * this.a + bg[key] * bg.a * (1 - this.a)) / alpha);
5285
+ };
5286
+ return this._c({
5287
+ r: calc("r"),
5288
+ g: calc("g"),
5289
+ b: calc("b"),
5290
+ a: alpha
5291
+ });
5292
+ }
5293
+ // ======================= Status =======================
5294
+ isDark() {
5295
+ return this.getBrightness() < 128;
5296
+ }
5297
+ isLight() {
5298
+ return this.getBrightness() >= 128;
5299
+ }
5300
+ // ======================== MISC ========================
5301
+ equals(other) {
5302
+ return this.r === other.r && this.g === other.g && this.b === other.b && this.a === other.a;
5303
+ }
5304
+ clone() {
5305
+ return this._c(this);
5306
+ }
5307
+ // ======================= Format =======================
5308
+ toHexString() {
5309
+ let hex = "#";
5310
+ const rHex = (this.r || 0).toString(16);
5311
+ hex += rHex.length === 2 ? rHex : "0" + rHex;
5312
+ const gHex = (this.g || 0).toString(16);
5313
+ hex += gHex.length === 2 ? gHex : "0" + gHex;
5314
+ const bHex = (this.b || 0).toString(16);
5315
+ hex += bHex.length === 2 ? bHex : "0" + bHex;
5316
+ if (typeof this.a === "number" && this.a >= 0 && this.a < 1) {
5317
+ const aHex = round(this.a * 255).toString(16);
5318
+ hex += aHex.length === 2 ? aHex : "0" + aHex;
5319
+ }
5320
+ return hex;
5321
+ }
5322
+ /** CSS support color pattern */
5323
+ toHsl() {
5324
+ return {
5325
+ h: this.getHue(),
5326
+ s: this.getHSLSaturation(),
5327
+ l: this.getLightness(),
5328
+ a: this.a
5329
+ };
5330
+ }
5331
+ /** CSS support color pattern */
5332
+ toHslString() {
5333
+ const h = this.getHue();
5334
+ const s = round(this.getHSLSaturation() * 100);
5335
+ const l = round(this.getLightness() * 100);
5336
+ return this.a !== 1 ? `hsla(${h},${s}%,${l}%,${this.a})` : `hsl(${h},${s}%,${l}%)`;
5337
+ }
5338
+ /** Same as toHsb */
5339
+ toHsv() {
5340
+ return {
5341
+ h: this.getHue(),
5342
+ s: this.getHSVSaturation(),
5343
+ v: this.getValue(),
5344
+ a: this.a
5345
+ };
5346
+ }
5347
+ toRgb() {
5348
+ return {
5349
+ r: this.r,
5350
+ g: this.g,
5351
+ b: this.b,
5352
+ a: this.a
5353
+ };
5354
+ }
5355
+ toRgbString() {
5356
+ return this.a !== 1 ? `rgba(${this.r},${this.g},${this.b},${this.a})` : `rgb(${this.r},${this.g},${this.b})`;
5357
+ }
5358
+ toString() {
5359
+ return this.toRgbString();
5360
+ }
5361
+ // ====================== Privates ======================
5362
+ /** Return a new FastColor object with one channel changed */
5363
+ _sc(rgb, value, max) {
5364
+ const clone = this.clone();
5365
+ clone[rgb] = limitRange(value, max);
5366
+ return clone;
5367
+ }
5368
+ _c(input) {
5369
+ return new this.constructor(input);
5370
+ }
5371
+ getMax() {
5372
+ if (typeof this._max === "undefined") {
5373
+ this._max = Math.max(this.r, this.g, this.b);
5374
+ }
5375
+ return this._max;
5376
+ }
5377
+ getMin() {
5378
+ if (typeof this._min === "undefined") {
5379
+ this._min = Math.min(this.r, this.g, this.b);
5380
+ }
5381
+ return this._min;
5382
+ }
5383
+ fromHexString(trimStr) {
5384
+ const withoutPrefix = trimStr.replace("#", "");
5385
+ function connectNum(index1, index2) {
5386
+ return parseInt(withoutPrefix[index1] + withoutPrefix[index2 || index1], 16);
5387
+ }
5388
+ if (withoutPrefix.length < 6) {
5389
+ this.r = connectNum(0);
5390
+ this.g = connectNum(1);
5391
+ this.b = connectNum(2);
5392
+ this.a = withoutPrefix[3] ? connectNum(3) / 255 : 1;
5393
+ } else {
5394
+ this.r = connectNum(0, 1);
5395
+ this.g = connectNum(2, 3);
5396
+ this.b = connectNum(4, 5);
5397
+ this.a = withoutPrefix[6] ? connectNum(6, 7) / 255 : 1;
5398
+ }
5399
+ }
5400
+ fromHsl({
5401
+ h: _h,
5402
+ s,
5403
+ l,
5404
+ a
5405
+ }) {
5406
+ const h = (_h % 360 + 360) % 360;
5407
+ this._h = h;
5408
+ this._hsl_s = s;
5409
+ this._l = l;
5410
+ this.a = typeof a === "number" ? a : 1;
5411
+ if (s <= 0) {
5412
+ const rgb = round(l * 255);
5413
+ this.r = rgb;
5414
+ this.g = rgb;
5415
+ this.b = rgb;
5416
+ return;
5417
+ }
5418
+ let r = 0, g = 0, b = 0;
5419
+ const huePrime = h / 60;
5420
+ const chroma = (1 - Math.abs(2 * l - 1)) * s;
5421
+ const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
5422
+ if (huePrime >= 0 && huePrime < 1) {
5423
+ r = chroma;
5424
+ g = secondComponent;
5425
+ } else if (huePrime >= 1 && huePrime < 2) {
5426
+ r = secondComponent;
5427
+ g = chroma;
5428
+ } else if (huePrime >= 2 && huePrime < 3) {
5429
+ g = chroma;
5430
+ b = secondComponent;
5431
+ } else if (huePrime >= 3 && huePrime < 4) {
5432
+ g = secondComponent;
5433
+ b = chroma;
5434
+ } else if (huePrime >= 4 && huePrime < 5) {
5435
+ r = secondComponent;
5436
+ b = chroma;
5437
+ } else if (huePrime >= 5 && huePrime < 6) {
5438
+ r = chroma;
5439
+ b = secondComponent;
5440
+ }
5441
+ const lightnessModification = l - chroma / 2;
5442
+ this.r = round((r + lightnessModification) * 255);
5443
+ this.g = round((g + lightnessModification) * 255);
5444
+ this.b = round((b + lightnessModification) * 255);
5445
+ }
5446
+ fromHsv({
5447
+ h: _h,
5448
+ s,
5449
+ v,
5450
+ a
5451
+ }) {
5452
+ const h = (_h % 360 + 360) % 360;
5453
+ this._h = h;
5454
+ this._hsv_s = s;
5455
+ this._v = v;
5456
+ this.a = typeof a === "number" ? a : 1;
5457
+ const vv = round(v * 255);
5458
+ this.r = vv;
5459
+ this.g = vv;
5460
+ this.b = vv;
5461
+ if (s <= 0) {
5462
+ return;
5463
+ }
5464
+ const hh = h / 60;
5465
+ const i = Math.floor(hh);
5466
+ const ff = hh - i;
5467
+ const p = round(v * (1 - s) * 255);
5468
+ const q = round(v * (1 - s * ff) * 255);
5469
+ const t = round(v * (1 - s * (1 - ff)) * 255);
5470
+ switch (i) {
5471
+ case 0:
5472
+ this.g = t;
5473
+ this.b = p;
5474
+ break;
5475
+ case 1:
5476
+ this.r = q;
5477
+ this.b = p;
5478
+ break;
5479
+ case 2:
5480
+ this.r = p;
5481
+ this.b = t;
5482
+ break;
5483
+ case 3:
5484
+ this.r = p;
5485
+ this.g = q;
5486
+ break;
5487
+ case 4:
5488
+ this.r = t;
5489
+ this.g = p;
5490
+ break;
5491
+ case 5:
5492
+ default:
5493
+ this.g = p;
5494
+ this.b = q;
5495
+ break;
5496
+ }
5497
+ }
5498
+ fromHsvString(trimStr) {
5499
+ const cells = splitColorStr(trimStr, parseHSVorHSL);
5500
+ this.fromHsv({
5501
+ h: cells[0],
5502
+ s: cells[1],
5503
+ v: cells[2],
5504
+ a: cells[3]
5505
+ });
5506
+ }
5507
+ fromHslString(trimStr) {
5508
+ const cells = splitColorStr(trimStr, parseHSVorHSL);
5509
+ this.fromHsl({
5510
+ h: cells[0],
5511
+ s: cells[1],
5512
+ l: cells[2],
5513
+ a: cells[3]
5514
+ });
5515
+ }
5516
+ fromRgbString(trimStr) {
5517
+ const cells = splitColorStr(trimStr, (num, txt) => (
5518
+ // Convert percentage to number. e.g. 50% -> 128
5519
+ txt.includes("%") ? round(num / 100 * 255) : num
5520
+ ));
5521
+ this.r = cells[0];
5522
+ this.g = cells[1];
5523
+ this.b = cells[2];
5524
+ this.a = cells[3];
5525
+ }
5526
+ };
5527
+
5528
+ // ../../node_modules/@ant-design/colors/es/generate.js
5529
+ var hueStep = 2;
5530
+ var saturationStep = 0.16;
5531
+ var saturationStep2 = 0.05;
5532
+ var brightnessStep1 = 0.05;
5533
+ var brightnessStep2 = 0.15;
5534
+ var lightColorCount = 5;
5535
+ var darkColorCount = 4;
5536
+ var darkColorMap = [{
5537
+ index: 7,
5538
+ amount: 15
5539
+ }, {
5540
+ index: 6,
5541
+ amount: 25
5542
+ }, {
5543
+ index: 5,
5544
+ amount: 30
5545
+ }, {
5546
+ index: 5,
5547
+ amount: 45
5548
+ }, {
5549
+ index: 5,
5550
+ amount: 65
5551
+ }, {
5552
+ index: 5,
5553
+ amount: 85
5554
+ }, {
5555
+ index: 4,
5556
+ amount: 90
5557
+ }, {
5558
+ index: 3,
5559
+ amount: 95
5560
+ }, {
5561
+ index: 2,
5562
+ amount: 97
5563
+ }, {
5564
+ index: 1,
5565
+ amount: 98
5566
+ }];
5567
+ function getHue(hsv, i, light) {
5568
+ let hue;
5569
+ if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
5570
+ hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
5571
+ } else {
5572
+ hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
5573
+ }
5574
+ if (hue < 0) {
5575
+ hue += 360;
5576
+ } else if (hue >= 360) {
5577
+ hue -= 360;
5578
+ }
5579
+ return hue;
5580
+ }
5581
+ function getSaturation(hsv, i, light) {
5582
+ if (hsv.h === 0 && hsv.s === 0) {
5583
+ return hsv.s;
5584
+ }
5585
+ let saturation;
5586
+ if (light) {
5587
+ saturation = hsv.s - saturationStep * i;
5588
+ } else if (i === darkColorCount) {
5589
+ saturation = hsv.s + saturationStep;
5590
+ } else {
5591
+ saturation = hsv.s + saturationStep2 * i;
5592
+ }
5593
+ if (saturation > 1) {
5594
+ saturation = 1;
5595
+ }
5596
+ if (light && i === lightColorCount && saturation > 0.1) {
5597
+ saturation = 0.1;
5598
+ }
5599
+ if (saturation < 0.06) {
5600
+ saturation = 0.06;
5601
+ }
5602
+ return Math.round(saturation * 100) / 100;
5603
+ }
5604
+ function getValue(hsv, i, light) {
5605
+ let value;
5606
+ if (light) {
5607
+ value = hsv.v + brightnessStep1 * i;
5608
+ } else {
5609
+ value = hsv.v - brightnessStep2 * i;
5610
+ }
5611
+ value = Math.max(0, Math.min(1, value));
5612
+ return Math.round(value * 100) / 100;
5613
+ }
5614
+ function generate(color, opts = {}) {
5615
+ const patterns = [];
5616
+ const pColor = new FastColor(color);
5617
+ const hsv = pColor.toHsv();
5618
+ for (let i = lightColorCount; i > 0; i -= 1) {
5619
+ const c = new FastColor({
5620
+ h: getHue(hsv, i, true),
5621
+ s: getSaturation(hsv, i, true),
5622
+ v: getValue(hsv, i, true)
5623
+ });
5624
+ patterns.push(c);
5625
+ }
5626
+ patterns.push(pColor);
5627
+ for (let i = 1; i <= darkColorCount; i += 1) {
5628
+ const c = new FastColor({
5629
+ h: getHue(hsv, i),
5630
+ s: getSaturation(hsv, i),
5631
+ v: getValue(hsv, i)
5632
+ });
5633
+ patterns.push(c);
5634
+ }
5635
+ if (opts.theme === "dark") {
5636
+ return darkColorMap.map(({
5637
+ index,
5638
+ amount
5639
+ }) => new FastColor(opts.backgroundColor || "#141414").mix(patterns[index], amount).toHexString());
5640
+ }
5641
+ return patterns.map((c) => c.toHexString());
5642
+ }
5643
+
5644
+ // ../../node_modules/@ant-design/colors/es/presets.js
5645
+ var red = ["#fff1f0", "#ffccc7", "#ffa39e", "#ff7875", "#ff4d4f", "#f5222d", "#cf1322", "#a8071a", "#820014", "#5c0011"];
5646
+ red.primary = red[5];
5647
+ var volcano = ["#fff2e8", "#ffd8bf", "#ffbb96", "#ff9c6e", "#ff7a45", "#fa541c", "#d4380d", "#ad2102", "#871400", "#610b00"];
5648
+ volcano.primary = volcano[5];
5649
+ var orange = ["#fff7e6", "#ffe7ba", "#ffd591", "#ffc069", "#ffa940", "#fa8c16", "#d46b08", "#ad4e00", "#873800", "#612500"];
5650
+ orange.primary = orange[5];
5651
+ var gold = ["#fffbe6", "#fff1b8", "#ffe58f", "#ffd666", "#ffc53d", "#faad14", "#d48806", "#ad6800", "#874d00", "#613400"];
5652
+ gold.primary = gold[5];
5653
+ var yellow = ["#feffe6", "#ffffb8", "#fffb8f", "#fff566", "#ffec3d", "#fadb14", "#d4b106", "#ad8b00", "#876800", "#614700"];
5654
+ yellow.primary = yellow[5];
5655
+ var lime = ["#fcffe6", "#f4ffb8", "#eaff8f", "#d3f261", "#bae637", "#a0d911", "#7cb305", "#5b8c00", "#3f6600", "#254000"];
5656
+ lime.primary = lime[5];
5657
+ var green = ["#f6ffed", "#d9f7be", "#b7eb8f", "#95de64", "#73d13d", "#52c41a", "#389e0d", "#237804", "#135200", "#092b00"];
5658
+ green.primary = green[5];
5659
+ var cyan = ["#e6fffb", "#b5f5ec", "#87e8de", "#5cdbd3", "#36cfc9", "#13c2c2", "#08979c", "#006d75", "#00474f", "#002329"];
5660
+ cyan.primary = cyan[5];
5661
+ var blue = ["#e6f4ff", "#bae0ff", "#91caff", "#69b1ff", "#4096ff", "#1677ff", "#0958d9", "#003eb3", "#002c8c", "#001d66"];
5662
+ blue.primary = blue[5];
5663
+ var geekblue = ["#f0f5ff", "#d6e4ff", "#adc6ff", "#85a5ff", "#597ef7", "#2f54eb", "#1d39c4", "#10239e", "#061178", "#030852"];
5664
+ geekblue.primary = geekblue[5];
5665
+ var purple = ["#f9f0ff", "#efdbff", "#d3adf7", "#b37feb", "#9254de", "#722ed1", "#531dab", "#391085", "#22075e", "#120338"];
5666
+ purple.primary = purple[5];
5667
+ var magenta = ["#fff0f6", "#ffd6e7", "#ffadd2", "#ff85c0", "#f759ab", "#eb2f96", "#c41d7f", "#9e1068", "#780650", "#520339"];
5668
+ magenta.primary = magenta[5];
5669
+ var grey = ["#a6a6a6", "#999999", "#8c8c8c", "#808080", "#737373", "#666666", "#404040", "#1a1a1a", "#000000", "#000000"];
5670
+ grey.primary = grey[5];
5671
+ var redDark = ["#2a1215", "#431418", "#58181c", "#791a1f", "#a61d24", "#d32029", "#e84749", "#f37370", "#f89f9a", "#fac8c3"];
5672
+ redDark.primary = redDark[5];
5673
+ var volcanoDark = ["#2b1611", "#441d12", "#592716", "#7c3118", "#aa3e19", "#d84a1b", "#e87040", "#f3956a", "#f8b692", "#fad4bc"];
5674
+ volcanoDark.primary = volcanoDark[5];
5675
+ var orangeDark = ["#2b1d11", "#442a11", "#593815", "#7c4a15", "#aa6215", "#d87a16", "#e89a3c", "#f3b765", "#f8cf8d", "#fae3b7"];
5676
+ orangeDark.primary = orangeDark[5];
5677
+ var goldDark = ["#2b2111", "#443111", "#594214", "#7c5914", "#aa7714", "#d89614", "#e8b339", "#f3cc62", "#f8df8b", "#faedb5"];
5678
+ goldDark.primary = goldDark[5];
5679
+ var yellowDark = ["#2b2611", "#443b11", "#595014", "#7c6e14", "#aa9514", "#d8bd14", "#e8d639", "#f3ea62", "#f8f48b", "#fafab5"];
5680
+ yellowDark.primary = yellowDark[5];
5681
+ var limeDark = ["#1f2611", "#2e3c10", "#3e4f13", "#536d13", "#6f9412", "#8bbb11", "#a9d134", "#c9e75d", "#e4f88b", "#f0fab5"];
5682
+ limeDark.primary = limeDark[5];
5683
+ var greenDark = ["#162312", "#1d3712", "#274916", "#306317", "#3c8618", "#49aa19", "#6abe39", "#8fd460", "#b2e58b", "#d5f2bb"];
5684
+ greenDark.primary = greenDark[5];
5685
+ var cyanDark = ["#112123", "#113536", "#144848", "#146262", "#138585", "#13a8a8", "#33bcb7", "#58d1c9", "#84e2d8", "#b2f1e8"];
5686
+ cyanDark.primary = cyanDark[5];
5687
+ var blueDark = ["#111a2c", "#112545", "#15325b", "#15417e", "#1554ad", "#1668dc", "#3c89e8", "#65a9f3", "#8dc5f8", "#b7dcfa"];
5688
+ blueDark.primary = blueDark[5];
5689
+ var geekblueDark = ["#131629", "#161d40", "#1c2755", "#203175", "#263ea0", "#2b4acb", "#5273e0", "#7f9ef3", "#a8c1f8", "#d2e0fa"];
5690
+ geekblueDark.primary = geekblueDark[5];
5691
+ var purpleDark = ["#1a1325", "#24163a", "#301c4d", "#3e2069", "#51258f", "#642ab5", "#854eca", "#ab7ae0", "#cda8f0", "#ebd7fa"];
5692
+ purpleDark.primary = purpleDark[5];
5693
+ var magentaDark = ["#291321", "#40162f", "#551c3b", "#75204f", "#a02669", "#cb2b83", "#e0529c", "#f37fb7", "#f8a8cc", "#fad2e3"];
5694
+ magentaDark.primary = magentaDark[5];
5695
+ var greyDark = ["#151515", "#1f1f1f", "#2d2d2d", "#393939", "#494949", "#5a5a5a", "#6a6a6a", "#7b7b7b", "#888888", "#969696"];
5696
+ greyDark.primary = greyDark[5];
5697
+
5698
+ // ../../node_modules/@ant-design/icons/es/components/IconBase.js
5699
+ var React13 = __toESM(require("react"));
5700
+
5701
+ // ../../node_modules/@rc-component/util/es/Dom/canUseDom.js
5702
+ function canUseDom() {
5703
+ return !!(typeof window !== "undefined" && window.document && window.document.createElement);
5704
+ }
5705
+
5706
+ // ../../node_modules/@rc-component/util/es/Dom/contains.js
5707
+ function contains(root, n) {
5708
+ if (!root) {
5709
+ return false;
5710
+ }
5711
+ if (root.contains) {
5712
+ return root.contains(n);
5713
+ }
5714
+ let node = n;
5715
+ while (node) {
5716
+ if (node === root) {
5717
+ return true;
5718
+ }
5719
+ node = node.parentNode;
5720
+ }
5721
+ return false;
5722
+ }
5723
+
5724
+ // ../../node_modules/@rc-component/util/es/Dom/dynamicCSS.js
5725
+ var APPEND_ORDER = "data-rc-order";
5726
+ var APPEND_PRIORITY = "data-rc-priority";
5727
+ var MARK_KEY = `rc-util-key`;
5728
+ var containerCache = /* @__PURE__ */ new Map();
5729
+ function getMark({
5730
+ mark
5731
+ } = {}) {
5732
+ if (mark) {
5733
+ return mark.startsWith("data-") ? mark : `data-${mark}`;
5734
+ }
5735
+ return MARK_KEY;
5736
+ }
5737
+ function getContainer(option) {
5738
+ if (option.attachTo) {
5739
+ return option.attachTo;
5740
+ }
5741
+ const head = document.querySelector("head");
5742
+ return head || document.body;
5743
+ }
5744
+ function getOrder(prepend) {
5745
+ if (prepend === "queue") {
5746
+ return "prependQueue";
5747
+ }
5748
+ return prepend ? "prepend" : "append";
5749
+ }
5750
+ function findStyles(container) {
5751
+ return Array.from((containerCache.get(container) || container).children).filter((node) => node.tagName === "STYLE");
5752
+ }
5753
+ function injectCSS(css, option = {}) {
5754
+ if (!canUseDom()) {
5755
+ return null;
5756
+ }
5757
+ const {
5758
+ csp,
5759
+ prepend,
5760
+ priority = 0
5761
+ } = option;
5762
+ const mergedOrder = getOrder(prepend);
5763
+ const isPrependQueue = mergedOrder === "prependQueue";
5764
+ const styleNode = document.createElement("style");
5765
+ styleNode.setAttribute(APPEND_ORDER, mergedOrder);
5766
+ if (isPrependQueue && priority) {
5767
+ styleNode.setAttribute(APPEND_PRIORITY, `${priority}`);
5768
+ }
5769
+ if (csp?.nonce) {
5770
+ styleNode.nonce = csp?.nonce;
5771
+ }
5772
+ styleNode.innerHTML = css;
5773
+ const container = getContainer(option);
5774
+ const {
5775
+ firstChild
5776
+ } = container;
5777
+ if (prepend) {
5778
+ if (isPrependQueue) {
5779
+ const existStyle = (option.styles || findStyles(container)).filter((node) => {
5780
+ if (!["prepend", "prependQueue"].includes(node.getAttribute(APPEND_ORDER))) {
5781
+ return false;
5782
+ }
5783
+ const nodePriority = Number(node.getAttribute(APPEND_PRIORITY) || 0);
5784
+ return priority >= nodePriority;
5785
+ });
5786
+ if (existStyle.length) {
5787
+ container.insertBefore(styleNode, existStyle[existStyle.length - 1].nextSibling);
5788
+ return styleNode;
5789
+ }
5790
+ }
5791
+ container.insertBefore(styleNode, firstChild);
5792
+ } else {
5793
+ container.appendChild(styleNode);
5794
+ }
5795
+ return styleNode;
5796
+ }
5797
+ function findExistNode(key, option = {}) {
5798
+ let {
5799
+ styles
5800
+ } = option;
5801
+ styles ||= findStyles(getContainer(option));
5802
+ return styles.find((node) => node.getAttribute(getMark(option)) === key);
5803
+ }
5804
+ function syncRealContainer(container, option) {
5805
+ const cachedRealContainer = containerCache.get(container);
5806
+ if (!cachedRealContainer || !contains(document, cachedRealContainer)) {
5807
+ const placeholderStyle = injectCSS("", option);
5808
+ const {
5809
+ parentNode
5810
+ } = placeholderStyle;
5811
+ containerCache.set(container, parentNode);
5812
+ container.removeChild(placeholderStyle);
5813
+ }
5814
+ }
5815
+ function updateCSS(css, key, originOption = {}) {
5816
+ const container = getContainer(originOption);
5817
+ const styles = findStyles(container);
5818
+ const option = {
5819
+ ...originOption,
5820
+ styles
5821
+ };
5822
+ syncRealContainer(container, option);
5823
+ const existNode = findExistNode(key, option);
5824
+ if (existNode) {
5825
+ if (option.csp?.nonce && existNode.nonce !== option.csp?.nonce) {
5826
+ existNode.nonce = option.csp?.nonce;
5827
+ }
5828
+ if (existNode.innerHTML !== css) {
5829
+ existNode.innerHTML = css;
5830
+ }
5831
+ return existNode;
5832
+ }
5833
+ const newNode = injectCSS(css, option);
5834
+ newNode.setAttribute(getMark(option), key);
5835
+ return newNode;
5836
+ }
5837
+
5838
+ // ../../node_modules/@rc-component/util/es/Dom/shadow.js
5839
+ function getRoot(ele) {
5840
+ return ele?.getRootNode?.();
5841
+ }
5842
+ function inShadow(ele) {
5843
+ return getRoot(ele) instanceof ShadowRoot;
5844
+ }
5845
+ function getShadowRoot(ele) {
5846
+ return inShadow(ele) ? getRoot(ele) : null;
5847
+ }
5848
+
5849
+ // ../../node_modules/@rc-component/util/es/warning.js
5850
+ var warned = {};
5851
+ var preWarningFns = [];
5852
+ var preMessage = (fn) => {
5853
+ preWarningFns.push(fn);
5854
+ };
5855
+ function warning(valid, message) {
5856
+ if (process.env.NODE_ENV !== "production" && !valid && console !== void 0) {
5857
+ const finalMessage = preWarningFns.reduce((msg, preMessageFn) => preMessageFn(msg ?? "", "warning"), message);
5858
+ if (finalMessage) {
5859
+ console.error(`Warning: ${finalMessage}`);
5860
+ }
5861
+ }
5862
+ }
5863
+ function note(valid, message) {
5864
+ if (process.env.NODE_ENV !== "production" && !valid && console !== void 0) {
5865
+ const finalMessage = preWarningFns.reduce((msg, preMessageFn) => preMessageFn(msg ?? "", "note"), message);
5866
+ if (finalMessage) {
5867
+ console.warn(`Note: ${finalMessage}`);
5868
+ }
5869
+ }
5870
+ }
5871
+ function resetWarned() {
5872
+ warned = {};
5873
+ }
5874
+ function call(method, valid, message) {
5875
+ if (!valid && !warned[message]) {
5876
+ method(false, message);
5877
+ warned[message] = true;
5878
+ }
5879
+ }
5880
+ function warningOnce(valid, message) {
5881
+ call(warning, valid, message);
5882
+ }
5883
+ function noteOnce(valid, message) {
5884
+ call(note, valid, message);
5885
+ }
5886
+ warningOnce.preMessage = preMessage;
5887
+ warningOnce.resetWarned = resetWarned;
5888
+ warningOnce.noteOnce = noteOnce;
5889
+
5890
+ // ../../node_modules/@ant-design/icons/es/utils.js
5891
+ var import_react22 = __toESM(require("react"));
5892
+ function camelCase(input) {
5893
+ return input.replace(/-(.)/g, (match, g) => g.toUpperCase());
5894
+ }
5895
+ function warning2(valid, message) {
5896
+ warningOnce(valid, `[@ant-design/icons] ${message}`);
5897
+ }
5898
+ function isIconDefinition(target) {
5899
+ return typeof target === "object" && typeof target.name === "string" && typeof target.theme === "string" && (typeof target.icon === "object" || typeof target.icon === "function");
5900
+ }
5901
+ function normalizeAttrs(attrs = {}) {
5902
+ return Object.keys(attrs).reduce((acc, key) => {
5903
+ const val = attrs[key];
5904
+ switch (key) {
5905
+ case "class":
5906
+ acc.className = val;
5907
+ delete acc.class;
5908
+ break;
5909
+ default:
5910
+ delete acc[key];
5911
+ acc[camelCase(key)] = val;
5912
+ }
5913
+ return acc;
5914
+ }, {});
5915
+ }
5916
+ function generate2(node, key, rootProps) {
5917
+ if (!rootProps) {
5918
+ return /* @__PURE__ */ import_react22.default.createElement(node.tag, {
5919
+ key,
5920
+ ...normalizeAttrs(node.attrs)
5921
+ }, (node.children || []).map((child, index) => generate2(child, `${key}-${node.tag}-${index}`)));
5922
+ }
5923
+ return /* @__PURE__ */ import_react22.default.createElement(node.tag, {
5924
+ key,
5925
+ ...normalizeAttrs(node.attrs),
5926
+ ...rootProps
5927
+ }, (node.children || []).map((child, index) => generate2(child, `${key}-${node.tag}-${index}`)));
5928
+ }
5929
+ function getSecondaryColor(primaryColor) {
5930
+ return generate(primaryColor)[0];
5931
+ }
5932
+ function normalizeTwoToneColors(twoToneColor) {
5933
+ if (!twoToneColor) {
5934
+ return [];
5935
+ }
5936
+ return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
5937
+ }
5938
+ var iconStyles = `
5939
+ .anticon {
5940
+ display: inline-flex;
5941
+ align-items: center;
5942
+ color: inherit;
5943
+ font-style: normal;
5944
+ line-height: 0;
5945
+ text-align: center;
5946
+ text-transform: none;
5947
+ vertical-align: -0.125em;
5948
+ text-rendering: optimizeLegibility;
5949
+ -webkit-font-smoothing: antialiased;
5950
+ -moz-osx-font-smoothing: grayscale;
5951
+ }
5952
+
5953
+ .anticon > * {
5954
+ line-height: 1;
5955
+ }
5956
+
5957
+ .anticon svg {
5958
+ display: inline-block;
5959
+ vertical-align: inherit;
5960
+ }
5961
+
5962
+ .anticon::before {
5963
+ display: none;
5964
+ }
5965
+
5966
+ .anticon .anticon-icon {
5967
+ display: block;
5968
+ }
5969
+
5970
+ .anticon[tabindex] {
5971
+ cursor: pointer;
5972
+ }
5973
+
5974
+ .anticon-spin::before,
5975
+ .anticon-spin {
5976
+ display: inline-block;
5977
+ -webkit-animation: loadingCircle 1s infinite linear;
5978
+ animation: loadingCircle 1s infinite linear;
5979
+ }
5980
+
5981
+ @-webkit-keyframes loadingCircle {
5982
+ 100% {
5983
+ -webkit-transform: rotate(360deg);
5984
+ transform: rotate(360deg);
5985
+ }
5986
+ }
5987
+
5988
+ @keyframes loadingCircle {
5989
+ 100% {
5990
+ -webkit-transform: rotate(360deg);
5991
+ transform: rotate(360deg);
5992
+ }
5993
+ }
5994
+ `;
5995
+ var useInsertStyles = (eleRef) => {
5996
+ const {
5997
+ csp,
5998
+ prefixCls,
5999
+ layer
6000
+ } = (0, import_react22.useContext)(Context_default);
6001
+ let mergedStyleStr = iconStyles;
6002
+ if (prefixCls) {
6003
+ mergedStyleStr = mergedStyleStr.replace(/anticon/g, prefixCls);
6004
+ }
6005
+ if (layer) {
6006
+ mergedStyleStr = `@layer ${layer} {
6007
+ ${mergedStyleStr}
6008
+ }`;
6009
+ }
6010
+ (0, import_react22.useEffect)(() => {
6011
+ const ele = eleRef.current;
6012
+ const shadowRoot = getShadowRoot(ele);
6013
+ updateCSS(mergedStyleStr, "@ant-design-icons", {
6014
+ prepend: !layer,
6015
+ csp,
6016
+ attachTo: shadowRoot
6017
+ });
6018
+ }, []);
6019
+ };
6020
+
6021
+ // ../../node_modules/@ant-design/icons/es/components/IconBase.js
6022
+ var twoToneColorPalette = {
6023
+ primaryColor: "#333",
6024
+ secondaryColor: "#E6E6E6",
6025
+ calculated: false
6026
+ };
6027
+ function setTwoToneColors({
6028
+ primaryColor,
6029
+ secondaryColor
6030
+ }) {
6031
+ twoToneColorPalette.primaryColor = primaryColor;
6032
+ twoToneColorPalette.secondaryColor = secondaryColor || getSecondaryColor(primaryColor);
6033
+ twoToneColorPalette.calculated = !!secondaryColor;
6034
+ }
6035
+ function getTwoToneColors() {
6036
+ return {
6037
+ ...twoToneColorPalette
6038
+ };
6039
+ }
6040
+ var IconBase = (props) => {
6041
+ const {
6042
+ icon,
6043
+ className,
6044
+ onClick,
6045
+ style,
6046
+ primaryColor,
6047
+ secondaryColor,
6048
+ ...restProps
6049
+ } = props;
6050
+ const svgRef = React13.useRef(null);
6051
+ let colors = twoToneColorPalette;
6052
+ if (primaryColor) {
6053
+ colors = {
6054
+ primaryColor,
6055
+ secondaryColor: secondaryColor || getSecondaryColor(primaryColor)
6056
+ };
6057
+ }
6058
+ useInsertStyles(svgRef);
6059
+ warning2(isIconDefinition(icon), `icon should be icon definiton, but got ${icon}`);
6060
+ if (!isIconDefinition(icon)) {
6061
+ return null;
6062
+ }
6063
+ let target = icon;
6064
+ if (target && typeof target.icon === "function") {
6065
+ target = {
6066
+ ...target,
6067
+ icon: target.icon(colors.primaryColor, colors.secondaryColor)
6068
+ };
6069
+ }
6070
+ return generate2(target.icon, `svg-${target.name}`, {
6071
+ className,
6072
+ onClick,
6073
+ style,
6074
+ "data-icon": target.name,
6075
+ width: "1em",
6076
+ height: "1em",
6077
+ fill: "currentColor",
6078
+ "aria-hidden": "true",
6079
+ ...restProps,
6080
+ ref: svgRef
6081
+ });
6082
+ };
6083
+ IconBase.displayName = "IconReact";
6084
+ IconBase.getTwoToneColors = getTwoToneColors;
6085
+ IconBase.setTwoToneColors = setTwoToneColors;
6086
+ var IconBase_default = IconBase;
6087
+
6088
+ // ../../node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js
6089
+ function setTwoToneColor(twoToneColor) {
6090
+ const [primaryColor, secondaryColor] = normalizeTwoToneColors(twoToneColor);
6091
+ return IconBase_default.setTwoToneColors({
6092
+ primaryColor,
6093
+ secondaryColor
6094
+ });
6095
+ }
6096
+ function getTwoToneColor() {
6097
+ const colors = IconBase_default.getTwoToneColors();
6098
+ if (!colors.calculated) {
6099
+ return colors.primaryColor;
6100
+ }
6101
+ return [colors.primaryColor, colors.secondaryColor];
6102
+ }
6103
+
6104
+ // ../../node_modules/@ant-design/icons/es/components/AntdIcon.js
6105
+ function _extends() {
6106
+ _extends = Object.assign ? Object.assign.bind() : function(target) {
6107
+ for (var i = 1; i < arguments.length; i++) {
6108
+ var source = arguments[i];
6109
+ for (var key in source) {
6110
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
6111
+ target[key] = source[key];
6112
+ }
6113
+ }
6114
+ }
6115
+ return target;
6116
+ };
6117
+ return _extends.apply(this, arguments);
6118
+ }
6119
+ setTwoToneColor(blue.primary);
6120
+ var Icon = /* @__PURE__ */ React14.forwardRef((props, ref) => {
6121
+ const {
6122
+ // affect outter <i>...</i>
6123
+ className,
6124
+ // affect inner <svg>...</svg>
6125
+ icon,
6126
+ spin,
6127
+ rotate,
6128
+ tabIndex,
6129
+ onClick,
6130
+ // other
6131
+ twoToneColor,
6132
+ ...restProps
6133
+ } = props;
6134
+ const {
6135
+ prefixCls = "anticon",
6136
+ rootClassName
6137
+ } = React14.useContext(Context_default);
6138
+ const classString = (0, import_clsx2.clsx)(rootClassName, prefixCls, {
6139
+ [`${prefixCls}-${icon.name}`]: !!icon.name,
6140
+ [`${prefixCls}-spin`]: !!spin || icon.name === "loading"
6141
+ }, className);
6142
+ let iconTabIndex = tabIndex;
6143
+ if (iconTabIndex === void 0 && onClick) {
6144
+ iconTabIndex = -1;
6145
+ }
6146
+ const svgStyle = rotate ? {
6147
+ msTransform: `rotate(${rotate}deg)`,
6148
+ transform: `rotate(${rotate}deg)`
6149
+ } : void 0;
6150
+ const [primaryColor, secondaryColor] = normalizeTwoToneColors(twoToneColor);
6151
+ return /* @__PURE__ */ React14.createElement("span", _extends({
6152
+ role: "img",
6153
+ "aria-label": icon.name
6154
+ }, restProps, {
6155
+ ref,
6156
+ tabIndex: iconTabIndex,
6157
+ onClick,
6158
+ className: classString
6159
+ }), /* @__PURE__ */ React14.createElement(IconBase_default, {
6160
+ icon,
6161
+ primaryColor,
6162
+ secondaryColor,
6163
+ style: svgStyle
6164
+ }));
6165
+ });
6166
+ Icon.getTwoToneColor = getTwoToneColor;
6167
+ Icon.setTwoToneColor = setTwoToneColor;
6168
+ if (process.env.NODE_ENV !== "production") {
6169
+ Icon.displayName = "AntdIcon";
6170
+ }
6171
+ var AntdIcon_default = Icon;
6172
+
6173
+ // ../../node_modules/@ant-design/icons/es/icons/PlusOutlined.js
6174
+ var React15 = __toESM(require("react"));
6175
+
6176
+ // ../../node_modules/@ant-design/icons-svg/es/asn/PlusOutlined.js
6177
+ var PlusOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z" } }, { "tag": "path", "attrs": { "d": "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z" } }] }, "name": "plus", "theme": "outlined" };
6178
+ var PlusOutlined_default = PlusOutlined;
6179
+
6180
+ // ../../node_modules/@ant-design/icons/es/icons/PlusOutlined.js
6181
+ function _extends2() {
6182
+ _extends2 = Object.assign ? Object.assign.bind() : function(target) {
6183
+ for (var i = 1; i < arguments.length; i++) {
6184
+ var source = arguments[i];
6185
+ for (var key in source) {
6186
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
6187
+ target[key] = source[key];
6188
+ }
6189
+ }
6190
+ }
6191
+ return target;
6192
+ };
6193
+ return _extends2.apply(this, arguments);
6194
+ }
6195
+ var PlusOutlined2 = (props, ref) => /* @__PURE__ */ React15.createElement(AntdIcon_default, _extends2({}, props, {
6196
+ ref,
6197
+ icon: PlusOutlined_default
6198
+ }));
6199
+ var RefIcon = /* @__PURE__ */ React15.forwardRef(PlusOutlined2);
6200
+ if (process.env.NODE_ENV !== "production") {
6201
+ RefIcon.displayName = "PlusOutlined";
6202
+ }
6203
+ var PlusOutlined_default2 = RefIcon;
6204
+
6205
+ // src/hooks/uploads/useAntdImageUpload.tsx
6206
+ var import_antd2 = require("antd");
6207
+ var import_jsx_runtime30 = require("react/jsx-runtime");
6208
+ var getBase64 = (file) => new Promise((resolve, reject) => {
6209
+ const reader = new FileReader();
6210
+ reader.readAsDataURL(file);
6211
+ reader.onload = () => resolve(reader.result);
6212
+ reader.onerror = (error) => reject(error);
6213
+ });
6214
+ var useAntdImageUpload = ({ length = 1 }) => {
6215
+ const [fileList, setFileList] = (0, import_react23.useState)([]);
6216
+ const [previewOpen, setPreviewOpen] = (0, import_react23.useState)(false);
6217
+ const [previewImage, setPreviewImage] = (0, import_react23.useState)("");
6218
+ const handlePreview = async (file) => {
6219
+ if (!file.url && !file.preview) {
6220
+ file.preview = await getBase64(file.originFileObj);
6221
+ }
6222
+ setPreviewImage(file.url || file.preview);
6223
+ setPreviewOpen(true);
6224
+ };
6225
+ const handleChange = ({ fileList: newFileList }) => {
6226
+ setFileList(
6227
+ newFileList.map((f) => ({
6228
+ ...f,
6229
+ status: "done"
6230
+ // mark done immediately
6231
+ }))
6232
+ );
6233
+ };
6234
+ const ImageBox = () => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
6235
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
6236
+ import_antd2.Upload,
6237
+ {
6238
+ listType: "picture-card",
6239
+ fileList,
6240
+ onPreview: handlePreview,
6241
+ onChange: handleChange,
6242
+ beforeUpload: () => false,
6243
+ children: fileList.length >= length ? null : /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("button", { style: { border: 0, background: "none" }, type: "button", children: [
6244
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(PlusOutlined_default2, {}),
6245
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style: { marginTop: 8 }, children: "Upload" })
6246
+ ] })
6247
+ }
6248
+ ),
6249
+ previewImage && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
6250
+ import_antd2.Image,
6251
+ {
6252
+ style: { display: "none" },
6253
+ preview: {
6254
+ visible: previewOpen,
6255
+ onVisibleChange: (visible) => setPreviewOpen(visible),
6256
+ afterOpenChange: (visible) => !visible && setPreviewImage("")
6257
+ },
6258
+ src: previewImage
6259
+ }
6260
+ )
6261
+ ] });
6262
+ return { ImageBox, fileList, setFileList };
6263
+ };
6264
+ var useAntdImageUpload_default = useAntdImageUpload;
4841
6265
  // Annotate the CommonJS export names for ESM import in node:
4842
6266
  0 && (module.exports = {
4843
6267
  Badge,
@@ -4882,6 +6306,7 @@ var storage = {
4882
6306
  generatePdf,
4883
6307
  storage,
4884
6308
  useA4StatementView,
6309
+ useAntdImageUpload,
4885
6310
  useApi,
4886
6311
  useModal,
4887
6312
  useSearchApiContext,