@gomusdev/web-components 1.47.1 → 1.48.0
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.
|
@@ -4250,15 +4250,15 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
4250
4250
|
if (!is_array(value)) {
|
|
4251
4251
|
return select_multiple_invalid_value();
|
|
4252
4252
|
}
|
|
4253
|
-
for (var
|
|
4254
|
-
|
|
4253
|
+
for (var option2 of select.options) {
|
|
4254
|
+
option2.selected = value.includes(get_option_value(option2));
|
|
4255
4255
|
}
|
|
4256
4256
|
return;
|
|
4257
4257
|
}
|
|
4258
|
-
for (
|
|
4259
|
-
var option_value = get_option_value(
|
|
4258
|
+
for (option2 of select.options) {
|
|
4259
|
+
var option_value = get_option_value(option2);
|
|
4260
4260
|
if (is(option_value, value)) {
|
|
4261
|
-
|
|
4261
|
+
option2.selected = true;
|
|
4262
4262
|
return;
|
|
4263
4263
|
}
|
|
4264
4264
|
}
|
|
@@ -4327,11 +4327,11 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
4327
4327
|
});
|
|
4328
4328
|
init_select(select);
|
|
4329
4329
|
}
|
|
4330
|
-
function get_option_value(
|
|
4331
|
-
if ("__value" in
|
|
4332
|
-
return
|
|
4330
|
+
function get_option_value(option2) {
|
|
4331
|
+
if ("__value" in option2) {
|
|
4332
|
+
return option2.__value;
|
|
4333
4333
|
} else {
|
|
4334
|
-
return
|
|
4334
|
+
return option2.value;
|
|
4335
4335
|
}
|
|
4336
4336
|
}
|
|
4337
4337
|
const CLASS = /* @__PURE__ */ Symbol("class");
|
|
@@ -6450,8 +6450,8 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
6450
6450
|
promise() {
|
|
6451
6451
|
return ZodPromise.create(this, this._def);
|
|
6452
6452
|
}
|
|
6453
|
-
or(
|
|
6454
|
-
return ZodUnion$1.create([this,
|
|
6453
|
+
or(option2) {
|
|
6454
|
+
return ZodUnion$1.create([this, option2], this._def);
|
|
6455
6455
|
}
|
|
6456
6456
|
and(incoming) {
|
|
6457
6457
|
return ZodIntersection$1.create(this, incoming, this._def);
|
|
@@ -8213,7 +8213,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
8213
8213
|
return INVALID;
|
|
8214
8214
|
}
|
|
8215
8215
|
if (ctx.common.async) {
|
|
8216
|
-
return Promise.all(options.map(async (
|
|
8216
|
+
return Promise.all(options.map(async (option2) => {
|
|
8217
8217
|
const childCtx = {
|
|
8218
8218
|
...ctx,
|
|
8219
8219
|
common: {
|
|
@@ -8223,7 +8223,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
8223
8223
|
parent: null
|
|
8224
8224
|
};
|
|
8225
8225
|
return {
|
|
8226
|
-
result: await
|
|
8226
|
+
result: await option2._parseAsync({
|
|
8227
8227
|
data: ctx.data,
|
|
8228
8228
|
path: ctx.path,
|
|
8229
8229
|
parent: childCtx
|
|
@@ -8234,7 +8234,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
8234
8234
|
} else {
|
|
8235
8235
|
let dirty = void 0;
|
|
8236
8236
|
const issues = [];
|
|
8237
|
-
for (const
|
|
8237
|
+
for (const option2 of options) {
|
|
8238
8238
|
const childCtx = {
|
|
8239
8239
|
...ctx,
|
|
8240
8240
|
common: {
|
|
@@ -8243,7 +8243,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
8243
8243
|
},
|
|
8244
8244
|
parent: null
|
|
8245
8245
|
};
|
|
8246
|
-
const result =
|
|
8246
|
+
const result = option2._parseSync({
|
|
8247
8247
|
data: ctx.data,
|
|
8248
8248
|
path: ctx.path,
|
|
8249
8249
|
parent: childCtx
|
|
@@ -8324,8 +8324,8 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
8324
8324
|
}
|
|
8325
8325
|
const discriminator = this.discriminator;
|
|
8326
8326
|
const discriminatorValue = ctx.data[discriminator];
|
|
8327
|
-
const
|
|
8328
|
-
if (!
|
|
8327
|
+
const option2 = this.optionsMap.get(discriminatorValue);
|
|
8328
|
+
if (!option2) {
|
|
8329
8329
|
addIssueToContext(ctx, {
|
|
8330
8330
|
code: ZodIssueCode.invalid_union_discriminator,
|
|
8331
8331
|
options: Array.from(this.optionsMap.keys()),
|
|
@@ -8334,13 +8334,13 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
8334
8334
|
return INVALID;
|
|
8335
8335
|
}
|
|
8336
8336
|
if (ctx.common.async) {
|
|
8337
|
-
return
|
|
8337
|
+
return option2._parseAsync({
|
|
8338
8338
|
data: ctx.data,
|
|
8339
8339
|
path: ctx.path,
|
|
8340
8340
|
parent: ctx
|
|
8341
8341
|
});
|
|
8342
8342
|
} else {
|
|
8343
|
-
return
|
|
8343
|
+
return option2._parseSync({
|
|
8344
8344
|
data: ctx.data,
|
|
8345
8345
|
path: ctx.path,
|
|
8346
8346
|
parent: ctx
|
|
@@ -14081,7 +14081,7 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
14081
14081
|
defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
|
|
14082
14082
|
defineLazy(inst._zod, "values", () => {
|
|
14083
14083
|
if (def.options.every((o) => o._zod.values)) {
|
|
14084
|
-
return new Set(def.options.flatMap((
|
|
14084
|
+
return new Set(def.options.flatMap((option2) => Array.from(option2._zod.values)));
|
|
14085
14085
|
}
|
|
14086
14086
|
return void 0;
|
|
14087
14087
|
});
|
|
@@ -14100,8 +14100,8 @@ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot
|
|
|
14100
14100
|
}
|
|
14101
14101
|
let async = false;
|
|
14102
14102
|
const results = [];
|
|
14103
|
-
for (const
|
|
14104
|
-
const result =
|
|
14103
|
+
for (const option2 of def.options) {
|
|
14104
|
+
const result = option2._zod.run({
|
|
14105
14105
|
value: payload.value,
|
|
14106
14106
|
issues: []
|
|
14107
14107
|
}, ctx);
|
|
@@ -15271,8 +15271,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15271
15271
|
return false;
|
|
15272
15272
|
}
|
|
15273
15273
|
if (def.type === "union") {
|
|
15274
|
-
for (const
|
|
15275
|
-
if (isTransforming(
|
|
15274
|
+
for (const option2 of def.options) {
|
|
15275
|
+
if (isTransforming(option2, ctx))
|
|
15276
15276
|
return true;
|
|
15277
15277
|
}
|
|
15278
15278
|
return false;
|
|
@@ -16857,23 +16857,24 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16857
16857
|
return pop($$exports);
|
|
16858
16858
|
}
|
|
16859
16859
|
create_custom_element(Ticket, { cartItem: {} }, [], [], { mode: "open" });
|
|
16860
|
-
function generateQuantityOptions(
|
|
16861
|
-
|
|
16862
|
-
if (
|
|
16863
|
-
return
|
|
16860
|
+
function generateQuantityOptions(from, to, options = { floor: 0 }) {
|
|
16861
|
+
const { floor: floor2 } = options;
|
|
16862
|
+
if (to === 0 || to === floor2) {
|
|
16863
|
+
return [option(floor2)];
|
|
16864
16864
|
}
|
|
16865
|
-
if (
|
|
16866
|
-
|
|
16867
|
-
options = [];
|
|
16865
|
+
if (to < from) {
|
|
16866
|
+
return from > floor2 ? [option(from)] : [];
|
|
16868
16867
|
}
|
|
16869
|
-
|
|
16870
|
-
|
|
16871
|
-
|
|
16872
|
-
|
|
16873
|
-
|
|
16874
|
-
});
|
|
16868
|
+
const start = Math.max(from, floor2);
|
|
16869
|
+
const result = [option(floor2)];
|
|
16870
|
+
for (let q = start; q <= to; q++) {
|
|
16871
|
+
if (q === floor2) continue;
|
|
16872
|
+
result.push(option(q));
|
|
16875
16873
|
}
|
|
16876
|
-
return
|
|
16874
|
+
return result;
|
|
16875
|
+
}
|
|
16876
|
+
function option(value) {
|
|
16877
|
+
return { value, label: value.toString() };
|
|
16877
16878
|
}
|
|
16878
16879
|
var root_5$2 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
16879
16880
|
var root_7$3 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
@@ -16977,19 +16978,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16977
16978
|
var alternate_1 = ($$anchor3) => {
|
|
16978
16979
|
var select = root_6$2();
|
|
16979
16980
|
select.__change = (e) => update(cartItem(), e.target);
|
|
16980
|
-
each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max), (q) => q.value, ($$anchor4, q) => {
|
|
16981
|
-
var
|
|
16982
|
-
var text_2 = child(
|
|
16983
|
-
reset(
|
|
16981
|
+
each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max, { floor: 1 }), (q) => q.value, ($$anchor4, q) => {
|
|
16982
|
+
var option2 = root_7$3();
|
|
16983
|
+
var text_2 = child(option2, true);
|
|
16984
|
+
reset(option2);
|
|
16984
16985
|
var option_value = {};
|
|
16985
16986
|
template_effect(() => {
|
|
16986
|
-
set_selected(
|
|
16987
|
+
set_selected(option2, cartItem().quantity === get$2(q).value);
|
|
16987
16988
|
set_text(text_2, get$2(q).label);
|
|
16988
16989
|
if (option_value !== (option_value = get$2(q).value)) {
|
|
16989
|
-
|
|
16990
|
+
option2.value = (option2.__value = get$2(q).value) ?? "";
|
|
16990
16991
|
}
|
|
16991
16992
|
});
|
|
16992
|
-
append($$anchor4,
|
|
16993
|
+
append($$anchor4, option2);
|
|
16993
16994
|
});
|
|
16994
16995
|
reset(select);
|
|
16995
16996
|
append($$anchor3, select);
|
|
@@ -17412,18 +17413,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17412
17413
|
var text2 = child(h3, true);
|
|
17413
17414
|
reset(h3);
|
|
17414
17415
|
var div_1 = sibling(h3, 2);
|
|
17415
|
-
each(div_1, 20, () => goDonation.campaign?.options, (
|
|
17416
|
+
each(div_1, 20, () => goDonation.campaign?.options, (option2) => option2, ($$anchor2, option2) => {
|
|
17416
17417
|
var button = root_1$g();
|
|
17417
17418
|
let classes;
|
|
17418
|
-
button.__click = () => selectAmount(
|
|
17419
|
+
button.__click = () => selectAmount(option2);
|
|
17419
17420
|
var text_1 = child(button, true);
|
|
17420
17421
|
reset(button);
|
|
17421
17422
|
template_effect(
|
|
17422
17423
|
($0) => {
|
|
17423
|
-
classes = set_class(button, 1, "btn btn-default", null, classes, { selected: goDonation.amount ===
|
|
17424
|
+
classes = set_class(button, 1, "btn btn-default", null, classes, { selected: goDonation.amount === option2 });
|
|
17424
17425
|
set_text(text_1, $0);
|
|
17425
17426
|
},
|
|
17426
|
-
[() => currency(
|
|
17427
|
+
[() => currency(option2 / 100, shop.currency)]
|
|
17427
17428
|
);
|
|
17428
17429
|
append($$anchor2, button);
|
|
17429
17430
|
});
|
|
@@ -18797,9 +18798,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
18797
18798
|
const propValue = getProp();
|
|
18798
18799
|
if (propValue !== void 0)
|
|
18799
18800
|
return propValue;
|
|
18800
|
-
const
|
|
18801
|
-
if (
|
|
18802
|
-
return
|
|
18801
|
+
const option2 = configOption(config2).current;
|
|
18802
|
+
if (option2 !== void 0)
|
|
18803
|
+
return option2;
|
|
18803
18804
|
return fallback;
|
|
18804
18805
|
});
|
|
18805
18806
|
};
|
|
@@ -31266,15 +31267,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31266
31267
|
reset(option_1);
|
|
31267
31268
|
option_1.value = option_1.__value = "";
|
|
31268
31269
|
var node_5 = sibling(option_1, 2);
|
|
31269
|
-
each(node_5, 17, () => field().options(), index$1, ($$anchor4,
|
|
31270
|
+
each(node_5, 17, () => field().options(), index$1, ($$anchor4, option2) => {
|
|
31270
31271
|
var option_2 = root_7$2();
|
|
31271
31272
|
var text_2 = child(option_2, true);
|
|
31272
31273
|
reset(option_2);
|
|
31273
31274
|
var option_2_value = {};
|
|
31274
31275
|
template_effect(() => {
|
|
31275
|
-
set_text(text_2, get$2(
|
|
31276
|
-
if (option_2_value !== (option_2_value = get$2(
|
|
31277
|
-
option_2.value = (option_2.__value = get$2(
|
|
31276
|
+
set_text(text_2, get$2(option2).label);
|
|
31277
|
+
if (option_2_value !== (option_2_value = get$2(option2).value)) {
|
|
31278
|
+
option_2.value = (option_2.__value = get$2(option2).value) ?? "";
|
|
31278
31279
|
}
|
|
31279
31280
|
});
|
|
31280
31281
|
append($$anchor4, option_2);
|
|
@@ -31324,7 +31325,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31324
31325
|
var consequent_2 = ($$anchor3) => {
|
|
31325
31326
|
var fragment_5 = comment();
|
|
31326
31327
|
var node_8 = first_child(fragment_5);
|
|
31327
|
-
each(node_8, 17, () => field().options, index$1, ($$anchor4,
|
|
31328
|
+
each(node_8, 17, () => field().options, index$1, ($$anchor4, option2) => {
|
|
31328
31329
|
var label_4 = root_11$2();
|
|
31329
31330
|
var text_3 = child(label_4);
|
|
31330
31331
|
var input_3 = sibling(text_3);
|
|
@@ -31345,8 +31346,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31345
31346
|
reset(label_4);
|
|
31346
31347
|
template_effect(() => {
|
|
31347
31348
|
set_class(label_4, 1, clsx(labelClass()));
|
|
31348
|
-
set_attribute(label_4, "for", get$2(inputId) + get$2(
|
|
31349
|
-
set_text(text_3, `${get$2(
|
|
31349
|
+
set_attribute(label_4, "for", get$2(inputId) + get$2(option2));
|
|
31350
|
+
set_text(text_3, `${get$2(option2) ?? ""} `);
|
|
31350
31351
|
});
|
|
31351
31352
|
bind_value(input_3, () => field().value, ($$value) => field(field().value = $$value, true));
|
|
31352
31353
|
append($$anchor4, label_4);
|
|
@@ -33507,18 +33508,18 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33507
33508
|
var select = child(li_4);
|
|
33508
33509
|
select.__change = (e) => update(item(), e.target, details()?.ticketSelectionDetails);
|
|
33509
33510
|
each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max), (q) => q.value, ($$anchor3, q) => {
|
|
33510
|
-
var
|
|
33511
|
-
var text_4 = child(
|
|
33512
|
-
reset(
|
|
33511
|
+
var option2 = root_4();
|
|
33512
|
+
var text_4 = child(option2, true);
|
|
33513
|
+
reset(option2);
|
|
33513
33514
|
var option_value = {};
|
|
33514
33515
|
template_effect(() => {
|
|
33515
|
-
set_selected(
|
|
33516
|
+
set_selected(option2, item().quantity === get$2(q).value);
|
|
33516
33517
|
set_text(text_4, get$2(q).label);
|
|
33517
33518
|
if (option_value !== (option_value = get$2(q).value)) {
|
|
33518
|
-
|
|
33519
|
+
option2.value = (option2.__value = get$2(q).value) ?? "";
|
|
33519
33520
|
}
|
|
33520
33521
|
});
|
|
33521
|
-
append($$anchor3,
|
|
33522
|
+
append($$anchor3, option2);
|
|
33522
33523
|
});
|
|
33523
33524
|
reset(select);
|
|
33524
33525
|
reset(li_4);
|
|
@@ -4248,15 +4248,15 @@ function select_option(select, value, mounting = false) {
|
|
|
4248
4248
|
if (!is_array(value)) {
|
|
4249
4249
|
return select_multiple_invalid_value();
|
|
4250
4250
|
}
|
|
4251
|
-
for (var
|
|
4252
|
-
|
|
4251
|
+
for (var option2 of select.options) {
|
|
4252
|
+
option2.selected = value.includes(get_option_value(option2));
|
|
4253
4253
|
}
|
|
4254
4254
|
return;
|
|
4255
4255
|
}
|
|
4256
|
-
for (
|
|
4257
|
-
var option_value = get_option_value(
|
|
4256
|
+
for (option2 of select.options) {
|
|
4257
|
+
var option_value = get_option_value(option2);
|
|
4258
4258
|
if (is(option_value, value)) {
|
|
4259
|
-
|
|
4259
|
+
option2.selected = true;
|
|
4260
4260
|
return;
|
|
4261
4261
|
}
|
|
4262
4262
|
}
|
|
@@ -4325,11 +4325,11 @@ function bind_select_value(select, get2, set2 = get2) {
|
|
|
4325
4325
|
});
|
|
4326
4326
|
init_select(select);
|
|
4327
4327
|
}
|
|
4328
|
-
function get_option_value(
|
|
4329
|
-
if ("__value" in
|
|
4330
|
-
return
|
|
4328
|
+
function get_option_value(option2) {
|
|
4329
|
+
if ("__value" in option2) {
|
|
4330
|
+
return option2.__value;
|
|
4331
4331
|
} else {
|
|
4332
|
-
return
|
|
4332
|
+
return option2.value;
|
|
4333
4333
|
}
|
|
4334
4334
|
}
|
|
4335
4335
|
const CLASS = /* @__PURE__ */ Symbol("class");
|
|
@@ -6450,8 +6450,8 @@ let ZodType$1 = class ZodType {
|
|
|
6450
6450
|
promise() {
|
|
6451
6451
|
return ZodPromise.create(this, this._def);
|
|
6452
6452
|
}
|
|
6453
|
-
or(
|
|
6454
|
-
return ZodUnion$1.create([this,
|
|
6453
|
+
or(option2) {
|
|
6454
|
+
return ZodUnion$1.create([this, option2], this._def);
|
|
6455
6455
|
}
|
|
6456
6456
|
and(incoming) {
|
|
6457
6457
|
return ZodIntersection$1.create(this, incoming, this._def);
|
|
@@ -8213,7 +8213,7 @@ let ZodUnion$1 = class ZodUnion extends ZodType$1 {
|
|
|
8213
8213
|
return INVALID;
|
|
8214
8214
|
}
|
|
8215
8215
|
if (ctx.common.async) {
|
|
8216
|
-
return Promise.all(options.map(async (
|
|
8216
|
+
return Promise.all(options.map(async (option2) => {
|
|
8217
8217
|
const childCtx = {
|
|
8218
8218
|
...ctx,
|
|
8219
8219
|
common: {
|
|
@@ -8223,7 +8223,7 @@ let ZodUnion$1 = class ZodUnion extends ZodType$1 {
|
|
|
8223
8223
|
parent: null
|
|
8224
8224
|
};
|
|
8225
8225
|
return {
|
|
8226
|
-
result: await
|
|
8226
|
+
result: await option2._parseAsync({
|
|
8227
8227
|
data: ctx.data,
|
|
8228
8228
|
path: ctx.path,
|
|
8229
8229
|
parent: childCtx
|
|
@@ -8234,7 +8234,7 @@ let ZodUnion$1 = class ZodUnion extends ZodType$1 {
|
|
|
8234
8234
|
} else {
|
|
8235
8235
|
let dirty = void 0;
|
|
8236
8236
|
const issues = [];
|
|
8237
|
-
for (const
|
|
8237
|
+
for (const option2 of options) {
|
|
8238
8238
|
const childCtx = {
|
|
8239
8239
|
...ctx,
|
|
8240
8240
|
common: {
|
|
@@ -8243,7 +8243,7 @@ let ZodUnion$1 = class ZodUnion extends ZodType$1 {
|
|
|
8243
8243
|
},
|
|
8244
8244
|
parent: null
|
|
8245
8245
|
};
|
|
8246
|
-
const result =
|
|
8246
|
+
const result = option2._parseSync({
|
|
8247
8247
|
data: ctx.data,
|
|
8248
8248
|
path: ctx.path,
|
|
8249
8249
|
parent: childCtx
|
|
@@ -8324,8 +8324,8 @@ class ZodDiscriminatedUnion extends ZodType$1 {
|
|
|
8324
8324
|
}
|
|
8325
8325
|
const discriminator = this.discriminator;
|
|
8326
8326
|
const discriminatorValue = ctx.data[discriminator];
|
|
8327
|
-
const
|
|
8328
|
-
if (!
|
|
8327
|
+
const option2 = this.optionsMap.get(discriminatorValue);
|
|
8328
|
+
if (!option2) {
|
|
8329
8329
|
addIssueToContext(ctx, {
|
|
8330
8330
|
code: ZodIssueCode.invalid_union_discriminator,
|
|
8331
8331
|
options: Array.from(this.optionsMap.keys()),
|
|
@@ -8334,13 +8334,13 @@ class ZodDiscriminatedUnion extends ZodType$1 {
|
|
|
8334
8334
|
return INVALID;
|
|
8335
8335
|
}
|
|
8336
8336
|
if (ctx.common.async) {
|
|
8337
|
-
return
|
|
8337
|
+
return option2._parseAsync({
|
|
8338
8338
|
data: ctx.data,
|
|
8339
8339
|
path: ctx.path,
|
|
8340
8340
|
parent: ctx
|
|
8341
8341
|
});
|
|
8342
8342
|
} else {
|
|
8343
|
-
return
|
|
8343
|
+
return option2._parseSync({
|
|
8344
8344
|
data: ctx.data,
|
|
8345
8345
|
path: ctx.path,
|
|
8346
8346
|
parent: ctx
|
|
@@ -14081,7 +14081,7 @@ const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
14081
14081
|
defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
|
|
14082
14082
|
defineLazy(inst._zod, "values", () => {
|
|
14083
14083
|
if (def.options.every((o) => o._zod.values)) {
|
|
14084
|
-
return new Set(def.options.flatMap((
|
|
14084
|
+
return new Set(def.options.flatMap((option2) => Array.from(option2._zod.values)));
|
|
14085
14085
|
}
|
|
14086
14086
|
return void 0;
|
|
14087
14087
|
});
|
|
@@ -14100,8 +14100,8 @@ const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
|
|
|
14100
14100
|
}
|
|
14101
14101
|
let async = false;
|
|
14102
14102
|
const results = [];
|
|
14103
|
-
for (const
|
|
14104
|
-
const result =
|
|
14103
|
+
for (const option2 of def.options) {
|
|
14104
|
+
const result = option2._zod.run({
|
|
14105
14105
|
value: payload.value,
|
|
14106
14106
|
issues: []
|
|
14107
14107
|
}, ctx);
|
|
@@ -15271,8 +15271,8 @@ function isTransforming(_schema, _ctx) {
|
|
|
15271
15271
|
return false;
|
|
15272
15272
|
}
|
|
15273
15273
|
if (def.type === "union") {
|
|
15274
|
-
for (const
|
|
15275
|
-
if (isTransforming(
|
|
15274
|
+
for (const option2 of def.options) {
|
|
15275
|
+
if (isTransforming(option2, ctx))
|
|
15276
15276
|
return true;
|
|
15277
15277
|
}
|
|
15278
15278
|
return false;
|
|
@@ -16857,23 +16857,24 @@ function Ticket($$anchor, $$props) {
|
|
|
16857
16857
|
return pop($$exports);
|
|
16858
16858
|
}
|
|
16859
16859
|
create_custom_element(Ticket, { cartItem: {} }, [], [], { mode: "open" });
|
|
16860
|
-
function generateQuantityOptions(
|
|
16861
|
-
|
|
16862
|
-
if (
|
|
16863
|
-
return
|
|
16860
|
+
function generateQuantityOptions(from, to, options = { floor: 0 }) {
|
|
16861
|
+
const { floor: floor2 } = options;
|
|
16862
|
+
if (to === 0 || to === floor2) {
|
|
16863
|
+
return [option(floor2)];
|
|
16864
16864
|
}
|
|
16865
|
-
if (
|
|
16866
|
-
|
|
16867
|
-
options = [];
|
|
16865
|
+
if (to < from) {
|
|
16866
|
+
return from > floor2 ? [option(from)] : [];
|
|
16868
16867
|
}
|
|
16869
|
-
|
|
16870
|
-
|
|
16871
|
-
|
|
16872
|
-
|
|
16873
|
-
|
|
16874
|
-
});
|
|
16868
|
+
const start = Math.max(from, floor2);
|
|
16869
|
+
const result = [option(floor2)];
|
|
16870
|
+
for (let q = start; q <= to; q++) {
|
|
16871
|
+
if (q === floor2) continue;
|
|
16872
|
+
result.push(option(q));
|
|
16875
16873
|
}
|
|
16876
|
-
return
|
|
16874
|
+
return result;
|
|
16875
|
+
}
|
|
16876
|
+
function option(value) {
|
|
16877
|
+
return { value, label: value.toString() };
|
|
16877
16878
|
}
|
|
16878
16879
|
var root_5$2 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
16879
16880
|
var root_7$3 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
@@ -16977,19 +16978,19 @@ function Item$1($$anchor, $$props) {
|
|
|
16977
16978
|
var alternate_1 = ($$anchor3) => {
|
|
16978
16979
|
var select = root_6$2();
|
|
16979
16980
|
select.__change = (e) => update(cartItem(), e.target);
|
|
16980
|
-
each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max), (q) => q.value, ($$anchor4, q) => {
|
|
16981
|
-
var
|
|
16982
|
-
var text_2 = child(
|
|
16983
|
-
reset(
|
|
16981
|
+
each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max, { floor: 1 }), (q) => q.value, ($$anchor4, q) => {
|
|
16982
|
+
var option2 = root_7$3();
|
|
16983
|
+
var text_2 = child(option2, true);
|
|
16984
|
+
reset(option2);
|
|
16984
16985
|
var option_value = {};
|
|
16985
16986
|
template_effect(() => {
|
|
16986
|
-
set_selected(
|
|
16987
|
+
set_selected(option2, cartItem().quantity === get$2(q).value);
|
|
16987
16988
|
set_text(text_2, get$2(q).label);
|
|
16988
16989
|
if (option_value !== (option_value = get$2(q).value)) {
|
|
16989
|
-
|
|
16990
|
+
option2.value = (option2.__value = get$2(q).value) ?? "";
|
|
16990
16991
|
}
|
|
16991
16992
|
});
|
|
16992
|
-
append($$anchor4,
|
|
16993
|
+
append($$anchor4, option2);
|
|
16993
16994
|
});
|
|
16994
16995
|
reset(select);
|
|
16995
16996
|
append($$anchor3, select);
|
|
@@ -17412,18 +17413,18 @@ function DonationSelector($$anchor, $$props) {
|
|
|
17412
17413
|
var text2 = child(h3, true);
|
|
17413
17414
|
reset(h3);
|
|
17414
17415
|
var div_1 = sibling(h3, 2);
|
|
17415
|
-
each(div_1, 20, () => goDonation.campaign?.options, (
|
|
17416
|
+
each(div_1, 20, () => goDonation.campaign?.options, (option2) => option2, ($$anchor2, option2) => {
|
|
17416
17417
|
var button = root_1$g();
|
|
17417
17418
|
let classes;
|
|
17418
|
-
button.__click = () => selectAmount(
|
|
17419
|
+
button.__click = () => selectAmount(option2);
|
|
17419
17420
|
var text_1 = child(button, true);
|
|
17420
17421
|
reset(button);
|
|
17421
17422
|
template_effect(
|
|
17422
17423
|
($0) => {
|
|
17423
|
-
classes = set_class(button, 1, "btn btn-default", null, classes, { selected: goDonation.amount ===
|
|
17424
|
+
classes = set_class(button, 1, "btn btn-default", null, classes, { selected: goDonation.amount === option2 });
|
|
17424
17425
|
set_text(text_1, $0);
|
|
17425
17426
|
},
|
|
17426
|
-
[() => currency(
|
|
17427
|
+
[() => currency(option2 / 100, shop.currency)]
|
|
17427
17428
|
);
|
|
17428
17429
|
append($$anchor2, button);
|
|
17429
17430
|
});
|
|
@@ -18797,9 +18798,9 @@ function createPropResolver(configOption, fallback) {
|
|
|
18797
18798
|
const propValue = getProp();
|
|
18798
18799
|
if (propValue !== void 0)
|
|
18799
18800
|
return propValue;
|
|
18800
|
-
const
|
|
18801
|
-
if (
|
|
18802
|
-
return
|
|
18801
|
+
const option2 = configOption(config2).current;
|
|
18802
|
+
if (option2 !== void 0)
|
|
18803
|
+
return option2;
|
|
18803
18804
|
return fallback;
|
|
18804
18805
|
});
|
|
18805
18806
|
};
|
|
@@ -31266,15 +31267,15 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
31266
31267
|
reset(option_1);
|
|
31267
31268
|
option_1.value = option_1.__value = "";
|
|
31268
31269
|
var node_5 = sibling(option_1, 2);
|
|
31269
|
-
each(node_5, 17, () => field().options(), index$1, ($$anchor4,
|
|
31270
|
+
each(node_5, 17, () => field().options(), index$1, ($$anchor4, option2) => {
|
|
31270
31271
|
var option_2 = root_7$2();
|
|
31271
31272
|
var text_2 = child(option_2, true);
|
|
31272
31273
|
reset(option_2);
|
|
31273
31274
|
var option_2_value = {};
|
|
31274
31275
|
template_effect(() => {
|
|
31275
|
-
set_text(text_2, get$2(
|
|
31276
|
-
if (option_2_value !== (option_2_value = get$2(
|
|
31277
|
-
option_2.value = (option_2.__value = get$2(
|
|
31276
|
+
set_text(text_2, get$2(option2).label);
|
|
31277
|
+
if (option_2_value !== (option_2_value = get$2(option2).value)) {
|
|
31278
|
+
option_2.value = (option_2.__value = get$2(option2).value) ?? "";
|
|
31278
31279
|
}
|
|
31279
31280
|
});
|
|
31280
31281
|
append($$anchor4, option_2);
|
|
@@ -31324,7 +31325,7 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
31324
31325
|
var consequent_2 = ($$anchor3) => {
|
|
31325
31326
|
var fragment_5 = comment();
|
|
31326
31327
|
var node_8 = first_child(fragment_5);
|
|
31327
|
-
each(node_8, 17, () => field().options, index$1, ($$anchor4,
|
|
31328
|
+
each(node_8, 17, () => field().options, index$1, ($$anchor4, option2) => {
|
|
31328
31329
|
var label_4 = root_11$2();
|
|
31329
31330
|
var text_3 = child(label_4);
|
|
31330
31331
|
var input_3 = sibling(text_3);
|
|
@@ -31345,8 +31346,8 @@ function InputAndLabel($$anchor, $$props) {
|
|
|
31345
31346
|
reset(label_4);
|
|
31346
31347
|
template_effect(() => {
|
|
31347
31348
|
set_class(label_4, 1, clsx(labelClass()));
|
|
31348
|
-
set_attribute(label_4, "for", get$2(inputId) + get$2(
|
|
31349
|
-
set_text(text_3, `${get$2(
|
|
31349
|
+
set_attribute(label_4, "for", get$2(inputId) + get$2(option2));
|
|
31350
|
+
set_text(text_3, `${get$2(option2) ?? ""} `);
|
|
31350
31351
|
});
|
|
31351
31352
|
bind_value(input_3, () => field().value, ($$value) => field(field().value = $$value, true));
|
|
31352
31353
|
append($$anchor4, label_4);
|
|
@@ -33507,18 +33508,18 @@ function Item($$anchor, $$props) {
|
|
|
33507
33508
|
var select = child(li_4);
|
|
33508
33509
|
select.__change = (e) => update(item(), e.target, details()?.ticketSelectionDetails);
|
|
33509
33510
|
each(select, 21, () => generateQuantityOptions(get$2(capacity).min, get$2(capacity).max), (q) => q.value, ($$anchor3, q) => {
|
|
33510
|
-
var
|
|
33511
|
-
var text_4 = child(
|
|
33512
|
-
reset(
|
|
33511
|
+
var option2 = root_4();
|
|
33512
|
+
var text_4 = child(option2, true);
|
|
33513
|
+
reset(option2);
|
|
33513
33514
|
var option_value = {};
|
|
33514
33515
|
template_effect(() => {
|
|
33515
|
-
set_selected(
|
|
33516
|
+
set_selected(option2, item().quantity === get$2(q).value);
|
|
33516
33517
|
set_text(text_4, get$2(q).label);
|
|
33517
33518
|
if (option_value !== (option_value = get$2(q).value)) {
|
|
33518
|
-
|
|
33519
|
+
option2.value = (option2.__value = get$2(q).value) ?? "";
|
|
33519
33520
|
}
|
|
33520
33521
|
});
|
|
33521
|
-
append($$anchor3,
|
|
33522
|
+
append($$anchor3, option2);
|
|
33522
33523
|
});
|
|
33523
33524
|
reset(select);
|
|
33524
33525
|
reset(li_4);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|