@wix/form-public 0.204.0 → 0.206.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.
package/dist/index.cjs CHANGED
@@ -536,6 +536,7 @@ var init_types_impl = __esm({
536
536
  UploadFileFormat4["AUDIO"] = "AUDIO";
537
537
  UploadFileFormat4["DOCUMENT"] = "DOCUMENT";
538
538
  UploadFileFormat4["ARCHIVE"] = "ARCHIVE";
539
+ UploadFileFormat4["MODEL_3D"] = "MODEL_3D";
539
540
  })(UploadFileFormat || (UploadFileFormat = {}));
540
541
  (function(InputFieldPaymentComponentType3) {
541
542
  InputFieldPaymentComponentType3["UNKNOWN_COMPONENT_TYPE"] = "UNKNOWN_COMPONENT_TYPE";
@@ -5094,6 +5095,451 @@ var init_max = __esm({
5094
5095
  }
5095
5096
  });
5096
5097
 
5098
+ // ../../node_modules/@wix/sdk-context/build/browser/index.mjs
5099
+ var wixContext;
5100
+ var init_browser = __esm({
5101
+ "../../node_modules/@wix/sdk-context/build/browser/index.mjs"() {
5102
+ wixContext = {};
5103
+ }
5104
+ });
5105
+
5106
+ // ../../node_modules/@wix/sdk-runtime/build/context-v2.js
5107
+ function contextualizeRESTModuleV2(restModule, elevated) {
5108
+ return ((...args) => {
5109
+ const context = resolveContext();
5110
+ if (!context) {
5111
+ return restModule.apply(void 0, args);
5112
+ }
5113
+ return context.initWixModules(restModule, elevated).apply(void 0, args);
5114
+ });
5115
+ }
5116
+ var init_context_v2 = __esm({
5117
+ "../../node_modules/@wix/sdk-runtime/build/context-v2.js"() {
5118
+ init_context();
5119
+ }
5120
+ });
5121
+
5122
+ // ../../node_modules/@wix/sdk-runtime/build/context.js
5123
+ function resolveContext() {
5124
+ const oldContext = typeof $wixContext !== "undefined" && $wixContext.initWixModules ? $wixContext.initWixModules : typeof globalThis.__wix_context__ !== "undefined" && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
5125
+ if (oldContext) {
5126
+ return {
5127
+ // @ts-expect-error
5128
+ initWixModules(modules, elevated) {
5129
+ return runWithoutContext(() => oldContext(modules, elevated));
5130
+ },
5131
+ fetchWithAuth() {
5132
+ throw new Error("fetchWithAuth is not available in this context");
5133
+ },
5134
+ graphql() {
5135
+ throw new Error("graphql is not available in this context");
5136
+ }
5137
+ };
5138
+ }
5139
+ const contextualClient = typeof $wixContext !== "undefined" ? $wixContext.client : typeof wixContext.client !== "undefined" ? wixContext.client : typeof globalThis.__wix_context__ !== "undefined" ? globalThis.__wix_context__.client : void 0;
5140
+ const elevatedClient = typeof $wixContext !== "undefined" ? $wixContext.elevatedClient : typeof wixContext.elevatedClient !== "undefined" ? wixContext.elevatedClient : typeof globalThis.__wix_context__ !== "undefined" ? globalThis.__wix_context__.elevatedClient : void 0;
5141
+ if (!contextualClient && !elevatedClient) {
5142
+ return;
5143
+ }
5144
+ return {
5145
+ initWixModules(wixModules, elevated) {
5146
+ if (elevated) {
5147
+ if (!elevatedClient) {
5148
+ throw new Error("An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules");
5149
+ }
5150
+ return runWithoutContext(() => elevatedClient.use(wixModules));
5151
+ }
5152
+ if (!contextualClient) {
5153
+ throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
5154
+ }
5155
+ return runWithoutContext(() => contextualClient.use(wixModules));
5156
+ },
5157
+ fetchWithAuth: (urlOrRequest, requestInit) => {
5158
+ if (!contextualClient) {
5159
+ throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
5160
+ }
5161
+ return contextualClient.fetchWithAuth(urlOrRequest, requestInit);
5162
+ },
5163
+ getAuth() {
5164
+ if (!contextualClient) {
5165
+ throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
5166
+ }
5167
+ return contextualClient.auth;
5168
+ },
5169
+ async graphql(query, variables, opts) {
5170
+ if (!contextualClient) {
5171
+ throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
5172
+ }
5173
+ return contextualClient.graphql(query, variables, opts);
5174
+ }
5175
+ };
5176
+ }
5177
+ function runWithoutContext(fn) {
5178
+ const globalContext = globalThis.__wix_context__;
5179
+ const moduleContext = {
5180
+ client: wixContext.client,
5181
+ elevatedClient: wixContext.elevatedClient
5182
+ };
5183
+ let closureContext;
5184
+ globalThis.__wix_context__ = void 0;
5185
+ wixContext.client = void 0;
5186
+ wixContext.elevatedClient = void 0;
5187
+ if (typeof $wixContext !== "undefined") {
5188
+ closureContext = {
5189
+ client: $wixContext?.client,
5190
+ elevatedClient: $wixContext?.elevatedClient
5191
+ };
5192
+ delete $wixContext.client;
5193
+ delete $wixContext.elevatedClient;
5194
+ }
5195
+ try {
5196
+ return fn();
5197
+ } finally {
5198
+ globalThis.__wix_context__ = globalContext;
5199
+ wixContext.client = moduleContext.client;
5200
+ wixContext.elevatedClient = moduleContext.elevatedClient;
5201
+ if (typeof $wixContext !== "undefined") {
5202
+ $wixContext.client = closureContext.client;
5203
+ $wixContext.elevatedClient = closureContext.elevatedClient;
5204
+ }
5205
+ }
5206
+ }
5207
+ var init_context = __esm({
5208
+ "../../node_modules/@wix/sdk-runtime/build/context.js"() {
5209
+ init_browser();
5210
+ init_context_v2();
5211
+ }
5212
+ });
5213
+
5214
+ // ../../node_modules/@wix/sdk-runtime/build/constants.js
5215
+ var SDKRequestToRESTRequestRenameMap, RESTResponseToSDKResponseRenameMap;
5216
+ var init_constants = __esm({
5217
+ "../../node_modules/@wix/sdk-runtime/build/constants.js"() {
5218
+ SDKRequestToRESTRequestRenameMap = {
5219
+ _id: "id",
5220
+ _createdDate: "createdDate",
5221
+ _updatedDate: "updatedDate"
5222
+ };
5223
+ RESTResponseToSDKResponseRenameMap = {
5224
+ id: "_id",
5225
+ createdDate: "_createdDate",
5226
+ updatedDate: "_updatedDate"
5227
+ };
5228
+ }
5229
+ });
5230
+
5231
+ // ../../node_modules/@wix/sdk-runtime/build/utils.js
5232
+ function removeUndefinedKeys(obj) {
5233
+ return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== void 0));
5234
+ }
5235
+ function constantCase(input) {
5236
+ return split(input).map((part) => part.toLocaleUpperCase()).join("_");
5237
+ }
5238
+ function split(value) {
5239
+ let result2 = value.trim();
5240
+ result2 = result2.replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE).replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);
5241
+ result2 = result2.replace(DEFAULT_STRIP_REGEXP, "\0");
5242
+ let start = 0;
5243
+ let end = result2.length;
5244
+ while (result2.charAt(start) === "\0") {
5245
+ start++;
5246
+ }
5247
+ if (start === end) {
5248
+ return [];
5249
+ }
5250
+ while (result2.charAt(end - 1) === "\0") {
5251
+ end--;
5252
+ }
5253
+ return result2.slice(start, end).split(/\0/g);
5254
+ }
5255
+ var SPLIT_LOWER_UPPER_RE, SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE, DEFAULT_STRIP_REGEXP;
5256
+ var init_utils2 = __esm({
5257
+ "../../node_modules/@wix/sdk-runtime/build/utils.js"() {
5258
+ SPLIT_LOWER_UPPER_RE = /([\p{Ll}\d])(\p{Lu})/gu;
5259
+ SPLIT_UPPER_UPPER_RE = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
5260
+ SPLIT_REPLACE_VALUE = "$1\0$2";
5261
+ DEFAULT_STRIP_REGEXP = /[^\p{L}\d]+/giu;
5262
+ }
5263
+ });
5264
+
5265
+ // ../../node_modules/@wix/sdk-runtime/build/transform-error.js
5266
+ function transformError(httpClientError, pathsToArguments = {
5267
+ explicitPathsToArguments: {},
5268
+ spreadPathsToArguments: {},
5269
+ singleArgumentUnchanged: false
5270
+ }, argumentNames = []) {
5271
+ if (typeof httpClientError !== "object" || httpClientError === null) {
5272
+ throw httpClientError;
5273
+ }
5274
+ if (isValidationError(httpClientError)) {
5275
+ return buildValidationError(httpClientError, pathsToArguments, argumentNames);
5276
+ }
5277
+ if (isApplicationError(httpClientError)) {
5278
+ return buildApplicationError(httpClientError);
5279
+ }
5280
+ if (isClientError(httpClientError)) {
5281
+ const status = httpClientError.response?.status;
5282
+ const statusText = httpClientError.response?.statusText ?? "UNKNOWN";
5283
+ const message = httpClientError.response?.data?.message ?? statusText;
5284
+ const details = {
5285
+ applicationError: {
5286
+ description: statusText,
5287
+ code: constantCase(statusText),
5288
+ data: {}
5289
+ },
5290
+ requestId: httpClientError.requestId
5291
+ };
5292
+ return wrapError(httpClientError, {
5293
+ message: JSON.stringify({
5294
+ message,
5295
+ details
5296
+ }, null, 2),
5297
+ extraProperties: {
5298
+ details,
5299
+ status
5300
+ }
5301
+ });
5302
+ }
5303
+ return buildSystemError(httpClientError);
5304
+ }
5305
+ var isValidationError, isApplicationError, isClientError, buildValidationError, wrapError, buildApplicationError, buildSystemError, violationsWithRenamedFields, withRenamedArgument, getArgumentIndex;
5306
+ var init_transform_error = __esm({
5307
+ "../../node_modules/@wix/sdk-runtime/build/transform-error.js"() {
5308
+ init_utils2();
5309
+ isValidationError = (httpClientError) => "validationError" in (httpClientError.response?.data?.details ?? {});
5310
+ isApplicationError = (httpClientError) => "applicationError" in (httpClientError.response?.data?.details ?? {});
5311
+ isClientError = (httpClientError) => (httpClientError.response?.status ?? -1) >= 400 && (httpClientError.response?.status ?? -1) < 500;
5312
+ buildValidationError = (httpClientError, pathsToArguments, argumentNames) => {
5313
+ const validationErrorResponse = httpClientError.response?.data;
5314
+ const requestId = httpClientError.requestId;
5315
+ const { fieldViolations } = validationErrorResponse.details.validationError;
5316
+ const transformedFieldViolations = violationsWithRenamedFields(pathsToArguments, fieldViolations, argumentNames)?.sort((a, b) => a.field < b.field ? -1 : 1);
5317
+ const message = `INVALID_ARGUMENT: ${transformedFieldViolations?.map(({ field, description }) => `"${field}" ${description}`)?.join(", ")}`;
5318
+ const details = {
5319
+ validationError: { fieldViolations: transformedFieldViolations },
5320
+ requestId
5321
+ };
5322
+ return wrapError(httpClientError, {
5323
+ message: JSON.stringify({ message, details }, null, 2),
5324
+ extraProperties: {
5325
+ details,
5326
+ status: httpClientError.response?.status,
5327
+ requestId
5328
+ }
5329
+ });
5330
+ };
5331
+ wrapError = (baseError, { message, extraProperties }) => {
5332
+ return Object.assign(baseError, {
5333
+ ...extraProperties,
5334
+ message
5335
+ });
5336
+ };
5337
+ buildApplicationError = (httpClientError) => {
5338
+ const status = httpClientError.response?.status;
5339
+ const statusText = httpClientError.response?.statusText ?? "UNKNOWN";
5340
+ const message = httpClientError.response?.data?.message ?? statusText;
5341
+ const description = httpClientError.response?.data?.details?.applicationError?.description ?? statusText;
5342
+ const code = httpClientError.response?.data?.details?.applicationError?.code ?? constantCase(statusText);
5343
+ const data = httpClientError.response?.data?.details?.applicationError?.data ?? {};
5344
+ const combinedMessage = message === description ? message : `${message}: ${description}`;
5345
+ const details = {
5346
+ applicationError: {
5347
+ description,
5348
+ code,
5349
+ data
5350
+ },
5351
+ requestId: httpClientError.requestId
5352
+ };
5353
+ return wrapError(httpClientError, {
5354
+ message: JSON.stringify({ message: combinedMessage, details }, null, 2),
5355
+ extraProperties: {
5356
+ details,
5357
+ status,
5358
+ requestId: httpClientError.requestId
5359
+ }
5360
+ });
5361
+ };
5362
+ buildSystemError = (httpClientError) => {
5363
+ const message = httpClientError.requestId ? `System error occurred, request-id: ${httpClientError.requestId}` : `System error occurred: ${JSON.stringify(httpClientError)}`;
5364
+ return wrapError(httpClientError, {
5365
+ message,
5366
+ extraProperties: {
5367
+ requestId: httpClientError.requestId,
5368
+ status: httpClientError.response?.status,
5369
+ code: constantCase(httpClientError.response?.statusText ?? "UNKNOWN"),
5370
+ ...!httpClientError.response && {
5371
+ runtimeError: httpClientError
5372
+ }
5373
+ }
5374
+ });
5375
+ };
5376
+ violationsWithRenamedFields = ({ spreadPathsToArguments, explicitPathsToArguments, singleArgumentUnchanged }, fieldViolations, argumentNames) => {
5377
+ const allPathsToArguments = {
5378
+ ...spreadPathsToArguments,
5379
+ ...explicitPathsToArguments
5380
+ };
5381
+ const allPathsToArgumentsKeys = Object.keys(allPathsToArguments);
5382
+ return fieldViolations?.filter((fieldViolation) => {
5383
+ const containedInAMoreSpecificViolationField = fieldViolations.some((anotherViolation) => anotherViolation.field.length > fieldViolation.field.length && anotherViolation.field.startsWith(fieldViolation.field) && allPathsToArgumentsKeys.includes(anotherViolation.field));
5384
+ return !containedInAMoreSpecificViolationField;
5385
+ }).map((fieldViolation) => {
5386
+ const exactMatchArgumentExpression = explicitPathsToArguments[fieldViolation.field];
5387
+ if (exactMatchArgumentExpression) {
5388
+ return {
5389
+ ...fieldViolation,
5390
+ field: withRenamedArgument(exactMatchArgumentExpression, argumentNames)
5391
+ };
5392
+ }
5393
+ const longestPartialPathMatch = allPathsToArgumentsKeys?.sort((a, b) => b.length - a.length)?.find((path) => fieldViolation.field.startsWith(path));
5394
+ if (longestPartialPathMatch) {
5395
+ const partialMatchArgumentExpression = allPathsToArguments[longestPartialPathMatch];
5396
+ if (partialMatchArgumentExpression) {
5397
+ return {
5398
+ ...fieldViolation,
5399
+ field: fieldViolation.field.replace(longestPartialPathMatch, withRenamedArgument(partialMatchArgumentExpression, argumentNames))
5400
+ };
5401
+ }
5402
+ }
5403
+ if (singleArgumentUnchanged) {
5404
+ return {
5405
+ ...fieldViolation,
5406
+ field: `${argumentNames[0]}.${fieldViolation.field}`
5407
+ };
5408
+ }
5409
+ return fieldViolation;
5410
+ });
5411
+ };
5412
+ withRenamedArgument = (fieldValue, argumentNames) => {
5413
+ const argIndex = getArgumentIndex(fieldValue);
5414
+ if (argIndex !== null && typeof argIndex !== "undefined") {
5415
+ return fieldValue.replace(`$[${argIndex}]`, argumentNames[argIndex]);
5416
+ }
5417
+ return fieldValue;
5418
+ };
5419
+ getArgumentIndex = (s) => {
5420
+ const match = s.match(/\$\[(?<argIndex>\d+)\]/);
5421
+ return match && match.groups && Number(match.groups.argIndex);
5422
+ };
5423
+ }
5424
+ });
5425
+
5426
+ // ../../node_modules/@wix/sdk-runtime/build/rest-modules.js
5427
+ function createRESTModule(descriptor, elevated = false) {
5428
+ return contextualizeRESTModuleV2(descriptor, elevated);
5429
+ }
5430
+ function toURLSearchParams(params, isComplexRequest) {
5431
+ const flatten = flattenParams(params);
5432
+ Object.entries(flatten).some(([key, value]) => key.includes(".") || Array.isArray(value) && value.some((v) => typeof v === "object"));
5433
+ {
5434
+ return Object.entries(flatten).reduce((urlSearchParams, [key, value]) => {
5435
+ const keyParams = Array.isArray(value) ? value : [value];
5436
+ keyParams.forEach((param) => {
5437
+ if (param === void 0 || param === null || Array.isArray(value) && typeof param === "object") {
5438
+ return;
5439
+ }
5440
+ urlSearchParams.append(key, param);
5441
+ });
5442
+ return urlSearchParams;
5443
+ }, new URLSearchParams());
5444
+ }
5445
+ }
5446
+ function resolveUrl(opts) {
5447
+ const domain = resolveDomain(opts.host);
5448
+ const mappings = resolveMappingsByDomain(domain, opts.domainToMappings);
5449
+ const path = injectDataIntoProtoPath(opts.protoPath, opts.data || {});
5450
+ return resolvePathFromMappings(path, mappings);
5451
+ }
5452
+ function flattenParams(data, path = "") {
5453
+ const params = {};
5454
+ Object.entries(data).forEach(([key, value]) => {
5455
+ const isObject5 = value !== null && typeof value === "object" && !Array.isArray(value);
5456
+ const fieldPath = resolvePath(path, key);
5457
+ if (isObject5) {
5458
+ const serializedObject = flattenParams(value, fieldPath);
5459
+ Object.assign(params, serializedObject);
5460
+ } else {
5461
+ params[fieldPath] = value;
5462
+ }
5463
+ });
5464
+ return params;
5465
+ }
5466
+ function resolvePath(path, key) {
5467
+ return `${path}${path ? "." : ""}${key}`;
5468
+ }
5469
+ function resolveDomain(host) {
5470
+ const resolvedHost = fixHostExceptions(host);
5471
+ return resolvedHost.replace(REGEX_CAPTURE_DOMAINS, "._base_domain_").replace(REGEX_CAPTURE_API_DOMAINS, "._api_base_domain_").replace(REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN, "*.dev.wix-code.com");
5472
+ }
5473
+ function fixHostExceptions(host) {
5474
+ return host.replace("create.editorx.com", "editor.editorx.com");
5475
+ }
5476
+ function resolveMappingsByDomain(domain, domainToMappings) {
5477
+ const mappings = domainToMappings[domain] || domainToMappings[USER_DOMAIN];
5478
+ if (mappings) {
5479
+ return mappings;
5480
+ }
5481
+ const rootDomainMappings = resolveRootDomain(domain, domainToMappings);
5482
+ if (!rootDomainMappings) {
5483
+ if (isBaseDomain(domain)) {
5484
+ return domainToMappings[wwwBaseDomain];
5485
+ }
5486
+ }
5487
+ return rootDomainMappings ?? [];
5488
+ }
5489
+ function resolveRootDomain(domain, domainToMappings) {
5490
+ return Object.entries(domainToMappings).find(([entryDomain]) => {
5491
+ const [, ...rooDomainSegments] = domain.split(".");
5492
+ return rooDomainSegments.join(".") === entryDomain;
5493
+ })?.[1];
5494
+ }
5495
+ function isBaseDomain(domain) {
5496
+ return !!domain.match(/\._base_domain_$/);
5497
+ }
5498
+ function injectDataIntoProtoPath(protoPath, data) {
5499
+ return protoPath.split("/").map((path) => maybeProtoPathToData(path, data)).join("/");
5500
+ }
5501
+ function maybeProtoPathToData(protoPath, data) {
5502
+ const protoRegExpMatch = protoPath.match(REGEX_CAPTURE_PROTO_FIELD) || [];
5503
+ const field = protoRegExpMatch[1];
5504
+ if (field) {
5505
+ const suffix = protoPath.replace(protoRegExpMatch[0], "");
5506
+ return findByPath(data, field, protoPath, suffix);
5507
+ }
5508
+ return protoPath;
5509
+ }
5510
+ function findByPath(obj, path, defaultValue, suffix) {
5511
+ let result2 = obj;
5512
+ for (const field of path.split(".")) {
5513
+ if (!result2) {
5514
+ return defaultValue;
5515
+ }
5516
+ result2 = result2[field];
5517
+ }
5518
+ return `${result2}${suffix}`;
5519
+ }
5520
+ function resolvePathFromMappings(protoPath, mappings) {
5521
+ const mapping = mappings?.find((m) => protoPath.startsWith(m.destPath));
5522
+ if (!mapping) {
5523
+ return protoPath;
5524
+ }
5525
+ return mapping.srcPath + protoPath.slice(mapping.destPath.length);
5526
+ }
5527
+ var DOMAINS, USER_DOMAIN, REGEX_CAPTURE_DOMAINS, WIX_API_DOMAINS, DEV_WIX_CODE_DOMAIN, REGEX_CAPTURE_PROTO_FIELD, REGEX_CAPTURE_API_DOMAINS, REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN, wwwBaseDomain;
5528
+ var init_rest_modules = __esm({
5529
+ "../../node_modules/@wix/sdk-runtime/build/rest-modules.js"() {
5530
+ init_context_v2();
5531
+ DOMAINS = ["wix.com", "editorx.com"];
5532
+ USER_DOMAIN = "_";
5533
+ REGEX_CAPTURE_DOMAINS = new RegExp(`\\.(${DOMAINS.join("|")})$`);
5534
+ WIX_API_DOMAINS = ["42.wixprod.net", "uw2-edt-1.wixprod.net"];
5535
+ DEV_WIX_CODE_DOMAIN = "dev.wix-code.com";
5536
+ REGEX_CAPTURE_PROTO_FIELD = /{(.*)}/;
5537
+ REGEX_CAPTURE_API_DOMAINS = new RegExp(`\\.(${WIX_API_DOMAINS.join("|")})$`);
5538
+ REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN = new RegExp(`.*\\.${DEV_WIX_CODE_DOMAIN}$`);
5539
+ wwwBaseDomain = "www._base_domain_";
5540
+ }
5541
+ });
5542
+
5097
5543
  // ../../node_modules/@wix/ambassador-forms-v1-validation-result/es/build/types.impl.js
5098
5544
  var ErrorType, Format2, DayOfWeek2, ValidationFormat2, ProductType2, PriceType2, FieldFieldType2, StringTypeFormatEnumFormat2, InputFieldStringComponentType2, NodeType2, WidthType2, PluginContainerDataAlignment2, Type2, Target2, TextAlignment2, LineStyle2, Width2, Alignment2, ViewMode2, LayoutType2, Orientation2, Crop2, ThumbnailsAlignment2, GIFType2, Source2, Position2, MapType3, ViewRole2, VoteRole2, PollLayoutType2, PollLayoutDirection2, BackgroundType2, DecorationType2, FontType2, ImageStylesPosition2, AspectRatio2, Resizing2, Placement2, CardStylesType2, CardStylesAlignment2, CardStylesLayout2, AppType2, InitialExpandedItems2, Direction2, VerticalAlignment2, NullValue2, Scaling2, LayoutDataImagePosition2, Origin2, VerticalAlignmentAlignment2, ResponsivenessBehaviour2, DesignTarget2, ImagePosition2, AlignmentEnumAlignment2, ImageFit2, NumberOfColumns2, FirstDayOfWeekEnumFirstDayOfWeek2, InputFieldNumberComponentType2, InputFieldBooleanComponentType2, ArrayItemsItemType2, PropertiesTypePropertiesTypeEnum2, ArrayComponentType2, InputFieldWixFileComponentType2, UploadFileFormat2, InputFieldPaymentComponentType2, AddressComponentType2, DefaultCountryConfigType2, ObjectArrayComponentType2, InputFieldSchedulingComponentType2, AppointmentFormat2, MeetingType2, StaffStrategySelection2, InputFieldInputType2, FormFieldContactInfoEmailInfoTag2, FormFieldContactInfoPhoneInfoTag2, AddressInfoTag2, ConfirmationLevel2, SubscriptionChannel2, FormFieldContactInfoContactField2, DisplayFieldDisplayFieldType2, OverrideEntityType2, Kind2, EmailInfoTag2, PhoneInfoTag2, Tag2, OptInLevel2, ContactField2, SpamFilterProtectionLevel2, RequiredIndicator2, RequiredIndicatorPlacement2, UrlTargetEnumTarget2, SubmitSuccessAction2, ChangeableProperty2, OverrideEntityTypeEnumOverrideEntityType2, Operator2, ResultsDisplay2, ContactAutofill2, ValidationMode, Feature, AscendPlan, ActionType;
5099
5545
  var init_types_impl2 = __esm({
@@ -14170,7 +14616,7 @@ var init_getPossibleCountriesForNumber = __esm({
14170
14616
 
14171
14617
  // ../../node_modules/libphonenumber-js/es6/constants.js
14172
14618
  var MIN_LENGTH_FOR_NSN, MAX_LENGTH_FOR_NSN, MAX_LENGTH_COUNTRY_CODE, VALID_DIGITS, DASHES, SLASHES, DOTS, WHITESPACE, BRACKETS, TILDES, VALID_PUNCTUATION, PLUS_CHARS;
14173
- var init_constants = __esm({
14619
+ var init_constants2 = __esm({
14174
14620
  "../../node_modules/libphonenumber-js/es6/constants.js"() {
14175
14621
  MIN_LENGTH_FOR_NSN = 2;
14176
14622
  MAX_LENGTH_FOR_NSN = 17;
@@ -14211,7 +14657,7 @@ var CAPTURING_DIGIT_PATTERN;
14211
14657
  var init_stripIddPrefix = __esm({
14212
14658
  "../../node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js"() {
14213
14659
  init_metadata();
14214
- init_constants();
14660
+ init_constants2();
14215
14661
  CAPTURING_DIGIT_PATTERN = new RegExp("([" + VALID_DIGITS + "])");
14216
14662
  }
14217
14663
  });
@@ -14484,7 +14930,7 @@ var init_extractCountryCallingCode = __esm({
14484
14930
  init_stripIddPrefix();
14485
14931
  init_extractCountryCallingCodeFromInternationalNumberWithoutPlusSign();
14486
14932
  init_metadata();
14487
- init_constants();
14933
+ init_constants2();
14488
14934
  }
14489
14935
  });
14490
14936
 
@@ -14494,7 +14940,7 @@ function applyInternationalSeparatorStyle(formattedNumber) {
14494
14940
  }
14495
14941
  var init_applyInternationalSeparatorStyle = __esm({
14496
14942
  "../../node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js"() {
14497
- init_constants();
14943
+ init_constants2();
14498
14944
  }
14499
14945
  });
14500
14946
 
@@ -14574,7 +15020,7 @@ function createExtensionPattern(purpose) {
14574
15020
  var RFC3966_EXTN_PREFIX, getExtensionDigitsPattern;
14575
15021
  var init_createExtensionPattern = __esm({
14576
15022
  "../../node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js"() {
14577
- init_constants();
15023
+ init_constants2();
14578
15024
  RFC3966_EXTN_PREFIX = ";ext=";
14579
15025
  getExtensionDigitsPattern = function getExtensionDigitsPattern2(maxLength) {
14580
15026
  return "([".concat(VALID_DIGITS, "]{1,").concat(maxLength, "})");
@@ -14592,7 +15038,7 @@ function isViablePhoneNumberStart(number) {
14592
15038
  var MIN_LENGTH_PHONE_NUMBER_PATTERN, VALID_PHONE_NUMBER, VALID_PHONE_NUMBER_START_REG_EXP, VALID_PHONE_NUMBER_WITH_EXTENSION, VALID_PHONE_NUMBER_PATTERN;
14593
15039
  var init_isViablePhoneNumber = __esm({
14594
15040
  "../../node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js"() {
14595
- init_constants();
15041
+ init_constants2();
14596
15042
  init_createExtensionPattern();
14597
15043
  MIN_LENGTH_PHONE_NUMBER_PATTERN = "[" + VALID_DIGITS + "]{" + MIN_LENGTH_FOR_NSN + "}";
14598
15044
  VALID_PHONE_NUMBER = "[" + PLUS_CHARS + "]{0,1}(?:[" + VALID_PUNCTUATION + "]*[" + VALID_DIGITS + "]){3,}[" + VALID_PUNCTUATION + VALID_DIGITS + "]*";
@@ -15304,7 +15750,7 @@ function isPhoneContextValid(phoneContext) {
15304
15750
  var PLUS_SIGN, RFC3966_VISUAL_SEPARATOR_, RFC3966_PHONE_DIGIT_, RFC3966_GLOBAL_NUMBER_DIGITS_, RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_, ALPHANUM_, RFC3966_DOMAINLABEL_, VALID_ALPHA_, RFC3966_TOPLABEL_, RFC3966_DOMAINNAME_, RFC3966_DOMAINNAME_PATTERN_, RFC3966_PREFIX_, RFC3966_PHONE_CONTEXT_, RFC3966_ISDN_SUBADDRESS_;
15305
15751
  var init_extractPhoneContext = __esm({
15306
15752
  "../../node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js"() {
15307
- init_constants();
15753
+ init_constants2();
15308
15754
  PLUS_SIGN = "+";
15309
15755
  RFC3966_VISUAL_SEPARATOR_ = "[\\-\\.\\(\\)]?";
15310
15756
  RFC3966_PHONE_DIGIT_ = "([" + VALID_DIGITS + "]|" + RFC3966_VISUAL_SEPARATOR_ + ")";
@@ -15529,7 +15975,7 @@ function parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCo
15529
15975
  var MAX_INPUT_STRING_LENGTH, PHONE_NUMBER_START_PATTERN, AFTER_PHONE_NUMBER_END_PATTERN, USE_NON_GEOGRAPHIC_COUNTRY_CODE3;
15530
15976
  var init_parse = __esm({
15531
15977
  "../../node_modules/libphonenumber-js/es6/parse.js"() {
15532
- init_constants();
15978
+ init_constants2();
15533
15979
  init_ParseError();
15534
15980
  init_metadata();
15535
15981
  init_isViablePhoneNumber();
@@ -16680,7 +17126,7 @@ var init_AsYouTypeFormatter = __esm({
16680
17126
  init_parseDigits();
16681
17127
  init_AsYouTypeFormatter_util();
16682
17128
  init_formatNationalNumberUsingFormat();
16683
- init_constants();
17129
+ init_constants2();
16684
17130
  init_applyInternationalSeparatorStyle();
16685
17131
  DUMMY_DIGIT = "9";
16686
17132
  LONGEST_NATIONAL_PHONE_NUMBER_LENGTH = 15;
@@ -17124,7 +17570,7 @@ var init_AsYouTypeParser = __esm({
17124
17570
  init_extractNationalNumberFromPossiblyIncompleteNumber();
17125
17571
  init_stripIddPrefix();
17126
17572
  init_parseDigits();
17127
- init_constants();
17573
+ init_constants2();
17128
17574
  VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART = "[" + VALID_PUNCTUATION + VALID_DIGITS + "]+";
17129
17575
  VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN = new RegExp("^" + VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART + "$", "i");
17130
17576
  VALID_FORMATTED_PHONE_NUMBER_PART = "(?:[" + PLUS_CHARS + "][" + VALID_PUNCTUATION + VALID_DIGITS + "]*|[" + VALID_PUNCTUATION + VALID_DIGITS + "]+)";
@@ -20675,7 +21121,7 @@ var init_esm2 = __esm({
20675
21121
 
20676
21122
  // ../form-multiline-address/dist/esm/lib/constants.js
20677
21123
  var ADDRESS_FORM_ID_BY_COUNTRY, DEFAULT_COUNTRY;
20678
- var init_constants2 = __esm({
21124
+ var init_constants3 = __esm({
20679
21125
  "../form-multiline-address/dist/esm/lib/constants.js"() {
20680
21126
  ADDRESS_FORM_ID_BY_COUNTRY = {
20681
21127
  COMMON: "0d5dcb6d-1403-4b80-b73e-6d90a2245561",
@@ -21419,7 +21865,7 @@ var init_multiline_address_toolkit = __esm({
21419
21865
  init_defineProperty();
21420
21866
  init_types_impl();
21421
21867
  import_locale_dataset_javascript = __toESM(require_index_bundle());
21422
- init_constants2();
21868
+ init_constants3();
21423
21869
  init_apply_validation_properties();
21424
21870
  init_apply_view_properties();
21425
21871
  init_get_country_field();
@@ -21629,7 +22075,7 @@ __export(esm_exports2, {
21629
22075
  });
21630
22076
  var init_esm3 = __esm({
21631
22077
  "../form-multiline-address/dist/esm/index.js"() {
21632
- init_constants2();
22078
+ init_constants3();
21633
22079
  init_multiline_address_toolkit();
21634
22080
  init_get_country_field();
21635
22081
  init_country_codes();
@@ -22542,451 +22988,6 @@ var require_messages_en = __commonJS({
22542
22988
  }
22543
22989
  });
22544
22990
 
22545
- // ../../node_modules/@wix/sdk-runtime/build/constants.js
22546
- var SDKRequestToRESTRequestRenameMap, RESTResponseToSDKResponseRenameMap;
22547
- var init_constants3 = __esm({
22548
- "../../node_modules/@wix/sdk-runtime/build/constants.js"() {
22549
- SDKRequestToRESTRequestRenameMap = {
22550
- _id: "id",
22551
- _createdDate: "createdDate",
22552
- _updatedDate: "updatedDate"
22553
- };
22554
- RESTResponseToSDKResponseRenameMap = {
22555
- id: "_id",
22556
- createdDate: "_createdDate",
22557
- updatedDate: "_updatedDate"
22558
- };
22559
- }
22560
- });
22561
-
22562
- // ../../node_modules/@wix/sdk-runtime/build/utils.js
22563
- function removeUndefinedKeys(obj) {
22564
- return Object.fromEntries(Object.entries(obj).filter(([, value]) => value !== void 0));
22565
- }
22566
- function constantCase(input) {
22567
- return split(input).map((part) => part.toLocaleUpperCase()).join("_");
22568
- }
22569
- function split(value) {
22570
- let result2 = value.trim();
22571
- result2 = result2.replace(SPLIT_LOWER_UPPER_RE, SPLIT_REPLACE_VALUE).replace(SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE);
22572
- result2 = result2.replace(DEFAULT_STRIP_REGEXP, "\0");
22573
- let start = 0;
22574
- let end = result2.length;
22575
- while (result2.charAt(start) === "\0") {
22576
- start++;
22577
- }
22578
- if (start === end) {
22579
- return [];
22580
- }
22581
- while (result2.charAt(end - 1) === "\0") {
22582
- end--;
22583
- }
22584
- return result2.slice(start, end).split(/\0/g);
22585
- }
22586
- var SPLIT_LOWER_UPPER_RE, SPLIT_UPPER_UPPER_RE, SPLIT_REPLACE_VALUE, DEFAULT_STRIP_REGEXP;
22587
- var init_utils2 = __esm({
22588
- "../../node_modules/@wix/sdk-runtime/build/utils.js"() {
22589
- SPLIT_LOWER_UPPER_RE = /([\p{Ll}\d])(\p{Lu})/gu;
22590
- SPLIT_UPPER_UPPER_RE = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
22591
- SPLIT_REPLACE_VALUE = "$1\0$2";
22592
- DEFAULT_STRIP_REGEXP = /[^\p{L}\d]+/giu;
22593
- }
22594
- });
22595
-
22596
- // ../../node_modules/@wix/sdk-runtime/build/transform-error.js
22597
- function transformError(httpClientError, pathsToArguments = {
22598
- explicitPathsToArguments: {},
22599
- spreadPathsToArguments: {},
22600
- singleArgumentUnchanged: false
22601
- }, argumentNames = []) {
22602
- if (typeof httpClientError !== "object" || httpClientError === null) {
22603
- throw httpClientError;
22604
- }
22605
- if (isValidationError(httpClientError)) {
22606
- return buildValidationError(httpClientError, pathsToArguments, argumentNames);
22607
- }
22608
- if (isApplicationError(httpClientError)) {
22609
- return buildApplicationError(httpClientError);
22610
- }
22611
- if (isClientError(httpClientError)) {
22612
- const status = httpClientError.response?.status;
22613
- const statusText = httpClientError.response?.statusText ?? "UNKNOWN";
22614
- const message = httpClientError.response?.data?.message ?? statusText;
22615
- const details = {
22616
- applicationError: {
22617
- description: statusText,
22618
- code: constantCase(statusText),
22619
- data: {}
22620
- },
22621
- requestId: httpClientError.requestId
22622
- };
22623
- return wrapError(httpClientError, {
22624
- message: JSON.stringify({
22625
- message,
22626
- details
22627
- }, null, 2),
22628
- extraProperties: {
22629
- details,
22630
- status
22631
- }
22632
- });
22633
- }
22634
- return buildSystemError(httpClientError);
22635
- }
22636
- var isValidationError, isApplicationError, isClientError, buildValidationError, wrapError, buildApplicationError, buildSystemError, violationsWithRenamedFields, withRenamedArgument, getArgumentIndex;
22637
- var init_transform_error = __esm({
22638
- "../../node_modules/@wix/sdk-runtime/build/transform-error.js"() {
22639
- init_utils2();
22640
- isValidationError = (httpClientError) => "validationError" in (httpClientError.response?.data?.details ?? {});
22641
- isApplicationError = (httpClientError) => "applicationError" in (httpClientError.response?.data?.details ?? {});
22642
- isClientError = (httpClientError) => (httpClientError.response?.status ?? -1) >= 400 && (httpClientError.response?.status ?? -1) < 500;
22643
- buildValidationError = (httpClientError, pathsToArguments, argumentNames) => {
22644
- const validationErrorResponse = httpClientError.response?.data;
22645
- const requestId = httpClientError.requestId;
22646
- const { fieldViolations } = validationErrorResponse.details.validationError;
22647
- const transformedFieldViolations = violationsWithRenamedFields(pathsToArguments, fieldViolations, argumentNames)?.sort((a, b) => a.field < b.field ? -1 : 1);
22648
- const message = `INVALID_ARGUMENT: ${transformedFieldViolations?.map(({ field, description }) => `"${field}" ${description}`)?.join(", ")}`;
22649
- const details = {
22650
- validationError: { fieldViolations: transformedFieldViolations },
22651
- requestId
22652
- };
22653
- return wrapError(httpClientError, {
22654
- message: JSON.stringify({ message, details }, null, 2),
22655
- extraProperties: {
22656
- details,
22657
- status: httpClientError.response?.status,
22658
- requestId
22659
- }
22660
- });
22661
- };
22662
- wrapError = (baseError, { message, extraProperties }) => {
22663
- return Object.assign(baseError, {
22664
- ...extraProperties,
22665
- message
22666
- });
22667
- };
22668
- buildApplicationError = (httpClientError) => {
22669
- const status = httpClientError.response?.status;
22670
- const statusText = httpClientError.response?.statusText ?? "UNKNOWN";
22671
- const message = httpClientError.response?.data?.message ?? statusText;
22672
- const description = httpClientError.response?.data?.details?.applicationError?.description ?? statusText;
22673
- const code = httpClientError.response?.data?.details?.applicationError?.code ?? constantCase(statusText);
22674
- const data = httpClientError.response?.data?.details?.applicationError?.data ?? {};
22675
- const combinedMessage = message === description ? message : `${message}: ${description}`;
22676
- const details = {
22677
- applicationError: {
22678
- description,
22679
- code,
22680
- data
22681
- },
22682
- requestId: httpClientError.requestId
22683
- };
22684
- return wrapError(httpClientError, {
22685
- message: JSON.stringify({ message: combinedMessage, details }, null, 2),
22686
- extraProperties: {
22687
- details,
22688
- status,
22689
- requestId: httpClientError.requestId
22690
- }
22691
- });
22692
- };
22693
- buildSystemError = (httpClientError) => {
22694
- const message = httpClientError.requestId ? `System error occurred, request-id: ${httpClientError.requestId}` : `System error occurred: ${JSON.stringify(httpClientError)}`;
22695
- return wrapError(httpClientError, {
22696
- message,
22697
- extraProperties: {
22698
- requestId: httpClientError.requestId,
22699
- status: httpClientError.response?.status,
22700
- code: constantCase(httpClientError.response?.statusText ?? "UNKNOWN"),
22701
- ...!httpClientError.response && {
22702
- runtimeError: httpClientError
22703
- }
22704
- }
22705
- });
22706
- };
22707
- violationsWithRenamedFields = ({ spreadPathsToArguments, explicitPathsToArguments, singleArgumentUnchanged }, fieldViolations, argumentNames) => {
22708
- const allPathsToArguments = {
22709
- ...spreadPathsToArguments,
22710
- ...explicitPathsToArguments
22711
- };
22712
- const allPathsToArgumentsKeys = Object.keys(allPathsToArguments);
22713
- return fieldViolations?.filter((fieldViolation) => {
22714
- const containedInAMoreSpecificViolationField = fieldViolations.some((anotherViolation) => anotherViolation.field.length > fieldViolation.field.length && anotherViolation.field.startsWith(fieldViolation.field) && allPathsToArgumentsKeys.includes(anotherViolation.field));
22715
- return !containedInAMoreSpecificViolationField;
22716
- }).map((fieldViolation) => {
22717
- const exactMatchArgumentExpression = explicitPathsToArguments[fieldViolation.field];
22718
- if (exactMatchArgumentExpression) {
22719
- return {
22720
- ...fieldViolation,
22721
- field: withRenamedArgument(exactMatchArgumentExpression, argumentNames)
22722
- };
22723
- }
22724
- const longestPartialPathMatch = allPathsToArgumentsKeys?.sort((a, b) => b.length - a.length)?.find((path) => fieldViolation.field.startsWith(path));
22725
- if (longestPartialPathMatch) {
22726
- const partialMatchArgumentExpression = allPathsToArguments[longestPartialPathMatch];
22727
- if (partialMatchArgumentExpression) {
22728
- return {
22729
- ...fieldViolation,
22730
- field: fieldViolation.field.replace(longestPartialPathMatch, withRenamedArgument(partialMatchArgumentExpression, argumentNames))
22731
- };
22732
- }
22733
- }
22734
- if (singleArgumentUnchanged) {
22735
- return {
22736
- ...fieldViolation,
22737
- field: `${argumentNames[0]}.${fieldViolation.field}`
22738
- };
22739
- }
22740
- return fieldViolation;
22741
- });
22742
- };
22743
- withRenamedArgument = (fieldValue, argumentNames) => {
22744
- const argIndex = getArgumentIndex(fieldValue);
22745
- if (argIndex !== null && typeof argIndex !== "undefined") {
22746
- return fieldValue.replace(`$[${argIndex}]`, argumentNames[argIndex]);
22747
- }
22748
- return fieldValue;
22749
- };
22750
- getArgumentIndex = (s) => {
22751
- const match = s.match(/\$\[(?<argIndex>\d+)\]/);
22752
- return match && match.groups && Number(match.groups.argIndex);
22753
- };
22754
- }
22755
- });
22756
-
22757
- // ../../node_modules/@wix/sdk-context/build/browser/index.mjs
22758
- var wixContext;
22759
- var init_browser = __esm({
22760
- "../../node_modules/@wix/sdk-context/build/browser/index.mjs"() {
22761
- wixContext = {};
22762
- }
22763
- });
22764
-
22765
- // ../../node_modules/@wix/sdk-runtime/build/context.js
22766
- function resolveContext() {
22767
- const oldContext = typeof $wixContext !== "undefined" && $wixContext.initWixModules ? $wixContext.initWixModules : typeof globalThis.__wix_context__ !== "undefined" && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
22768
- if (oldContext) {
22769
- return {
22770
- // @ts-expect-error
22771
- initWixModules(modules, elevated) {
22772
- return runWithoutContext(() => oldContext(modules, elevated));
22773
- },
22774
- fetchWithAuth() {
22775
- throw new Error("fetchWithAuth is not available in this context");
22776
- },
22777
- graphql() {
22778
- throw new Error("graphql is not available in this context");
22779
- }
22780
- };
22781
- }
22782
- const contextualClient = typeof $wixContext !== "undefined" ? $wixContext.client : typeof wixContext.client !== "undefined" ? wixContext.client : typeof globalThis.__wix_context__ !== "undefined" ? globalThis.__wix_context__.client : void 0;
22783
- const elevatedClient = typeof $wixContext !== "undefined" ? $wixContext.elevatedClient : typeof wixContext.elevatedClient !== "undefined" ? wixContext.elevatedClient : typeof globalThis.__wix_context__ !== "undefined" ? globalThis.__wix_context__.elevatedClient : void 0;
22784
- if (!contextualClient && !elevatedClient) {
22785
- return;
22786
- }
22787
- return {
22788
- initWixModules(wixModules, elevated) {
22789
- if (elevated) {
22790
- if (!elevatedClient) {
22791
- throw new Error("An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules");
22792
- }
22793
- return runWithoutContext(() => elevatedClient.use(wixModules));
22794
- }
22795
- if (!contextualClient) {
22796
- throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
22797
- }
22798
- return runWithoutContext(() => contextualClient.use(wixModules));
22799
- },
22800
- fetchWithAuth: (urlOrRequest, requestInit) => {
22801
- if (!contextualClient) {
22802
- throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
22803
- }
22804
- return contextualClient.fetchWithAuth(urlOrRequest, requestInit);
22805
- },
22806
- getAuth() {
22807
- if (!contextualClient) {
22808
- throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
22809
- }
22810
- return contextualClient.auth;
22811
- },
22812
- async graphql(query, variables, opts) {
22813
- if (!contextualClient) {
22814
- throw new Error("Wix context is not available. Make sure to initialize the Wix context before using SDK modules");
22815
- }
22816
- return contextualClient.graphql(query, variables, opts);
22817
- }
22818
- };
22819
- }
22820
- function runWithoutContext(fn) {
22821
- const globalContext = globalThis.__wix_context__;
22822
- const moduleContext = {
22823
- client: wixContext.client,
22824
- elevatedClient: wixContext.elevatedClient
22825
- };
22826
- let closureContext;
22827
- globalThis.__wix_context__ = void 0;
22828
- wixContext.client = void 0;
22829
- wixContext.elevatedClient = void 0;
22830
- if (typeof $wixContext !== "undefined") {
22831
- closureContext = {
22832
- client: $wixContext?.client,
22833
- elevatedClient: $wixContext?.elevatedClient
22834
- };
22835
- delete $wixContext.client;
22836
- delete $wixContext.elevatedClient;
22837
- }
22838
- try {
22839
- return fn();
22840
- } finally {
22841
- globalThis.__wix_context__ = globalContext;
22842
- wixContext.client = moduleContext.client;
22843
- wixContext.elevatedClient = moduleContext.elevatedClient;
22844
- if (typeof $wixContext !== "undefined") {
22845
- $wixContext.client = closureContext.client;
22846
- $wixContext.elevatedClient = closureContext.elevatedClient;
22847
- }
22848
- }
22849
- }
22850
- var init_context = __esm({
22851
- "../../node_modules/@wix/sdk-runtime/build/context.js"() {
22852
- init_browser();
22853
- init_context_v2();
22854
- }
22855
- });
22856
-
22857
- // ../../node_modules/@wix/sdk-runtime/build/context-v2.js
22858
- function contextualizeRESTModuleV2(restModule, elevated) {
22859
- return ((...args) => {
22860
- const context = resolveContext();
22861
- if (!context) {
22862
- return restModule.apply(void 0, args);
22863
- }
22864
- return context.initWixModules(restModule, elevated).apply(void 0, args);
22865
- });
22866
- }
22867
- var init_context_v2 = __esm({
22868
- "../../node_modules/@wix/sdk-runtime/build/context-v2.js"() {
22869
- init_context();
22870
- }
22871
- });
22872
-
22873
- // ../../node_modules/@wix/sdk-runtime/build/rest-modules.js
22874
- function createRESTModule(descriptor, elevated = false) {
22875
- return contextualizeRESTModuleV2(descriptor, elevated);
22876
- }
22877
- function toURLSearchParams(params, isComplexRequest) {
22878
- const flatten = flattenParams(params);
22879
- Object.entries(flatten).some(([key, value]) => key.includes(".") || Array.isArray(value) && value.some((v) => typeof v === "object"));
22880
- {
22881
- return Object.entries(flatten).reduce((urlSearchParams, [key, value]) => {
22882
- const keyParams = Array.isArray(value) ? value : [value];
22883
- keyParams.forEach((param) => {
22884
- if (param === void 0 || param === null || Array.isArray(value) && typeof param === "object") {
22885
- return;
22886
- }
22887
- urlSearchParams.append(key, param);
22888
- });
22889
- return urlSearchParams;
22890
- }, new URLSearchParams());
22891
- }
22892
- }
22893
- function resolveUrl(opts) {
22894
- const domain = resolveDomain(opts.host);
22895
- const mappings = resolveMappingsByDomain(domain, opts.domainToMappings);
22896
- const path = injectDataIntoProtoPath(opts.protoPath, opts.data || {});
22897
- return resolvePathFromMappings(path, mappings);
22898
- }
22899
- function flattenParams(data, path = "") {
22900
- const params = {};
22901
- Object.entries(data).forEach(([key, value]) => {
22902
- const isObject5 = value !== null && typeof value === "object" && !Array.isArray(value);
22903
- const fieldPath = resolvePath(path, key);
22904
- if (isObject5) {
22905
- const serializedObject = flattenParams(value, fieldPath);
22906
- Object.assign(params, serializedObject);
22907
- } else {
22908
- params[fieldPath] = value;
22909
- }
22910
- });
22911
- return params;
22912
- }
22913
- function resolvePath(path, key) {
22914
- return `${path}${path ? "." : ""}${key}`;
22915
- }
22916
- function resolveDomain(host) {
22917
- const resolvedHost = fixHostExceptions(host);
22918
- return resolvedHost.replace(REGEX_CAPTURE_DOMAINS, "._base_domain_").replace(REGEX_CAPTURE_API_DOMAINS, "._api_base_domain_").replace(REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN, "*.dev.wix-code.com");
22919
- }
22920
- function fixHostExceptions(host) {
22921
- return host.replace("create.editorx.com", "editor.editorx.com");
22922
- }
22923
- function resolveMappingsByDomain(domain, domainToMappings) {
22924
- const mappings = domainToMappings[domain] || domainToMappings[USER_DOMAIN];
22925
- if (mappings) {
22926
- return mappings;
22927
- }
22928
- const rootDomainMappings = resolveRootDomain(domain, domainToMappings);
22929
- if (!rootDomainMappings) {
22930
- if (isBaseDomain(domain)) {
22931
- return domainToMappings[wwwBaseDomain];
22932
- }
22933
- }
22934
- return rootDomainMappings ?? [];
22935
- }
22936
- function resolveRootDomain(domain, domainToMappings) {
22937
- return Object.entries(domainToMappings).find(([entryDomain]) => {
22938
- const [, ...rooDomainSegments] = domain.split(".");
22939
- return rooDomainSegments.join(".") === entryDomain;
22940
- })?.[1];
22941
- }
22942
- function isBaseDomain(domain) {
22943
- return !!domain.match(/\._base_domain_$/);
22944
- }
22945
- function injectDataIntoProtoPath(protoPath, data) {
22946
- return protoPath.split("/").map((path) => maybeProtoPathToData(path, data)).join("/");
22947
- }
22948
- function maybeProtoPathToData(protoPath, data) {
22949
- const protoRegExpMatch = protoPath.match(REGEX_CAPTURE_PROTO_FIELD) || [];
22950
- const field = protoRegExpMatch[1];
22951
- if (field) {
22952
- const suffix = protoPath.replace(protoRegExpMatch[0], "");
22953
- return findByPath(data, field, protoPath, suffix);
22954
- }
22955
- return protoPath;
22956
- }
22957
- function findByPath(obj, path, defaultValue, suffix) {
22958
- let result2 = obj;
22959
- for (const field of path.split(".")) {
22960
- if (!result2) {
22961
- return defaultValue;
22962
- }
22963
- result2 = result2[field];
22964
- }
22965
- return `${result2}${suffix}`;
22966
- }
22967
- function resolvePathFromMappings(protoPath, mappings) {
22968
- const mapping = mappings?.find((m) => protoPath.startsWith(m.destPath));
22969
- if (!mapping) {
22970
- return protoPath;
22971
- }
22972
- return mapping.srcPath + protoPath.slice(mapping.destPath.length);
22973
- }
22974
- var DOMAINS, USER_DOMAIN, REGEX_CAPTURE_DOMAINS, WIX_API_DOMAINS, DEV_WIX_CODE_DOMAIN, REGEX_CAPTURE_PROTO_FIELD, REGEX_CAPTURE_API_DOMAINS, REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN, wwwBaseDomain;
22975
- var init_rest_modules = __esm({
22976
- "../../node_modules/@wix/sdk-runtime/build/rest-modules.js"() {
22977
- init_context_v2();
22978
- DOMAINS = ["wix.com", "editorx.com"];
22979
- USER_DOMAIN = "_";
22980
- REGEX_CAPTURE_DOMAINS = new RegExp(`\\.(${DOMAINS.join("|")})$`);
22981
- WIX_API_DOMAINS = ["42.wixprod.net", "uw2-edt-1.wixprod.net"];
22982
- DEV_WIX_CODE_DOMAIN = "dev.wix-code.com";
22983
- REGEX_CAPTURE_PROTO_FIELD = /{(.*)}/;
22984
- REGEX_CAPTURE_API_DOMAINS = new RegExp(`\\.(${WIX_API_DOMAINS.join("|")})$`);
22985
- REGEX_CAPTURE_DEV_WIX_CODE_DOMAIN = new RegExp(`.*\\.${DEV_WIX_CODE_DOMAIN}$`);
22986
- wwwBaseDomain = "www._base_domain_";
22987
- }
22988
- });
22989
-
22990
22991
  // ../../node_modules/@wix/json-proto-serializer/node_modules/long/src/long.js
22991
22992
  var require_long = __commonJS({
22992
22993
  "../../node_modules/@wix/json-proto-serializer/node_modules/long/src/long.js"(exports, module) {
@@ -26561,6 +26562,97 @@ function isDateInRange(date, range) {
26561
26562
  const endDate = startOfDay(new Date(range.end));
26562
26563
  return checkDate >= startDate && checkDate <= endDate;
26563
26564
  }
26565
+
26566
+ // ../form-fields/dist/esm/services/get-image-url.js
26567
+ init_max();
26568
+ function getImageURL(_ref, targetWidth, targetHeight, fit) {
26569
+ let {
26570
+ id,
26571
+ width,
26572
+ height
26573
+ } = _ref;
26574
+ if (fit === void 0) {
26575
+ fit = "fill";
26576
+ }
26577
+ const urlFunction = fit === "fit" ? sdk.getScaleToFitImageURL : sdk.getScaleToFillImageURL;
26578
+ return urlFunction(id, width, height, targetWidth , targetHeight );
26579
+ }
26580
+
26581
+ // ../../node_modules/@wix/sdk-runtime/build/rename-all-nested-keys.js
26582
+ init_constants();
26583
+ function renameAllNestedKeys(payload, renameMap, ignorePaths) {
26584
+ const isIgnored = (path) => ignorePaths.includes(path);
26585
+ const traverse = (obj, path) => {
26586
+ if (Array.isArray(obj)) {
26587
+ obj.forEach((item) => {
26588
+ traverse(item, path);
26589
+ });
26590
+ } else if (typeof obj === "object" && obj !== null) {
26591
+ const objAsRecord = obj;
26592
+ Object.keys(objAsRecord).forEach((key) => {
26593
+ const newPath = path === "" ? key : `${path}.${key}`;
26594
+ if (isIgnored(newPath)) {
26595
+ return;
26596
+ }
26597
+ const transformedKey = renameKey(key, renameMap);
26598
+ if (transformedKey !== key && !(transformedKey in objAsRecord)) {
26599
+ objAsRecord[transformedKey] = objAsRecord[key];
26600
+ delete objAsRecord[key];
26601
+ }
26602
+ traverse(objAsRecord[transformedKey], newPath);
26603
+ });
26604
+ }
26605
+ };
26606
+ traverse(payload, "");
26607
+ return payload;
26608
+ }
26609
+ function renameKey(key, renameMap) {
26610
+ let transformedKey;
26611
+ if (key.includes(".")) {
26612
+ const parts = key.split(".");
26613
+ const transformedParts = parts.map((part) => renameMap[part] ?? part);
26614
+ transformedKey = transformedParts.join(".");
26615
+ } else {
26616
+ transformedKey = renameMap[key] ?? key;
26617
+ }
26618
+ return transformedKey;
26619
+ }
26620
+ function renameKeysFromSDKRequestToRESTRequest(payload, ignorePaths = []) {
26621
+ return renameAllNestedKeys(payload, SDKRequestToRESTRequestRenameMap, ignorePaths);
26622
+ }
26623
+ function renameKeysFromRESTResponseToSDKResponse(payload, ignorePaths = []) {
26624
+ return renameAllNestedKeys(payload, RESTResponseToSDKResponseRenameMap, ignorePaths);
26625
+ }
26626
+
26627
+ // ../../node_modules/@wix/sdk-runtime/build/transformations/transform-paths.js
26628
+ function transformPath(obj, { path, isRepeated, isMap }, transformFn) {
26629
+ const pathParts = path.split(".");
26630
+ if (pathParts.length === 1 && path in obj) {
26631
+ obj[path] = isRepeated ? obj[path].map(transformFn) : isMap ? Object.fromEntries(Object.entries(obj[path]).map(([key, value]) => [key, transformFn(value)])) : transformFn(obj[path]);
26632
+ return obj;
26633
+ }
26634
+ const [first, ...rest] = pathParts;
26635
+ if (first.endsWith("{}")) {
26636
+ const cleanPath = first.slice(0, -2);
26637
+ obj[cleanPath] = Object.fromEntries(Object.entries(obj[cleanPath]).map(([key, value]) => [
26638
+ key,
26639
+ transformPath(value, { path: rest.join("."), isRepeated, isMap }, transformFn)
26640
+ ]));
26641
+ } else if (Array.isArray(obj[first])) {
26642
+ obj[first] = obj[first].map((item) => transformPath(item, { path: rest.join("."), isRepeated, isMap }, transformFn));
26643
+ } else if (first in obj && typeof obj[first] === "object" && obj[first] !== null) {
26644
+ obj[first] = transformPath(obj[first], { path: rest.join("."), isRepeated, isMap }, transformFn);
26645
+ } else if (first === "*") {
26646
+ Object.keys(obj).reduce((acc, curr) => {
26647
+ acc[curr] = transformPath(obj[curr], { path: rest.join("."), isRepeated, isMap }, transformFn);
26648
+ return acc;
26649
+ }, obj);
26650
+ }
26651
+ return obj;
26652
+ }
26653
+ function transformPaths(obj, transformations) {
26654
+ return transformations.reduce((acc, { paths, transformFn }) => paths.reduce((transformerAcc, path) => transformPath(transformerAcc, path, transformFn), acc), obj);
26655
+ }
26564
26656
  var HttpClientContext = /* @__PURE__ */ React42.createContext(void 0);
26565
26657
  var FormContext = /* @__PURE__ */ React42.createContext(void 0);
26566
26658
  function useForm() {
@@ -28066,21 +28158,6 @@ var Form = (props) => {
28066
28158
  }, /* @__PURE__ */ React42__namespace.default.createElement(FormRoot, props)));
28067
28159
  };
28068
28160
 
28069
- // ../form-fields/dist/esm/services/get-image-url.js
28070
- init_max();
28071
- function getImageURL(_ref, targetWidth, targetHeight, fit) {
28072
- let {
28073
- id,
28074
- width,
28075
- height
28076
- } = _ref;
28077
- if (fit === void 0) {
28078
- fit = "fill";
28079
- }
28080
- const urlFunction = fit === "fit" ? sdk.getScaleToFitImageURL : sdk.getScaleToFillImageURL;
28081
- return urlFunction(id, width, height, targetWidth , targetHeight );
28082
- }
28083
-
28084
28161
  // ../form-fields/dist/esm/utils/map-by-field.js
28085
28162
  function mapByField(collection, field) {
28086
28163
  return collection.reduce((acc, item) => {
@@ -29390,6 +29467,7 @@ var ValueSliderLimitKey = "valueSliderLimit";
29390
29467
  var UploadFileFormatsKey = "uploadFileFormats";
29391
29468
  var ExplanationTextKey = "explanationText";
29392
29469
  var MediaKey = "media";
29470
+ var MediaSettingsKey = "mediaSettings";
29393
29471
  var UploadEnabledKey = "uploadEnabled";
29394
29472
  var FirstDayOfWeekKey = "firstDayOfWeek";
29395
29473
  var DefaultCountryCodeKey = "defaultCountry";
@@ -29725,6 +29803,12 @@ function takeTextInputViewProperties(textInput) {
29725
29803
  },
29726
29804
  ...textInput.default && {
29727
29805
  [DefaultValueKey]: textInput.default
29806
+ },
29807
+ ...textInput.media && {
29808
+ [MediaKey]: textInput.media
29809
+ },
29810
+ ...textInput.mediaSettings && {
29811
+ [MediaSettingsKey]: textInput.mediaSettings
29728
29812
  }
29729
29813
  };
29730
29814
  }
@@ -30470,6 +30554,7 @@ function createLayoutBreakpoints(layout, fieldId) {
30470
30554
  };
30471
30555
  }
30472
30556
  function createPropertiesView(field, path, recursive, isMobile2) {
30557
+ var _field$validation;
30473
30558
  const {
30474
30559
  hidden,
30475
30560
  pii,
@@ -30486,6 +30571,7 @@ function createPropertiesView(field, path, recursive, isMobile2) {
30486
30571
  const {
30487
30572
  required
30488
30573
  } = field.validation ?? {};
30574
+ const availability = (_field$validation = field.validation) == null || (_field$validation = _field$validation.string) == null || (_field$validation = _field$validation.dateOptions) == null ? void 0 : _field$validation.availability;
30489
30575
  const formView = form && recursive ? createFormView({
30490
30576
  form,
30491
30577
  path,
@@ -30505,7 +30591,10 @@ function createPropertiesView(field, path, recursive, isMobile2) {
30505
30591
  ...nestedFormId ? {
30506
30592
  nestedFormId
30507
30593
  } : {},
30508
- ...rest
30594
+ ...rest,
30595
+ ...availability ? {
30596
+ availability
30597
+ } : {}
30509
30598
  };
30510
30599
  }
30511
30600
  function createLayoutView(layout) {
@@ -37698,54 +37787,6 @@ __export(es_exports, {
37698
37787
  getPlace: () => getPlace4
37699
37788
  });
37700
37789
  init_transform_error();
37701
-
37702
- // ../../node_modules/@wix/sdk-runtime/build/rename-all-nested-keys.js
37703
- init_constants3();
37704
- function renameAllNestedKeys(payload, renameMap, ignorePaths) {
37705
- const isIgnored = (path) => ignorePaths.includes(path);
37706
- const traverse = (obj, path) => {
37707
- if (Array.isArray(obj)) {
37708
- obj.forEach((item) => {
37709
- traverse(item, path);
37710
- });
37711
- } else if (typeof obj === "object" && obj !== null) {
37712
- const objAsRecord = obj;
37713
- Object.keys(objAsRecord).forEach((key) => {
37714
- const newPath = path === "" ? key : `${path}.${key}`;
37715
- if (isIgnored(newPath)) {
37716
- return;
37717
- }
37718
- const transformedKey = renameKey(key, renameMap);
37719
- if (transformedKey !== key && !(transformedKey in objAsRecord)) {
37720
- objAsRecord[transformedKey] = objAsRecord[key];
37721
- delete objAsRecord[key];
37722
- }
37723
- traverse(objAsRecord[transformedKey], newPath);
37724
- });
37725
- }
37726
- };
37727
- traverse(payload, "");
37728
- return payload;
37729
- }
37730
- function renameKey(key, renameMap) {
37731
- let transformedKey;
37732
- if (key.includes(".")) {
37733
- const parts = key.split(".");
37734
- const transformedParts = parts.map((part) => renameMap[part] ?? part);
37735
- transformedKey = transformedParts.join(".");
37736
- } else {
37737
- transformedKey = renameMap[key] ?? key;
37738
- }
37739
- return transformedKey;
37740
- }
37741
- function renameKeysFromSDKRequestToRESTRequest(payload, ignorePaths = []) {
37742
- return renameAllNestedKeys(payload, SDKRequestToRESTRequestRenameMap, ignorePaths);
37743
- }
37744
- function renameKeysFromRESTResponseToSDKResponse(payload, ignorePaths = []) {
37745
- return renameAllNestedKeys(payload, RESTResponseToSDKResponseRenameMap, ignorePaths);
37746
- }
37747
-
37748
- // ../../node_modules/@wix/auto_sdk_atlas_places/build/es/index.mjs
37749
37790
  init_rest_modules();
37750
37791
 
37751
37792
  // ../../node_modules/@wix/sdk-runtime/build/transformations/float.js
@@ -37765,36 +37806,6 @@ function transformRESTFloatToSDKFloat(val) {
37765
37806
  return val;
37766
37807
  }
37767
37808
 
37768
- // ../../node_modules/@wix/sdk-runtime/build/transformations/transform-paths.js
37769
- function transformPath(obj, { path, isRepeated, isMap }, transformFn) {
37770
- const pathParts = path.split(".");
37771
- if (pathParts.length === 1 && path in obj) {
37772
- obj[path] = isRepeated ? obj[path].map(transformFn) : isMap ? Object.fromEntries(Object.entries(obj[path]).map(([key, value]) => [key, transformFn(value)])) : transformFn(obj[path]);
37773
- return obj;
37774
- }
37775
- const [first, ...rest] = pathParts;
37776
- if (first.endsWith("{}")) {
37777
- const cleanPath = first.slice(0, -2);
37778
- obj[cleanPath] = Object.fromEntries(Object.entries(obj[cleanPath]).map(([key, value]) => [
37779
- key,
37780
- transformPath(value, { path: rest.join("."), isRepeated, isMap }, transformFn)
37781
- ]));
37782
- } else if (Array.isArray(obj[first])) {
37783
- obj[first] = obj[first].map((item) => transformPath(item, { path: rest.join("."), isRepeated, isMap }, transformFn));
37784
- } else if (first in obj && typeof obj[first] === "object" && obj[first] !== null) {
37785
- obj[first] = transformPath(obj[first], { path: rest.join("."), isRepeated, isMap }, transformFn);
37786
- } else if (first === "*") {
37787
- Object.keys(obj).reduce((acc, curr) => {
37788
- acc[curr] = transformPath(obj[curr], { path: rest.join("."), isRepeated, isMap }, transformFn);
37789
- return acc;
37790
- }, obj);
37791
- }
37792
- return obj;
37793
- }
37794
- function transformPaths(obj, transformations) {
37795
- return transformations.reduce((acc, { paths, transformFn }) => paths.reduce((transformerAcc, path) => transformPath(transformerAcc, path, transformFn), acc), obj);
37796
- }
37797
-
37798
37809
  // ../../node_modules/@wix/auto_sdk_atlas_places/build/es/index.mjs
37799
37810
  init_rest_modules();
37800
37811