light-chain-open-ui 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,40 +1,42 @@
1
- import { LitElement as e, css as t, html as n, nothing as r } from "lit";
1
+ import { l as e, t } from "./client-C5AgfBeT.js";
2
+ import { N as n, P as r, o as i } from "./constants-DmzJOR2G.js";
3
+ import { LitElement as a, css as o, html as s, nothing as c } from "lit";
2
4
  //#region node_modules/@lit/reactive-element/decorators/custom-element.js
3
- var i = (e) => (t, n) => {
5
+ var l = (e) => (t, n) => {
4
6
  n === void 0 ? customElements.define(e, t) : n.addInitializer(() => {
5
7
  customElements.define(e, t);
6
8
  });
7
- }, a = globalThis, o = a.ShadowRoot && (a.ShadyCSS === void 0 || a.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s = Symbol(), c = /* @__PURE__ */ new WeakMap(), l = class {
9
+ }, u = globalThis, d = u.ShadowRoot && (u.ShadyCSS === void 0 || u.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ee = Symbol(), te = /* @__PURE__ */ new WeakMap(), ne = class {
8
10
  constructor(e, t, n) {
9
- if (this._$cssResult$ = !0, n !== s) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
11
+ if (this._$cssResult$ = !0, n !== ee) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
12
  this.cssText = e, this.t = t;
11
13
  }
12
14
  get styleSheet() {
13
15
  let e = this.o, t = this.t;
14
- if (o && e === void 0) {
16
+ if (d && e === void 0) {
15
17
  let n = t !== void 0 && t.length === 1;
16
- n && (e = c.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), n && c.set(t, e));
18
+ n && (e = te.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), n && te.set(t, e));
17
19
  }
18
20
  return e;
19
21
  }
20
22
  toString() {
21
23
  return this.cssText;
22
24
  }
23
- }, u = (e) => new l(typeof e == "string" ? e : e + "", void 0, s), ee = (e, t) => {
24
- if (o) e.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
25
+ }, re = (e) => new ne(typeof e == "string" ? e : e + "", void 0, ee), ie = (e, t) => {
26
+ if (d) e.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
25
27
  else for (let n of t) {
26
- let t = document.createElement("style"), r = a.litNonce;
28
+ let t = document.createElement("style"), r = u.litNonce;
27
29
  r !== void 0 && t.setAttribute("nonce", r), t.textContent = n.cssText, e.appendChild(t);
28
30
  }
29
- }, te = o ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((e) => {
31
+ }, ae = d ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((e) => {
30
32
  let t = "";
31
33
  for (let n of e.cssRules) t += n.cssText;
32
- return u(t);
33
- })(e) : e, { is: ne, defineProperty: re, getOwnPropertyDescriptor: ie, getOwnPropertyNames: ae, getOwnPropertySymbols: oe, getPrototypeOf: se } = Object, d = globalThis, ce = d.trustedTypes, le = ce ? ce.emptyScript : "", ue = d.reactiveElementPolyfillSupport, f = (e, t) => e, p = {
34
+ return re(t);
35
+ })(e) : e, { is: oe, defineProperty: se, getOwnPropertyDescriptor: ce, getOwnPropertyNames: le, getOwnPropertySymbols: ue, getPrototypeOf: de } = Object, f = globalThis, fe = f.trustedTypes, pe = fe ? fe.emptyScript : "", me = f.reactiveElementPolyfillSupport, p = (e, t) => e, m = {
34
36
  toAttribute(e, t) {
35
37
  switch (t) {
36
38
  case Boolean:
37
- e = e ? le : null;
39
+ e = e ? pe : null;
38
40
  break;
39
41
  case Object:
40
42
  case Array: e = e == null ? e : JSON.stringify(e);
@@ -59,30 +61,30 @@ var i = (e) => (t, n) => {
59
61
  }
60
62
  return n;
61
63
  }
62
- }, de = (e, t) => !ne(e, t), fe = {
64
+ }, h = (e, t) => !oe(e, t), he = {
63
65
  attribute: !0,
64
66
  type: String,
65
- converter: p,
67
+ converter: m,
66
68
  reflect: !1,
67
69
  useDefault: !1,
68
- hasChanged: de
70
+ hasChanged: h
69
71
  };
70
- Symbol.metadata ??= Symbol("metadata"), d.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
71
- var m = class extends HTMLElement {
72
+ Symbol.metadata ??= Symbol("metadata"), f.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
73
+ var g = class extends HTMLElement {
72
74
  static addInitializer(e) {
73
75
  this._$Ei(), (this.l ??= []).push(e);
74
76
  }
75
77
  static get observedAttributes() {
76
78
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
77
79
  }
78
- static createProperty(e, t = fe) {
80
+ static createProperty(e, t = he) {
79
81
  if (t.state && (t.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((t = Object.create(t)).wrapped = !0), this.elementProperties.set(e, t), !t.noAccessor) {
80
82
  let n = Symbol(), r = this.getPropertyDescriptor(e, n, t);
81
- r !== void 0 && re(this.prototype, e, r);
83
+ r !== void 0 && se(this.prototype, e, r);
82
84
  }
83
85
  }
84
86
  static getPropertyDescriptor(e, t, n) {
85
- let { get: r, set: i } = ie(this.prototype, e) ?? {
87
+ let { get: r, set: i } = ce(this.prototype, e) ?? {
86
88
  get() {
87
89
  return this[t];
88
90
  },
@@ -101,17 +103,17 @@ var m = class extends HTMLElement {
101
103
  };
102
104
  }
103
105
  static getPropertyOptions(e) {
104
- return this.elementProperties.get(e) ?? fe;
106
+ return this.elementProperties.get(e) ?? he;
105
107
  }
106
108
  static _$Ei() {
107
- if (this.hasOwnProperty(f("elementProperties"))) return;
108
- let e = se(this);
109
+ if (this.hasOwnProperty(p("elementProperties"))) return;
110
+ let e = de(this);
109
111
  e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
110
112
  }
111
113
  static finalize() {
112
- if (this.hasOwnProperty(f("finalized"))) return;
113
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(f("properties"))) {
114
- let e = this.properties, t = [...ae(e), ...oe(e)];
114
+ if (this.hasOwnProperty(p("finalized"))) return;
115
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(p("properties"))) {
116
+ let e = this.properties, t = [...le(e), ...ue(e)];
115
117
  for (let n of t) this.createProperty(n, e[n]);
116
118
  }
117
119
  let e = this[Symbol.metadata];
@@ -130,8 +132,8 @@ var m = class extends HTMLElement {
130
132
  let t = [];
131
133
  if (Array.isArray(e)) {
132
134
  let n = new Set(e.flat(Infinity).reverse());
133
- for (let e of n) t.unshift(te(e));
134
- } else e !== void 0 && t.push(te(e));
135
+ for (let e of n) t.unshift(ae(e));
136
+ } else e !== void 0 && t.push(ae(e));
135
137
  return t;
136
138
  }
137
139
  static _$Eu(e, t) {
@@ -157,7 +159,7 @@ var m = class extends HTMLElement {
157
159
  }
158
160
  createRenderRoot() {
159
161
  let e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
160
- return ee(e, this.constructor.elementStyles), e;
162
+ return ie(e, this.constructor.elementStyles), e;
161
163
  }
162
164
  connectedCallback() {
163
165
  this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((e) => e.hostConnected?.());
@@ -172,14 +174,14 @@ var m = class extends HTMLElement {
172
174
  _$ET(e, t) {
173
175
  let n = this.constructor.elementProperties.get(e), r = this.constructor._$Eu(e, n);
174
176
  if (r !== void 0 && !0 === n.reflect) {
175
- let i = (n.converter?.toAttribute === void 0 ? p : n.converter).toAttribute(t, n.type);
177
+ let i = (n.converter?.toAttribute === void 0 ? m : n.converter).toAttribute(t, n.type);
176
178
  this._$Em = e, i == null ? this.removeAttribute(r) : this.setAttribute(r, i), this._$Em = null;
177
179
  }
178
180
  }
179
181
  _$AK(e, t) {
180
182
  let n = this.constructor, r = n._$Eh.get(e);
181
183
  if (r !== void 0 && this._$Em !== r) {
182
- let e = n.getPropertyOptions(r), i = typeof e.converter == "function" ? { fromAttribute: e.converter } : e.converter?.fromAttribute === void 0 ? p : e.converter;
184
+ let e = n.getPropertyOptions(r), i = typeof e.converter == "function" ? { fromAttribute: e.converter } : e.converter?.fromAttribute === void 0 ? m : e.converter;
183
185
  this._$Em = r;
184
186
  let a = i.fromAttribute(t, e.type);
185
187
  this[r] = a ?? this._$Ej?.get(r) ?? a, this._$Em = null;
@@ -188,7 +190,7 @@ var m = class extends HTMLElement {
188
190
  requestUpdate(e, t, n, r = !1, i) {
189
191
  if (e !== void 0) {
190
192
  let a = this.constructor;
191
- if (!1 === r && (i = this[e]), n ??= a.getPropertyOptions(e), !((n.hasChanged ?? de)(i, t) || n.useDefault && n.reflect && i === this._$Ej?.get(e) && !this.hasAttribute(a._$Eu(e, n)))) return;
193
+ if (!1 === r && (i = this[e]), n ??= a.getPropertyOptions(e), !((n.hasChanged ?? h)(i, t) || n.useDefault && n.reflect && i === this._$Ej?.get(e) && !this.hasAttribute(a._$Eu(e, n)))) return;
192
194
  this.C(e, t, n);
193
195
  }
194
196
  !1 === this.isUpdatePending && (this._$ES = this._$EP());
@@ -252,16 +254,16 @@ var m = class extends HTMLElement {
252
254
  updated(e) {}
253
255
  firstUpdated(e) {}
254
256
  };
255
- m.elementStyles = [], m.shadowRootOptions = { mode: "open" }, m[f("elementProperties")] = /* @__PURE__ */ new Map(), m[f("finalized")] = /* @__PURE__ */ new Map(), ue?.({ ReactiveElement: m }), (d.reactiveElementVersions ??= []).push("2.1.2");
257
+ g.elementStyles = [], g.shadowRootOptions = { mode: "open" }, g[p("elementProperties")] = /* @__PURE__ */ new Map(), g[p("finalized")] = /* @__PURE__ */ new Map(), me?.({ ReactiveElement: g }), (f.reactiveElementVersions ??= []).push("2.1.2");
256
258
  //#endregion
257
259
  //#region node_modules/@lit/reactive-element/decorators/property.js
258
- var pe = {
260
+ var ge = {
259
261
  attribute: !0,
260
262
  type: String,
261
- converter: p,
263
+ converter: m,
262
264
  reflect: !1,
263
- hasChanged: de
264
- }, me = (e = pe, t, n) => {
265
+ hasChanged: h
266
+ }, _e = (e = ge, t, n) => {
265
267
  let { kind: r, metadata: i } = n, a = globalThis.litPropertyMetadata.get(i);
266
268
  if (a === void 0 && globalThis.litPropertyMetadata.set(i, a = /* @__PURE__ */ new Map()), r === "setter" && ((e = Object.create(e)).wrapped = !0), a.set(n.name, e), r === "accessor") {
267
269
  let { name: r } = n;
@@ -284,16 +286,16 @@ var pe = {
284
286
  }
285
287
  throw Error("Unsupported decorator location: " + r);
286
288
  };
287
- function h(e) {
288
- return (t, n) => typeof n == "object" ? me(e, t, n) : ((e, t, n) => {
289
+ function _(e) {
290
+ return (t, n) => typeof n == "object" ? _e(e, t, n) : ((e, t, n) => {
289
291
  let r = t.hasOwnProperty(n);
290
292
  return t.constructor.createProperty(n, e), r ? Object.getOwnPropertyDescriptor(t, n) : void 0;
291
293
  })(e, t, n);
292
294
  }
293
295
  //#endregion
294
296
  //#region node_modules/@lit/reactive-element/decorators/state.js
295
- function g(e) {
296
- return h({
297
+ function v(e) {
298
+ return _({
297
299
  ...e,
298
300
  state: !0,
299
301
  attribute: !1
@@ -301,10 +303,10 @@ function g(e) {
301
303
  }
302
304
  //#endregion
303
305
  //#region node_modules/@lit/reactive-element/decorators/base.js
304
- var he = (e, t, n) => (n.configurable = !0, n.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, n), n);
306
+ var ve = (e, t, n) => (n.configurable = !0, n.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(e, t, n), n);
305
307
  //#endregion
306
308
  //#region node_modules/@lit/reactive-element/decorators/query.js
307
- function ge(e, t) {
309
+ function ye(e, t) {
308
310
  return (n, r, i) => {
309
311
  let a = (t) => t.renderRoot?.querySelector(e) ?? null;
310
312
  if (t) {
@@ -319,479 +321,19 @@ function ge(e, t) {
319
321
  }
320
322
  };
321
323
  })();
322
- return he(n, r, { get() {
324
+ return ve(n, r, { get() {
323
325
  let n = e.call(this);
324
326
  return n === void 0 && (n = a(this), (n !== null || this.hasUpdated) && t.call(this, n)), n;
325
327
  } });
326
328
  }
327
- return he(n, r, { get() {
329
+ return ve(n, r, { get() {
328
330
  return a(this);
329
331
  } });
330
332
  };
331
333
  }
332
334
  //#endregion
333
- //#region src/core/types.ts
334
- var _e = {
335
- RUNNING: "running",
336
- DONE: "done"
337
- }, ve = {
338
- DONE: "done",
339
- EXCEPTION: "exception"
340
- }, _ = {
341
- MAX_SIZE_MB: 10,
342
- MAX_WIDTH: 2048,
343
- MAX_HEIGHT: 2048,
344
- ASPECT_RATIO_MIN: 1 / 3,
345
- ASPECT_RATIO_MAX: 3
346
- }, ye = [
347
- "1:1",
348
- "2:3",
349
- "3:4",
350
- "3:2",
351
- "4:3",
352
- "9:16",
353
- "16:9"
354
- ];
355
- //#endregion
356
- //#region src/core/image-validator.ts
357
- function be(e) {
358
- let t = [];
359
- e.size > _.MAX_SIZE_MB * 1024 * 1024 && t.push("图片大小不能超过10MB"), (e.width > _.MAX_WIDTH || e.height > _.MAX_HEIGHT) && t.push("图片分辨率不能超过2048x2048");
360
- let n = e.width / e.height;
361
- return (n < _.ASPECT_RATIO_MIN || n > _.ASPECT_RATIO_MAX) && t.push("宽高比必须在1:3到3:1之间"), {
362
- valid: t.length === 0,
363
- errors: t
364
- };
365
- }
366
- function xe(e, t) {
367
- let n = [];
368
- return (e.width !== t.width || e.height !== t.height) && n.push("蒙版尺寸必须与原图尺寸相同"), {
369
- valid: n.length === 0,
370
- errors: n
371
- };
372
- }
373
- async function Se(e) {
374
- let t = e.size <= _.MAX_SIZE_MB * 1024 * 1024;
375
- return new Promise((n) => {
376
- let r = new Image(), i = URL.createObjectURL(e);
377
- r.onload = () => {
378
- URL.revokeObjectURL(i);
379
- let e = [];
380
- (r.width > _.MAX_WIDTH || r.height > _.MAX_HEIGHT) && e.push("图片分辨率不能超过2048x2048");
381
- let a = r.width / r.height;
382
- (a < _.ASPECT_RATIO_MIN || a > _.ASPECT_RATIO_MAX) && e.push("宽高比必须在1:3到3:1之间"), t || e.push("图片大小不能超过10MB"), n({
383
- valid: e.length === 0,
384
- errors: e
385
- });
386
- }, r.onerror = () => {
387
- URL.revokeObjectURL(i), n({
388
- valid: !1,
389
- errors: ["无法加载图片"]
390
- });
391
- }, r.src = i;
392
- });
393
- }
394
- //#endregion
395
- //#region src/core/constants.ts
396
- var Ce = "https://api.lightchainai.com", we = "client-secret", Te = "/task/progress", Ee = "/task/submit", De = {
397
- BAD_REQUEST: 400,
398
- UNAUTHORIZED: 401,
399
- RATE_LIMIT: 429,
400
- SERVER_ERROR: 500
401
- }, Oe = {
402
- GENERATE_PRINTING: "GeneratePrinting",
403
- VIRTUAL_FITTING: "VirtualFitting",
404
- FIX_FACE: "FixFace",
405
- CHANGE_FACE: "ChangeFace",
406
- MULTI_PERSPECTIVE: "MultiPerspective",
407
- PRINTING_TILING: "PrintingTiling",
408
- CHANGE_DESIGN_POINT: "ChangeDesignPoint",
409
- CHANGE_COLOR: "ChangeColor",
410
- CHANGE_FABRIC: "ChangeFabric",
411
- SR: "Sr",
412
- VECTOR_CONVERT: "VectorConvert",
413
- CHANGE_MODEL: "ChangeModel",
414
- GENERATE_SKETCH: "GenerateSketch",
415
- MODEL_GENERATE_SKETCH: "ModelGenerateSketch",
416
- ELIMINATE: "Eliminate",
417
- EXPAND_IMAGE: "ExpandImage",
418
- CLOTHING_DESIGN: "ClothingDesign",
419
- CHANGE_PATTERN: "ChangePattern",
420
- GENERATE_MODEL: "GenerateModel",
421
- MODIFY_PRINTING: "ModifyPrinting",
422
- CUT_OUT: "CutOut",
423
- LINE_ART_TO_REAL: "LineArtToReal",
424
- FIX_PARTIAL: "FixPartial",
425
- DETAIL_COMPENSATION: "DetailCompensation",
426
- CHANGE_CLOTHES_BY_IMG: "ChangeClothesByImg",
427
- CHANGE_ACCESSORIES_BY_IMG: "ChangeAccessoriesByImg",
428
- VIRTUAL_FITTING_REFERENCE: "VirtualFittingReference",
429
- VIRTUAL_FITTING_TEMPLATE: "VirtualFittingTemplate",
430
- FIX_DEFORMITIES: "FixDeformities",
431
- INTELLIGENT_CROPPING: "IntelligentCropping",
432
- MODEL_TO_FLAT: "ModelToFlat",
433
- GENERATE_SHORT_VIDEO: "GenerateShortVideo",
434
- ONE_CLICK_MODIFY_PRINTING: "OneClickModifyPrinting",
435
- ORIENTATION_DESIGN: "OrientationDesign",
436
- DIRECTIONAL_INTEGRATION: "DirectionalIntegration",
437
- ONE_CLICK_INTEGRATION: "OneClickIntegration",
438
- CHANGE_FABRIC_V2: "ChangeFabricV2",
439
- VIRTUAL_FITTING_REFERENCE_V2: "VirtualFittingReferenceV2",
440
- FLOWER_SHAPED_DESIGN: "FlowerShapedDesign",
441
- FLOWER_SHAPED_VIRTUAL_PRINTING: "FlowerShapedVirtualPrinting",
442
- ONE_CLICK_CHANGE_COLOR: "OneClickChangeColor",
443
- FITTING_MODEL_WITH_LABELS: "FittingModelWithLabels",
444
- FITTING_MODEL_CUSTOM: "FittingModelCustom",
445
- FITTING_MODEL_CHANGE_FACE: "FittingModelChangeFace",
446
- FITTING_MODEL_CHANGE_MODEL: "FittingModelChangeModel",
447
- FITTING_MODEL_CHANGE_BODY_SHAPE: "FittingModelChangeBodyShape",
448
- FITTING_MODEL_CHANGE_CLOTHING_SIZE: "FittingModelChangeClothingSize",
449
- FITTING_MODEL_CHANGE_POSTURE: "FittingModelChangePosture",
450
- FITTING_MODEL_CHANGE_BACKGROUND: "FittingModelChangeBackground",
451
- FITTING_MODEL_CHANGE_PERSPECTIVE: "FittingModelChangePerspective",
452
- TRAIN_CLOTHING_MODEL: "TrainClothingModel"
453
- }, ke = {
454
- IMAGE: "image",
455
- MASK: "mask",
456
- IMAGES: "images",
457
- TEXT: "text",
458
- ENUM: "enum",
459
- MULTI_ENUM: "multiEnum",
460
- ASPECT_RATIO: "aspectRatio",
461
- COLOR: "color",
462
- STRENGTH: "strength",
463
- NUMBER: "number"
464
- }, v = {
465
- IDLE: "idle",
466
- SUBMITTING: "submitting",
467
- POLLING: "polling",
468
- SUCCESS: "success",
469
- ERROR: "error"
470
- }, y = {
471
- POLL_INTERVAL: 1e3,
472
- MAX_POLL_ATTEMPTS: 120,
473
- POLL_ENDPOINT: "/task/progress"
474
- }, b = {
475
- CHANGE: "change",
476
- SUBMIT: "submit",
477
- POLL: "poll",
478
- SUCCESS: "success",
479
- ERROR: "error",
480
- IMAGE_CLICK: "image-click",
481
- COMPARE: "compare"
482
- }, x = {
483
- MISSING_ENDPOINT: "未指定提交端点或任务类型",
484
- POLL_TIMEOUT: (e) => `轮询超时: ${e}`,
485
- POLL_FAILED: "轮询失败",
486
- TASK_NOT_FOUND: (e) => `未找到任务: ${e}`,
487
- SUBMIT_FAILED: "提交失败",
488
- FIELD_REQUIRED: (e) => `${e}为必填项`,
489
- FIELD_STRING: (e) => `${e}必须为字符串`,
490
- FIELD_ARRAY: (e) => `${e}必须为非空数组`,
491
- FIELD_ARRAY_ELEMENTS: (e) => `${e}数组元素必须为非空字符串`,
492
- FIELD_MAX_LENGTH: (e, t) => `${e}不能超过${t}个字符`,
493
- FIELD_ENUM_INVALID: (e) => `${e}值不在可选项中`,
494
- FIELD_COLOR_FORMAT: (e) => `${e}必须为#RRGGBB格式`,
495
- FIELD_NUMBER: (e) => `${e}必须为数字`
496
- }, Ae = { IMAGE: [
497
- "image/jpeg",
498
- "image/png",
499
- "image/webp"
500
- ] }, je = { MAX_IMAGE_SIZE: 10 * 1024 * 1024 }, Me = [
501
- {
502
- label: "1:1",
503
- value: "1:1"
504
- },
505
- {
506
- label: "2:3",
507
- value: "2:3"
508
- },
509
- {
510
- label: "3:4",
511
- value: "3:4"
512
- },
513
- {
514
- label: "3:2",
515
- value: "3:2"
516
- },
517
- {
518
- label: "4:3",
519
- value: "4:3"
520
- },
521
- {
522
- label: "9:16",
523
- value: "9:16"
524
- },
525
- {
526
- label: "16:9",
527
- value: "16:9"
528
- }
529
- ], S = [
530
- {
531
- label: "正面",
532
- value: "front"
533
- },
534
- {
535
- label: "背面",
536
- value: "back"
537
- },
538
- {
539
- label: "左侧",
540
- value: "left"
541
- },
542
- {
543
- label: "右侧",
544
- value: "right"
545
- }
546
- ], Ne = [
547
- {
548
- label: "2倍",
549
- value: "2"
550
- },
551
- {
552
- label: "3倍",
553
- value: "3"
554
- },
555
- {
556
- label: "4倍",
557
- value: "4"
558
- }
559
- ], Pe = [{
560
- label: "线稿",
561
- value: "line"
562
- }, {
563
- label: "印花",
564
- value: "printing"
565
- }], C = [{
566
- label: "女",
567
- value: "female"
568
- }, {
569
- label: "男",
570
- value: "male"
571
- }], Fe = [{
572
- label: "青年",
573
- value: "young"
574
- }, {
575
- label: "中年",
576
- value: "middle"
577
- }], Ie = [
578
- {
579
- label: "亚洲",
580
- value: "asian"
581
- },
582
- {
583
- label: "欧洲",
584
- value: "european"
585
- },
586
- {
587
- label: "非洲",
588
- value: "african"
589
- }
590
- ], Le = [
591
- {
592
- label: "上装",
593
- value: "upper"
594
- },
595
- {
596
- label: "下装",
597
- value: "lower"
598
- },
599
- {
600
- label: "连身装",
601
- value: "dress"
602
- }
603
- ], Re = [
604
- {
605
- label: "袖型",
606
- value: "sleeve"
607
- },
608
- {
609
- label: "领型",
610
- value: "collar"
611
- },
612
- {
613
- label: "裤型",
614
- value: "pants"
615
- },
616
- {
617
- label: "裙型",
618
- value: "skirt"
619
- }
620
- ], ze = [
621
- {
622
- label: "全身",
623
- value: "full"
624
- },
625
- {
626
- label: "半身",
627
- value: "half"
628
- },
629
- {
630
- label: "服装",
631
- value: "clothing"
632
- }
633
- ], Be = [{
634
- label: "黑白线稿",
635
- value: "bw"
636
- }, {
637
- label: "彩色线稿",
638
- value: "color"
639
- }], Ve = [
640
- {
641
- label: "背包",
642
- value: "bag"
643
- },
644
- {
645
- label: "鞋子",
646
- value: "shoes"
647
- },
648
- {
649
- label: "首饰",
650
- value: "jewelry"
651
- },
652
- {
653
- label: "腰带",
654
- value: "belt"
655
- },
656
- {
657
- label: "帽子",
658
- value: "hat"
659
- }
660
- ], He = [{
661
- label: "棚内瑜伽",
662
- value: "yoga"
663
- }, {
664
- label: "极简棚拍",
665
- value: "minimal"
666
- }], Ue = [{
667
- label: "自定义像素",
668
- value: "1"
669
- }, {
670
- label: "比例裁剪",
671
- value: "2"
672
- }], We = [{
673
- label: "3秒",
674
- value: "3"
675
- }, {
676
- label: "5秒",
677
- value: "5"
678
- }], Ge = [{
679
- label: "是",
680
- value: "true"
681
- }, {
682
- label: "否",
683
- value: "false"
684
- }], Ke = [
685
- {
686
- label: "中国",
687
- value: "china"
688
- },
689
- {
690
- label: "美国",
691
- value: "usa"
692
- },
693
- {
694
- label: "英国",
695
- value: "uk"
696
- },
697
- {
698
- label: "法国",
699
- value: "france"
700
- },
701
- {
702
- label: "德国",
703
- value: "germany"
704
- },
705
- {
706
- label: "意大利",
707
- value: "italy"
708
- },
709
- {
710
- label: "西班牙",
711
- value: "spain"
712
- },
713
- {
714
- label: "俄罗斯",
715
- value: "russia"
716
- },
717
- {
718
- label: "日本",
719
- value: "japan"
720
- },
721
- {
722
- label: "韩国",
723
- value: "korea"
724
- },
725
- {
726
- label: "泰国",
727
- value: "thailand"
728
- },
729
- {
730
- label: "印度",
731
- value: "india"
732
- },
733
- {
734
- label: "越南",
735
- value: "vietnam"
736
- },
737
- {
738
- label: "其他",
739
- value: "other"
740
- }
741
- ], qe = [
742
- {
743
- label: "白皙",
744
- value: "fair"
745
- },
746
- {
747
- label: "中等",
748
- value: "medium"
749
- },
750
- {
751
- label: "小麦色",
752
- value: "wheatish"
753
- },
754
- {
755
- label: "深色",
756
- value: "dark"
757
- },
758
- {
759
- label: "其他",
760
- value: "other"
761
- }
762
- ], Je = [
763
- {
764
- label: "偏瘦",
765
- value: "slim"
766
- },
767
- {
768
- label: "标准",
769
- value: "standard"
770
- },
771
- {
772
- label: "微胖",
773
- value: "chubby"
774
- },
775
- {
776
- label: "肥胖",
777
- value: "fat"
778
- }
779
- ], w = [{
780
- label: "一致",
781
- value: "same"
782
- }, {
783
- label: "相似",
784
- value: "similar"
785
- }], Ye = [{
786
- label: "偏小",
787
- value: "smaller"
788
- }, {
789
- label: "偏大",
790
- value: "larger"
791
- }];
792
- //#endregion
793
335
  //#region \0@oxc-project+runtime@0.130.0/helpers/decorate.js
794
- function T(e, t, n, r) {
336
+ function y(e, t, n, r) {
795
337
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
796
338
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
797
339
  else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
@@ -799,12 +341,12 @@ function T(e, t, n, r) {
799
341
  }
800
342
  //#endregion
801
343
  //#region src/components/image-uploader/image-uploader.ts
802
- var E = class extends e {
344
+ var b = class extends a {
803
345
  constructor(...e) {
804
346
  super(...e), this.name = "", this.label = "", this.hint = "", this.value = "", this.file = null, this.disabled = !1, this.showMaskHint = !1, this._previewUrl = "", this._errorMessage = "", this._isDragOver = !1;
805
347
  }
806
348
  static {
807
- this.styles = t`
349
+ this.styles = o`
808
350
  :host {
809
351
  display: block;
810
352
  --lc-uploader-border-color: var(--lc-color-border);
@@ -957,21 +499,21 @@ var E = class extends e {
957
499
  let t = e.target, n = t.files?.[0];
958
500
  n && this._processFile(n), t.value = "";
959
501
  }
960
- async _processFile(e) {
502
+ async _processFile(t) {
961
503
  this._errorMessage = "";
962
- let t = await Se(e);
963
- if (!t.valid) {
964
- this._errorMessage = t.errors.join("; "), this.value = "", this.file = null, this._dispatchChange(null);
504
+ let n = await e(t);
505
+ if (!n.valid) {
506
+ this._errorMessage = n.errors.join("; "), this.value = "", this.file = null, this._dispatchChange(null);
965
507
  return;
966
508
  }
967
- let n = URL.createObjectURL(e);
968
- this._cleanupPreview(), this._previewUrl = n, this.file = e, this.value = n, this._dispatchChange(e);
509
+ let r = URL.createObjectURL(t);
510
+ this._cleanupPreview(), this._previewUrl = r, this.file = t, this.value = r, this._dispatchChange(t);
969
511
  }
970
512
  _handleRemove(e) {
971
513
  e.stopPropagation(), this._cleanupPreview(), this._previewUrl = "", this.value = "", this.file = null, this._errorMessage = "", this._dispatchChange(null);
972
514
  }
973
515
  _dispatchChange(e) {
974
- this.dispatchEvent(new CustomEvent(b.CHANGE, {
516
+ this.dispatchEvent(new CustomEvent(i.CHANGE, {
975
517
  detail: {
976
518
  value: this.value,
977
519
  file: e
@@ -982,18 +524,18 @@ var E = class extends e {
982
524
  }
983
525
  render() {
984
526
  let e = this._previewUrl || this.value;
985
- return n`
527
+ return s`
986
528
  <div class="container" part="container">
987
- ${this.label ? n`<label class="label" part="label">${this.label}</label>` : r}
529
+ ${this.label ? s`<label class="label" part="label">${this.label}</label>` : c}
988
530
  ${e ? this._renderPreview() : this._renderDropzone()}
989
- ${this._errorMessage ? n`<div class="error">${this._errorMessage}</div>` : r}
990
- ${this.hint && !this.showMaskHint ? n`<div class="hint" part="hint">${this.hint}</div>` : r}
991
- ${this.showMaskHint ? this._renderMaskHint() : r}
531
+ ${this._errorMessage ? s`<div class="error">${this._errorMessage}</div>` : c}
532
+ ${this.hint && !this.showMaskHint ? s`<div class="hint" part="hint">${this.hint}</div>` : c}
533
+ ${this.showMaskHint ? this._renderMaskHint() : c}
992
534
  </div>
993
535
  `;
994
536
  }
995
537
  _renderDropzone() {
996
- return n`
538
+ return s`
997
539
  <div
998
540
  class="${this._isDragOver ? "dropzone dragover" : "dropzone"}"
999
541
  part="dropzone"
@@ -1035,7 +577,7 @@ var E = class extends e {
1035
577
  `;
1036
578
  }
1037
579
  _renderPreview() {
1038
- return n`
580
+ return s`
1039
581
  <div class="preview" part="preview">
1040
582
  <img src="${this._previewUrl || this.value}" alt="预览" />
1041
583
  <button
@@ -1049,18 +591,18 @@ var E = class extends e {
1049
591
  `;
1050
592
  }
1051
593
  _renderMaskHint() {
1052
- return n`<div class="mask-hint" part="hint">${this.hint || "Mask hint: white keeps the area, black removes the area"}</div>`;
594
+ return s`<div class="mask-hint" part="hint">${this.hint || "Mask hint: white keeps the area, black removes the area"}</div>`;
1053
595
  }
1054
596
  };
1055
- T([h({ type: String })], E.prototype, "name", void 0), T([h({ type: String })], E.prototype, "label", void 0), T([h({ type: String })], E.prototype, "hint", void 0), T([h({ type: String })], E.prototype, "value", void 0), T([h({ attribute: !1 })], E.prototype, "file", void 0), T([h({ type: Boolean })], E.prototype, "disabled", void 0), T([h({ type: Boolean })], E.prototype, "showMaskHint", void 0), T([g()], E.prototype, "_previewUrl", void 0), T([g()], E.prototype, "_errorMessage", void 0), T([g()], E.prototype, "_isDragOver", void 0), T([ge("input[type=\"file\"]")], E.prototype, "_fileInput", void 0), E = T([i("lc-image-uploader")], E);
597
+ y([_({ type: String })], b.prototype, "name", void 0), y([_({ type: String })], b.prototype, "label", void 0), y([_({ type: String })], b.prototype, "hint", void 0), y([_({ type: String })], b.prototype, "value", void 0), y([_({ attribute: !1 })], b.prototype, "file", void 0), y([_({ type: Boolean })], b.prototype, "disabled", void 0), y([_({ type: Boolean })], b.prototype, "showMaskHint", void 0), y([v()], b.prototype, "_previewUrl", void 0), y([v()], b.prototype, "_errorMessage", void 0), y([v()], b.prototype, "_isDragOver", void 0), y([ye("input[type=\"file\"]")], b.prototype, "_fileInput", void 0), b = y([l("lc-image-uploader")], b);
1056
598
  //#endregion
1057
599
  //#region src/components/mask-editor/mask-editor.ts
1058
- var D = class extends e {
600
+ var x = class extends a {
1059
601
  constructor(...e) {
1060
602
  super(...e), this.label = "涂抹蒙版", this.name = "", this.hint = "", this.required = !1, this.value = "", this.source = "", this.disabled = !1, this.brushSize = 28, this._mode = "paint", this._isDrawing = !1, this._errorMessage = "", this._aspectRatio = "1 / 1", this._canUndo = !1, this._canRedo = !1, this._zoom = 1, this._isSpacePressed = !1, this._isPanning = !1, this._panX = 0, this._panY = 0, this._lastPoint = null, this._lastPanPoint = null, this._history = [], this._historyIndex = -1, this._sourceWidth = 0, this._sourceHeight = 0;
1061
603
  }
1062
604
  static {
1063
- this.styles = t`
605
+ this.styles = o`
1064
606
  :host {
1065
607
  display: block;
1066
608
  --lc-mask-border-color: var(--lc-color-border);
@@ -1393,7 +935,7 @@ var D = class extends e {
1393
935
  }
1394
936
  _syncValue() {
1395
937
  let e = this._canvas;
1396
- this.value = this.source && e ? e.toDataURL("image/png") : "", this.dispatchEvent(new CustomEvent(b.CHANGE, {
938
+ this.value = this.source && e ? e.toDataURL("image/png") : "", this.dispatchEvent(new CustomEvent(i.CHANGE, {
1397
939
  detail: { value: this.value },
1398
940
  bubbles: !0,
1399
941
  composed: !0
@@ -1455,32 +997,32 @@ var D = class extends e {
1455
997
  }, r.src = e;
1456
998
  }
1457
999
  render() {
1458
- return n`
1000
+ return s`
1459
1001
  <div class="container" part="container">
1460
1002
  ${this._renderLabel()}
1461
1003
  ${this.source ? this._renderEditor() : this._renderEmpty()}
1462
- ${this._errorMessage ? n`<div class="error">${this._errorMessage}</div>` : r}
1463
- ${this.hint ? n`<div class="hint" part="hint">${this.hint}</div>` : r}
1004
+ ${this._errorMessage ? s`<div class="error">${this._errorMessage}</div>` : c}
1005
+ ${this.hint ? s`<div class="hint" part="hint">${this.hint}</div>` : c}
1464
1006
  <div class="mask-hint">先上传原图,再在图片上涂抹需要处理的区域。</div>
1465
1007
  </div>
1466
1008
  `;
1467
1009
  }
1468
1010
  _renderLabel() {
1469
- return n`
1011
+ return s`
1470
1012
  <label class="label" part="label">
1471
- ${this.label}${this.required ? n`<span class="required">*</span>` : r}
1013
+ ${this.label}${this.required ? s`<span class="required">*</span>` : c}
1472
1014
  </label>
1473
1015
  `;
1474
1016
  }
1475
1017
  _renderEmpty() {
1476
- return n`
1018
+ return s`
1477
1019
  <div class="empty" part="editor">
1478
1020
  请先上传原图,随后在这里涂抹生成蒙版
1479
1021
  </div>
1480
1022
  `;
1481
1023
  }
1482
1024
  _renderEditor() {
1483
- return n`
1025
+ return s`
1484
1026
  <div class="editor" part="editor">
1485
1027
  <div
1486
1028
  class="stage"
@@ -1535,15 +1077,15 @@ var D = class extends e {
1535
1077
  `;
1536
1078
  }
1537
1079
  };
1538
- T([h({ type: String })], D.prototype, "label", void 0), T([h({ type: String })], D.prototype, "name", void 0), T([h({ type: String })], D.prototype, "hint", void 0), T([h({ type: Boolean })], D.prototype, "required", void 0), T([h({ type: String })], D.prototype, "value", void 0), T([h({ type: String })], D.prototype, "source", void 0), T([h({ type: Boolean })], D.prototype, "disabled", void 0), T([h({ type: Number })], D.prototype, "brushSize", void 0), T([g()], D.prototype, "_mode", void 0), T([g()], D.prototype, "_isDrawing", void 0), T([g()], D.prototype, "_errorMessage", void 0), T([g()], D.prototype, "_aspectRatio", void 0), T([g()], D.prototype, "_canUndo", void 0), T([g()], D.prototype, "_canRedo", void 0), T([g()], D.prototype, "_zoom", void 0), T([g()], D.prototype, "_isSpacePressed", void 0), T([g()], D.prototype, "_isPanning", void 0), T([g()], D.prototype, "_panX", void 0), T([g()], D.prototype, "_panY", void 0), T([ge("canvas")], D.prototype, "_canvas", void 0), D = T([i("lc-mask-editor")], D);
1080
+ y([_({ type: String })], x.prototype, "label", void 0), y([_({ type: String })], x.prototype, "name", void 0), y([_({ type: String })], x.prototype, "hint", void 0), y([_({ type: Boolean })], x.prototype, "required", void 0), y([_({ type: String })], x.prototype, "value", void 0), y([_({ type: String })], x.prototype, "source", void 0), y([_({ type: Boolean })], x.prototype, "disabled", void 0), y([_({ type: Number })], x.prototype, "brushSize", void 0), y([v()], x.prototype, "_mode", void 0), y([v()], x.prototype, "_isDrawing", void 0), y([v()], x.prototype, "_errorMessage", void 0), y([v()], x.prototype, "_aspectRatio", void 0), y([v()], x.prototype, "_canUndo", void 0), y([v()], x.prototype, "_canRedo", void 0), y([v()], x.prototype, "_zoom", void 0), y([v()], x.prototype, "_isSpacePressed", void 0), y([v()], x.prototype, "_isPanning", void 0), y([v()], x.prototype, "_panX", void 0), y([v()], x.prototype, "_panY", void 0), y([ye("canvas")], x.prototype, "_canvas", void 0), x = y([l("lc-mask-editor")], x);
1539
1081
  //#endregion
1540
1082
  //#region src/components/enum-selector/enum-selector.ts
1541
- var O = class extends e {
1083
+ var S = class extends a {
1542
1084
  constructor(...e) {
1543
1085
  super(...e), this.label = "", this.name = "", this.value = "", this.mode = "button", this.multiple = !1, this.required = !1, this.disabled = !1, this.showIcon = !1, this.options = "[]";
1544
1086
  }
1545
1087
  static {
1546
- this.styles = t`
1088
+ this.styles = o`
1547
1089
  :host {
1548
1090
  display: block;
1549
1091
  font-family: var(--lc-font-family);
@@ -1690,7 +1232,7 @@ var O = class extends e {
1690
1232
  return this.selectedValues.includes(e);
1691
1233
  }
1692
1234
  emitChange(e) {
1693
- this.dispatchEvent(new CustomEvent(b.CHANGE, {
1235
+ this.dispatchEvent(new CustomEvent(i.CHANGE, {
1694
1236
  detail: { value: e },
1695
1237
  bubbles: !0,
1696
1238
  composed: !0
@@ -1707,17 +1249,17 @@ var O = class extends e {
1707
1249
  return /^\d+(?:\.\d+)?:\d+(?:\.\d+)?$/.test(e);
1708
1250
  }
1709
1251
  renderOptionIcon(e) {
1710
- if (!this.showIcon) return r;
1711
- if (e.icon) return n`<span class="option-icon" aria-hidden="true">${e.icon}</span>`;
1252
+ if (!this.showIcon) return c;
1253
+ if (e.icon) return s`<span class="option-icon" aria-hidden="true">${e.icon}</span>`;
1712
1254
  if (this.isRatioValue(e.value)) {
1713
1255
  let t = this.getRatioBoxDimensions(e.value);
1714
- return n`
1256
+ return s`
1715
1257
  <span class="option-icon" aria-hidden="true">
1716
1258
  <span class="ratio-box" style="width: ${t.width}px; height: ${t.height}px;"></span>
1717
1259
  </span>
1718
1260
  `;
1719
1261
  }
1720
- return r;
1262
+ return c;
1721
1263
  }
1722
1264
  handleSelect(e) {
1723
1265
  let t = e.target;
@@ -1741,17 +1283,17 @@ var O = class extends e {
1741
1283
  }
1742
1284
  render() {
1743
1285
  let e = this.parsedOptions;
1744
- return n`
1745
- ${this.label ? n`<label class="label">
1746
- ${this.label}${this.required ? n`<span class="required">*</span>` : r}
1747
- </label>` : r}
1286
+ return s`
1287
+ ${this.label ? s`<label class="label">
1288
+ ${this.label}${this.required ? s`<span class="required">*</span>` : c}
1289
+ </label>` : c}
1748
1290
  ${this.mode === "button" ? this.renderButtonGroup(e) : this.mode === "radio" ? this.renderRadioGroup(e) : this.renderSelect(e)}
1749
1291
  `;
1750
1292
  }
1751
1293
  renderButtonGroup(e) {
1752
- return n`
1294
+ return s`
1753
1295
  <div class="button-group ${this.showIcon ? "with-icon" : ""}">
1754
- ${e.map((e) => n`
1296
+ ${e.map((e) => s`
1755
1297
  <button
1756
1298
  type="button"
1757
1299
  class="btn ${this.showIcon ? "with-icon" : ""} ${this.isSelected(e.value) ? "active" : ""}"
@@ -1767,9 +1309,9 @@ var O = class extends e {
1767
1309
  `;
1768
1310
  }
1769
1311
  renderRadioGroup(e) {
1770
- return n`
1312
+ return s`
1771
1313
  <div class="radio-group">
1772
- ${e.map((e) => n`
1314
+ ${e.map((e) => s`
1773
1315
  <label class="radio-item ${this.disabled ? "disabled" : ""}">
1774
1316
  <input
1775
1317
  type=${this.multiple ? "checkbox" : "radio"}
@@ -1789,7 +1331,7 @@ var O = class extends e {
1789
1331
  `;
1790
1332
  }
1791
1333
  renderSelect(e) {
1792
- return n`
1334
+ return s`
1793
1335
  <select
1794
1336
  class="select-input"
1795
1337
  .value=${this.multiple ? "" : String(this.value)}
@@ -1797,25 +1339,25 @@ var O = class extends e {
1797
1339
  ?disabled=${this.disabled}
1798
1340
  @change=${this.handleSelect}
1799
1341
  >
1800
- ${e.map((e) => n`<option value=${e.value} ?selected=${this.isSelected(e.value)}>
1342
+ ${e.map((e) => s`<option value=${e.value} ?selected=${this.isSelected(e.value)}>
1801
1343
  ${e.label}
1802
1344
  </option>`)}
1803
1345
  </select>
1804
1346
  `;
1805
1347
  }
1806
1348
  };
1807
- T([h({ type: String })], O.prototype, "label", void 0), T([h({ type: String })], O.prototype, "name", void 0), T([h()], O.prototype, "value", void 0), T([h({ type: String })], O.prototype, "mode", void 0), T([h({ type: Boolean })], O.prototype, "multiple", void 0), T([h({ type: Boolean })], O.prototype, "required", void 0), T([h({ type: Boolean })], O.prototype, "disabled", void 0), T([h({
1349
+ y([_({ type: String })], S.prototype, "label", void 0), y([_({ type: String })], S.prototype, "name", void 0), y([_()], S.prototype, "value", void 0), y([_({ type: String })], S.prototype, "mode", void 0), y([_({ type: Boolean })], S.prototype, "multiple", void 0), y([_({ type: Boolean })], S.prototype, "required", void 0), y([_({ type: Boolean })], S.prototype, "disabled", void 0), y([_({
1808
1350
  type: Boolean,
1809
1351
  attribute: "show-icon"
1810
- })], O.prototype, "showIcon", void 0), T([h({ type: String })], O.prototype, "options", void 0), O = T([i("lc-enum-selector")], O);
1352
+ })], S.prototype, "showIcon", void 0), y([_({ type: String })], S.prototype, "options", void 0), S = y([l("lc-enum-selector")], S);
1811
1353
  //#endregion
1812
1354
  //#region src/components/prompt-input/prompt-input.ts
1813
- var k = class extends e {
1355
+ var C = class extends a {
1814
1356
  constructor(...e) {
1815
1357
  super(...e), this.value = "", this.name = "", this.label = "", this.placeholder = "", this.maxLength = 500, this.required = !1, this.disabled = !1;
1816
1358
  }
1817
1359
  static {
1818
- this.styles = t`
1360
+ this.styles = o`
1819
1361
  :host {
1820
1362
  display: block;
1821
1363
  font-family: var(--lc-font-family);
@@ -1878,7 +1420,7 @@ var k = class extends e {
1878
1420
  `;
1879
1421
  }
1880
1422
  emitChange(e) {
1881
- this.dispatchEvent(new CustomEvent(b.CHANGE, {
1423
+ this.dispatchEvent(new CustomEvent(i.CHANGE, {
1882
1424
  detail: { value: e },
1883
1425
  bubbles: !0,
1884
1426
  composed: !0
@@ -1890,10 +1432,10 @@ var k = class extends e {
1890
1432
  }
1891
1433
  render() {
1892
1434
  let e = this.value.length > this.maxLength;
1893
- return n`
1894
- ${this.label ? n`<label class="label">
1895
- ${this.label}${this.required ? n`<span class="required">*</span>` : r}
1896
- </label>` : r}
1435
+ return s`
1436
+ ${this.label ? s`<label class="label">
1437
+ ${this.label}${this.required ? s`<span class="required">*</span>` : c}
1438
+ </label>` : c}
1897
1439
  <div class="wrapper">
1898
1440
  <textarea
1899
1441
  .value=${this.value}
@@ -1909,83 +1451,83 @@ var k = class extends e {
1909
1451
  `;
1910
1452
  }
1911
1453
  };
1912
- T([h({ type: String })], k.prototype, "value", void 0), T([h({ type: String })], k.prototype, "name", void 0), T([h({ type: String })], k.prototype, "label", void 0), T([h({ type: String })], k.prototype, "placeholder", void 0), T([h({ type: Number })], k.prototype, "maxLength", void 0), T([h({ type: Boolean })], k.prototype, "required", void 0), T([h({ type: Boolean })], k.prototype, "disabled", void 0), k = T([i("lc-prompt-input")], k);
1454
+ y([_({ type: String })], C.prototype, "value", void 0), y([_({ type: String })], C.prototype, "name", void 0), y([_({ type: String })], C.prototype, "label", void 0), y([_({ type: String })], C.prototype, "placeholder", void 0), y([_({ type: Number })], C.prototype, "maxLength", void 0), y([_({ type: Boolean })], C.prototype, "required", void 0), y([_({ type: Boolean })], C.prototype, "disabled", void 0), C = y([l("lc-prompt-input")], C);
1913
1455
  //#endregion
1914
1456
  //#region node_modules/lit-html/lit-html.js
1915
- var Xe = globalThis, Ze = (e) => e, A = Xe.trustedTypes, Qe = A ? A.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, $e = "$lit$", j = `lit$${Math.random().toFixed(9).slice(2)}$`, et = "?" + j, tt = `<${et}>`, M = document, N = () => M.createComment(""), P = (e) => e === null || typeof e != "object" && typeof e != "function", nt = Array.isArray, rt = (e) => nt(e) || typeof e?.[Symbol.iterator] == "function", it = "[ \n\f\r]", F = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, at = /-->/g, ot = />/g, I = RegExp(`>|${it}(?:([^\\s"'>=/]+)(${it}*=${it}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), st = /'/g, ct = /"/g, lt = /^(?:script|style|textarea|title)$/i, L = Symbol.for("lit-noChange"), R = Symbol.for("lit-nothing"), ut = /* @__PURE__ */ new WeakMap(), z = M.createTreeWalker(M, 129);
1916
- function dt(e, t) {
1917
- if (!nt(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
1918
- return Qe === void 0 ? t : Qe.createHTML(t);
1457
+ var w = globalThis, be = (e) => e, T = w.trustedTypes, xe = T ? T.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, E = "$lit$", D = `lit$${Math.random().toFixed(9).slice(2)}$`, O = "?" + D, Se = `<${O}>`, k = document, A = () => k.createComment(""), j = (e) => e === null || typeof e != "object" && typeof e != "function", M = Array.isArray, Ce = (e) => M(e) || typeof e?.[Symbol.iterator] == "function", N = "[ \n\f\r]", P = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, we = /-->/g, Te = />/g, F = RegExp(`>|${N}(?:([^\\s"'>=/]+)(${N}*=${N}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), Ee = /'/g, De = /"/g, Oe = /^(?:script|style|textarea|title)$/i, I = Symbol.for("lit-noChange"), L = Symbol.for("lit-nothing"), ke = /* @__PURE__ */ new WeakMap(), R = k.createTreeWalker(k, 129);
1458
+ function Ae(e, t) {
1459
+ if (!M(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
1460
+ return xe === void 0 ? t : xe.createHTML(t);
1919
1461
  }
1920
- var ft = (e, t) => {
1921
- let n = e.length - 1, r = [], i, a = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = F;
1462
+ var je = (e, t) => {
1463
+ let n = e.length - 1, r = [], i, a = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", o = P;
1922
1464
  for (let t = 0; t < n; t++) {
1923
1465
  let n = e[t], s, c, l = -1, u = 0;
1924
- for (; u < n.length && (o.lastIndex = u, c = o.exec(n), c !== null);) u = o.lastIndex, o === F ? c[1] === "!--" ? o = at : c[1] === void 0 ? c[2] === void 0 ? c[3] !== void 0 && (o = I) : (lt.test(c[2]) && (i = RegExp("</" + c[2], "g")), o = I) : o = ot : o === I ? c[0] === ">" ? (o = i ?? F, l = -1) : c[1] === void 0 ? l = -2 : (l = o.lastIndex - c[2].length, s = c[1], o = c[3] === void 0 ? I : c[3] === "\"" ? ct : st) : o === ct || o === st ? o = I : o === at || o === ot ? o = F : (o = I, i = void 0);
1925
- let ee = o === I && e[t + 1].startsWith("/>") ? " " : "";
1926
- a += o === F ? n + tt : l >= 0 ? (r.push(s), n.slice(0, l) + $e + n.slice(l) + j + ee) : n + j + (l === -2 ? t : ee);
1466
+ for (; u < n.length && (o.lastIndex = u, c = o.exec(n), c !== null);) u = o.lastIndex, o === P ? c[1] === "!--" ? o = we : c[1] === void 0 ? c[2] === void 0 ? c[3] !== void 0 && (o = F) : (Oe.test(c[2]) && (i = RegExp("</" + c[2], "g")), o = F) : o = Te : o === F ? c[0] === ">" ? (o = i ?? P, l = -1) : c[1] === void 0 ? l = -2 : (l = o.lastIndex - c[2].length, s = c[1], o = c[3] === void 0 ? F : c[3] === "\"" ? De : Ee) : o === De || o === Ee ? o = F : o === we || o === Te ? o = P : (o = F, i = void 0);
1467
+ let d = o === F && e[t + 1].startsWith("/>") ? " " : "";
1468
+ a += o === P ? n + Se : l >= 0 ? (r.push(s), n.slice(0, l) + E + n.slice(l) + D + d) : n + D + (l === -2 ? t : d);
1927
1469
  }
1928
- return [dt(e, a + (e[n] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
1929
- }, pt = class e {
1470
+ return [Ae(e, a + (e[n] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), r];
1471
+ }, z = class e {
1930
1472
  constructor({ strings: t, _$litType$: n }, r) {
1931
1473
  let i;
1932
1474
  this.parts = [];
1933
- let a = 0, o = 0, s = t.length - 1, c = this.parts, [l, u] = ft(t, n);
1934
- if (this.el = e.createElement(l, r), z.currentNode = this.el.content, n === 2 || n === 3) {
1475
+ let a = 0, o = 0, s = t.length - 1, c = this.parts, [l, u] = je(t, n);
1476
+ if (this.el = e.createElement(l, r), R.currentNode = this.el.content, n === 2 || n === 3) {
1935
1477
  let e = this.el.content.firstChild;
1936
1478
  e.replaceWith(...e.childNodes);
1937
1479
  }
1938
- for (; (i = z.nextNode()) !== null && c.length < s;) {
1480
+ for (; (i = R.nextNode()) !== null && c.length < s;) {
1939
1481
  if (i.nodeType === 1) {
1940
- if (i.hasAttributes()) for (let e of i.getAttributeNames()) if (e.endsWith($e)) {
1941
- let t = u[o++], n = i.getAttribute(e).split(j), r = /([.?@])?(.*)/.exec(t);
1482
+ if (i.hasAttributes()) for (let e of i.getAttributeNames()) if (e.endsWith(E)) {
1483
+ let t = u[o++], n = i.getAttribute(e).split(D), r = /([.?@])?(.*)/.exec(t);
1942
1484
  c.push({
1943
1485
  type: 1,
1944
1486
  index: a,
1945
1487
  name: r[2],
1946
1488
  strings: n,
1947
- ctor: r[1] === "." ? gt : r[1] === "?" ? _t : r[1] === "@" ? vt : V
1489
+ ctor: r[1] === "." ? Ne : r[1] === "?" ? Pe : r[1] === "@" ? Fe : H
1948
1490
  }), i.removeAttribute(e);
1949
- } else e.startsWith(j) && (c.push({
1491
+ } else e.startsWith(D) && (c.push({
1950
1492
  type: 6,
1951
1493
  index: a
1952
1494
  }), i.removeAttribute(e));
1953
- if (lt.test(i.tagName)) {
1954
- let e = i.textContent.split(j), t = e.length - 1;
1495
+ if (Oe.test(i.tagName)) {
1496
+ let e = i.textContent.split(D), t = e.length - 1;
1955
1497
  if (t > 0) {
1956
- i.textContent = A ? A.emptyScript : "";
1957
- for (let n = 0; n < t; n++) i.append(e[n], N()), z.nextNode(), c.push({
1498
+ i.textContent = T ? T.emptyScript : "";
1499
+ for (let n = 0; n < t; n++) i.append(e[n], A()), R.nextNode(), c.push({
1958
1500
  type: 2,
1959
1501
  index: ++a
1960
1502
  });
1961
- i.append(e[t], N());
1503
+ i.append(e[t], A());
1962
1504
  }
1963
1505
  }
1964
- } else if (i.nodeType === 8) if (i.data === et) c.push({
1506
+ } else if (i.nodeType === 8) if (i.data === O) c.push({
1965
1507
  type: 2,
1966
1508
  index: a
1967
1509
  });
1968
1510
  else {
1969
1511
  let e = -1;
1970
- for (; (e = i.data.indexOf(j, e + 1)) !== -1;) c.push({
1512
+ for (; (e = i.data.indexOf(D, e + 1)) !== -1;) c.push({
1971
1513
  type: 7,
1972
1514
  index: a
1973
- }), e += j.length - 1;
1515
+ }), e += D.length - 1;
1974
1516
  }
1975
1517
  a++;
1976
1518
  }
1977
1519
  }
1978
1520
  static createElement(e, t) {
1979
- let n = M.createElement("template");
1521
+ let n = k.createElement("template");
1980
1522
  return n.innerHTML = e, n;
1981
1523
  }
1982
1524
  };
1983
1525
  function B(e, t, n = e, r) {
1984
- if (t === L) return t;
1985
- let i = r === void 0 ? n._$Cl : n._$Co?.[r], a = P(t) ? void 0 : t._$litDirective$;
1526
+ if (t === I) return t;
1527
+ let i = r === void 0 ? n._$Cl : n._$Co?.[r], a = j(t) ? void 0 : t._$litDirective$;
1986
1528
  return i?.constructor !== a && (i?._$AO?.(!1), a === void 0 ? i = void 0 : (i = new a(e), i._$AT(e, n, r)), r === void 0 ? n._$Cl = i : (n._$Co ??= [])[r] = i), i !== void 0 && (t = B(e, i._$AS(e, t.values), i, r)), t;
1987
1529
  }
1988
- var mt = class {
1530
+ var Me = class {
1989
1531
  constructor(e, t) {
1990
1532
  this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
1991
1533
  }
@@ -1996,28 +1538,28 @@ var mt = class {
1996
1538
  return this._$AM._$AU;
1997
1539
  }
1998
1540
  u(e) {
1999
- let { el: { content: t }, parts: n } = this._$AD, r = (e?.creationScope ?? M).importNode(t, !0);
2000
- z.currentNode = r;
2001
- let i = z.nextNode(), a = 0, o = 0, s = n[0];
1541
+ let { el: { content: t }, parts: n } = this._$AD, r = (e?.creationScope ?? k).importNode(t, !0);
1542
+ R.currentNode = r;
1543
+ let i = R.nextNode(), a = 0, o = 0, s = n[0];
2002
1544
  for (; s !== void 0;) {
2003
1545
  if (a === s.index) {
2004
1546
  let t;
2005
- s.type === 2 ? t = new ht(i, i.nextSibling, this, e) : s.type === 1 ? t = new s.ctor(i, s.name, s.strings, this, e) : s.type === 6 && (t = new yt(i, this, e)), this._$AV.push(t), s = n[++o];
1547
+ s.type === 2 ? t = new V(i, i.nextSibling, this, e) : s.type === 1 ? t = new s.ctor(i, s.name, s.strings, this, e) : s.type === 6 && (t = new Ie(i, this, e)), this._$AV.push(t), s = n[++o];
2006
1548
  }
2007
- a !== s?.index && (i = z.nextNode(), a++);
1549
+ a !== s?.index && (i = R.nextNode(), a++);
2008
1550
  }
2009
- return z.currentNode = M, r;
1551
+ return R.currentNode = k, r;
2010
1552
  }
2011
1553
  p(e) {
2012
1554
  let t = 0;
2013
1555
  for (let n of this._$AV) n !== void 0 && (n.strings === void 0 ? n._$AI(e[t]) : (n._$AI(e, n, t), t += n.strings.length - 2)), t++;
2014
1556
  }
2015
- }, ht = class e {
1557
+ }, V = class e {
2016
1558
  get _$AU() {
2017
1559
  return this._$AM?._$AU ?? this._$Cv;
2018
1560
  }
2019
1561
  constructor(e, t, n, r) {
2020
- this.type = 2, this._$AH = R, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = n, this.options = r, this._$Cv = r?.isConnected ?? !0;
1562
+ this.type = 2, this._$AH = L, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = n, this.options = r, this._$Cv = r?.isConnected ?? !0;
2021
1563
  }
2022
1564
  get parentNode() {
2023
1565
  let e = this._$AA.parentNode, t = this._$AM;
@@ -2030,7 +1572,7 @@ var mt = class {
2030
1572
  return this._$AB;
2031
1573
  }
2032
1574
  _$AI(e, t = this) {
2033
- e = B(this, e, t), P(e) ? e === R || e == null || e === "" ? (this._$AH !== R && this._$AR(), this._$AH = R) : e !== this._$AH && e !== L && this._(e) : e._$litType$ === void 0 ? e.nodeType === void 0 ? rt(e) ? this.k(e) : this._(e) : this.T(e) : this.$(e);
1575
+ e = B(this, e, t), j(e) ? e === L || e == null || e === "" ? (this._$AH !== L && this._$AR(), this._$AH = L) : e !== this._$AH && e !== I && this._(e) : e._$litType$ === void 0 ? e.nodeType === void 0 ? Ce(e) ? this.k(e) : this._(e) : this.T(e) : this.$(e);
2034
1576
  }
2035
1577
  O(e) {
2036
1578
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -2039,36 +1581,36 @@ var mt = class {
2039
1581
  this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
2040
1582
  }
2041
1583
  _(e) {
2042
- this._$AH !== R && P(this._$AH) ? this._$AA.nextSibling.data = e : this.T(M.createTextNode(e)), this._$AH = e;
1584
+ this._$AH !== L && j(this._$AH) ? this._$AA.nextSibling.data = e : this.T(k.createTextNode(e)), this._$AH = e;
2043
1585
  }
2044
1586
  $(e) {
2045
- let { values: t, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = pt.createElement(dt(n.h, n.h[0]), this.options)), n);
1587
+ let { values: t, _$litType$: n } = e, r = typeof n == "number" ? this._$AC(e) : (n.el === void 0 && (n.el = z.createElement(Ae(n.h, n.h[0]), this.options)), n);
2046
1588
  if (this._$AH?._$AD === r) this._$AH.p(t);
2047
1589
  else {
2048
- let e = new mt(r, this), n = e.u(this.options);
1590
+ let e = new Me(r, this), n = e.u(this.options);
2049
1591
  e.p(t), this.T(n), this._$AH = e;
2050
1592
  }
2051
1593
  }
2052
1594
  _$AC(e) {
2053
- let t = ut.get(e.strings);
2054
- return t === void 0 && ut.set(e.strings, t = new pt(e)), t;
1595
+ let t = ke.get(e.strings);
1596
+ return t === void 0 && ke.set(e.strings, t = new z(e)), t;
2055
1597
  }
2056
1598
  k(t) {
2057
- nt(this._$AH) || (this._$AH = [], this._$AR());
1599
+ M(this._$AH) || (this._$AH = [], this._$AR());
2058
1600
  let n = this._$AH, r, i = 0;
2059
- for (let a of t) i === n.length ? n.push(r = new e(this.O(N()), this.O(N()), this, this.options)) : r = n[i], r._$AI(a), i++;
1601
+ for (let a of t) i === n.length ? n.push(r = new e(this.O(A()), this.O(A()), this, this.options)) : r = n[i], r._$AI(a), i++;
2060
1602
  i < n.length && (this._$AR(r && r._$AB.nextSibling, i), n.length = i);
2061
1603
  }
2062
1604
  _$AR(e = this._$AA.nextSibling, t) {
2063
1605
  for (this._$AP?.(!1, !0, t); e !== this._$AB;) {
2064
- let t = Ze(e).nextSibling;
2065
- Ze(e).remove(), e = t;
1606
+ let t = be(e).nextSibling;
1607
+ be(e).remove(), e = t;
2066
1608
  }
2067
1609
  }
2068
1610
  setConnected(e) {
2069
1611
  this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
2070
1612
  }
2071
- }, V = class {
1613
+ }, H = class {
2072
1614
  get tagName() {
2073
1615
  return this.element.tagName;
2074
1616
  }
@@ -2076,47 +1618,47 @@ var mt = class {
2076
1618
  return this._$AM._$AU;
2077
1619
  }
2078
1620
  constructor(e, t, n, r, i) {
2079
- this.type = 1, this._$AH = R, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = i, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(/* @__PURE__ */ new String()), this.strings = n) : this._$AH = R;
1621
+ this.type = 1, this._$AH = L, this._$AN = void 0, this.element = e, this.name = t, this._$AM = r, this.options = i, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(/* @__PURE__ */ new String()), this.strings = n) : this._$AH = L;
2080
1622
  }
2081
1623
  _$AI(e, t = this, n, r) {
2082
1624
  let i = this.strings, a = !1;
2083
- if (i === void 0) e = B(this, e, t, 0), a = !P(e) || e !== this._$AH && e !== L, a && (this._$AH = e);
1625
+ if (i === void 0) e = B(this, e, t, 0), a = !j(e) || e !== this._$AH && e !== I, a && (this._$AH = e);
2084
1626
  else {
2085
1627
  let r = e, o, s;
2086
- for (e = i[0], o = 0; o < i.length - 1; o++) s = B(this, r[n + o], t, o), s === L && (s = this._$AH[o]), a ||= !P(s) || s !== this._$AH[o], s === R ? e = R : e !== R && (e += (s ?? "") + i[o + 1]), this._$AH[o] = s;
1628
+ for (e = i[0], o = 0; o < i.length - 1; o++) s = B(this, r[n + o], t, o), s === I && (s = this._$AH[o]), a ||= !j(s) || s !== this._$AH[o], s === L ? e = L : e !== L && (e += (s ?? "") + i[o + 1]), this._$AH[o] = s;
2087
1629
  }
2088
1630
  a && !r && this.j(e);
2089
1631
  }
2090
1632
  j(e) {
2091
- e === R ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
1633
+ e === L ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
2092
1634
  }
2093
- }, gt = class extends V {
1635
+ }, Ne = class extends H {
2094
1636
  constructor() {
2095
1637
  super(...arguments), this.type = 3;
2096
1638
  }
2097
1639
  j(e) {
2098
- this.element[this.name] = e === R ? void 0 : e;
1640
+ this.element[this.name] = e === L ? void 0 : e;
2099
1641
  }
2100
- }, _t = class extends V {
1642
+ }, Pe = class extends H {
2101
1643
  constructor() {
2102
1644
  super(...arguments), this.type = 4;
2103
1645
  }
2104
1646
  j(e) {
2105
- this.element.toggleAttribute(this.name, !!e && e !== R);
1647
+ this.element.toggleAttribute(this.name, !!e && e !== L);
2106
1648
  }
2107
- }, vt = class extends V {
1649
+ }, Fe = class extends H {
2108
1650
  constructor(e, t, n, r, i) {
2109
1651
  super(e, t, n, r, i), this.type = 5;
2110
1652
  }
2111
1653
  _$AI(e, t = this) {
2112
- if ((e = B(this, e, t, 0) ?? R) === L) return;
2113
- let n = this._$AH, r = e === R && n !== R || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, i = e !== R && (n === R || r);
1654
+ if ((e = B(this, e, t, 0) ?? L) === I) return;
1655
+ let n = this._$AH, r = e === L && n !== L || e.capture !== n.capture || e.once !== n.once || e.passive !== n.passive, i = e !== L && (n === L || r);
2114
1656
  r && this.element.removeEventListener(this.name, this, n), i && this.element.addEventListener(this.name, this, e), this._$AH = e;
2115
1657
  }
2116
1658
  handleEvent(e) {
2117
1659
  typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
2118
1660
  }
2119
- }, yt = class {
1661
+ }, Ie = class {
2120
1662
  constructor(e, t, n) {
2121
1663
  this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = n;
2122
1664
  }
@@ -2126,36 +1668,36 @@ var mt = class {
2126
1668
  _$AI(e) {
2127
1669
  B(this, e);
2128
1670
  }
2129
- }, bt = {
2130
- M: $e,
2131
- P: j,
2132
- A: et,
1671
+ }, Le = {
1672
+ M: E,
1673
+ P: D,
1674
+ A: O,
2133
1675
  C: 1,
2134
- L: ft,
2135
- R: mt,
2136
- D: rt,
1676
+ L: je,
1677
+ R: Me,
1678
+ D: Ce,
2137
1679
  V: B,
2138
- I: ht,
2139
- H: V,
2140
- N: _t,
2141
- U: vt,
2142
- B: gt,
2143
- F: yt
2144
- }, xt = Xe.litHtmlPolyfillSupport;
2145
- xt?.(pt, ht), (Xe.litHtmlVersions ??= []).push("3.3.3");
1680
+ I: V,
1681
+ H,
1682
+ N: Pe,
1683
+ U: Fe,
1684
+ B: Ne,
1685
+ F: Ie
1686
+ }, Re = w.litHtmlPolyfillSupport;
1687
+ Re?.(z, V), (w.litHtmlVersions ??= []).push("3.3.3");
2146
1688
  //#endregion
2147
1689
  //#region node_modules/lit-html/directive-helpers.js
2148
- var { I: St } = bt, Ct = (e) => e.strings === void 0, wt = {
1690
+ var { I: ze } = Le, Be = (e) => e.strings === void 0, Ve = {
2149
1691
  ATTRIBUTE: 1,
2150
1692
  CHILD: 2,
2151
1693
  PROPERTY: 3,
2152
1694
  BOOLEAN_ATTRIBUTE: 4,
2153
1695
  EVENT: 5,
2154
1696
  ELEMENT: 6
2155
- }, Tt = (e) => (...t) => ({
1697
+ }, He = (e) => (...t) => ({
2156
1698
  _$litDirective$: e,
2157
1699
  values: t
2158
- }), Et = class {
1700
+ }), Ue = class {
2159
1701
  constructor(e) {}
2160
1702
  get _$AU() {
2161
1703
  return this._$AM._$AU;
@@ -2169,48 +1711,48 @@ var { I: St } = bt, Ct = (e) => e.strings === void 0, wt = {
2169
1711
  update(e, t) {
2170
1712
  return this.render(...t);
2171
1713
  }
2172
- }, H = (e, t) => {
1714
+ }, U = (e, t) => {
2173
1715
  let n = e._$AN;
2174
1716
  if (n === void 0) return !1;
2175
- for (let e of n) e._$AO?.(t, !1), H(e, t);
1717
+ for (let e of n) e._$AO?.(t, !1), U(e, t);
2176
1718
  return !0;
2177
- }, U = (e) => {
1719
+ }, W = (e) => {
2178
1720
  let t, n;
2179
1721
  do {
2180
1722
  if ((t = e._$AM) === void 0) break;
2181
1723
  n = t._$AN, n.delete(e), e = t;
2182
1724
  } while (n?.size === 0);
2183
- }, Dt = (e) => {
1725
+ }, We = (e) => {
2184
1726
  for (let t; t = e._$AM; e = t) {
2185
1727
  let n = t._$AN;
2186
1728
  if (n === void 0) t._$AN = n = /* @__PURE__ */ new Set();
2187
1729
  else if (n.has(e)) break;
2188
- n.add(e), At(t);
1730
+ n.add(e), qe(t);
2189
1731
  }
2190
1732
  };
2191
- function Ot(e) {
2192
- this._$AN === void 0 ? this._$AM = e : (U(this), this._$AM = e, Dt(this));
1733
+ function Ge(e) {
1734
+ this._$AN === void 0 ? this._$AM = e : (W(this), this._$AM = e, We(this));
2193
1735
  }
2194
- function kt(e, t = !1, n = 0) {
1736
+ function Ke(e, t = !1, n = 0) {
2195
1737
  let r = this._$AH, i = this._$AN;
2196
- if (i !== void 0 && i.size !== 0) if (t) if (Array.isArray(r)) for (let e = n; e < r.length; e++) H(r[e], !1), U(r[e]);
2197
- else r != null && (H(r, !1), U(r));
2198
- else H(this, e);
1738
+ if (i !== void 0 && i.size !== 0) if (t) if (Array.isArray(r)) for (let e = n; e < r.length; e++) U(r[e], !1), W(r[e]);
1739
+ else r != null && (U(r, !1), W(r));
1740
+ else U(this, e);
2199
1741
  }
2200
- var At = (e) => {
2201
- e.type == wt.CHILD && (e._$AP ??= kt, e._$AQ ??= Ot);
2202
- }, jt = class extends Et {
1742
+ var qe = (e) => {
1743
+ e.type == Ve.CHILD && (e._$AP ??= Ke, e._$AQ ??= Ge);
1744
+ }, Je = class extends Ue {
2203
1745
  constructor() {
2204
1746
  super(...arguments), this._$AN = void 0;
2205
1747
  }
2206
1748
  _$AT(e, t, n) {
2207
- super._$AT(e, t, n), Dt(this), this.isConnected = e._$AU;
1749
+ super._$AT(e, t, n), We(this), this.isConnected = e._$AU;
2208
1750
  }
2209
1751
  _$AO(e, t = !0) {
2210
- e !== this.isConnected && (this.isConnected = e, e ? this.reconnected?.() : this.disconnected?.()), t && (H(this, e), U(this));
1752
+ e !== this.isConnected && (this.isConnected = e, e ? this.reconnected?.() : this.disconnected?.()), t && (U(this, e), W(this));
2211
1753
  }
2212
1754
  setValue(e) {
2213
- if (Ct(this._$Ct)) this._$Ct._$AI(e, this);
1755
+ if (Be(this._$Ct)) this._$Ct._$AI(e, this);
2214
1756
  else {
2215
1757
  let t = [...this._$Ct._$AH];
2216
1758
  t[this._$Ci] = e, this._$Ct._$AI(t, this, 0);
@@ -2218,22 +1760,22 @@ var At = (e) => {
2218
1760
  }
2219
1761
  disconnected() {}
2220
1762
  reconnected() {}
2221
- }, Mt = () => new Nt(), Nt = class {}, Pt = /* @__PURE__ */ new WeakMap(), Ft = Tt(class extends jt {
1763
+ }, Ye = () => new Xe(), Xe = class {}, Ze = /* @__PURE__ */ new WeakMap(), Qe = He(class extends Je {
2222
1764
  render(e) {
2223
- return R;
1765
+ return L;
2224
1766
  }
2225
1767
  update(e, [t]) {
2226
1768
  let n = t !== this.G;
2227
- return n && this.rt(void 0), (n || this.lt !== this.ct) && (this.G = t, this.ht = e.options?.host, this.rt(this.ct = e.element)), R;
1769
+ return n && this.rt(void 0), (n || this.lt !== this.ct) && (this.G = t, this.ht = e.options?.host, this.rt(this.ct = e.element)), L;
2228
1770
  }
2229
1771
  rt(e) {
2230
1772
  if (this.G !== void 0) if (this.isConnected || (e = void 0), typeof this.G == "function") {
2231
- let t = this.ht ?? globalThis, n = Pt.get(t);
2232
- n === void 0 && (n = /* @__PURE__ */ new WeakMap(), Pt.set(t, n)), n.get(this.G) !== void 0 && this.G.call(this.ht, void 0), n.set(this.G, e), e !== void 0 && this.G.call(this.ht, e);
1773
+ let t = this.ht ?? globalThis, n = Ze.get(t);
1774
+ n === void 0 && (n = /* @__PURE__ */ new WeakMap(), Ze.set(t, n)), n.get(this.G) !== void 0 && this.G.call(this.ht, void 0), n.set(this.G, e), e !== void 0 && this.G.call(this.ht, e);
2233
1775
  } else this.G.value = e;
2234
1776
  }
2235
1777
  get lt() {
2236
- return typeof this.G == "function" ? Pt.get(this.ht ?? globalThis)?.get(this.G) : this.G?.value;
1778
+ return typeof this.G == "function" ? Ze.get(this.ht ?? globalThis)?.get(this.G) : this.G?.value;
2237
1779
  }
2238
1780
  disconnected() {
2239
1781
  this.lt === this.ct && this.rt(void 0);
@@ -2241,12 +1783,12 @@ var At = (e) => {
2241
1783
  reconnected() {
2242
1784
  this.rt(this.ct);
2243
1785
  }
2244
- }), W = class extends e {
1786
+ }), G = class extends a {
2245
1787
  constructor(...e) {
2246
- super(...e), this.value = "", this.name = "", this.label = "", this.disabled = !1, this.colorInputRef = Mt();
1788
+ super(...e), this.value = "", this.name = "", this.label = "", this.disabled = !1, this.colorInputRef = Ye();
2247
1789
  }
2248
1790
  static {
2249
- this.styles = t`
1791
+ this.styles = o`
2250
1792
  :host {
2251
1793
  display: block;
2252
1794
  font-family: var(--lc-font-family);
@@ -2315,7 +1857,7 @@ var At = (e) => {
2315
1857
  `;
2316
1858
  }
2317
1859
  emitChange(e) {
2318
- this.dispatchEvent(new CustomEvent(b.CHANGE, {
1860
+ this.dispatchEvent(new CustomEvent(i.CHANGE, {
2319
1861
  detail: { value: e },
2320
1862
  bubbles: !0,
2321
1863
  composed: !0
@@ -2334,8 +1876,8 @@ var At = (e) => {
2334
1876
  }
2335
1877
  render() {
2336
1878
  let e = this.value || "#000000";
2337
- return n`
2338
- ${this.label ? n`<label class="label">${this.label}</label>` : r}
1879
+ return s`
1880
+ ${this.label ? s`<label class="label">${this.label}</label>` : c}
2339
1881
  <div class="container">
2340
1882
  <input
2341
1883
  class="hidden"
@@ -2343,7 +1885,7 @@ var At = (e) => {
2343
1885
  .value=${e}
2344
1886
  ?disabled=${this.disabled}
2345
1887
  @input=${this.handleColorInput}
2346
- ${Ft(this.colorInputRef)}
1888
+ ${Qe(this.colorInputRef)}
2347
1889
  />
2348
1890
  <div
2349
1891
  class="preview ${this.disabled ? "disabled" : ""}"
@@ -2362,15 +1904,15 @@ var At = (e) => {
2362
1904
  `;
2363
1905
  }
2364
1906
  };
2365
- T([h({ type: String })], W.prototype, "value", void 0), T([h({ type: String })], W.prototype, "name", void 0), T([h({ type: String })], W.prototype, "label", void 0), T([h({ type: Boolean })], W.prototype, "disabled", void 0), W = T([i("lc-color-picker")], W);
1907
+ y([_({ type: String })], G.prototype, "value", void 0), y([_({ type: String })], G.prototype, "name", void 0), y([_({ type: String })], G.prototype, "label", void 0), y([_({ type: Boolean })], G.prototype, "disabled", void 0), G = y([l("lc-color-picker")], G);
2366
1908
  //#endregion
2367
1909
  //#region src/components/strength-slider/strength-slider.ts
2368
- var G = class extends e {
1910
+ var K = class extends a {
2369
1911
  constructor(...e) {
2370
1912
  super(...e), this.value = .5, this.min = 0, this.max = 1, this.step = .1, this.name = "", this.label = "", this.disabled = !1;
2371
1913
  }
2372
1914
  static {
2373
- this.styles = t`
1915
+ this.styles = o`
2374
1916
  :host {
2375
1917
  display: block;
2376
1918
  font-family: var(--lc-font-family);
@@ -2407,7 +1949,7 @@ var G = class extends e {
2407
1949
  `;
2408
1950
  }
2409
1951
  emitChange(e) {
2410
- this.dispatchEvent(new CustomEvent(b.CHANGE, {
1952
+ this.dispatchEvent(new CustomEvent(i.CHANGE, {
2411
1953
  detail: { value: e },
2412
1954
  bubbles: !0,
2413
1955
  composed: !0
@@ -2418,8 +1960,8 @@ var G = class extends e {
2418
1960
  this.value = parseFloat(t.value), this.emitChange(this.value);
2419
1961
  }
2420
1962
  render() {
2421
- return n`
2422
- ${this.label ? n`<label class="label">${this.label}</label>` : r}
1963
+ return s`
1964
+ ${this.label ? s`<label class="label">${this.label}</label>` : c}
2423
1965
  <div class="container">
2424
1966
  <input
2425
1967
  type="range"
@@ -2435,20 +1977,20 @@ var G = class extends e {
2435
1977
  `;
2436
1978
  }
2437
1979
  };
2438
- T([h({ type: Number })], G.prototype, "value", void 0), T([h({ type: Number })], G.prototype, "min", void 0), T([h({ type: Number })], G.prototype, "max", void 0), T([h({ type: Number })], G.prototype, "step", void 0), T([h({ type: String })], G.prototype, "name", void 0), T([h({ type: String })], G.prototype, "label", void 0), T([h({ type: Boolean })], G.prototype, "disabled", void 0), G = T([i("lc-strength-slider")], G);
1980
+ y([_({ type: Number })], K.prototype, "value", void 0), y([_({ type: Number })], K.prototype, "min", void 0), y([_({ type: Number })], K.prototype, "max", void 0), y([_({ type: Number })], K.prototype, "step", void 0), y([_({ type: String })], K.prototype, "name", void 0), y([_({ type: String })], K.prototype, "label", void 0), y([_({ type: Boolean })], K.prototype, "disabled", void 0), K = y([l("lc-strength-slider")], K);
2439
1981
  //#endregion
2440
1982
  //#region src/components/task-progress-card/task-progress-card.ts
2441
- var It = {
1983
+ var $e = {
2442
1984
  pending: "等待中",
2443
1985
  running: "运行中",
2444
1986
  done: "已完成",
2445
1987
  exception: "异常"
2446
- }, K = class extends e {
1988
+ }, q = class extends a {
2447
1989
  constructor(...e) {
2448
1990
  super(...e), this.taskId = "", this.status = "pending", this.progress = 0, this.queuePos = -1, this.errorMessage = "", this.submittedAt = 0;
2449
1991
  }
2450
1992
  static {
2451
- this.styles = t`
1993
+ this.styles = o`
2452
1994
  :host {
2453
1995
  display: block;
2454
1996
  --lc-progress-height: 8px;
@@ -2536,8 +2078,8 @@ var It = {
2536
2078
  return e ? new Date(e).toLocaleString("zh-CN") : "";
2537
2079
  }
2538
2080
  render() {
2539
- let e = Math.max(0, Math.min(1, this.progress)), t = `width: ${e * 100}%`, r = `background: ${this.getStatusColor()}`;
2540
- return n`
2081
+ let e = Math.max(0, Math.min(1, this.progress)), t = `width: ${e * 100}%`, n = `background: ${this.getStatusColor()}`;
2082
+ return s`
2541
2083
  <div class="card" part="card">
2542
2084
  <div class="title">任务 #${this.taskId}</div>
2543
2085
  <div class="progress-text">${Math.round(e * 100)}%</div>
@@ -2545,27 +2087,27 @@ var It = {
2545
2087
  <div class="progress-fill" style=${t} part="progress-fill"></div>
2546
2088
  </div>
2547
2089
  <div class="meta">
2548
- <span class="status-dot" style=${r}></span>
2549
- <span part="status">${It[this.status]}</span>
2550
- ${this.queuePos >= 0 ? n`<span class="separator">·</span><span>队列位置: ${this.queuePos}</span>` : null}
2090
+ <span class="status-dot" style=${n}></span>
2091
+ <span part="status">${$e[this.status]}</span>
2092
+ ${this.queuePos >= 0 ? s`<span class="separator">·</span><span>队列位置: ${this.queuePos}</span>` : null}
2551
2093
  </div>
2552
- ${this.submittedAt ? n`<div class="meta" style="margin-top: var(--lc-spacing-1)">
2094
+ ${this.submittedAt ? s`<div class="meta" style="margin-top: var(--lc-spacing-1)">
2553
2095
  提交时间: ${this.formatTime(this.submittedAt)}
2554
2096
  </div>` : null}
2555
- ${this.status === "exception" && this.errorMessage ? n`<div class="error-message">${this.errorMessage}</div>` : null}
2097
+ ${this.status === "exception" && this.errorMessage ? s`<div class="error-message">${this.errorMessage}</div>` : null}
2556
2098
  </div>
2557
2099
  `;
2558
2100
  }
2559
2101
  };
2560
- T([h({ type: String })], K.prototype, "taskId", void 0), T([h({ type: String })], K.prototype, "status", void 0), T([h({ type: Number })], K.prototype, "progress", void 0), T([h({ type: Number })], K.prototype, "queuePos", void 0), T([h({ type: String })], K.prototype, "errorMessage", void 0), T([h({ type: Number })], K.prototype, "submittedAt", void 0), K = T([i("lc-task-progress-card")], K);
2102
+ y([_({ type: String })], q.prototype, "taskId", void 0), y([_({ type: String })], q.prototype, "status", void 0), y([_({ type: Number })], q.prototype, "progress", void 0), y([_({ type: Number })], q.prototype, "queuePos", void 0), y([_({ type: String })], q.prototype, "errorMessage", void 0), y([_({ type: Number })], q.prototype, "submittedAt", void 0), q = y([l("lc-task-progress-card")], q);
2561
2103
  //#endregion
2562
2104
  //#region src/components/result-gallery/result-gallery.ts
2563
- var q = class extends e {
2105
+ var J = class extends a {
2564
2106
  constructor(...e) {
2565
2107
  super(...e), this.images = "[]", this.originalUrl = "", this.showDownload = !0;
2566
2108
  }
2567
2109
  static {
2568
- this.styles = t`
2110
+ this.styles = o`
2569
2111
  :host {
2570
2112
  display: block;
2571
2113
  --lc-gallery-gap: var(--lc-spacing-3);
@@ -2638,7 +2180,7 @@ var q = class extends e {
2638
2180
  }
2639
2181
  }
2640
2182
  _onImageClick(e) {
2641
- this.dispatchEvent(new CustomEvent(b.IMAGE_CLICK, {
2183
+ this.dispatchEvent(new CustomEvent(i.IMAGE_CLICK, {
2642
2184
  detail: {
2643
2185
  index: e.index,
2644
2186
  url: e.url
@@ -2648,7 +2190,7 @@ var q = class extends e {
2648
2190
  }));
2649
2191
  }
2650
2192
  _onCompare(e) {
2651
- this.dispatchEvent(new CustomEvent(b.COMPARE, {
2193
+ this.dispatchEvent(new CustomEvent(i.COMPARE, {
2652
2194
  detail: {
2653
2195
  originalUrl: this.originalUrl,
2654
2196
  resultUrl: e
@@ -2658,35 +2200,35 @@ var q = class extends e {
2658
2200
  }));
2659
2201
  }
2660
2202
  renderImageItem(e) {
2661
- return n`
2203
+ return s`
2662
2204
  <div class="image-item" @click=${() => this._onImageClick(e)}>
2663
2205
  <img src="${e.url}" alt="结果 ${e.index + 1}">
2664
2206
  <div class="overlay">
2665
- ${this.showDownload ? n`<a class="action-btn" href="${e.url}" download title="下载">&#11015;</a>` : r}
2666
- ${this.originalUrl ? n`<button class="action-btn" @click=${(t) => {
2207
+ ${this.showDownload ? s`<a class="action-btn" href="${e.url}" download title="下载">&#11015;</a>` : c}
2208
+ ${this.originalUrl ? s`<button class="action-btn" @click=${(t) => {
2667
2209
  t.stopPropagation(), this._onCompare(e.url);
2668
- }} title="对比">&#8801;</button>` : r}
2210
+ }} title="对比">&#8801;</button>` : c}
2669
2211
  </div>
2670
2212
  </div>
2671
2213
  `;
2672
2214
  }
2673
2215
  render() {
2674
- return n`
2216
+ return s`
2675
2217
  <div class="gallery">
2676
2218
  ${this.getParsedImages().map((e) => this.renderImageItem(e))}
2677
2219
  </div>
2678
2220
  `;
2679
2221
  }
2680
2222
  };
2681
- T([h({ type: String })], q.prototype, "images", void 0), T([h({ type: String })], q.prototype, "originalUrl", void 0), T([h({ type: Boolean })], q.prototype, "showDownload", void 0), q = T([i("lc-result-gallery")], q);
2223
+ y([_({ type: String })], J.prototype, "images", void 0), y([_({ type: String })], J.prototype, "originalUrl", void 0), y([_({ type: Boolean })], J.prototype, "showDownload", void 0), J = y([l("lc-result-gallery")], J);
2682
2224
  //#endregion
2683
2225
  //#region src/components/image-compare-slider/image-compare-slider.ts
2684
- var J = class extends e {
2226
+ var Y = class extends a {
2685
2227
  constructor(...e) {
2686
2228
  super(...e), this.beforeSrc = "", this.afterSrc = "", this.beforeLabel = "原图", this.afterLabel = "结果", this._position = 50;
2687
2229
  }
2688
2230
  static {
2689
- this.styles = t`
2231
+ this.styles = o`
2690
2232
  :host {
2691
2233
  display: block;
2692
2234
  --lc-compare-width: 100%;
@@ -2779,7 +2321,7 @@ var J = class extends e {
2779
2321
  }
2780
2322
  render() {
2781
2323
  let e = `clip-path: inset(0 0 0 ${this._position}%)`, t = `left: ${this._position}%`;
2782
- return n`
2324
+ return s`
2783
2325
  <div class="compare-container" part="container">
2784
2326
  <div class="after-wrapper">
2785
2327
  <img src="${this.afterSrc}" alt="${this.afterLabel}">
@@ -2798,1540 +2340,12 @@ var J = class extends e {
2798
2340
  `;
2799
2341
  }
2800
2342
  };
2801
- T([h({ type: String })], J.prototype, "beforeSrc", void 0), T([h({ type: String })], J.prototype, "afterSrc", void 0), T([h({ type: String })], J.prototype, "beforeLabel", void 0), T([h({ type: String })], J.prototype, "afterLabel", void 0), T([g()], J.prototype, "_position", void 0), J = T([i("lc-image-compare-slider")], J);
2802
- //#endregion
2803
- //#region src/core/task-types/types-part-a.ts
2804
- var Lt = {
2805
- GeneratePrinting: {
2806
- key: "GeneratePrinting",
2807
- title: "图案设计",
2808
- description: "上传1-2张灵感素材图进行融合发散设计",
2809
- fields: [
2810
- {
2811
- name: "imgUrlList",
2812
- label: "灵感素材图",
2813
- type: "images",
2814
- required: !0,
2815
- hint: "上传1-2张灵感素材图"
2816
- },
2817
- {
2818
- name: "prompt",
2819
- label: "图案风格",
2820
- type: "text",
2821
- required: !0,
2822
- placeholder: "描述想要的图案风格"
2823
- },
2824
- {
2825
- name: "aspectRatio",
2826
- label: "比例",
2827
- type: "aspectRatio"
2828
- }
2829
- ]
2830
- },
2831
- VirtualFitting: {
2832
- key: "VirtualFitting",
2833
- title: "AI试衣",
2834
- description: "上传服装图片生成模特上身效果图",
2835
- fields: [
2836
- {
2837
- name: "imgUrl",
2838
- label: "上装图片",
2839
- type: "image",
2840
- required: !0,
2841
- hint: "挂拍图/人台图/平铺图"
2842
- },
2843
- {
2844
- name: "lowerImgUrl",
2845
- label: "下装图片",
2846
- type: "image"
2847
- },
2848
- {
2849
- name: "prompt",
2850
- label: "试衣需求",
2851
- type: "text",
2852
- placeholder: "描述试衣需求"
2853
- },
2854
- {
2855
- name: "aspectRatio",
2856
- label: "比例",
2857
- type: "aspectRatio"
2858
- }
2859
- ]
2860
- },
2861
- FixFace: {
2862
- key: "FixFace",
2863
- title: "面部优化",
2864
- description: "智能修复模特脸部畸形",
2865
- fields: [{
2866
- name: "imgUrl",
2867
- label: "模特图",
2868
- type: "image",
2869
- required: !0
2870
- }]
2871
- },
2872
- ChangeFace: {
2873
- key: "ChangeFace",
2874
- title: "面部替换",
2875
- description: "上传指定面部图片替换模特面容",
2876
- fields: [{
2877
- name: "imgUrl",
2878
- label: "模特图",
2879
- type: "image",
2880
- required: !0
2881
- }, {
2882
- name: "refImgUrl",
2883
- label: "参考面部图",
2884
- type: "image",
2885
- required: !0
2886
- }]
2887
- },
2888
- MultiPerspective: {
2889
- key: "MultiPerspective",
2890
- title: "多视角",
2891
- description: "生成不同角度的展示效果图",
2892
- fields: [{
2893
- name: "imgUrl",
2894
- label: "图片",
2895
- type: "image",
2896
- required: !0
2897
- }, {
2898
- name: "perspective",
2899
- label: "视角",
2900
- type: "enum",
2901
- required: !0,
2902
- options: S
2903
- }]
2904
- },
2905
- PrintingTiling: {
2906
- key: "PrintingTiling",
2907
- title: "图案印染上身",
2908
- description: "将指定图案虚拟印染到款式图上",
2909
- fields: [
2910
- {
2911
- name: "imgUrl",
2912
- label: "款式图",
2913
- type: "image",
2914
- required: !0
2915
- },
2916
- {
2917
- name: "maskUrl",
2918
- label: "蒙版",
2919
- type: "mask"
2920
- },
2921
- {
2922
- name: "printingImgUrl",
2923
- label: "印花图案",
2924
- type: "image",
2925
- required: !0
2926
- },
2927
- {
2928
- name: "prompt",
2929
- label: "印染需求",
2930
- type: "text",
2931
- placeholder: "描述印染需求"
2932
- }
2933
- ]
2934
- },
2935
- ChangeDesignPoint: {
2936
- key: "ChangeDesignPoint",
2937
- title: "设计点修改",
2938
- description: "通过参考图实现设计点修改或融合",
2939
- fields: [
2940
- {
2941
- name: "imgUrl",
2942
- label: "原图",
2943
- type: "image",
2944
- required: !0
2945
- },
2946
- {
2947
- name: "maskUrl",
2948
- label: "蒙版",
2949
- type: "mask"
2950
- },
2951
- {
2952
- name: "refImgUrl",
2953
- label: "参考图",
2954
- type: "image"
2955
- },
2956
- {
2957
- name: "prompt",
2958
- label: "修改需求",
2959
- type: "text",
2960
- placeholder: "描述修改需求"
2961
- }
2962
- ]
2963
- },
2964
- ChangeColor: {
2965
- key: "ChangeColor",
2966
- title: "服装改色",
2967
- description: "自定义区域一键换色",
2968
- fields: [
2969
- {
2970
- name: "imgUrl",
2971
- label: "原图",
2972
- type: "image",
2973
- required: !0
2974
- },
2975
- {
2976
- name: "maskUrl",
2977
- label: "改色区域蒙版",
2978
- type: "mask",
2979
- required: !0
2980
- },
2981
- {
2982
- name: "hexCode",
2983
- label: "目标颜色",
2984
- type: "color",
2985
- required: !0
2986
- }
2987
- ]
2988
- },
2989
- ChangeFabric: {
2990
- key: "ChangeFabric",
2991
- title: "面料上身",
2992
- description: "将指定面料一键上身到款式图",
2993
- fields: [
2994
- {
2995
- name: "imgUrl",
2996
- label: "款式图/模特图",
2997
- type: "image",
2998
- required: !0
2999
- },
3000
- {
3001
- name: "maskUrl",
3002
- label: "蒙版",
3003
- type: "mask",
3004
- required: !0
3005
- },
3006
- {
3007
- name: "fabricImgUrl",
3008
- label: "面料图",
3009
- type: "image",
3010
- required: !0
3011
- }
3012
- ]
3013
- },
3014
- Sr: {
3015
- key: "Sr",
3016
- title: "高清放大",
3017
- description: "无损高清放大与细节强化",
3018
- fields: [{
3019
- name: "imgUrl",
3020
- label: "图片",
3021
- type: "image",
3022
- required: !0
3023
- }, {
3024
- name: "scale",
3025
- label: "放大倍数",
3026
- type: "enum",
3027
- required: !0,
3028
- options: Ne
3029
- }]
3030
- },
3031
- VectorConvert: {
3032
- key: "VectorConvert",
3033
- title: "矢量图转换",
3034
- description: "生成可编辑的矢量格式文件",
3035
- fields: [{
3036
- name: "imgUrl",
3037
- label: "图片",
3038
- type: "image",
3039
- required: !0
3040
- }, {
3041
- name: "patternType",
3042
- label: "图案类型",
3043
- type: "enum",
3044
- required: !0,
3045
- options: Pe
3046
- }]
3047
- },
3048
- ChangeModel: {
3049
- key: "ChangeModel",
3050
- title: "模特更换",
3051
- description: "一键更换模特并支持自定义选择",
3052
- fields: [
3053
- {
3054
- name: "imgUrl",
3055
- label: "模特图",
3056
- type: "image",
3057
- required: !0
3058
- },
3059
- {
3060
- name: "gender",
3061
- label: "性别",
3062
- type: "enum",
3063
- options: C
3064
- },
3065
- {
3066
- name: "age",
3067
- label: "年龄",
3068
- type: "enum",
3069
- options: Fe
3070
- },
3071
- {
3072
- name: "race",
3073
- label: "人种",
3074
- type: "enum",
3075
- options: Ie
3076
- }
3077
- ]
3078
- },
3079
- GenerateSketch: {
3080
- key: "GenerateSketch",
3081
- title: "平铺图转线稿",
3082
- description: "上传平铺图生成线稿",
3083
- fields: [{
3084
- name: "imgUrl",
3085
- label: "平铺图",
3086
- type: "image",
3087
- required: !0
3088
- }]
3089
- },
3090
- ModelGenerateSketch: {
3091
- key: "ModelGenerateSketch",
3092
- title: "模特图转线稿",
3093
- description: "上传模特图生成线稿",
3094
- fields: [{
3095
- name: "imgUrl",
3096
- label: "模特图",
3097
- type: "image",
3098
- required: !0
3099
- }, {
3100
- name: "position",
3101
- label: "服装位置",
3102
- type: "enum",
3103
- options: Le
3104
- }]
3105
- },
3106
- Eliminate: {
3107
- key: "Eliminate",
3108
- title: "AI消除",
3109
- description: "一键消除指定元素",
3110
- fields: [{
3111
- name: "imgUrl",
3112
- label: "原图",
3113
- type: "image",
3114
- required: !0
3115
- }, {
3116
- name: "maskUrl",
3117
- label: "消除区域蒙版",
3118
- type: "mask",
3119
- required: !0
3120
- }]
3121
- },
3122
- ExpandImage: {
3123
- key: "ExpandImage",
3124
- title: "AI扩图",
3125
- description: "一键扩充人物或背景",
3126
- fields: [{
3127
- name: "imgUrl",
3128
- label: "原图",
3129
- type: "image",
3130
- required: !0
3131
- }, {
3132
- name: "maskUrl",
3133
- label: "扩图区域蒙版",
3134
- type: "mask",
3135
- required: !0
3136
- }]
3137
- },
3138
- ClothingDesign: {
3139
- key: "ClothingDesign",
3140
- title: "AI创款",
3141
- description: "根据灵感图快速创款",
3142
- fields: [
3143
- {
3144
- name: "imgUrlList",
3145
- label: "灵感款式图",
3146
- type: "images",
3147
- hint: "上传1-3张灵感图"
3148
- },
3149
- {
3150
- name: "fabricImgUrl",
3151
- label: "面料图",
3152
- type: "image",
3153
- hint: "上传面料图进行面料创款"
3154
- },
3155
- {
3156
- name: "words",
3157
- label: "创款需求",
3158
- type: "text",
3159
- placeholder: "描述创款需求"
3160
- },
3161
- {
3162
- name: "aspectRatio",
3163
- label: "比例",
3164
- type: "aspectRatio"
3165
- }
3166
- ]
3167
- },
3168
- ChangePattern: {
3169
- key: "ChangePattern",
3170
- title: "服装改版",
3171
- description: "通过选择部位和版型修改服装版型",
3172
- fields: [{
3173
- name: "imgUrl",
3174
- label: "服装图",
3175
- type: "image",
3176
- required: !0
3177
- }, {
3178
- name: "detailList",
3179
- label: "改版部位",
3180
- type: "multiEnum",
3181
- required: !0,
3182
- options: Re
3183
- }]
3184
- },
3185
- GenerateModel: {
3186
- key: "GenerateModel",
3187
- title: "定制模特",
3188
- description: "生成符合需求的虚拟模特",
3189
- fields: [
3190
- {
3191
- name: "imgUrlList",
3192
- label: "参考图片",
3193
- type: "images",
3194
- required: !0,
3195
- hint: "上传1-10张带面容的图片"
3196
- },
3197
- {
3198
- name: "gender",
3199
- label: "性别",
3200
- type: "enum",
3201
- required: !0,
3202
- options: C
3203
- },
3204
- {
3205
- name: "race",
3206
- label: "人种",
3207
- type: "enum",
3208
- options: Ie
3209
- }
3210
- ]
3211
- },
3212
- ModifyPrinting: {
3213
- key: "ModifyPrinting",
3214
- title: "图案修改",
3215
- description: "上传图案和参考图AI修改",
3216
- fields: [
3217
- {
3218
- name: "imgUrl",
3219
- label: "原图",
3220
- type: "image",
3221
- required: !0
3222
- },
3223
- {
3224
- name: "refImgUrl",
3225
- label: "参考图",
3226
- type: "image"
3227
- },
3228
- {
3229
- name: "maskUrl",
3230
- label: "蒙版",
3231
- type: "mask"
3232
- },
3233
- {
3234
- name: "prompt",
3235
- label: "修改需求",
3236
- type: "text",
3237
- placeholder: "描述修改需求"
3238
- }
3239
- ]
3240
- },
3241
- CutOut: {
3242
- key: "CutOut",
3243
- title: "智能抠图",
3244
- description: "一键抠图修边",
3245
- fields: [{
3246
- name: "imgUrl",
3247
- label: "图片",
3248
- type: "image",
3249
- required: !0
3250
- }, {
3251
- name: "recognitionType",
3252
- label: "识别类型",
3253
- type: "enum",
3254
- required: !0,
3255
- options: ze
3256
- }]
3257
- },
3258
- LineArtToReal: {
3259
- key: "LineArtToReal",
3260
- title: "线稿转实物",
3261
- description: "线稿图生成实物效果平铺图",
3262
- fields: [
3263
- {
3264
- name: "imgUrl",
3265
- label: "线稿图",
3266
- type: "image",
3267
- required: !0
3268
- },
3269
- {
3270
- name: "imageType",
3271
- label: "图片类型",
3272
- type: "enum",
3273
- required: !0,
3274
- options: Be
3275
- },
3276
- {
3277
- name: "prompt",
3278
- label: "款式特征",
3279
- type: "text",
3280
- placeholder: "描述款式特征"
3281
- }
3282
- ]
3283
- },
3284
- FixPartial: {
3285
- key: "FixPartial",
3286
- title: "局部修复",
3287
- description: "修复或重新创造指定区域",
3288
- fields: [
3289
- {
3290
- name: "imgUrl",
3291
- label: "原图",
3292
- type: "image",
3293
- required: !0
3294
- },
3295
- {
3296
- name: "maskUrl",
3297
- label: "修复区域蒙版",
3298
- type: "mask",
3299
- required: !0
3300
- },
3301
- {
3302
- name: "prompt",
3303
- label: "修复需求",
3304
- type: "text",
3305
- placeholder: "描述修复需求"
3306
- }
3307
- ]
3308
- },
3309
- DetailCompensation: {
3310
- key: "DetailCompensation",
3311
- title: "细节补偿",
3312
- description: "精准还原服装细节",
3313
- fields: [
3314
- {
3315
- name: "imgUrl",
3316
- label: "原图",
3317
- type: "image",
3318
- required: !0
3319
- },
3320
- {
3321
- name: "maskUrl",
3322
- label: "蒙版",
3323
- type: "mask"
3324
- },
3325
- {
3326
- name: "refImgUrl",
3327
- label: "参考图",
3328
- type: "image"
3329
- }
3330
- ]
3331
- },
3332
- ChangeClothesByImg: {
3333
- key: "ChangeClothesByImg",
3334
- title: "服装穿搭调整",
3335
- description: "上下装搭配调整",
3336
- fields: [{
3337
- name: "imgUrl",
3338
- label: "原图",
3339
- type: "image",
3340
- required: !0
3341
- }, {
3342
- name: "changeImgUrl",
3343
- label: "搭配服装图",
3344
- type: "image",
3345
- required: !0
3346
- }]
3347
- }
3348
- }, Rt = {
3349
- ChangeAccessoriesByImg: {
3350
- key: "ChangeAccessoriesByImg",
3351
- title: "配饰穿搭调整",
3352
- description: "背包鞋子首饰等搭配调整",
3353
- fields: [
3354
- {
3355
- name: "imgUrl",
3356
- label: "原图",
3357
- type: "image",
3358
- required: !0
3359
- },
3360
- {
3361
- name: "changeImgUrl",
3362
- label: "搭配物品图",
3363
- type: "image",
3364
- required: !0
3365
- },
3366
- {
3367
- name: "accessoryType",
3368
- label: "配件类型",
3369
- type: "enum",
3370
- required: !0,
3371
- options: Ve
3372
- }
3373
- ]
3374
- },
3375
- VirtualFittingReference: {
3376
- key: "VirtualFittingReference",
3377
- title: "AI试衣参考图模式",
3378
- description: "上传模特参考图生成试衣效果",
3379
- fields: [{
3380
- name: "imgUrl",
3381
- label: "服装图片",
3382
- type: "image",
3383
- required: !0
3384
- }, {
3385
- name: "refImgUrl",
3386
- label: "模特参考图",
3387
- type: "image",
3388
- required: !0
3389
- }]
3390
- },
3391
- VirtualFittingTemplate: {
3392
- key: "VirtualFittingTemplate",
3393
- title: "AI试衣模板模式",
3394
- description: "选择试衣场景模板",
3395
- fields: [{
3396
- name: "imgUrl",
3397
- label: "服装图片",
3398
- type: "image",
3399
- required: !0
3400
- }, {
3401
- name: "templateId",
3402
- label: "试衣模板",
3403
- type: "enum",
3404
- required: !0,
3405
- options: He
3406
- }]
3407
- },
3408
- FixDeformities: {
3409
- key: "FixDeformities",
3410
- title: "畸形修复",
3411
- description: "修复手部脚部脸部畸形",
3412
- fields: [{
3413
- name: "imgUrl",
3414
- label: "模特图",
3415
- type: "image",
3416
- required: !0
3417
- }, {
3418
- name: "maskUrl",
3419
- label: "修复区域蒙版",
3420
- type: "mask",
3421
- required: !0
3422
- }]
3423
- },
3424
- IntelligentCropping: {
3425
- key: "IntelligentCropping",
3426
- title: "AI智能裁图",
3427
- description: "自定义像素或比例裁图",
3428
- fields: [
3429
- {
3430
- name: "imgUrl",
3431
- label: "图片",
3432
- type: "image",
3433
- required: !0
3434
- },
3435
- {
3436
- name: "mode",
3437
- label: "裁剪模式",
3438
- type: "enum",
3439
- required: !0,
3440
- options: Ue
3441
- },
3442
- {
3443
- name: "x",
3444
- label: "X坐标",
3445
- type: "number"
3446
- },
3447
- {
3448
- name: "y",
3449
- label: "Y坐标",
3450
- type: "number"
3451
- },
3452
- {
3453
- name: "width",
3454
- label: "宽度",
3455
- type: "number"
3456
- },
3457
- {
3458
- name: "height",
3459
- label: "高度",
3460
- type: "number"
3461
- },
3462
- {
3463
- name: "aspectRatio",
3464
- label: "宽高比",
3465
- type: "aspectRatio"
3466
- }
3467
- ]
3468
- },
3469
- ModelToFlat: {
3470
- key: "ModelToFlat",
3471
- title: "模特转平铺",
3472
- description: "模特图生成平铺图效果",
3473
- fields: [{
3474
- name: "imgUrl",
3475
- label: "模特图",
3476
- type: "image",
3477
- required: !0
3478
- }, {
3479
- name: "position",
3480
- label: "服装位置",
3481
- type: "enum",
3482
- required: !0,
3483
- options: Le
3484
- }]
3485
- },
3486
- GenerateShortVideo: {
3487
- key: "GenerateShortVideo",
3488
- title: "短视频生成",
3489
- description: "上传图片生成短视频",
3490
- fields: [
3491
- {
3492
- name: "imgUrl",
3493
- label: "首帧图片",
3494
- type: "image",
3495
- required: !0
3496
- },
3497
- {
3498
- name: "tailImgUrl",
3499
- label: "尾帧图片",
3500
- type: "image"
3501
- },
3502
- {
3503
- name: "prompt",
3504
- label: "文本指令",
3505
- type: "text",
3506
- placeholder: "描述视频内容"
3507
- },
3508
- {
3509
- name: "duration",
3510
- label: "时长",
3511
- type: "enum",
3512
- required: !0,
3513
- options: We
3514
- }
3515
- ]
3516
- },
3517
- OneClickModifyPrinting: {
3518
- key: "OneClickModifyPrinting",
3519
- title: "一键改图案",
3520
- description: "通过文本或参考图一键更改图案",
3521
- fields: [
3522
- {
3523
- name: "imgUrl",
3524
- label: "原图",
3525
- type: "image",
3526
- required: !0
3527
- },
3528
- {
3529
- name: "refImgUrl",
3530
- label: "参考图",
3531
- type: "image"
3532
- },
3533
- {
3534
- name: "prompt",
3535
- label: "文本指令",
3536
- type: "text",
3537
- placeholder: "描述图案修改需求"
3538
- },
3539
- {
3540
- name: "aspectRatio",
3541
- label: "宽高比",
3542
- type: "aspectRatio"
3543
- }
3544
- ]
3545
- },
3546
- OrientationDesign: {
3547
- key: "OrientationDesign",
3548
- title: "服装定向设计",
3549
- description: "通过设计点对服装进行定向设计",
3550
- fields: [
3551
- {
3552
- name: "imgUrl",
3553
- label: "原图",
3554
- type: "image",
3555
- required: !0
3556
- },
3557
- {
3558
- name: "maskUrl",
3559
- label: "蒙版1",
3560
- type: "mask"
3561
- },
3562
- {
3563
- name: "refImgUrl",
3564
- label: "参考图1",
3565
- type: "image"
3566
- },
3567
- {
3568
- name: "prompt",
3569
- label: "文本指令1",
3570
- type: "text",
3571
- placeholder: "描述设计需求"
3572
- }
3573
- ]
3574
- },
3575
- DirectionalIntegration: {
3576
- key: "DirectionalIntegration",
3577
- title: "定向融合",
3578
- description: "通过融合设计点对服装进行融合设计",
3579
- fields: [
3580
- {
3581
- name: "imgUrl",
3582
- label: "原图",
3583
- type: "image",
3584
- required: !0
3585
- },
3586
- {
3587
- name: "maskUrl",
3588
- label: "蒙版1",
3589
- type: "mask"
3590
- },
3591
- {
3592
- name: "refImgUrl",
3593
- label: "参考图1",
3594
- type: "image",
3595
- required: !0
3596
- }
3597
- ]
3598
- },
3599
- OneClickIntegration: {
3600
- key: "OneClickIntegration",
3601
- title: "一键融合",
3602
- description: "通过参考图和文本指令一键融合",
3603
- fields: [
3604
- {
3605
- name: "imgUrl",
3606
- label: "原图",
3607
- type: "image",
3608
- required: !0
3609
- },
3610
- {
3611
- name: "refImgUrl",
3612
- label: "参考图",
3613
- type: "image",
3614
- required: !0
3615
- },
3616
- {
3617
- name: "prompt",
3618
- label: "文本指令",
3619
- type: "text",
3620
- placeholder: "描述融合需求"
3621
- },
3622
- {
3623
- name: "aspectRatio",
3624
- label: "宽高比",
3625
- type: "aspectRatio"
3626
- }
3627
- ]
3628
- },
3629
- ChangeFabricV2: {
3630
- key: "ChangeFabricV2",
3631
- title: "面料上身2.0",
3632
- description: "支持文本指令的面料上身",
3633
- fields: [
3634
- {
3635
- name: "imgUrl",
3636
- label: "款式图",
3637
- type: "image",
3638
- required: !0
3639
- },
3640
- {
3641
- name: "maskUrl",
3642
- label: "蒙版",
3643
- type: "mask",
3644
- required: !0
3645
- },
3646
- {
3647
- name: "fabricImgUrl",
3648
- label: "面料图",
3649
- type: "image",
3650
- required: !0
3651
- },
3652
- {
3653
- name: "prompt",
3654
- label: "文本指令",
3655
- type: "text",
3656
- placeholder: "描述调整需求"
3657
- },
3658
- {
3659
- name: "aspectRatio",
3660
- label: "宽高比",
3661
- type: "aspectRatio"
3662
- }
3663
- ]
3664
- },
3665
- VirtualFittingReferenceV2: {
3666
- key: "VirtualFittingReferenceV2",
3667
- title: "AI试衣参考图2.0",
3668
- description: "支持姿势和背景的试衣",
3669
- fields: [
3670
- {
3671
- name: "imgUrl",
3672
- label: "服装图片",
3673
- type: "image",
3674
- required: !0
3675
- },
3676
- {
3677
- name: "refImgUrl",
3678
- label: "模特参考图",
3679
- type: "image",
3680
- required: !0
3681
- },
3682
- {
3683
- name: "poseImgUrl",
3684
- label: "姿势图",
3685
- type: "image"
3686
- },
3687
- {
3688
- name: "bgImgUrl",
3689
- label: "背景图",
3690
- type: "image"
3691
- },
3692
- {
3693
- name: "prompt",
3694
- label: "文本指令",
3695
- type: "text",
3696
- placeholder: "描述试衣需求"
3697
- },
3698
- {
3699
- name: "aspectRatio",
3700
- label: "宽高比",
3701
- type: "aspectRatio"
3702
- }
3703
- ]
3704
- },
3705
- FlowerShapedDesign: {
3706
- key: "FlowerShapedDesign",
3707
- title: "花型创款",
3708
- description: "将印花上身到指定款式效果图",
3709
- fields: [
3710
- {
3711
- name: "imgUrl",
3712
- label: "印花图案",
3713
- type: "image",
3714
- required: !0
3715
- },
3716
- {
3717
- name: "prompt",
3718
- label: "文本指令",
3719
- type: "text",
3720
- required: !0,
3721
- placeholder: "描述上身效果需求"
3722
- },
3723
- {
3724
- name: "aspectRatio",
3725
- label: "宽高比",
3726
- type: "aspectRatio"
3727
- }
3728
- ]
3729
- },
3730
- FlowerShapedVirtualPrinting: {
3731
- key: "FlowerShapedVirtualPrinting",
3732
- title: "花型上身",
3733
- description: "将图案上身到款式图指定区域",
3734
- fields: [
3735
- {
3736
- name: "imgUrl",
3737
- label: "印花图案",
3738
- type: "image",
3739
- required: !0
3740
- },
3741
- {
3742
- name: "bodyImgUrl",
3743
- label: "上身图",
3744
- type: "image",
3745
- required: !0
3746
- },
3747
- {
3748
- name: "bodyMaskImgUrl",
3749
- label: "目标区域蒙版",
3750
- type: "mask",
3751
- required: !0
3752
- },
3753
- {
3754
- name: "removePattern",
3755
- label: "是否去除参考图印花",
3756
- type: "enum",
3757
- options: Ge
3758
- }
3759
- ]
3760
- },
3761
- OneClickChangeColor: {
3762
- key: "OneClickChangeColor",
3763
- title: "一键改色",
3764
- description: "整合智能识别与自定义改色",
3765
- fields: [
3766
- {
3767
- name: "imgUrl",
3768
- label: "原图",
3769
- type: "image",
3770
- required: !0
3771
- },
3772
- {
3773
- name: "hexCode",
3774
- label: "目标颜色",
3775
- type: "color"
3776
- },
3777
- {
3778
- name: "hexImgUrl",
3779
- label: "颜色参考图",
3780
- type: "image"
3781
- },
3782
- {
3783
- name: "changeColorArea",
3784
- label: "改色区域",
3785
- type: "text",
3786
- placeholder: "如:上衣"
3787
- },
3788
- {
3789
- name: "aspectRatio",
3790
- label: "宽高比",
3791
- type: "aspectRatio"
3792
- }
3793
- ]
3794
- },
3795
- FittingModelWithLabels: {
3796
- key: "FittingModelWithLabels",
3797
- title: "模特定制标签模式",
3798
- description: "通过标签选择生成虚拟模特",
3799
- fields: [
3800
- {
3801
- name: "gender",
3802
- label: "性别",
3803
- type: "enum",
3804
- required: !0,
3805
- options: C
3806
- },
3807
- {
3808
- name: "age",
3809
- label: "年龄",
3810
- type: "enum",
3811
- options: Fe
3812
- },
3813
- {
3814
- name: "nationality",
3815
- label: "国籍",
3816
- type: "enum",
3817
- options: Ke
3818
- },
3819
- {
3820
- name: "skinColor",
3821
- label: "肤色",
3822
- type: "enum",
3823
- options: qe
3824
- },
3825
- {
3826
- name: "bodyShape",
3827
- label: "身材",
3828
- type: "enum",
3829
- options: Je
3830
- }
3831
- ]
3832
- },
3833
- FittingModelCustom: {
3834
- key: "FittingModelCustom",
3835
- title: "模特定制自定义模式",
3836
- description: "根据参考图生成虚拟模特",
3837
- fields: [
3838
- {
3839
- name: "gender",
3840
- label: "性别",
3841
- type: "enum",
3842
- required: !0,
3843
- options: C
3844
- },
3845
- {
3846
- name: "faceRefImgUrl",
3847
- label: "脸部参考图",
3848
- type: "image",
3849
- required: !0
3850
- },
3851
- {
3852
- name: "similarity",
3853
- label: "相似度",
3854
- type: "enum",
3855
- options: w
3856
- },
3857
- {
3858
- name: "bodyShapeRefImgUrl",
3859
- label: "身材参考图",
3860
- type: "image"
3861
- },
3862
- {
3863
- name: "additionalDescription",
3864
- label: "附加描述",
3865
- type: "text",
3866
- placeholder: "附加描述"
3867
- }
3868
- ]
3869
- },
3870
- FittingModelChangeFace: {
3871
- key: "FittingModelChangeFace",
3872
- title: "模特换脸",
3873
- description: "对模特图换脸操作",
3874
- fields: [
3875
- {
3876
- name: "imgUrl",
3877
- label: "模特图",
3878
- type: "image",
3879
- required: !0
3880
- },
3881
- {
3882
- name: "refImgUrl",
3883
- label: "参考面部图",
3884
- type: "image",
3885
- required: !0
3886
- },
3887
- {
3888
- name: "similarity",
3889
- label: "相似度",
3890
- type: "enum",
3891
- options: w
3892
- },
3893
- {
3894
- name: "aspectRatio",
3895
- label: "宽高比",
3896
- type: "aspectRatio"
3897
- }
3898
- ]
3899
- },
3900
- FittingModelChangeModel: {
3901
- key: "FittingModelChangeModel",
3902
- title: "模特替换",
3903
- description: "随机或指定模特替换",
3904
- fields: [
3905
- {
3906
- name: "imgUrl",
3907
- label: "模特图",
3908
- type: "image",
3909
- required: !0
3910
- },
3911
- {
3912
- name: "gender",
3913
- label: "性别",
3914
- type: "enum",
3915
- options: C
3916
- },
3917
- {
3918
- name: "similarity",
3919
- label: "相似度",
3920
- type: "enum",
3921
- options: w
3922
- },
3923
- {
3924
- name: "aspectRatio",
3925
- label: "宽高比",
3926
- type: "aspectRatio"
3927
- }
3928
- ]
3929
- },
3930
- FittingModelChangeBodyShape: {
3931
- key: "FittingModelChangeBodyShape",
3932
- title: "模特身材调整",
3933
- description: "通过标签或参考图调整身材",
3934
- fields: [
3935
- {
3936
- name: "imgUrl",
3937
- label: "模特图",
3938
- type: "image",
3939
- required: !0
3940
- },
3941
- {
3942
- name: "bodyShapeRefImgUrl",
3943
- label: "身材参考图",
3944
- type: "image"
3945
- },
3946
- {
3947
- name: "aspectRatio",
3948
- label: "宽高比",
3949
- type: "aspectRatio"
3950
- }
3951
- ]
3952
- },
3953
- FittingModelChangeClothingSize: {
3954
- key: "FittingModelChangeClothingSize",
3955
- title: "模特尺码调整",
3956
- description: "调整模特服装尺码",
3957
- fields: [
3958
- {
3959
- name: "imgUrl",
3960
- label: "模特图",
3961
- type: "image",
3962
- required: !0
3963
- },
3964
- {
3965
- name: "size",
3966
- label: "尺码",
3967
- type: "enum",
3968
- required: !0,
3969
- options: Ye
3970
- },
3971
- {
3972
- name: "aspectRatio",
3973
- label: "宽高比",
3974
- type: "aspectRatio"
3975
- }
3976
- ]
3977
- },
3978
- FittingModelChangePosture: {
3979
- key: "FittingModelChangePosture",
3980
- title: "模特姿势调整",
3981
- description: "调整模特姿势",
3982
- fields: [
3983
- {
3984
- name: "imgUrl",
3985
- label: "模特图",
3986
- type: "image",
3987
- required: !0
3988
- },
3989
- {
3990
- name: "poseImgUrl",
3991
- label: "姿势参考图",
3992
- type: "image",
3993
- required: !0
3994
- },
3995
- {
3996
- name: "aspectRatio",
3997
- label: "宽高比",
3998
- type: "aspectRatio"
3999
- }
4000
- ]
4001
- },
4002
- FittingModelChangeBackground: {
4003
- key: "FittingModelChangeBackground",
4004
- title: "模特换背景",
4005
- description: "替换模特背景",
4006
- fields: [
4007
- {
4008
- name: "imgUrl",
4009
- label: "模特图",
4010
- type: "image",
4011
- required: !0
4012
- },
4013
- {
4014
- name: "bgImgUrl",
4015
- label: "背景参考图",
4016
- type: "image"
4017
- },
4018
- {
4019
- name: "prompt",
4020
- label: "文本指令",
4021
- type: "text",
4022
- placeholder: "描述背景需求"
4023
- },
4024
- {
4025
- name: "aspectRatio",
4026
- label: "宽高比",
4027
- type: "aspectRatio"
4028
- }
4029
- ]
4030
- },
4031
- FittingModelChangePerspective: {
4032
- key: "FittingModelChangePerspective",
4033
- title: "模特视角调整",
4034
- description: "调整模特视角",
4035
- fields: [
4036
- {
4037
- name: "imgUrl",
4038
- label: "模特图",
4039
- type: "image",
4040
- required: !0
4041
- },
4042
- {
4043
- name: "perspective",
4044
- label: "视角",
4045
- type: "enum",
4046
- required: !0,
4047
- options: S
4048
- },
4049
- {
4050
- name: "aspectRatio",
4051
- label: "宽高比",
4052
- type: "aspectRatio"
4053
- }
4054
- ]
4055
- },
4056
- TrainClothingModel: {
4057
- key: "TrainClothingModel",
4058
- title: "服装风格模型训练",
4059
- description: "训练自定义服装风格模型",
4060
- fields: [
4061
- {
4062
- name: "imgUrlList",
4063
- label: "训练图片",
4064
- type: "images",
4065
- required: !0,
4066
- hint: "建议上传30-50张正面/斜侧面模特图"
4067
- },
4068
- {
4069
- name: "clothingModelName",
4070
- label: "模型名称",
4071
- type: "text",
4072
- required: !0
4073
- },
4074
- {
4075
- name: "enhanceWordList",
4076
- label: "加强词",
4077
- type: "text"
4078
- }
4079
- ]
4080
- }
4081
- }, Y = {
4082
- ...Lt,
4083
- ...Rt
4084
- };
4085
- function zt(e) {
4086
- return Y[e];
4087
- }
4088
- function Bt() {
4089
- return Object.values(Y);
4090
- }
4091
- //#endregion
4092
- //#region src/core/validate.ts
4093
- function Vt(e, t) {
4094
- let n = [];
4095
- for (let r of t) {
4096
- let t = e[r.name], i = Ht(r, t);
4097
- i && n.push(i);
4098
- }
4099
- return {
4100
- valid: n.length === 0,
4101
- errors: n
4102
- };
4103
- }
4104
- function Ht(e, t) {
4105
- let n = t == null || t === "";
4106
- if (e.required && n) return {
4107
- field: e.name,
4108
- label: e.label,
4109
- message: x.FIELD_REQUIRED(e.label)
4110
- };
4111
- if (t == null) return null;
4112
- let r = (t) => ({
4113
- field: e.name,
4114
- label: e.label,
4115
- message: t(e.label)
4116
- });
4117
- switch (e.type) {
4118
- case "image":
4119
- case "mask":
4120
- if (typeof t != "string" && !Ut(t)) return r(x.FIELD_STRING);
4121
- break;
4122
- case "images":
4123
- if (!Array.isArray(t) || t.length === 0) return r(x.FIELD_ARRAY);
4124
- if (t.some((e) => (typeof e != "string" || e === "") && !Ut(e))) return r(x.FIELD_ARRAY_ELEMENTS);
4125
- break;
4126
- case "text":
4127
- if (typeof t != "string") return r(x.FIELD_STRING);
4128
- if (e.maxLength && t.length > e.maxLength) return r((t) => x.FIELD_MAX_LENGTH(t, e.maxLength));
4129
- break;
4130
- case "enum":
4131
- if (typeof t != "string") return r(x.FIELD_STRING);
4132
- if (e.options && !e.options.some((e) => e.value === t)) return r(x.FIELD_ENUM_INVALID);
4133
- break;
4134
- case "multiEnum":
4135
- if (!Array.isArray(t) || t.length === 0) return r(x.FIELD_ARRAY);
4136
- if (t.some((e) => typeof e != "string" || e === "")) return r(x.FIELD_ARRAY_ELEMENTS);
4137
- if (e.options && t.some((t) => !e.options?.some((e) => e.value === t))) return r(x.FIELD_ENUM_INVALID);
4138
- break;
4139
- case "color":
4140
- if (typeof t != "string" || !/^#[0-9A-Fa-f]{6}$/.test(t)) return r(x.FIELD_COLOR_FORMAT);
4141
- break;
4142
- case "number":
4143
- if (typeof t != "number" || Number.isNaN(t)) return r(x.FIELD_NUMBER);
4144
- break;
4145
- case "aspectRatio":
4146
- case "strength": break;
4147
- }
4148
- return null;
4149
- }
4150
- function Ut(e) {
4151
- return typeof File < "u" && e instanceof File;
4152
- }
4153
- //#endregion
4154
- //#region src/core/client.ts
4155
- var Wt = class {
4156
- constructor(e = {}) {
4157
- this.type = "", this.submitEndpoint = "/task/submit", this.submitEndpointMode = "prefix", this.pollEndpoint = "/task/progress", this.pollInterval = 1e3, this.maxPollAttempts = 120, this.phase = v.IDLE, this.taskId = "", this.progress = 0, this.result = null, this.error = "", this.activeTasks = /* @__PURE__ */ new Map(), this.pollTimer = null, this.isPollingBatch = !1, this.configure(e);
4158
- }
4159
- configure(e) {
4160
- e.type !== void 0 && (this.type = e.type), e.submitEndpoint !== void 0 && (this.submitEndpoint = e.submitEndpoint), e.submitEndpointMode !== void 0 && (this.submitEndpointMode = e.submitEndpointMode), e.pollEndpoint !== void 0 && (this.pollEndpoint = e.pollEndpoint), e.pollInterval !== void 0 && (this.pollInterval = e.pollInterval), e.maxPollAttempts !== void 0 && (this.maxPollAttempts = e.maxPollAttempts), e.customRequest !== void 0 && (this.customRequest = e.customRequest), e.customUploadRequest !== void 0 && (this.customUploadRequest = e.customUploadRequest), e.customUploadRequert !== void 0 && (this.customUploadRequest = e.customUploadRequert), e.onSubmit !== void 0 && (this.onSubmit = e.onSubmit), e.onPoll !== void 0 && (this.onPoll = e.onPoll), e.onSuccess !== void 0 && (this.onSuccess = e.onSuccess), e.onError !== void 0 && (this.onError = e.onError);
4161
- }
4162
- get typeDef() {
4163
- let e = this.resolvedTaskTypeKey;
4164
- return e ? zt(e) : void 0;
4165
- }
4166
- get taskFields() {
4167
- return this.typeDef?.fields ?? [];
4168
- }
4169
- async submit(e, t) {
4170
- let n = this.createRequestUri(e);
4171
- if (!n) {
4172
- this.fail(x.MISSING_ENDPOINT, v.IDLE);
4173
- return;
4174
- }
4175
- let r = this.getTaskFields(e);
4176
- if (r.length > 0) {
4177
- let e = Vt(t, r);
4178
- if (!e.valid) {
4179
- this.fail(e.errors.map((e) => e.message).join("; "), v.IDLE);
4180
- return;
4181
- }
4182
- }
4183
- this.phase = v.SUBMITTING, this.error = "", this.progress = 0, this.result = null;
4184
- try {
4185
- let e = await this.resolveUploads(t, r), i = (await this.request(n, {
4186
- method: "POST",
4187
- body: JSON.stringify(e),
4188
- headers: { "Content-Type": "application/json" }
4189
- })).data.taskId;
4190
- this.taskId = i;
4191
- let a = {
4192
- taskId: i,
4193
- endpoint: n,
4194
- formData: e
4195
- };
4196
- this.onSubmit?.(a), await this.trackTask(i);
4197
- } catch (e) {
4198
- this.fail(e instanceof Error ? e.message : x.SUBMIT_FAILED, this.phase);
4199
- }
4200
- }
4201
- reset() {
4202
- this.phase = v.IDLE, this.taskId = "", this.progress = 0, this.result = null, this.error = "", this.activeTasks.clear(), this.pollTimer &&= (clearTimeout(this.pollTimer), null);
4203
- }
4204
- createRequestUri(e = this.type) {
4205
- return this.submitEndpointMode === "full" ? this.submitEndpoint : e ? `${this.submitEndpoint}/${e}` : this.submitEndpoint;
4206
- }
4207
- get resolvedTaskTypeKey() {
4208
- return Gt(this.type);
4209
- }
4210
- getTaskFields(e) {
4211
- let t = Gt(e);
4212
- return t ? zt(t)?.fields ?? [] : [];
4213
- }
4214
- async resolveUploads(e, t) {
4215
- let n = t.length > 0 ? t.filter((e) => e.type === "image" || e.type === "mask" || e.type === "images") : Object.keys(e).map((e) => ({
4216
- name: e,
4217
- type: "image"
4218
- }));
4219
- if (!n.length) return e;
4220
- let r = { ...e };
4221
- for (let e of n) {
4222
- let t = r[e.name];
4223
- Array.isArray(t) ? r[e.name] = await Promise.all(t.map((t) => this.resolveUploadValue(t, e))) : r[e.name] = await this.resolveUploadValue(t, e);
4224
- }
4225
- return r;
4226
- }
4227
- async resolveUploadValue(e, t) {
4228
- if (!Kt(e)) return e;
4229
- if (!this.customUploadRequest) throw Error(`customUploadRequest is required to upload ${t.name}`);
4230
- let n = new FormData();
4231
- return n.append(t.name || "file", e), qt(await this.customUploadRequest({
4232
- file: e,
4233
- name: t.name,
4234
- formData: n,
4235
- field: t
4236
- }));
4237
- }
4238
- trackTask(e) {
4239
- this.phase = v.POLLING;
4240
- let t = new Promise((t) => {
4241
- this.activeTasks.set(e, {
4242
- taskId: e,
4243
- attempts: 0,
4244
- resolve: t
4245
- });
4246
- });
4247
- return this.ensurePolling(0), t;
4248
- }
4249
- ensurePolling(e = this.pollInterval) {
4250
- this.pollTimer || this.isPollingBatch || !this.activeTasks.size || (this.pollTimer = setTimeout(() => {
4251
- this.pollTimer = null, this.pollActiveTasks();
4252
- }, this.pollInterval));
4253
- }
4254
- async pollActiveTasks() {
4255
- if (!this.activeTasks.size) return;
4256
- this.isPollingBatch = !0;
4257
- let e = [...this.activeTasks.keys()];
4258
- try {
4259
- let t = `${this.pollEndpoint}?taskIds=${e.map(encodeURIComponent).join(",")}`, n = await this.request(t, { method: "GET" }), r = new Map(n.data.map((e) => [e.aiTaskId, e]));
4260
- e.forEach((e) => {
4261
- let t = this.activeTasks.get(e);
4262
- if (!t) return;
4263
- t.attempts += 1;
4264
- let n = r.get(e);
4265
- if (!n) {
4266
- this.failTask(t, x.TASK_NOT_FOUND(e));
4267
- return;
4268
- }
4269
- this.taskId = e, this.progress = n.taskProgress;
4270
- let i = {
4271
- taskId: e,
4272
- progress: n.taskProgress,
4273
- status: n.aiTaskStatus,
4274
- queuePos: n.queuePos
4275
- };
4276
- if (this.onPoll?.(i), n.aiTaskStatus === "done") {
4277
- this.result = n;
4278
- let r = {
4279
- taskId: e,
4280
- images: n.imgInfo ? [{
4281
- index: 0,
4282
- url: n.imgInfo
4283
- }] : [],
4284
- result: n
4285
- };
4286
- this.onSuccess?.(r), this.completeTask(t);
4287
- return;
4288
- }
4289
- t.attempts >= this.maxPollAttempts && this.failTask(t, x.POLL_TIMEOUT(e));
4290
- });
4291
- } catch (e) {
4292
- let t = e instanceof Error ? e.message : x.POLL_FAILED;
4293
- [...this.activeTasks.values()].forEach((e) => this.failTask(e, t));
4294
- } finally {
4295
- this.isPollingBatch = !1, this.activeTasks.size ? (this.phase = v.POLLING, this.ensurePolling(this.pollInterval)) : this.phase === v.POLLING && (this.phase = this.error ? v.ERROR : v.SUCCESS);
4296
- }
4297
- }
4298
- completeTask(e) {
4299
- this.activeTasks.delete(e.taskId), e.resolve();
4300
- }
4301
- failTask(e, t) {
4302
- this.activeTasks.delete(e.taskId), this.fail(t, v.POLLING, e.taskId), e.resolve();
4303
- }
4304
- async request(e, t) {
4305
- let n = await (this.customRequest ?? fetch)(e, t);
4306
- return n && typeof n.json == "function" ? n.json() : n;
4307
- }
4308
- fail(e, t, n) {
4309
- this.phase = v.ERROR, this.error = e;
4310
- let r = {
4311
- message: e,
4312
- phase: t,
4313
- taskId: n
4314
- };
4315
- this.onError?.(r);
4316
- }
4317
- };
4318
- function Gt(e) {
4319
- if (!e) return "";
4320
- if (Y[e]) return e;
4321
- let t = e.replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[-\s]+/g, "_").toUpperCase();
4322
- return Y[t] ? t : "";
4323
- }
4324
- function Kt(e) {
4325
- return typeof File < "u" && e instanceof File;
4326
- }
4327
- async function qt(e) {
4328
- return e ? typeof e == "string" ? e : e instanceof Response ? qt(await e.json()) : typeof e.data == "string" ? e.data : e.data ? e.data.value || e.data.url || "" : e.value || e.url || "" : "";
4329
- }
2343
+ y([_({ type: String })], Y.prototype, "beforeSrc", void 0), y([_({ type: String })], Y.prototype, "afterSrc", void 0), y([_({ type: String })], Y.prototype, "beforeLabel", void 0), y([_({ type: String })], Y.prototype, "afterLabel", void 0), y([v()], Y.prototype, "_position", void 0), Y = y([l("lc-image-compare-slider")], Y);
4330
2344
  //#endregion
4331
2345
  //#region src/components/task-workflow/task-workflow.ts
4332
- var X = v, Z = b, Q = class extends e {
2346
+ var X = r, Z = i, Q = class extends a {
4333
2347
  constructor(...e) {
4334
- super(...e), this.type = "", this.submitEndpoint = "", this.pollEndpoint = y.POLL_ENDPOINT, this.pollInterval = y.POLL_INTERVAL, this.maxPollAttempts = y.MAX_POLL_ATTEMPTS, this.phase = X.IDLE, this.taskId = "", this.progress = 0, this.result = null, this.error = "", this._defaultClient = new Wt();
2348
+ super(...e), this.type = "", this.submitEndpoint = "", this.pollEndpoint = n.POLL_ENDPOINT, this.pollInterval = n.POLL_INTERVAL, this.maxPollAttempts = n.MAX_POLL_ATTEMPTS, this.phase = X.IDLE, this.taskId = "", this.progress = 0, this.result = null, this.error = "", this._defaultClient = new t();
4335
2349
  }
4336
2350
  get typeDef() {
4337
2351
  return this._syncClientConfig(), this._activeClient.typeDef;
@@ -4354,9 +2368,9 @@ var X = v, Z = b, Q = class extends e {
4354
2368
  _handleChildChange(e) {
4355
2369
  let t = e.target;
4356
2370
  if (!(t instanceof HTMLElement)) return;
4357
- let n = Jt(t);
2371
+ let n = et(t);
4358
2372
  if (!n) return;
4359
- let r = Zt(e) ?? Yt(t);
2373
+ let r = rt(e) ?? tt(t);
4360
2374
  r !== void 0 && (t.value = r, this._syncMaskSources(n, r));
4361
2375
  }
4362
2376
  _syncMaskSources(e, t) {
@@ -4368,10 +2382,10 @@ var X = v, Z = b, Q = class extends e {
4368
2382
  collectFormData() {
4369
2383
  let e = {}, t = this.querySelectorAll("*"), n = new Map(this.taskFields.map((e) => [e.name, e]));
4370
2384
  return t.forEach((t) => {
4371
- let r = Jt(t);
2385
+ let r = et(t);
4372
2386
  if (!r) return;
4373
- let i = Xt(t);
4374
- n.get(r)?.type === "images" && typeof i == "string" && i && (i = [i]), n.get(r)?.type === "multiEnum" && typeof i == "string" && i && (i = Qt(i)), i !== void 0 && (e[r] = i);
2387
+ let i = nt(t);
2388
+ n.get(r)?.type === "images" && typeof i == "string" && i && (i = [i]), n.get(r)?.type === "multiEnum" && typeof i == "string" && i && (i = it(i)), i !== void 0 && (e[r] = i);
4375
2389
  }), e;
4376
2390
  }
4377
2391
  get _activeClient() {
@@ -4404,7 +2418,7 @@ var X = v, Z = b, Q = class extends e {
4404
2418
  },
4405
2419
  onError: (e) => this._fail(e.message, e.phase)
4406
2420
  };
4407
- this.client ? (this.type && (e.type = this.type), this.submitEndpoint && (e.submitEndpoint = this.submitEndpoint), this.pollEndpoint !== y.POLL_ENDPOINT && (e.pollEndpoint = this.pollEndpoint), this.pollInterval !== y.POLL_INTERVAL && (e.pollInterval = this.pollInterval), this.maxPollAttempts !== y.MAX_POLL_ATTEMPTS && (e.maxPollAttempts = this.maxPollAttempts)) : (e.type = this.type, this.submitEndpoint && (e.submitEndpoint = this.submitEndpoint), e.pollEndpoint = this.pollEndpoint, e.pollInterval = this.pollInterval, e.maxPollAttempts = this.maxPollAttempts), this._activeClient.configure(e);
2421
+ this.client ? (this.type && (e.type = this.type), this.submitEndpoint && (e.submitEndpoint = this.submitEndpoint), this.pollEndpoint !== n.POLL_ENDPOINT && (e.pollEndpoint = this.pollEndpoint), this.pollInterval !== n.POLL_INTERVAL && (e.pollInterval = this.pollInterval), this.maxPollAttempts !== n.MAX_POLL_ATTEMPTS && (e.maxPollAttempts = this.maxPollAttempts)) : (e.type = this.type, this.submitEndpoint && (e.submitEndpoint = this.submitEndpoint), e.pollEndpoint = this.pollEndpoint, e.pollInterval = this.pollInterval, e.maxPollAttempts = this.maxPollAttempts), this._activeClient.configure(e);
4408
2422
  }
4409
2423
  _syncStateFromClient() {
4410
2424
  let e = this._activeClient;
@@ -4421,39 +2435,39 @@ var X = v, Z = b, Q = class extends e {
4421
2435
  }));
4422
2436
  }
4423
2437
  render() {
4424
- return n`
2438
+ return s`
4425
2439
  <form @submit=${this._handleFormSubmit} @click=${this._handleClick} @change=${this._handleChildChange}>
4426
2440
  <slot></slot>
4427
2441
  </form>
4428
2442
  `;
4429
2443
  }
4430
2444
  };
4431
- T([h({ type: String })], Q.prototype, "type", void 0), T([h({
2445
+ y([_({ type: String })], Q.prototype, "type", void 0), y([_({
4432
2446
  type: String,
4433
2447
  attribute: "submit-endpoint"
4434
- })], Q.prototype, "submitEndpoint", void 0), T([h({
2448
+ })], Q.prototype, "submitEndpoint", void 0), y([_({
4435
2449
  type: String,
4436
2450
  attribute: "poll-endpoint"
4437
- })], Q.prototype, "pollEndpoint", void 0), T([h({ type: Number })], Q.prototype, "pollInterval", void 0), T([h({ type: Number })], Q.prototype, "maxPollAttempts", void 0), T([h({ attribute: !1 })], Q.prototype, "client", void 0), T([h({ attribute: !1 })], Q.prototype, "customRequest", void 0), T([h({ attribute: !1 })], Q.prototype, "customUploadRequest", void 0), T([g()], Q.prototype, "phase", void 0), T([g()], Q.prototype, "taskId", void 0), T([g()], Q.prototype, "progress", void 0), T([g()], Q.prototype, "result", void 0), T([g()], Q.prototype, "error", void 0), Q = T([i("lc-task-workflow")], Q);
4438
- function Jt(e) {
2451
+ })], Q.prototype, "pollEndpoint", void 0), y([_({ type: Number })], Q.prototype, "pollInterval", void 0), y([_({ type: Number })], Q.prototype, "maxPollAttempts", void 0), y([_({ attribute: !1 })], Q.prototype, "client", void 0), y([_({ attribute: !1 })], Q.prototype, "customRequest", void 0), y([_({ attribute: !1 })], Q.prototype, "customUploadRequest", void 0), y([v()], Q.prototype, "phase", void 0), y([v()], Q.prototype, "taskId", void 0), y([v()], Q.prototype, "progress", void 0), y([v()], Q.prototype, "result", void 0), y([v()], Q.prototype, "error", void 0), Q = y([l("lc-task-workflow")], Q);
2452
+ function et(e) {
4439
2453
  return e.name || e.getAttribute("name") || "";
4440
2454
  }
4441
- function Yt(e) {
2455
+ function tt(e) {
4442
2456
  let t = e.value;
4443
2457
  if (t !== void 0) return t;
4444
2458
  if (e.hasAttribute("value")) return e.getAttribute("value") ?? "";
4445
2459
  }
4446
- function Xt(e) {
4447
- return e.file || Yt(e);
2460
+ function nt(e) {
2461
+ return e.file || tt(e);
4448
2462
  }
4449
- function Zt(e) {
2463
+ function rt(e) {
4450
2464
  let t = e.detail;
4451
2465
  if (t) {
4452
2466
  if ("value" in t) return t.value;
4453
2467
  if ("file" in t) return t.file;
4454
2468
  }
4455
2469
  }
4456
- function Qt(e) {
2470
+ function it(e) {
4457
2471
  try {
4458
2472
  let t = JSON.parse(e);
4459
2473
  if (Array.isArray(t)) return t.map(String);
@@ -4462,12 +2476,12 @@ function Qt(e) {
4462
2476
  }
4463
2477
  //#endregion
4464
2478
  //#region src/components/button/button.ts
4465
- var $ = class extends e {
2479
+ var $ = class extends a {
4466
2480
  constructor(...e) {
4467
2481
  super(...e), this.type = "button", this.variant = "primary", this.disabled = !1;
4468
2482
  }
4469
2483
  static {
4470
- this.styles = t`
2484
+ this.styles = o`
4471
2485
  :host {
4472
2486
  display: inline-block;
4473
2487
  --lc-button-bg: var(--lc-color-primary);
@@ -4520,16 +2534,16 @@ var $ = class extends e {
4520
2534
  }));
4521
2535
  }
4522
2536
  render() {
4523
- return n`
2537
+ return s`
4524
2538
  <button type=${this.type} ?disabled=${this.disabled} part="button" @click=${this.handleClick}>
4525
2539
  <slot></slot>
4526
2540
  </button>
4527
2541
  `;
4528
2542
  }
4529
2543
  };
4530
- T([h({ type: String })], $.prototype, "type", void 0), T([h({
2544
+ y([_({ type: String })], $.prototype, "type", void 0), y([_({
4531
2545
  type: String,
4532
2546
  reflect: !0
4533
- })], $.prototype, "variant", void 0), T([h({ type: Boolean })], $.prototype, "disabled", void 0), $ = T([i("lc-button")], $);
2547
+ })], $.prototype, "variant", void 0), y([_({ type: Boolean })], $.prototype, "disabled", void 0), $ = y([l("lc-button")], $);
4534
2548
  //#endregion
4535
- export { be as $, Je as A, Ie as B, x as C, Ve as D, je as E, Be as F, Ye as G, Ge as H, Ke as I, Te as J, qe as K, Pe as L, Re as M, We as N, Fe as O, C as P, v as Q, S as R, De as S, ke as T, Ne as U, ze as V, w as W, Oe as X, Ee as Y, y as Z, D as _, Y as a, _e as at, Ce as b, Rt as c, q as d, Se as et, K as f, O as g, k as h, Vt as i, _ as it, Ue as j, Me as k, Lt as l, W as m, Q as n, ye as nt, Bt as o, G as p, He as q, Wt as r, ve as rt, zt as s, $ as t, xe as tt, J as u, E as v, b as w, we as x, Ae as y, Le as z };
2549
+ export { q as a, C as c, b as d, J as i, S as l, Q as n, K as o, Y as r, G as s, $ as t, x as u };