@chekinapp/ui 0.0.92 → 0.0.93

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
@@ -203,6 +203,7 @@ __export(index_exports, {
203
203
  LegacyTextarea: () => LegacyTextarea,
204
204
  Link: () => Link,
205
205
  LoadingBar: () => LoadingBar,
206
+ MobileWebcam: () => MobileWebcam,
206
207
  Modal: () => Modal,
207
208
  ModalButton: () => ModalButton,
208
209
  ModalLoader: () => ModalLoader,
@@ -2105,6 +2106,25 @@ function toCssSize(size) {
2105
2106
  return size;
2106
2107
  }
2107
2108
  }
2109
+ function getCanvasBlob(canvas) {
2110
+ return new Promise((resolve) => {
2111
+ canvas.toBlob((blob) => {
2112
+ resolve(blob);
2113
+ });
2114
+ });
2115
+ }
2116
+ function toBase64(file) {
2117
+ return new Promise((resolve, reject) => {
2118
+ const reader = new FileReader();
2119
+ reader.readAsDataURL(file);
2120
+ reader.onload = () => resolve(String(reader.result));
2121
+ reader.onerror = () => reject(new Error("Failed to read file as base64"));
2122
+ });
2123
+ }
2124
+ function getFileSizeMB(file) {
2125
+ if (!file) return;
2126
+ return file.size / Math.pow(1024, 2);
2127
+ }
2108
2128
 
2109
2129
  // src/tooltip/Tooltip.tsx
2110
2130
  var import_jsx_runtime26 = require("react/jsx-runtime");
@@ -3035,7 +3055,7 @@ function useCombinedRef(...refs) {
3035
3055
  var import_react15 = require("react");
3036
3056
  var MOBILE_BREAKPOINT = 768;
3037
3057
  function useIsMobile({ breakpoint = MOBILE_BREAKPOINT } = {}) {
3038
- const [isMobile2, setIsMobile] = (0, import_react15.useState)(void 0);
3058
+ const [isMobile3, setIsMobile] = (0, import_react15.useState)(void 0);
3039
3059
  (0, import_react15.useEffect)(() => {
3040
3060
  const mediaQuery = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);
3041
3061
  const onChange = () => {
@@ -3047,7 +3067,7 @@ function useIsMobile({ breakpoint = MOBILE_BREAKPOINT } = {}) {
3047
3067
  mediaQuery.removeEventListener("change", onChange);
3048
3068
  };
3049
3069
  }, [breakpoint]);
3050
- return !!isMobile2;
3070
+ return !!isMobile3;
3051
3071
  }
3052
3072
 
3053
3073
  // src/hooks/use-is-mounted.ts
@@ -5978,7 +5998,23 @@ var translation_default2 = {
5978
5998
  past_dates: "Date cannot be before {{minDate}}",
5979
5999
  future_dates: "Date cannot be after {{maxDate}}",
5980
6000
  signature_placeholder_text: "Sign inside this box.<br/> Use your finger.<br/> Tap to start.",
6001
+ open_devices_camera: "Open device's camera",
6002
+ place_document_inside_frame: "Place your document inside the frame",
6003
+ close_other_application_that_may_be_using_your_camera: "Close other applications that may be using your camera",
6004
+ if_you_use_external_camera_disconnect_and_reconnect: "If you use an external camera, disconnect and reconnect it",
6005
+ close_the_browser_re_open_it: "Close the browser and reopen it",
5981
6006
  camera_permissions_denied: "The camera doesn't open? Make sure to allow the browser permission to use the camera.",
6007
+ camera_errors: {
6008
+ experiencing_camera_issues: "Experiencing camera issues?",
6009
+ chekin_cant_use_your_camera: "Chekin can't use your camera",
6010
+ please_try_a_different_browser: "Your camera doesn't work in this browser. Please, try to open the link in a different browser.",
6011
+ permissions_denied: "Permission denied",
6012
+ camera_permissions_denied: "The camera doesn't open? Make sure to allow the browser permission to use the camera.",
6013
+ no_camera_device_found: "No camera device found. Please connect a camera.",
6014
+ constraints_camera_error: "Constraints cannot be satisfied by available devices.",
6015
+ safari_camera_error: "Safari could not satisfy the camera requirements",
6016
+ try_chrome_or_firefox: "Please try Chrome or Firefox"
6017
+ },
5982
6018
  clear: "Clear",
5983
6019
  show_less: "Show less",
5984
6020
  show_more: "Show more"
@@ -8588,7 +8624,7 @@ var SidebarProvider = React28.forwardRef(
8588
8624
  stateName = SIDEBAR_COOKIE_NAME_DEFAULT,
8589
8625
  ...props
8590
8626
  }, ref) => {
8591
- const isMobile2 = useIsMobile({ breakpoint: 641 });
8627
+ const isMobile3 = useIsMobile({ breakpoint: 641 });
8592
8628
  const [openMobile, setOpenMobile] = React28.useState(false);
8593
8629
  const [_open, _setOpen] = React28.useState(defaultOpen);
8594
8630
  const open = openProp ?? _open;
@@ -8605,8 +8641,8 @@ var SidebarProvider = React28.forwardRef(
8605
8641
  [setOpenProp, open, stateName]
8606
8642
  );
8607
8643
  const toggleSidebar = React28.useCallback(() => {
8608
- return isMobile2 ? setOpenMobile((value) => !value) : setOpen((value) => !value);
8609
- }, [isMobile2, setOpen]);
8644
+ return isMobile3 ? setOpenMobile((value) => !value) : setOpen((value) => !value);
8645
+ }, [isMobile3, setOpen]);
8610
8646
  React28.useEffect(() => {
8611
8647
  const handleKeyDown = (event) => {
8612
8648
  if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
@@ -8623,12 +8659,12 @@ var SidebarProvider = React28.forwardRef(
8623
8659
  state,
8624
8660
  open,
8625
8661
  setOpen,
8626
- isMobile: isMobile2,
8662
+ isMobile: isMobile3,
8627
8663
  openMobile,
8628
8664
  setOpenMobile,
8629
8665
  toggleSidebar
8630
8666
  }),
8631
- [state, open, setOpen, isMobile2, openMobile, setOpenMobile, toggleSidebar]
8667
+ [state, open, setOpen, isMobile3, openMobile, setOpenMobile, toggleSidebar]
8632
8668
  );
8633
8669
  return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(SidebarContext.Provider, { value: contextValue, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(TooltipProvider, { delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
8634
8670
  "div",
@@ -8655,7 +8691,7 @@ var Sidebar = React28.forwardRef(
8655
8691
  children,
8656
8692
  ...props
8657
8693
  }, ref) => {
8658
- const { isMobile: isMobile2, state, openMobile, setOpenMobile } = useSidebar();
8694
+ const { isMobile: isMobile3, state, openMobile, setOpenMobile } = useSidebar();
8659
8695
  if (collapsible === "none") {
8660
8696
  return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
8661
8697
  "div",
@@ -8670,7 +8706,7 @@ var Sidebar = React28.forwardRef(
8670
8706
  }
8671
8707
  );
8672
8708
  }
8673
- if (isMobile2) {
8709
+ if (isMobile3) {
8674
8710
  return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Sheet, { open: openMobile, onOpenChange: setOpenMobile, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
8675
8711
  SheetContent,
8676
8712
  {
@@ -8741,7 +8777,7 @@ var Sidebar = React28.forwardRef(
8741
8777
  );
8742
8778
  Sidebar.displayName = "Sidebar";
8743
8779
  var SidebarTrigger = React28.forwardRef(({ className, onClick, icon, ...props }, ref) => {
8744
- const { toggleSidebar, open, isMobile: isMobile2, openMobile } = useSidebar();
8780
+ const { toggleSidebar, open, isMobile: isMobile3, openMobile } = useSidebar();
8745
8781
  return /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
8746
8782
  Button,
8747
8783
  {
@@ -8760,7 +8796,7 @@ var SidebarTrigger = React28.forwardRef(({ className, onClick, icon, ...props },
8760
8796
  },
8761
8797
  ...props,
8762
8798
  children: [
8763
- icon || (isMobile2 ? openMobile : open) ? icon || /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react31.ArrowLeftFromLineIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react31.ArrowRightFromLineIcon, {}),
8799
+ icon || (isMobile3 ? openMobile : open) ? icon || /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react31.ArrowLeftFromLineIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_lucide_react31.ArrowRightFromLineIcon, {}),
8764
8800
  /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "sr-only", children: "Toggle Sidebar" })
8765
8801
  ]
8766
8802
  }
@@ -8980,7 +9016,7 @@ var SidebarMenuButton = React28.forwardRef(
8980
9016
  ...props
8981
9017
  }, ref) => {
8982
9018
  const Comp = asChild ? import_react_slot4.Slot : "button";
8983
- const { isMobile: isMobile2, state } = useSidebar();
9019
+ const { isMobile: isMobile3, state } = useSidebar();
8984
9020
  const button = /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
8985
9021
  Comp,
8986
9022
  {
@@ -9004,7 +9040,7 @@ var SidebarMenuButton = React28.forwardRef(
9004
9040
  {
9005
9041
  side: "right",
9006
9042
  align: "center",
9007
- hidden: state !== "collapsed" || isMobile2,
9043
+ hidden: state !== "collapsed" || isMobile3,
9008
9044
  className: "capitalize",
9009
9045
  variant: "dark",
9010
9046
  ...tooltipProps
@@ -9033,8 +9069,8 @@ var SidebarMenuAction = React28.forwardRef(({ className, asChild = false, showOn
9033
9069
  SidebarMenuAction.displayName = "SidebarMenuAction";
9034
9070
  var SidebarMenuBadge = React28.forwardRef(
9035
9071
  ({ className, ...props }, ref) => {
9036
- const { open, isMobile: isMobile2, openMobile } = useSidebar();
9037
- const isOpen = isMobile2 ? openMobile : open;
9072
+ const { open, isMobile: isMobile3, openMobile } = useSidebar();
9073
+ const isOpen = isMobile3 ? openMobile : open;
9038
9074
  return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
9039
9075
  "div",
9040
9076
  {
@@ -11093,147 +11129,611 @@ function VideoPlayer({
11093
11129
  }
11094
11130
 
11095
11131
  // src/webcam/Webcam.tsx
11096
- var import_react84 = require("react");
11097
- var import_react_i18next23 = require("react-i18next");
11098
- var import_react_device_detect = require("react-device-detect");
11132
+ var import_react85 = require("react");
11133
+ var import_react_device_detect3 = require("react-device-detect");
11099
11134
  var import_react_webcam = __toESM(require("react-webcam"), 1);
11100
11135
 
11101
- // src/webcam/utils.ts
11102
- function isDOMException(error) {
11103
- return error instanceof DOMException && Boolean(error?.name);
11136
+ // src/lib/compression.ts
11137
+ var IDENTITY_VERIFICATION_PHOTOS_MAX_SIZE_MB = 6;
11138
+ var IDENTITY_VERIFICATION_PHOTOS_QUALITY = 0.8;
11139
+ async function compressFile(file, { convertSize }) {
11140
+ const { default: Compressor } = await import("compressorjs");
11141
+ return new Promise((resolve, reject) => {
11142
+ new Compressor(file, {
11143
+ convertSize: convertSize ? convertSize * 1e6 : void 0,
11144
+ quality: 1,
11145
+ success: (result) => resolve(result),
11146
+ error: reject
11147
+ });
11148
+ });
11149
+ }
11150
+ async function compressImage(image) {
11151
+ const { default: Compressor } = await import("compressorjs");
11152
+ const parsedImage = new File([image], image.name, { type: image.type });
11153
+ return new Promise((resolve, reject) => {
11154
+ new Compressor(parsedImage, {
11155
+ convertSize: IDENTITY_VERIFICATION_PHOTOS_MAX_SIZE_MB * 1e6,
11156
+ quality: IDENTITY_VERIFICATION_PHOTOS_QUALITY,
11157
+ success: (compressedResult) => {
11158
+ toBase64(compressedResult).then((result) => {
11159
+ console.log(
11160
+ "Before: ",
11161
+ getFileSizeMB(image)?.toFixed(2),
11162
+ "MB",
11163
+ "After: ",
11164
+ getFileSizeMB(compressedResult)?.toFixed(2),
11165
+ "MB"
11166
+ );
11167
+ resolve(result);
11168
+ }, reject);
11169
+ },
11170
+ error: (error) => {
11171
+ if (error.message.includes("Failed to load the image")) {
11172
+ reject(new Error("Unable to process the selected image. Please try a different image."));
11173
+ return;
11174
+ }
11175
+ reject(error);
11176
+ }
11177
+ });
11178
+ });
11104
11179
  }
11105
11180
 
11106
- // src/webcam/Webcam.tsx
11107
- var import_jsx_runtime138 = require("react/jsx-runtime");
11108
- var SCREENSHOT_FORMAT = "image/jpeg";
11109
- var MEDIA_CONSTRAINTS = {
11110
- audio: false,
11111
- video: {
11112
- width: { ideal: 4096 },
11113
- height: { ideal: 2160 }
11114
- }
11115
- };
11181
+ // src/webcam/useErrorHandler.ts
11182
+ var import_react84 = require("react");
11183
+ var import_react_i18next23 = require("react-i18next");
11184
+ var import_react_device_detect2 = require("react-device-detect");
11185
+
11186
+ // src/webcam/utils.ts
11187
+ var import_react_device_detect = require("react-device-detect");
11116
11188
  var isMobileOrTablet = () => import_react_device_detect.isMobile || import_react_device_detect.isTablet;
11117
- function getMobileOrDesktopVideoConstraints() {
11189
+ var getLivenessOptimizedConstraints = (deviceId, additional) => {
11190
+ const additionalConstraints = typeof additional === "object" && additional !== null ? additional : {};
11191
+ const baseConstraints = {
11192
+ deviceId: deviceId ? { exact: deviceId } : void 0,
11193
+ facingMode: { ideal: "user" },
11194
+ width: { min: 320, ideal: 800 },
11195
+ height: { min: 240, ideal: 600 },
11196
+ frameRate: { ideal: 24 },
11197
+ resizeMode: "crop-and-scale",
11198
+ aspectRatio: { ideal: 1.333 },
11199
+ ...additionalConstraints
11200
+ };
11118
11201
  if (isMobileOrTablet()) {
11119
11202
  return {
11120
- width: { min: 576, ideal: 1080, max: 2160 },
11121
- height: { min: 1024, ideal: 1920, max: 4096 },
11122
- facingMode: {
11123
- exact: "environment"
11124
- }
11203
+ ...baseConstraints,
11204
+ width: { min: 320, ideal: 640 },
11205
+ height: { min: 240, ideal: 480 },
11206
+ aspectRatio: { ideal: 1 },
11207
+ facingMode: { ideal: "environment" },
11208
+ ...additionalConstraints
11125
11209
  };
11126
11210
  }
11211
+ return baseConstraints;
11212
+ };
11213
+ function getReducedVideoConstraints({
11214
+ deviceId,
11215
+ facingMode,
11216
+ additional
11217
+ }) {
11218
+ const additionalConstraints = typeof additional === "object" ? additional : {};
11127
11219
  return {
11128
- facingMode: "user"
11220
+ deviceId: deviceId ? { exact: deviceId } : void 0,
11221
+ facingMode: { ideal: facingMode || "user" },
11222
+ width: { min: 320, ideal: 640 },
11223
+ height: { min: 240, ideal: 480 },
11224
+ ...additionalConstraints
11129
11225
  };
11130
11226
  }
11131
- var Webcam = (0, import_react84.forwardRef)(
11132
- ({
11133
- onUserMedia,
11134
- onUserMediaError,
11135
- onException,
11136
- audio = false,
11137
- imageSmoothing = false,
11138
- screenshotQuality = 1,
11139
- videoConstraints,
11140
- className,
11141
- mirrored
11142
- }, ref) => {
11143
- const { t } = (0, import_react_i18next23.useTranslation)();
11144
- const isMounted = useIsMounted();
11145
- const [minScreenshotHeight, setMinScreenshotHeight] = (0, import_react84.useState)(
11146
- void 0
11147
- );
11148
- const [minScreenshotWidth, setMinScreenshotWidth] = (0, import_react84.useState)(
11149
- void 0
11227
+ function getMobileOrDesktopVideoConstraints({
11228
+ deviceId,
11229
+ facingMode,
11230
+ additional,
11231
+ optimizedForLiveness = false
11232
+ }) {
11233
+ const additionalConstraints = typeof additional === "object" ? additional : {};
11234
+ if (optimizedForLiveness) {
11235
+ return getLivenessOptimizedConstraints(deviceId, additionalConstraints);
11236
+ }
11237
+ const initialConstraints = {
11238
+ deviceId: deviceId ? { exact: deviceId } : void 0,
11239
+ facingMode: { ideal: facingMode || "user" },
11240
+ width: import_react_device_detect.isSafari ? { min: 320, ideal: 1920 } : { min: 320, ideal: 4096, max: 4096 },
11241
+ height: import_react_device_detect.isSafari ? { min: 240, ideal: 1080 } : { min: 240, ideal: 2160, max: 2160 },
11242
+ frameRate: { ideal: 30 },
11243
+ resizeMode: "none",
11244
+ aspectRatio: { ideal: 1.777 },
11245
+ ...additionalConstraints
11246
+ };
11247
+ if (isMobileOrTablet()) {
11248
+ return {
11249
+ ...initialConstraints,
11250
+ aspectRatio: { ideal: 1 },
11251
+ facingMode: { ideal: "environment" },
11252
+ ...additionalConstraints
11253
+ };
11254
+ }
11255
+ if (import_react_device_detect.isSafari && !import_react_device_detect.isMobile) {
11256
+ return {
11257
+ deviceId: deviceId ? { ideal: deviceId } : void 0,
11258
+ width: { min: 320, ideal: 1920 },
11259
+ height: { min: 240, ideal: 1080 },
11260
+ ...additionalConstraints
11261
+ };
11262
+ }
11263
+ return initialConstraints;
11264
+ }
11265
+ function isDOMException(error) {
11266
+ return error instanceof DOMException && Boolean(error?.name);
11267
+ }
11268
+ function getPhotoCanvas({
11269
+ player,
11270
+ container,
11271
+ scanArea,
11272
+ canvas,
11273
+ cropToScanArea
11274
+ }) {
11275
+ if (!canvas) return;
11276
+ const playerWidth = player?.videoWidth ?? 1280;
11277
+ const playerHeight = player?.videoHeight ?? 720;
11278
+ const playerAR = playerWidth / playerHeight;
11279
+ const canvasWidth = container?.offsetWidth ?? 1280;
11280
+ const canvasHeight = container?.offsetHeight ?? 1280;
11281
+ const canvasAR = canvasWidth / canvasHeight;
11282
+ let sourceX;
11283
+ let sourceY;
11284
+ let sourceWidth;
11285
+ let sourceHeight;
11286
+ if (playerAR > canvasAR) {
11287
+ sourceHeight = playerHeight;
11288
+ sourceWidth = playerHeight * canvasAR;
11289
+ sourceX = (playerWidth - sourceWidth) / 2;
11290
+ sourceY = 0;
11291
+ } else {
11292
+ sourceWidth = playerWidth;
11293
+ sourceHeight = playerWidth / canvasAR;
11294
+ sourceX = 0;
11295
+ sourceY = (playerHeight - sourceHeight) / 2;
11296
+ }
11297
+ if (cropToScanArea && scanArea && player) {
11298
+ const scanAreaRect = scanArea.getBoundingClientRect();
11299
+ const scaleY = playerHeight / player.clientHeight;
11300
+ const offsetX = (playerWidth - player.clientWidth * scaleY) / 2;
11301
+ const offsetY = (playerHeight - player.clientHeight * scaleY) / 2;
11302
+ const cropX = offsetX + (player.clientWidth - scanAreaRect.width) / 2 * scaleY;
11303
+ const cropY = offsetY + (player.clientHeight - scanAreaRect.height) / 2 * scaleY;
11304
+ const cropWidth = scanAreaRect.width * scaleY;
11305
+ const cropHeight = scanAreaRect.height * scaleY;
11306
+ canvas.width = cropWidth;
11307
+ canvas.height = cropHeight;
11308
+ const context2 = canvas.getContext("2d");
11309
+ if (context2) {
11310
+ context2.drawImage(
11311
+ player,
11312
+ cropX,
11313
+ cropY,
11314
+ cropWidth,
11315
+ cropHeight,
11316
+ 0,
11317
+ 0,
11318
+ cropWidth,
11319
+ cropHeight
11320
+ );
11321
+ }
11322
+ return canvas;
11323
+ }
11324
+ canvas.width = sourceWidth;
11325
+ canvas.height = sourceHeight;
11326
+ const context = canvas.getContext("2d");
11327
+ if (context && player) {
11328
+ context.drawImage(
11329
+ player,
11330
+ sourceX,
11331
+ sourceY,
11332
+ sourceWidth,
11333
+ sourceHeight,
11334
+ 0,
11335
+ 0,
11336
+ sourceWidth,
11337
+ sourceHeight
11150
11338
  );
11151
- const [isCameraPermissionsDenied, setIsCameraPermissionsDenied] = (0, import_react84.useState)(false);
11152
- const constraints = videoConstraints || getMobileOrDesktopVideoConstraints();
11153
- const isDisplayingMirrored = (0, import_react84.useMemo)(() => {
11154
- if (mirrored !== void 0) {
11155
- return mirrored;
11156
- }
11157
- if (isCameraPermissionsDenied) {
11158
- return false;
11159
- }
11160
- const facingMode = typeof constraints === "object" && constraints !== null ? constraints.facingMode : void 0;
11161
- if (typeof facingMode === "string") {
11162
- return facingMode === "user";
11163
- }
11164
- if (typeof facingMode === "object" && facingMode !== null && ("exact" in facingMode || "ideal" in facingMode)) {
11165
- const { exact, ideal } = facingMode;
11166
- return (exact ?? ideal) === "user";
11167
- }
11168
- return !isMobileOrTablet();
11169
- }, [mirrored, isCameraPermissionsDenied, constraints]);
11170
- (0, import_react84.useEffect)(() => {
11171
- if (!import_react_device_detect.isMobile) {
11172
- try {
11173
- window.navigator?.mediaDevices?.getUserMedia(MEDIA_CONSTRAINTS)?.then((stream) => {
11174
- const track = stream.getVideoTracks()[0];
11175
- const capabilities = track.getCapabilities();
11176
- if (capabilities && isMounted.current) {
11177
- setMinScreenshotHeight(capabilities?.height?.max);
11178
- setMinScreenshotWidth(capabilities?.width?.max);
11339
+ }
11340
+ return canvas;
11341
+ }
11342
+
11343
+ // src/webcam/useErrorHandler.ts
11344
+ var GET_USER_MEDIA_ERROR = "getUserMedia is not implemented in this browser";
11345
+ function useErrorHandler({ onError }) {
11346
+ const { t } = (0, import_react_i18next23.useTranslation)();
11347
+ const handleError = useEvent(onError);
11348
+ const handleUserMediaError = (0, import_react84.useCallback)(
11349
+ (error) => {
11350
+ console.error(error);
11351
+ let errorText = "";
11352
+ if (error?.message === GET_USER_MEDIA_ERROR) {
11353
+ errorText = t("camera_errors.chekin_cant_use_your_camera");
11354
+ handleError({
11355
+ title: errorText,
11356
+ message: t("camera_errors.please_try_a_different_browser")
11357
+ });
11358
+ } else if (isDOMException(error)) {
11359
+ switch (error.name) {
11360
+ case "PermissionDeniedError":
11361
+ case "NotAllowedError":
11362
+ errorText = `${t("camera_errors.permissions_denied")}. ${t(
11363
+ "camera_errors.camera_permissions_denied"
11364
+ )}`;
11365
+ import_sonner2.toast.error(errorText);
11366
+ break;
11367
+ case "NotFoundError":
11368
+ errorText = t("camera_errors.no_camera_device_found");
11369
+ import_sonner2.toast.error(errorText);
11370
+ break;
11371
+ case "NotReadableError":
11372
+ case "AbortError":
11373
+ errorText = t("camera_errors.chekin_cant_use_your_camera");
11374
+ handleError({
11375
+ title: errorText,
11376
+ message: `${t("close_other_application_that_may_be_using_your_camera")}.
11377
+ ${t("if_you_use_external_camera_disconnect_and_reconnect")}.
11378
+ ${t("close_the_browser_re_open_it")}.`
11379
+ });
11380
+ break;
11381
+ case "OverconstrainedError":
11382
+ errorText = t("camera_errors.constraints_camera_error");
11383
+ if (import_react_device_detect2.isSafari) {
11384
+ handleError({
11385
+ title: errorText,
11386
+ message: `${t("camera_errors.safari_camera_error")}. ${t(
11387
+ "camera_errors.try_chrome_or_firefox"
11388
+ )}.`
11389
+ });
11390
+ } else {
11391
+ import_sonner2.toast.error(errorText);
11179
11392
  }
11180
- track.stop();
11181
- });
11182
- } catch (err) {
11183
- onException?.(err instanceof Error ? err : String(err));
11393
+ break;
11394
+ default:
11395
+ errorText = t("camera_errors.chekin_cant_use_your_camera");
11396
+ handleError({
11397
+ title: errorText,
11398
+ message: `${t("camera_errors.please_try_a_different_browser")} ${error}`
11399
+ });
11184
11400
  }
11401
+ } else {
11402
+ errorText = t("camera_errors.chekin_cant_use_your_camera");
11403
+ handleError({
11404
+ title: errorText,
11405
+ message: `${t("camera_errors.please_try_a_different_browser")} ${error}`
11406
+ });
11185
11407
  }
11186
- }, [constraints, isMounted, onException]);
11187
- const handleUserMediaError = (0, import_react84.useCallback)(
11188
- (error) => {
11189
- if (isDOMException(error) && ["PermissionDeniedError", "NotAllowedError"].includes(error.name)) {
11190
- setIsCameraPermissionsDenied(true);
11191
- } else {
11192
- onException?.(error);
11408
+ },
11409
+ [handleError, t]
11410
+ );
11411
+ return { handleUserMediaError };
11412
+ }
11413
+
11414
+ // src/webcam/Webcam.tsx
11415
+ var import_jsx_runtime138 = require("react/jsx-runtime");
11416
+ var SCREENSHOT_FORMAT = "image/jpeg";
11417
+ var mirroredTransformStyle = { transform: "rotateY(180deg)" };
11418
+ var Webcam = (0, import_react85.memo)(
11419
+ (0, import_react85.forwardRef)(
11420
+ ({
11421
+ onUserMedia,
11422
+ onDisabled,
11423
+ imageSmoothing,
11424
+ videoConstraints,
11425
+ additionalConstraints,
11426
+ hideScanArea,
11427
+ roundedScanArea,
11428
+ cropToScanArea,
11429
+ className,
11430
+ mirrored,
11431
+ children,
11432
+ isLoading,
11433
+ placeholderImage,
11434
+ screenshotMaxSize,
11435
+ minScreenshotH,
11436
+ minScreenshotW,
11437
+ videoSourceDeviceId,
11438
+ screenshotQuality = 1,
11439
+ compression,
11440
+ onError,
11441
+ ...props
11442
+ }, ref) => {
11443
+ const [minScreenshotHeight, setMinScreenshotHeight] = (0, import_react85.useState)();
11444
+ const [minScreenshotWidth, setMinScreenshotWidth] = (0, import_react85.useState)();
11445
+ const [useReducedConstraints, setUseReducedConstraints] = (0, import_react85.useState)(false);
11446
+ const [numberOfCameras, setNumberOfCameras] = (0, import_react85.useState)(0);
11447
+ const constraints = (0, import_react85.useMemo)(() => {
11448
+ if (videoConstraints) {
11449
+ return videoConstraints;
11193
11450
  }
11194
- onUserMediaError?.();
11195
- },
11196
- [onUserMediaError, onException]
11197
- );
11198
- return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_jsx_runtime138.Fragment, { children: [
11199
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
11451
+ if (useReducedConstraints) {
11452
+ return getReducedVideoConstraints({
11453
+ deviceId: videoSourceDeviceId,
11454
+ additional: additionalConstraints
11455
+ });
11456
+ }
11457
+ return getMobileOrDesktopVideoConstraints({
11458
+ deviceId: videoSourceDeviceId,
11459
+ additional: additionalConstraints
11460
+ });
11461
+ }, [
11462
+ additionalConstraints,
11463
+ useReducedConstraints,
11464
+ videoConstraints,
11465
+ videoSourceDeviceId
11466
+ ]);
11467
+ const isMirroredInCSS = mirrored === void 0 && !isMobileOrTablet();
11468
+ const webcamRef = (0, import_react85.useRef)(null);
11469
+ const scanAreaRef = (0, import_react85.useRef)(null);
11470
+ const canvasRef = (0, import_react85.useRef)(null);
11471
+ const containerRef = (0, import_react85.useRef)(null);
11472
+ const { handleUserMediaError } = useErrorHandler({
11473
+ onError: (errorDetails) => {
11474
+ onDisabled?.(true);
11475
+ onError(errorDetails);
11476
+ }
11477
+ });
11478
+ const handleUserMediaErrorWithFallback = (0, import_react85.useCallback)(
11479
+ (error) => {
11480
+ if (error instanceof DOMException && error.name === "OverconstrainedError" && !useReducedConstraints && !videoConstraints) {
11481
+ console.warn("Camera constraints failed, trying reduced constraints:", error);
11482
+ setUseReducedConstraints(true);
11483
+ return;
11484
+ }
11485
+ handleUserMediaError(error);
11486
+ },
11487
+ [handleUserMediaError, useReducedConstraints, videoConstraints]
11488
+ );
11489
+ const compressImage2 = async (canvas) => {
11490
+ if (!canvas) return;
11491
+ const blobImage = await getCanvasBlob(canvas);
11492
+ if (!blobImage) return;
11493
+ const compressedFile = await compressFile(blobImage, {
11494
+ convertSize: screenshotMaxSize
11495
+ });
11496
+ console.log(
11497
+ "Before: ",
11498
+ getFileSizeMB(blobImage)?.toFixed(2),
11499
+ "MB",
11500
+ "After: ",
11501
+ getFileSizeMB(compressedFile)?.toFixed(2),
11502
+ "MB"
11503
+ );
11504
+ return toBase64(compressedFile);
11505
+ };
11506
+ const handleTakePhoto = () => {
11507
+ const takenPhotoCanvas = getPhotoCanvas({
11508
+ player: webcamRef.current?.video,
11509
+ container: containerRef.current,
11510
+ canvas: canvasRef.current,
11511
+ scanArea: scanAreaRef.current,
11512
+ cropToScanArea
11513
+ });
11514
+ if (!takenPhotoCanvas) return;
11515
+ if (compression) return compressImage2(takenPhotoCanvas);
11516
+ return Promise.resolve(
11517
+ takenPhotoCanvas.toDataURL(SCREENSHOT_FORMAT, screenshotQuality)
11518
+ );
11519
+ };
11520
+ (0, import_react85.useImperativeHandle)(
11521
+ ref,
11522
+ () => ({
11523
+ takePhoto: handleTakePhoto,
11524
+ numberOfCameras,
11525
+ ...webcamRef.current
11526
+ })
11527
+ );
11528
+ const handleUserMediaSuccess = (0, import_react85.useCallback)(
11529
+ (stream) => {
11530
+ if (!import_react_device_detect3.isMobile) {
11531
+ const track = stream.getVideoTracks()[0];
11532
+ const capabilities = !import_react_device_detect3.isFirefox && track?.getCapabilities();
11533
+ if (capabilities) {
11534
+ setMinScreenshotHeight(capabilities.height?.max);
11535
+ setMinScreenshotWidth(capabilities.width?.max);
11536
+ }
11537
+ } else {
11538
+ setMinScreenshotWidth(minScreenshotW);
11539
+ setMinScreenshotHeight(minScreenshotH);
11540
+ }
11541
+ navigator.mediaDevices.enumerateDevices().then((devices) => {
11542
+ setNumberOfCameras(
11543
+ devices.filter((device) => device.kind === "videoinput").length
11544
+ );
11545
+ }).catch((error) => {
11546
+ console.warn("Failed to enumerate devices:", error);
11547
+ setNumberOfCameras(1);
11548
+ });
11549
+ onUserMedia?.();
11550
+ },
11551
+ [minScreenshotH, minScreenshotW, onUserMedia]
11552
+ );
11553
+ return /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
11200
11554
  "div",
11201
11555
  {
11556
+ ref: containerRef,
11202
11557
  className: cn(
11203
- "relative z-[1] mx-auto flex h-[191px] w-[283px] justify-center overflow-hidden rounded-md text-center",
11204
- isDisplayingMirrored && "[&_video]:scale-x-[-1]",
11205
- className
11558
+ className,
11559
+ "webcam relative z-[1] mx-auto flex h-[222px] w-[332px] items-center justify-center overflow-hidden rounded-[6px] text-center",
11560
+ "kiosko:h-[620px] kiosko:max-h-[620px] kiosko:w-[890px] kiosko:max-w-[890px]"
11206
11561
  ),
11207
- children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
11208
- import_react_webcam.default,
11562
+ style: isMirroredInCSS ? mirroredTransformStyle : void 0,
11563
+ children: [
11564
+ !hideScanArea && /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(
11565
+ "div",
11566
+ {
11567
+ ref: scanAreaRef,
11568
+ className: cn(
11569
+ "webcam__scan-area absolute inset-0 z-[2] m-auto flex w-[calc(100%-32px)] items-center justify-center shadow-[0_0_0_9999em_rgb(0_0_0_/_60%)]",
11570
+ "h-[200px] rounded-[15px] min-[479px]:h-[calc(100%-32px)]",
11571
+ roundedScanArea && "h-[197px] w-[165px] rounded-[45%] border-[3px] border-white shadow-[0_0_8px_#fff,inset_0_0_0_#fff,0_0_0_9999em_rgb(0_0_0_/_60%)]",
11572
+ "kiosko:h-[calc(100%-170px)] kiosko:w-[345px]"
11573
+ ),
11574
+ style: isMirroredInCSS ? mirroredTransformStyle : void 0,
11575
+ children: [
11576
+ !roundedScanArea && /* @__PURE__ */ (0, import_jsx_runtime138.jsxs)(import_jsx_runtime138.Fragment, { children: [
11577
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "absolute left-[-2px] top-[-2px] h-[45px] w-[45px] rounded-tl-[15px] border-[4px] border-b-0 border-r-0 border-white" }),
11578
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "absolute right-[-2px] top-[-2px] h-[45px] w-[45px] rounded-tr-[15px] border-[4px] border-b-0 border-l-0 border-white" }),
11579
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "absolute bottom-[-2px] right-[-2px] h-[45px] w-[45px] rounded-br-[15px] border-[4px] border-l-0 border-t-0 border-white" }),
11580
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "absolute bottom-[-2px] left-[-2px] h-[45px] w-[45px] rounded-bl-[15px] border-[4px] border-r-0 border-t-0 border-white" })
11581
+ ] }),
11582
+ placeholderImage
11583
+ ]
11584
+ }
11585
+ ),
11586
+ /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("canvas", { ref: canvasRef, className: "hidden" }),
11587
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "h-10 w-10 animate-spin rounded-full border-4 border-white/30 border-t-white" }) }) : /* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
11588
+ import_react_webcam.default,
11589
+ {
11590
+ ref: webcamRef,
11591
+ mirrored: !!mirrored,
11592
+ width: props.width,
11593
+ height: props.height,
11594
+ videoConstraints: constraints,
11595
+ imageSmoothing: !!imageSmoothing,
11596
+ screenshotFormat: SCREENSHOT_FORMAT,
11597
+ onUserMedia: handleUserMediaSuccess,
11598
+ screenshotQuality,
11599
+ onUserMediaError: handleUserMediaErrorWithFallback,
11600
+ minScreenshotWidth,
11601
+ minScreenshotHeight,
11602
+ className: "webcam__video z-[1] h-full w-full bg-[#e2e2e2] object-cover",
11603
+ audio: false,
11604
+ disablePictureInPicture: false,
11605
+ forceScreenshotSourceSize: false
11606
+ }
11607
+ ),
11608
+ children
11609
+ ]
11610
+ }
11611
+ );
11612
+ }
11613
+ )
11614
+ );
11615
+ Webcam.displayName = "Webcam";
11616
+
11617
+ // src/mobile-webcam/MobileWebcam.tsx
11618
+ var import_lucide_react41 = require("lucide-react");
11619
+ var import_react87 = require("react");
11620
+ var import_react_dom = require("react-dom");
11621
+ var import_react_i18next25 = require("react-i18next");
11622
+
11623
+ // src/mobile-webcam/DeviceCamera/DeviceCamera.tsx
11624
+ var import_react86 = require("react");
11625
+ var import_react_i18next24 = require("react-i18next");
11626
+ var import_jsx_runtime139 = require("react/jsx-runtime");
11627
+ function DeviceCamera({ onChange, facingMode, className }) {
11628
+ const { t } = (0, import_react_i18next24.useTranslation)();
11629
+ const handleNativeScreenshot = (0, import_react86.useCallback)(
11630
+ (event) => {
11631
+ const file = event.target.files?.[0];
11632
+ onChange(file ? compressImage(file) : void 0);
11633
+ },
11634
+ [onChange]
11635
+ );
11636
+ return /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)(
11637
+ "div",
11638
+ {
11639
+ className: cn(
11640
+ "mobile-webcam-device-camera flex flex-col items-center gap-3 rounded-xl bg-[#1c1b1f] p-4 text-sm text-white",
11641
+ className
11642
+ ),
11643
+ children: [
11644
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)("div", { children: t("camera_errors.experiencing_camera_issues") }),
11645
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsxs)("label", { className: "text-[16px] font-semibold uppercase leading-6 text-[var(--text-button-color)]", children: [
11646
+ t("open_devices_camera"),
11647
+ /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
11648
+ "input",
11209
11649
  {
11210
- ref,
11211
- className: "z-[1] h-[260px] flex-1 self-center bg-[var(--webcam-bg)] max-md:min-h-[200%]",
11212
- onUserMedia,
11213
- onUserMediaError: handleUserMediaError,
11214
- audio,
11215
- imageSmoothing,
11216
- mirrored,
11217
- screenshotQuality,
11218
- videoConstraints: constraints,
11219
- screenshotFormat: SCREENSHOT_FORMAT,
11220
- minScreenshotHeight,
11221
- minScreenshotWidth
11650
+ className: "sr-only",
11651
+ type: "file",
11652
+ accept: "image/*",
11653
+ capture: facingMode || "environment",
11654
+ onChange: handleNativeScreenshot
11222
11655
  }
11223
11656
  )
11224
- }
11225
- ),
11226
- /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { className: "mx-auto box-border w-[306px] p-4 text-center text-base text-[var(--webcam-permission-text)]", children: t("camera_permissions_denied") })
11227
- ] });
11657
+ ] })
11658
+ ]
11659
+ }
11660
+ );
11661
+ }
11662
+
11663
+ // src/mobile-webcam/MobileWebcam.tsx
11664
+ var import_jsx_runtime140 = require("react/jsx-runtime");
11665
+ var webcamClasses = "fixed left-0 top-0 z-[6] h-full w-full rounded-none";
11666
+ var scanAreaClasses = String.raw`[&_.webcam\_\_scan-area]:h-full [&_.webcam\_\_scan-area]:max-h-[209px] landscape:[&_.webcam\_\_scan-area]:h-[80%] landscape:[&_.webcam\_\_scan-area]:max-h-full md:[&_.webcam\_\_scan-area]:h-auto md:[&_.webcam\_\_scan-area]:max-h-none md:[&_.webcam\_\_scan-area]:aspect-[2/1]`;
11667
+ var roundedWebcamClasses = String.raw`[&_.webcam\_\_scan-area]:top-[-60px] [&_.webcam\_\_scan-area]:h-full [&_.webcam\_\_scan-area]:w-full [&_.webcam\_\_scan-area]:max-h-[55%] [&_.webcam\_\_scan-area]:max-w-[80%] max-[375px]:[&_.webcam\_\_scan-area]:max-h-[369px] max-[375px]:[&_.webcam\_\_scan-area]:max-w-[261px] max-[320px]:[&_.webcam\_\_scan-area]:max-h-[318px] max-[320px]:[&_.webcam\_\_scan-area]:max-w-[220px] landscape:[&_.webcam\_\_scan-area]:h-full landscape:[&_.webcam\_\_scan-area]:w-full landscape:[&_.webcam\_\_scan-area]:max-h-[90%] landscape:[&_.webcam\_\_scan-area]:max-w-[261px] md:[&_.webcam\_\_scan-area]:aspect-square`;
11668
+ function getAndMapFacingMode(constraints) {
11669
+ if (typeof constraints === "boolean" || !constraints) return;
11670
+ if (constraints.facingMode === "user") return "user";
11671
+ if (constraints.facingMode === "environment") return "environment";
11672
+ }
11673
+ var MobileWebcam = (0, import_react87.forwardRef)(
11674
+ ({ onScreenshot, onBack, title, text, disabled, className, ...props }, ref) => {
11675
+ const rootElement = getDocument()?.body;
11676
+ const { t } = (0, import_react_i18next25.useTranslation)();
11677
+ const handleNativeScreenshot = (0, import_react87.useCallback)(
11678
+ (photo) => onScreenshot({ isNative: true, photo }),
11679
+ [onScreenshot]
11680
+ );
11681
+ return (0, import_react_dom.createPortal)(
11682
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: "mobile-camera flex justify-center", children: [
11683
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
11684
+ "button",
11685
+ {
11686
+ type: "button",
11687
+ onClick: onBack,
11688
+ className: "mobile-camera__back-btn fixed left-7 top-9 z-[7] flex border-0 bg-transparent p-0 landscape:left-[50px] landscape:top-[70px]",
11689
+ children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_lucide_react41.ChevronLeft, { size: 32, strokeWidth: 3, className: "text-white" })
11690
+ }
11691
+ ),
11692
+ title && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", { className: "mobile-camera__title fixed left-1/2 top-8 z-[7] -translate-x-1/2 whitespace-nowrap text-[18px] font-bold text-white landscape:top-[5px]", children: title }),
11693
+ text ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("p", { className: "mobile-camera__subtitle fixed top-[76px] z-[7] mx-auto my-0 px-6 text-center text-white landscape:hidden [@media(min-height:838px)]:top-28", children: text }) : /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("p", { className: "mobile-camera__helper fixed top-[88px] z-[7] mx-auto my-0 px-6 text-center text-xs text-white landscape:hidden [@media(min-height:700px)]:[font-size:inherit]", children: t("place_document_inside_frame") }),
11694
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
11695
+ Webcam,
11696
+ {
11697
+ ref,
11698
+ ...props,
11699
+ className: cn(
11700
+ className,
11701
+ webcamClasses,
11702
+ props.roundedScanArea ? roundedWebcamClasses : scanAreaClasses
11703
+ )
11704
+ }
11705
+ ),
11706
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)("div", { className: "fixed bottom-5 z-[7] flex w-[calc(100%-32px)] flex-col justify-between gap-5 self-center landscape:inset-y-0 landscape:right-10 landscape:my-auto landscape:h-auto landscape:w-auto landscape:justify-normal landscape:[&_.mobile-webcam-device-camera]:hidden", children: [
11707
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
11708
+ "button",
11709
+ {
11710
+ type: "button",
11711
+ disabled,
11712
+ onClick: () => onScreenshot({ isNative: false }),
11713
+ className: "mobile-camera__take-btn relative flex h-[75px] w-[75px] items-center justify-center self-center rounded-full border-0 bg-white p-[10px] shadow-[0_0_10px_#ffffff] hover:opacity-80 disabled:cursor-default disabled:opacity-60 disabled:hover:opacity-60",
11714
+ children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(import_lucide_react41.Camera, { size: 26, className: "text-[var(--primary)]" })
11715
+ }
11716
+ ),
11717
+ /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
11718
+ DeviceCamera,
11719
+ {
11720
+ onChange: handleNativeScreenshot,
11721
+ facingMode: getAndMapFacingMode(props.additionalConstraints)
11722
+ }
11723
+ )
11724
+ ] })
11725
+ ] }),
11726
+ rootElement
11727
+ );
11228
11728
  }
11229
11729
  );
11230
- Webcam.displayName = "Webcam";
11730
+ MobileWebcam.displayName = "MobileWebcam";
11231
11731
 
11232
11732
  // src/wide-button/WideButton.tsx
11233
- var import_react85 = require("react");
11234
- var import_jsx_runtime139 = require("react/jsx-runtime");
11235
- var WideButton = (0, import_react85.forwardRef)(
11236
- ({ className, disabled, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime139.jsx)(
11733
+ var import_react88 = require("react");
11734
+ var import_jsx_runtime141 = require("react/jsx-runtime");
11735
+ var WideButton = (0, import_react88.forwardRef)(
11736
+ ({ className, disabled, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
11237
11737
  Button,
11238
11738
  {
11239
11739
  ref,
@@ -11255,22 +11755,22 @@ WideButton.displayName = "WideButton";
11255
11755
  var React42 = __toESM(require("react"), 1);
11256
11756
  var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"), 1);
11257
11757
  var import_react_draggable = __toESM(require("react-draggable"), 1);
11258
- var import_jsx_runtime140 = require("react/jsx-runtime");
11758
+ var import_jsx_runtime142 = require("react/jsx-runtime");
11259
11759
  var DRAWER_CLOSE_THRESHOLD = 72;
11260
11760
  var DRAWER_MIN_OVERLAY_OPACITY = 0.1;
11261
11761
  function Drawer({ ...props }) {
11262
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(DialogPrimitive2.Root, { "data-slot": "drawer", ...props });
11762
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(DialogPrimitive2.Root, { "data-slot": "drawer", ...props });
11263
11763
  }
11264
11764
  function DrawerTrigger({ ...props }) {
11265
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(DialogPrimitive2.Trigger, { "data-slot": "drawer-trigger", ...props });
11765
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(DialogPrimitive2.Trigger, { "data-slot": "drawer-trigger", ...props });
11266
11766
  }
11267
11767
  function DrawerPortal({ ...props }) {
11268
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(DialogPrimitive2.Portal, { "data-slot": "drawer-portal", ...props });
11768
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(DialogPrimitive2.Portal, { "data-slot": "drawer-portal", ...props });
11269
11769
  }
11270
11770
  function DrawerClose({ ...props }) {
11271
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(DialogPrimitive2.Close, { "data-slot": "drawer-close", ...props });
11771
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(DialogPrimitive2.Close, { "data-slot": "drawer-close", ...props });
11272
11772
  }
11273
- var DrawerOverlay = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
11773
+ var DrawerOverlay = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11274
11774
  DialogPrimitive2.Overlay,
11275
11775
  {
11276
11776
  ref,
@@ -11320,14 +11820,14 @@ var DrawerContent = React42.forwardRef(
11320
11820
  },
11321
11821
  [onClose]
11322
11822
  );
11323
- return /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(DrawerPortal, { container: finalContainer, children: [
11324
- lockScroll ? /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
11823
+ return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(DrawerPortal, { container: finalContainer, children: [
11824
+ lockScroll ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11325
11825
  DrawerOverlay,
11326
11826
  {
11327
11827
  style: { opacity: overlayOpacity },
11328
11828
  onClick: closeOnOverlayClick ? onClose : void 0
11329
11829
  }
11330
- ) : /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
11830
+ ) : /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11331
11831
  "div",
11332
11832
  {
11333
11833
  className: cn(DrawerOverlayClasses),
@@ -11335,7 +11835,7 @@ var DrawerContent = React42.forwardRef(
11335
11835
  onClick: closeOnOverlayClick ? onClose : void 0
11336
11836
  }
11337
11837
  ),
11338
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
11838
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11339
11839
  DialogPrimitive2.Content,
11340
11840
  {
11341
11841
  asChild: true,
@@ -11351,7 +11851,7 @@ var DrawerContent = React42.forwardRef(
11351
11851
  }
11352
11852
  },
11353
11853
  ...props,
11354
- children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", { className: "fixed inset-x-0 bottom-0 top-auto z-50 outline-none", children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
11854
+ children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "fixed inset-x-0 bottom-0 top-auto z-50 outline-none", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11355
11855
  import_react_draggable.default,
11356
11856
  {
11357
11857
  axis: "y",
@@ -11362,7 +11862,7 @@ var DrawerContent = React42.forwardRef(
11362
11862
  onDrag: handleDrag,
11363
11863
  onStop: handleStop,
11364
11864
  position: { x: 0, y: dragOffsetY },
11365
- children: /* @__PURE__ */ (0, import_jsx_runtime140.jsxs)(
11865
+ children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
11366
11866
  "div",
11367
11867
  {
11368
11868
  ref: nodeRef,
@@ -11371,7 +11871,7 @@ var DrawerContent = React42.forwardRef(
11371
11871
  className
11372
11872
  ),
11373
11873
  children: [
11374
- showHandle && /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
11874
+ showHandle && /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11375
11875
  "div",
11376
11876
  {
11377
11877
  "data-drawer-handle": true,
@@ -11379,10 +11879,10 @@ var DrawerContent = React42.forwardRef(
11379
11879
  "mx-auto flex h-8 w-24 touch-none items-center justify-center",
11380
11880
  disableDrag ? "cursor-default" : "cursor-grab active:cursor-grabbing"
11381
11881
  ),
11382
- children: /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("span", { className: "block h-1.5 w-12 rounded-full bg-[#D9D7D3]" })
11882
+ children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("span", { className: "block h-1.5 w-12 rounded-full bg-[#D9D7D3]" })
11383
11883
  }
11384
11884
  ),
11385
- /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto", children })
11885
+ /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto", children })
11386
11886
  ]
11387
11887
  }
11388
11888
  )
@@ -11394,7 +11894,7 @@ var DrawerContent = React42.forwardRef(
11394
11894
  }
11395
11895
  );
11396
11896
  DrawerContent.displayName = DialogPrimitive2.Content.displayName;
11397
- var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
11897
+ var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11398
11898
  "div",
11399
11899
  {
11400
11900
  className: cn("flex flex-col gap-2 px-5 pt-2 text-center", className),
@@ -11402,9 +11902,9 @@ var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_r
11402
11902
  }
11403
11903
  );
11404
11904
  DrawerHeader.displayName = "DrawerHeader";
11405
- var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)("div", { className: cn("flex flex-col gap-2 p-5", className), ...props });
11905
+ var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: cn("flex flex-col gap-2 p-5", className), ...props });
11406
11906
  DrawerFooter.displayName = "DrawerFooter";
11407
- var DrawerTitle = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
11907
+ var DrawerTitle = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11408
11908
  DialogPrimitive2.Title,
11409
11909
  {
11410
11910
  ref,
@@ -11414,7 +11914,7 @@ var DrawerTitle = React42.forwardRef(({ className, ...props }, ref) => /* @__PUR
11414
11914
  }
11415
11915
  ));
11416
11916
  DrawerTitle.displayName = DialogPrimitive2.Title.displayName;
11417
- var DrawerDescription = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime140.jsx)(
11917
+ var DrawerDescription = React42.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
11418
11918
  DialogPrimitive2.Description,
11419
11919
  {
11420
11920
  ref,
@@ -11441,7 +11941,7 @@ var DEVICE = {
11441
11941
  };
11442
11942
 
11443
11943
  // src/responsive-sheet/ResponsiveSheet.tsx
11444
- var import_jsx_runtime141 = require("react/jsx-runtime");
11944
+ var import_jsx_runtime143 = require("react/jsx-runtime");
11445
11945
  function ResponsiveSheet({
11446
11946
  open,
11447
11947
  onClose,
@@ -11460,8 +11960,8 @@ function ResponsiveSheet({
11460
11960
  closeOnEscape = true,
11461
11961
  disableDrag = false
11462
11962
  }) {
11463
- const { isMatch: isMobile2 } = useScreenResize(DEVICE.tablet);
11464
- const isMobileMode = isMobile2 && isMobileModalModeAvailable();
11963
+ const { isMatch: isMobile3 } = useScreenResize(DEVICE.tablet);
11964
+ const isMobileMode = isMobile3 && isMobileModalModeAvailable();
11465
11965
  const handleOpenChange = (nextOpen) => {
11466
11966
  if (!nextOpen) {
11467
11967
  onClose();
@@ -11477,7 +11977,7 @@ function ResponsiveSheet({
11477
11977
  event.preventDefault();
11478
11978
  }
11479
11979
  };
11480
- const content = /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
11980
+ const content = /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
11481
11981
  "div",
11482
11982
  {
11483
11983
  className: cn(
@@ -11485,7 +11985,7 @@ function ResponsiveSheet({
11485
11985
  contentClassName
11486
11986
  ),
11487
11987
  children: [
11488
- title ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
11988
+ title ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
11489
11989
  "div",
11490
11990
  {
11491
11991
  "aria-hidden": "true",
@@ -11496,7 +11996,7 @@ function ResponsiveSheet({
11496
11996
  children: title
11497
11997
  }
11498
11998
  ) : null,
11499
- description ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(
11999
+ description ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
11500
12000
  "p",
11501
12001
  {
11502
12002
  "aria-hidden": "true",
@@ -11512,7 +12012,7 @@ function ResponsiveSheet({
11512
12012
  }
11513
12013
  );
11514
12014
  if (isMobileMode) {
11515
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Drawer, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
12015
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Drawer, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
11516
12016
  DrawerContent,
11517
12017
  {
11518
12018
  onClose,
@@ -11523,14 +12023,14 @@ function ResponsiveSheet({
11523
12023
  onEscapeKeyDown: handleEscapeKeyDown,
11524
12024
  className: cn(className, drawerClassName),
11525
12025
  children: [
11526
- title ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(DrawerTitle, { className: "sr-only", children: title }) : null,
11527
- description ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(DrawerDescription, { className: "sr-only", children: description }) : null,
12026
+ title ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(DrawerTitle, { className: "sr-only", children: title }) : null,
12027
+ description ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(DrawerDescription, { className: "sr-only", children: description }) : null,
11528
12028
  content
11529
12029
  ]
11530
12030
  }
11531
12031
  ) });
11532
12032
  }
11533
- return /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
12033
+ return /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
11534
12034
  DialogContent,
11535
12035
  {
11536
12036
  showCloseButton,
@@ -11540,8 +12040,8 @@ function ResponsiveSheet({
11540
12040
  className: cn("max-w-[560px] border-0 p-0 shadow-xl", className, dialogClassName),
11541
12041
  lockScroll: false,
11542
12042
  children: [
11543
- title ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(DialogTitle, { className: "sr-only", children: title }) : null,
11544
- description ? /* @__PURE__ */ (0, import_jsx_runtime141.jsx)(DialogDescription, { className: "sr-only", children: description }) : null,
12043
+ title ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(DialogTitle, { className: "sr-only", children: title }) : null,
12044
+ description ? /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(DialogDescription, { className: "sr-only", children: description }) : null,
11545
12045
  content
11546
12046
  ]
11547
12047
  }
@@ -11550,7 +12050,7 @@ function ResponsiveSheet({
11550
12050
 
11551
12051
  // src/responsive-dropdown/ResponsiveDropdown.tsx
11552
12052
  var React43 = __toESM(require("react"), 1);
11553
- var import_jsx_runtime142 = require("react/jsx-runtime");
12053
+ var import_jsx_runtime144 = require("react/jsx-runtime");
11554
12054
  function ResponsiveDropdown({
11555
12055
  trigger,
11556
12056
  options,
@@ -11563,8 +12063,8 @@ function ResponsiveDropdown({
11563
12063
  dropdownClassName,
11564
12064
  drawerClassName
11565
12065
  }) {
11566
- const { isMatch: isMobile2 } = useScreenResize(DEVICE.mobileXL);
11567
- const isMobileMode = isMobile2 && isMobileModalModeAvailable();
12066
+ const { isMatch: isMobile3 } = useScreenResize(DEVICE.mobileXL);
12067
+ const isMobileMode = isMobile3 && isMobileModalModeAvailable();
11568
12068
  const [open, setOpen] = React43.useState(false);
11569
12069
  const visibleOptions = options?.filter((option) => !option.hidden) ?? [];
11570
12070
  const renderTrigger = (isOpen) => typeof trigger === "function" ? trigger(isOpen) : trigger;
@@ -11582,8 +12082,8 @@ function ResponsiveDropdown({
11582
12082
  setOpen(false);
11583
12083
  };
11584
12084
  if (isMobileMode) {
11585
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(import_jsx_runtime142.Fragment, { children: [
11586
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
12085
+ return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(import_jsx_runtime144.Fragment, { children: [
12086
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11587
12087
  "div",
11588
12088
  {
11589
12089
  className: "responsive-dropdown__mobile-trigger",
@@ -11591,16 +12091,16 @@ function ResponsiveDropdown({
11591
12091
  children: renderTrigger(open)
11592
12092
  }
11593
12093
  ),
11594
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Drawer, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
12094
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Drawer, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
11595
12095
  DrawerContent,
11596
12096
  {
11597
12097
  onClose: () => setOpen(false),
11598
12098
  lockScroll: false,
11599
12099
  className: cn("px-0 pb-2", className, drawerClassName),
11600
12100
  children: [
11601
- title ? /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(DrawerTitle, { className: "sr-only", children: title }) : null,
11602
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex flex-col", children: [
11603
- visibleOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
12101
+ title ? /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(DrawerTitle, { className: "sr-only", children: title }) : null,
12102
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "flex flex-col", children: [
12103
+ visibleOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11604
12104
  "div",
11605
12105
  {
11606
12106
  role: "button",
@@ -11622,16 +12122,16 @@ function ResponsiveDropdown({
11622
12122
  ) })
11623
12123
  ] });
11624
12124
  }
11625
- return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(DropdownMenu, { open, onOpenChange: handleOpenChange, children: [
11626
- /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(DropdownMenuTrigger, { asChild: true, disabled, children: renderTrigger(open) }),
11627
- /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(
12125
+ return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(DropdownMenu, { open, onOpenChange: handleOpenChange, children: [
12126
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(DropdownMenuTrigger, { asChild: true, disabled, children: renderTrigger(open) }),
12127
+ /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
11628
12128
  DropdownMenuContent,
11629
12129
  {
11630
12130
  side,
11631
12131
  align,
11632
12132
  className: cn("min-w-[295px]", className, dropdownClassName),
11633
12133
  children: [
11634
- visibleOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
12134
+ visibleOptions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11635
12135
  DropdownMenuItem,
11636
12136
  {
11637
12137
  disabled: option.disabled,
@@ -11649,11 +12149,11 @@ function ResponsiveDropdown({
11649
12149
 
11650
12150
  // src/dashboard/input/Input.tsx
11651
12151
  var React44 = __toESM(require("react"), 1);
11652
- var import_lucide_react41 = require("lucide-react");
11653
- var import_react_i18next24 = require("react-i18next");
12152
+ var import_lucide_react42 = require("lucide-react");
12153
+ var import_react_i18next26 = require("react-i18next");
11654
12154
 
11655
12155
  // src/dashboard/_fieldset/Fieldset.tsx
11656
- var import_jsx_runtime143 = require("react/jsx-runtime");
12156
+ var import_jsx_runtime145 = require("react/jsx-runtime");
11657
12157
  function Fieldset({
11658
12158
  isActivated,
11659
12159
  isFocused,
@@ -11673,8 +12173,8 @@ function Fieldset({
11673
12173
  }) {
11674
12174
  const showLegendText = Boolean(legend || typeof label === "string");
11675
12175
  const raised = !isEmpty || isFocused;
11676
- return /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(import_jsx_runtime143.Fragment, { children: [
11677
- /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
12176
+ return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(import_jsx_runtime145.Fragment, { children: [
12177
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
11678
12178
  "div",
11679
12179
  {
11680
12180
  onClick,
@@ -11690,7 +12190,7 @@ function Fieldset({
11690
12190
  labelClassName
11691
12191
  ),
11692
12192
  children: [
11693
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
12193
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11694
12194
  "label",
11695
12195
  {
11696
12196
  id: labelId,
@@ -11702,7 +12202,7 @@ function Fieldset({
11702
12202
  children: label
11703
12203
  }
11704
12204
  ),
11705
- tooltip && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("span", { className: "ml-1 inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
12205
+ tooltip && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "ml-1 inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11706
12206
  HelpTooltip,
11707
12207
  {
11708
12208
  content: tooltip,
@@ -11713,7 +12213,7 @@ function Fieldset({
11713
12213
  ]
11714
12214
  }
11715
12215
  ),
11716
- /* @__PURE__ */ (0, import_jsx_runtime143.jsx)(
12216
+ /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
11717
12217
  "fieldset",
11718
12218
  {
11719
12219
  "aria-hidden": "true",
@@ -11725,7 +12225,7 @@ function Fieldset({
11725
12225
  invalid && "border-[var(--error-message-color)]",
11726
12226
  className
11727
12227
  ),
11728
- children: /* @__PURE__ */ (0, import_jsx_runtime143.jsxs)(
12228
+ children: /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
11729
12229
  "legend",
11730
12230
  {
11731
12231
  className: cn(
@@ -11735,8 +12235,8 @@ function Fieldset({
11735
12235
  !label && "w-0"
11736
12236
  ),
11737
12237
  children: [
11738
- showLegendText && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("span", { className: "visible inline-block pr-[6px] text-[14px] font-medium opacity-0", children: legend || label }),
11739
- tooltip && /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("span", { className: "visible inline-block w-[20px] opacity-0", children: /* @__PURE__ */ (0, import_jsx_runtime143.jsx)("span", { className: "inline-block h-4 w-4" }) })
12238
+ showLegendText && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "visible inline-block pr-[6px] text-[14px] font-medium opacity-0", children: legend || label }),
12239
+ tooltip && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "visible inline-block w-[20px] opacity-0", children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "inline-block h-4 w-4" }) })
11740
12240
  ]
11741
12241
  }
11742
12242
  )
@@ -11746,7 +12246,7 @@ function Fieldset({
11746
12246
  }
11747
12247
 
11748
12248
  // src/dashboard/input/Input.tsx
11749
- var import_jsx_runtime144 = require("react/jsx-runtime");
12249
+ var import_jsx_runtime146 = require("react/jsx-runtime");
11750
12250
  var checkIfEmpty = ({
11751
12251
  empty,
11752
12252
  defaultValue,
@@ -11797,7 +12297,7 @@ var DashboardInput = React44.forwardRef(
11797
12297
  const generatedId = React44.useId();
11798
12298
  const inputId = id ?? name ?? generatedId;
11799
12299
  const errorId = `${inputId}-error`;
11800
- const { t } = (0, import_react_i18next24.useTranslation)();
12300
+ const { t } = (0, import_react_i18next26.useTranslation)();
11801
12301
  const isEmpty = checkIfEmpty({ empty, value, defaultValue });
11802
12302
  const [inputType, setInputType] = React44.useState(type);
11803
12303
  const [isPasswordRevealed, setIsPasswordRevealed] = React44.useState(false);
@@ -11837,7 +12337,7 @@ var DashboardInput = React44.forwardRef(
11837
12337
  };
11838
12338
  const showRightPaddingForReset = Boolean(onReset);
11839
12339
  const showRightPaddingForReveal = isPasswordReveal;
11840
- return /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
12340
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
11841
12341
  "div",
11842
12342
  {
11843
12343
  className: cn(
@@ -11848,7 +12348,7 @@ var DashboardInput = React44.forwardRef(
11848
12348
  className
11849
12349
  ),
11850
12350
  children: [
11851
- topLabel && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12351
+ topLabel && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
11852
12352
  "label",
11853
12353
  {
11854
12354
  htmlFor: inputId,
@@ -11856,7 +12356,7 @@ var DashboardInput = React44.forwardRef(
11856
12356
  children: topLabel
11857
12357
  }
11858
12358
  ),
11859
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)(
12359
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
11860
12360
  "div",
11861
12361
  {
11862
12362
  className: cn(
@@ -11865,8 +12365,8 @@ var DashboardInput = React44.forwardRef(
11865
12365
  fieldClassName
11866
12366
  ),
11867
12367
  children: [
11868
- /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: cn("relative w-full cursor-text", contentClassName), children: [
11869
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12368
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { className: cn("relative w-full cursor-text", contentClassName), children: [
12369
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
11870
12370
  Fieldset,
11871
12371
  {
11872
12372
  isFocused: isFocused && !readOnly,
@@ -11887,8 +12387,8 @@ var DashboardInput = React44.forwardRef(
11887
12387
  })
11888
12388
  }
11889
12389
  ),
11890
- leftIcon && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "pointer-events-none absolute left-0 top-0 flex h-full max-w-10 items-center justify-center text-[var(--chekin-color-gray-2)]", children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "flex h-full w-10 items-center justify-center", children: leftIcon }) }),
11891
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12390
+ leftIcon && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { className: "pointer-events-none absolute left-0 top-0 flex h-full max-w-10 items-center justify-center text-[var(--chekin-color-gray-2)]", children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { className: "flex h-full w-10 items-center justify-center", children: leftIcon }) }),
12391
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
11892
12392
  "input",
11893
12393
  {
11894
12394
  ...props,
@@ -11925,9 +12425,9 @@ var DashboardInput = React44.forwardRef(
11925
12425
  )
11926
12426
  }
11927
12427
  ),
11928
- sign && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "pointer-events-none absolute right-[14px] top-0 flex h-full items-center text-[18px] font-medium leading-6 text-[var(--chekin-color-brand-navy)]", children: sign }),
11929
- trailingAdornment && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "pointer-events-none absolute right-[14px] top-0 flex h-full items-center", children: trailingAdornment }),
11930
- onReset && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12428
+ sign && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { className: "pointer-events-none absolute right-[14px] top-0 flex h-full items-center text-[18px] font-medium leading-6 text-[var(--chekin-color-brand-navy)]", children: sign }),
12429
+ trailingAdornment && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { className: "pointer-events-none absolute right-[14px] top-0 flex h-full items-center", children: trailingAdornment }),
12430
+ onReset && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
11931
12431
  "button",
11932
12432
  {
11933
12433
  type: "button",
@@ -11935,18 +12435,18 @@ var DashboardInput = React44.forwardRef(
11935
12435
  disabled,
11936
12436
  className: "absolute right-0 top-0 flex h-full w-10 items-center justify-center border-0 bg-transparent p-0 text-[#9696b9] hover:opacity-80 disabled:cursor-not-allowed disabled:opacity-50",
11937
12437
  "aria-label": "Reset",
11938
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_lucide_react41.X, { size: 14 })
12438
+ children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_lucide_react42.X, { size: 14 })
11939
12439
  }
11940
12440
  ),
11941
- isPasswordReveal && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12441
+ isPasswordReveal && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
11942
12442
  "button",
11943
12443
  {
11944
12444
  type: "button",
11945
12445
  onClick: togglePasswordReveal,
11946
12446
  className: "absolute right-[14px] top-[18px] flex h-[13px] w-[21px] cursor-pointer items-center justify-center border-0 bg-transparent p-0 hover:opacity-85",
11947
12447
  "aria-label": isPasswordRevealed ? "Hide password" : "Show password",
11948
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
11949
- import_lucide_react41.Eye,
12448
+ children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
12449
+ import_lucide_react42.Eye,
11950
12450
  {
11951
12451
  size: 20,
11952
12452
  className: cn(
@@ -11957,32 +12457,32 @@ var DashboardInput = React44.forwardRef(
11957
12457
  }
11958
12458
  )
11959
12459
  ] }),
11960
- type === "number" && showNumberButtons && /* @__PURE__ */ (0, import_jsx_runtime144.jsxs)("div", { className: "absolute right-[18px] top-[13px] inline-flex items-center text-right", children: [
11961
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12460
+ type === "number" && showNumberButtons && /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)("div", { className: "absolute right-[18px] top-[13px] inline-flex items-center text-right", children: [
12461
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
11962
12462
  "button",
11963
12463
  {
11964
12464
  type: "button",
11965
12465
  onClick: onDecrement,
11966
12466
  className: "mr-2 inline-flex h-[23px] w-8 cursor-pointer items-center justify-center rounded-[3px] border-0 bg-[var(--chekin-color-brand-blue)] p-0 text-[20px] font-bold text-white outline-none hover:opacity-90 active:opacity-100",
11967
12467
  "aria-label": "Decrement",
11968
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_lucide_react41.Minus, { size: 16, strokeWidth: 3, "aria-hidden": true })
12468
+ children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_lucide_react42.Minus, { size: 16, strokeWidth: 3, "aria-hidden": true })
11969
12469
  }
11970
12470
  ),
11971
- /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12471
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
11972
12472
  "button",
11973
12473
  {
11974
12474
  type: "button",
11975
12475
  onClick: onIncrement,
11976
12476
  className: "inline-flex h-[23px] w-8 cursor-pointer items-center justify-center rounded-[3px] border-0 bg-[var(--chekin-color-brand-blue)] p-0 text-[20px] font-bold text-white outline-none hover:opacity-90 active:opacity-100",
11977
12477
  "aria-label": "Increment",
11978
- children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_lucide_react41.Plus, { size: 16, strokeWidth: 3, "aria-hidden": true })
12478
+ children: /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(import_lucide_react42.Plus, { size: 16, strokeWidth: 3, "aria-hidden": true })
11979
12479
  }
11980
12480
  )
11981
12481
  ] })
11982
12482
  ]
11983
12483
  }
11984
12484
  ),
11985
- !errorMessage && optional && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12485
+ !errorMessage && optional && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
11986
12486
  "span",
11987
12487
  {
11988
12488
  "data-testid": `${name}-optional`,
@@ -11990,8 +12490,8 @@ var DashboardInput = React44.forwardRef(
11990
12490
  children: typeof optional === "string" ? optional : t("optional")
11991
12491
  }
11992
12492
  ),
11993
- !errorMessage && helperText && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)("span", { className: "mt-[1px] block text-[12px] font-normal text-[var(--chekin-color-gray-1)]", children: helperText }),
11994
- errorMessage && renderErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
12493
+ !errorMessage && helperText && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { className: "mt-[1px] block text-[12px] font-normal text-[var(--chekin-color-gray-1)]", children: helperText }),
12494
+ errorMessage && renderErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
11995
12495
  FieldErrorMessage,
11996
12496
  {
11997
12497
  id: errorId,
@@ -12010,11 +12510,11 @@ DashboardInput.displayName = "DashboardInput";
12010
12510
 
12011
12511
  // src/dashboard/select/Select.tsx
12012
12512
  var React48 = __toESM(require("react"), 1);
12013
- var import_react_i18next28 = require("react-i18next");
12513
+ var import_react_i18next30 = require("react-i18next");
12014
12514
 
12015
12515
  // src/dashboard/_select-internals/SelectFieldShell.tsx
12016
- var import_react_i18next25 = require("react-i18next");
12017
- var import_jsx_runtime145 = require("react/jsx-runtime");
12516
+ var import_react_i18next27 = require("react-i18next");
12517
+ var import_jsx_runtime147 = require("react/jsx-runtime");
12018
12518
  function SelectFieldShell({
12019
12519
  containerRef,
12020
12520
  className,
@@ -12033,9 +12533,9 @@ function SelectFieldShell({
12033
12533
  onBlur,
12034
12534
  children
12035
12535
  }) {
12036
- const { t } = (0, import_react_i18next25.useTranslation)();
12536
+ const { t } = (0, import_react_i18next27.useTranslation)();
12037
12537
  const wrapperWidth = toCssSize(width);
12038
- return /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)(
12538
+ return /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
12039
12539
  "div",
12040
12540
  {
12041
12541
  ref: containerRef,
@@ -12048,9 +12548,9 @@ function SelectFieldShell({
12048
12548
  ),
12049
12549
  style: wrapperWidth ? { width: wrapperWidth } : void 0,
12050
12550
  children: [
12051
- name && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("input", { type: "hidden", name, value: hiddenValue ?? "" }),
12052
- /* @__PURE__ */ (0, import_jsx_runtime145.jsxs)("div", { className: "relative min-h-[68px] w-full", children: [
12053
- topLabel && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
12551
+ name && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("input", { type: "hidden", name, value: hiddenValue ?? "" }),
12552
+ /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)("div", { className: "relative min-h-[68px] w-full", children: [
12553
+ topLabel && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
12054
12554
  "label",
12055
12555
  {
12056
12556
  htmlFor: triggerId,
@@ -12058,10 +12558,10 @@ function SelectFieldShell({
12058
12558
  children: topLabel
12059
12559
  }
12060
12560
  ),
12061
- /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("div", { className: "relative w-full", children }),
12062
- !errorMessage && optional && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "mt-[1px] block text-left text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: typeof optional === "string" ? optional : t("optional") }),
12063
- !errorMessage && helperText && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)("span", { className: "mt-[1px] block text-[12px] font-normal text-[var(--chekin-color-gray-1)]", children: helperText }),
12064
- errorMessage && !hideErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
12561
+ /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("div", { className: "relative w-full", children }),
12562
+ !errorMessage && optional && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { className: "mt-[1px] block text-left text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: typeof optional === "string" ? optional : t("optional") }),
12563
+ !errorMessage && helperText && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)("span", { className: "mt-[1px] block text-[12px] font-normal text-[var(--chekin-color-gray-1)]", children: helperText }),
12564
+ errorMessage && !hideErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
12065
12565
  FieldErrorMessage,
12066
12566
  {
12067
12567
  id: errorId,
@@ -12076,7 +12576,7 @@ function SelectFieldShell({
12076
12576
  }
12077
12577
 
12078
12578
  // src/dashboard/_select-internals/SelectMenu.tsx
12079
- var import_react_i18next26 = require("react-i18next");
12579
+ var import_react_i18next28 = require("react-i18next");
12080
12580
 
12081
12581
  // src/dashboard/_select-internals/utils.ts
12082
12582
  function getOptionIndex(options, option) {
@@ -12107,7 +12607,7 @@ function isOptionSelected(option, selectedValue, selectedValues) {
12107
12607
  }
12108
12608
 
12109
12609
  // src/dashboard/_select-internals/SelectMenu.tsx
12110
- var import_jsx_runtime146 = require("react/jsx-runtime");
12610
+ var import_jsx_runtime148 = require("react/jsx-runtime");
12111
12611
  function SelectMenu({
12112
12612
  id,
12113
12613
  options,
@@ -12129,10 +12629,10 @@ function SelectMenu({
12129
12629
  emptyContent,
12130
12630
  footer
12131
12631
  }) {
12132
- const { t } = (0, import_react_i18next26.useTranslation)();
12632
+ const { t } = (0, import_react_i18next28.useTranslation)();
12133
12633
  const emptyMessage = noOptionsMessage?.() ?? t("no_options");
12134
12634
  const hasOptions = options.length > 0;
12135
- return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
12635
+ return /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
12136
12636
  "div",
12137
12637
  {
12138
12638
  id,
@@ -12149,13 +12649,13 @@ function SelectMenu({
12149
12649
  menuClassName
12150
12650
  ),
12151
12651
  children: [
12152
- !hasOptions && (emptyContent ?? /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("div", { className: "mt-[10px] text-left text-[16px] text-[var(--chekin-color-brand-navy)]", children: emptyMessage })),
12652
+ !hasOptions && (emptyContent ?? /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("div", { className: "mt-[10px] text-left text-[16px] text-[var(--chekin-color-brand-navy)]", children: emptyMessage })),
12153
12653
  options.map((option, index) => {
12154
12654
  const isSelected = isOptionSelected(option, selectedValue, selectedValues);
12155
12655
  const isHighlighted = index === highlightedIndex;
12156
12656
  const optionKey = `${String(option.value)}-${index}`;
12157
12657
  const isOptionDisabled = Boolean(disabled || option.isDisabled);
12158
- return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
12658
+ return /* @__PURE__ */ (0, import_jsx_runtime148.jsxs)(
12159
12659
  "button",
12160
12660
  {
12161
12661
  id: getOptionId2(index),
@@ -12178,8 +12678,8 @@ function SelectMenu({
12178
12678
  isOptionDisabled && "cursor-default opacity-30"
12179
12679
  ),
12180
12680
  children: [
12181
- /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { className: "block break-words", children: option.label }),
12182
- option.description && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)("span", { className: "ml-2 mt-[3px] shrink-0 text-[12px] font-bold italic text-[#777e91]", children: option.description })
12681
+ /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", { className: "block break-words", children: option.label }),
12682
+ option.description && /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("span", { className: "ml-2 mt-[3px] shrink-0 text-[12px] font-bold italic text-[#777e91]", children: option.description })
12183
12683
  ]
12184
12684
  },
12185
12685
  optionKey
@@ -12192,11 +12692,11 @@ function SelectMenu({
12192
12692
  }
12193
12693
 
12194
12694
  // src/dashboard/_select-internals/SelectMenuPanel.tsx
12195
- var import_react_i18next27 = require("react-i18next");
12196
- var import_jsx_runtime147 = require("react/jsx-runtime");
12695
+ var import_react_i18next29 = require("react-i18next");
12696
+ var import_jsx_runtime149 = require("react/jsx-runtime");
12197
12697
  function SelectMenuPanel({
12198
12698
  isOpen,
12199
- isMobile: isMobile2,
12699
+ isMobile: isMobile3,
12200
12700
  onClose,
12201
12701
  title,
12202
12702
  description,
@@ -12205,29 +12705,29 @@ function SelectMenuPanel({
12205
12705
  drawerContentClassName,
12206
12706
  children
12207
12707
  }) {
12208
- const { t } = (0, import_react_i18next27.useTranslation)();
12708
+ const { t } = (0, import_react_i18next29.useTranslation)();
12209
12709
  if (!isOpen) return null;
12210
- if (isMobile2) {
12710
+ if (isMobile3) {
12211
12711
  const fallbackTitle = t("select_option");
12212
12712
  const titleText = typeof title === "string" || typeof title === "number" ? String(title) : fallbackTitle;
12213
12713
  const descriptionText = typeof description === "string" || typeof description === "number" ? String(description) : titleText;
12214
- return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
12714
+ return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
12215
12715
  Drawer,
12216
12716
  {
12217
12717
  open: isOpen,
12218
12718
  onOpenChange: (next) => {
12219
12719
  if (!next) onClose();
12220
12720
  },
12221
- children: /* @__PURE__ */ (0, import_jsx_runtime147.jsxs)(
12721
+ children: /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(
12222
12722
  DrawerContent,
12223
12723
  {
12224
12724
  onClose,
12225
12725
  lockScroll: false,
12226
12726
  className: cn("max-h-[calc(100vh-1rem)]", drawerClassName),
12227
12727
  children: [
12228
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(DrawerTitle, { className: "sr-only", children: titleText }),
12229
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(DrawerDescription, { className: "sr-only", children: descriptionText }),
12230
- /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
12728
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(DrawerTitle, { className: "sr-only", children: titleText }),
12729
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(DrawerDescription, { className: "sr-only", children: descriptionText }),
12730
+ /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
12231
12731
  "div",
12232
12732
  {
12233
12733
  className: cn(
@@ -12243,7 +12743,7 @@ function SelectMenuPanel({
12243
12743
  }
12244
12744
  );
12245
12745
  }
12246
- return /* @__PURE__ */ (0, import_jsx_runtime147.jsx)(
12746
+ return /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
12247
12747
  "div",
12248
12748
  {
12249
12749
  className: cn(
@@ -12256,7 +12756,7 @@ function SelectMenuPanel({
12256
12756
  }
12257
12757
 
12258
12758
  // src/dashboard/_select-internals/SelectSearchInput.tsx
12259
- var import_jsx_runtime148 = require("react/jsx-runtime");
12759
+ var import_jsx_runtime150 = require("react/jsx-runtime");
12260
12760
  function SelectSearchInput({
12261
12761
  inputRef,
12262
12762
  value,
@@ -12266,7 +12766,7 @@ function SelectSearchInput({
12266
12766
  onChange,
12267
12767
  onKeyDown
12268
12768
  }) {
12269
- return /* @__PURE__ */ (0, import_jsx_runtime148.jsx)("div", { className: "border-b border-[#f2f4f8] px-4 pb-2 pt-3", children: /* @__PURE__ */ (0, import_jsx_runtime148.jsx)(
12769
+ return /* @__PURE__ */ (0, import_jsx_runtime150.jsx)("div", { className: "border-b border-[#f2f4f8] px-4 pb-2 pt-3", children: /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
12270
12770
  "input",
12271
12771
  {
12272
12772
  ref: inputRef,
@@ -12284,8 +12784,8 @@ function SelectSearchInput({
12284
12784
  }
12285
12785
 
12286
12786
  // src/dashboard/_select-internals/SelectTrigger.tsx
12287
- var import_lucide_react42 = require("lucide-react");
12288
- var import_jsx_runtime149 = require("react/jsx-runtime");
12787
+ var import_lucide_react43 = require("lucide-react");
12788
+ var import_jsx_runtime151 = require("react/jsx-runtime");
12289
12789
  function SelectTrigger({
12290
12790
  triggerRef,
12291
12791
  triggerId,
@@ -12306,7 +12806,7 @@ function SelectTrigger({
12306
12806
  onBlur
12307
12807
  }) {
12308
12808
  const isEmpty = !hasValue;
12309
- return /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)(
12809
+ return /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)(
12310
12810
  "button",
12311
12811
  {
12312
12812
  id: triggerId,
@@ -12330,11 +12830,11 @@ function SelectTrigger({
12330
12830
  loading && "cursor-progress"
12331
12831
  ),
12332
12832
  children: [
12333
- /* @__PURE__ */ (0, import_jsx_runtime149.jsx)("span", { id: valueId, className: "block min-w-0 flex-1 truncate text-left", children: valueLabel ?? (isOpen ? placeholder : null) }),
12334
- /* @__PURE__ */ (0, import_jsx_runtime149.jsxs)("span", { className: "pointer-events-none flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: [
12335
- loading && /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(ThreeDotsLoader, { height: 18, width: 18 }),
12336
- /* @__PURE__ */ (0, import_jsx_runtime149.jsx)(
12337
- import_lucide_react42.ChevronDown,
12833
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { id: valueId, className: "block min-w-0 flex-1 truncate text-left", children: valueLabel ?? (isOpen ? placeholder : null) }),
12834
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("span", { className: "pointer-events-none flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: [
12835
+ loading && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(ThreeDotsLoader, { height: 18, width: 18 }),
12836
+ /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
12837
+ import_lucide_react43.ChevronDown,
12338
12838
  {
12339
12839
  size: 16,
12340
12840
  className: cn(
@@ -12388,7 +12888,7 @@ function useSelectIds({
12388
12888
  var React46 = __toESM(require("react"), 1);
12389
12889
  function useSelectMenuState({
12390
12890
  isBlocked,
12391
- isMobile: isMobile2,
12891
+ isMobile: isMobile3,
12392
12892
  onOutsideClick
12393
12893
  }) {
12394
12894
  const containerRef = React46.useRef(null);
@@ -12409,7 +12909,7 @@ function useSelectMenuState({
12409
12909
  setIsOpen(false);
12410
12910
  onOutsideClick?.();
12411
12911
  },
12412
- isDisabled: !isOpen || isMobile2
12912
+ isDisabled: !isOpen || isMobile3
12413
12913
  });
12414
12914
  React46.useEffect(() => {
12415
12915
  if (isBlocked) setIsOpen(false);
@@ -12434,7 +12934,7 @@ function useSelectSearch({
12434
12934
  }
12435
12935
 
12436
12936
  // src/dashboard/select/Select.tsx
12437
- var import_jsx_runtime150 = require("react/jsx-runtime");
12937
+ var import_jsx_runtime152 = require("react/jsx-runtime");
12438
12938
  function DashboardSelectInternal({
12439
12939
  options = [],
12440
12940
  value,
@@ -12468,8 +12968,8 @@ function DashboardSelectInternal({
12468
12968
  const listRef = React48.useRef(null);
12469
12969
  const optionRefs = React48.useRef([]);
12470
12970
  const [highlightedIndex, setHighlightedIndex] = React48.useState(-1);
12471
- const isMobile2 = useIsMobile();
12472
- const { t } = (0, import_react_i18next28.useTranslation)();
12971
+ const isMobile3 = useIsMobile();
12972
+ const { t } = (0, import_react_i18next30.useTranslation)();
12473
12973
  const resolvedSearchPlaceholder = searchPlaceholder ?? t("search_placeholder");
12474
12974
  const hasValue = Boolean(value);
12475
12975
  const isBlocked = Boolean(disabled) || Boolean(loading);
@@ -12479,7 +12979,7 @@ function DashboardSelectInternal({
12479
12979
  const valueLabel = value ? getValueLabel?.(value) ?? String(value.label) : void 0;
12480
12980
  const { containerRef, isOpen, closeMenu, toggleMenu, setIsOpen } = useSelectMenuState({
12481
12981
  isBlocked,
12482
- isMobile: isMobile2
12982
+ isMobile: isMobile3
12483
12983
  });
12484
12984
  const { triggerId, labelId, valueId, listboxId, describedErrorId, errorId, getOptionId: getOptionId2 } = useSelectIds({ name, hasValue, error, hideErrorMessage });
12485
12985
  const { searchValue, setSearchValue, filteredOptions } = useSelectSearch({
@@ -12558,7 +13058,7 @@ function DashboardSelectInternal({
12558
13058
  setIsOpen(false);
12559
13059
  }
12560
13060
  };
12561
- return /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(
13061
+ return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
12562
13062
  SelectFieldShell,
12563
13063
  {
12564
13064
  containerRef,
@@ -12576,7 +13076,7 @@ function DashboardSelectInternal({
12576
13076
  name,
12577
13077
  hiddenValue: value ? String(value.value) : "",
12578
13078
  children: [
12579
- /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
13079
+ /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
12580
13080
  SelectTrigger,
12581
13081
  {
12582
13082
  triggerRef,
@@ -12598,7 +13098,7 @@ function DashboardSelectInternal({
12598
13098
  onBlur
12599
13099
  }
12600
13100
  ),
12601
- /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
13101
+ /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
12602
13102
  Fieldset,
12603
13103
  {
12604
13104
  isFocused: isOpen,
@@ -12615,17 +13115,17 @@ function DashboardSelectInternal({
12615
13115
  onClick: !isBlocked ? toggleMenu : void 0
12616
13116
  }
12617
13117
  ),
12618
- /* @__PURE__ */ (0, import_jsx_runtime150.jsxs)(
13118
+ /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
12619
13119
  SelectMenuPanel,
12620
13120
  {
12621
13121
  isOpen,
12622
- isMobile: isMobile2,
13122
+ isMobile: isMobile3,
12623
13123
  onClose: closeMenu,
12624
13124
  title: typeof label === "string" ? label : void 0,
12625
13125
  className: dropdownClassName,
12626
13126
  drawerClassName,
12627
13127
  children: [
12628
- searchable && /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
13128
+ searchable && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
12629
13129
  SelectSearchInput,
12630
13130
  {
12631
13131
  inputRef: searchInputRef,
@@ -12637,7 +13137,7 @@ function DashboardSelectInternal({
12637
13137
  onKeyDown: handleSearchKeyDown
12638
13138
  }
12639
13139
  ),
12640
- /* @__PURE__ */ (0, import_jsx_runtime150.jsx)(
13140
+ /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
12641
13141
  SelectMenu,
12642
13142
  {
12643
13143
  id: listboxId,
@@ -12671,23 +13171,23 @@ var DashboardSelect = React48.forwardRef(
12671
13171
 
12672
13172
  // src/dashboard/multi-select/MultiSelect.tsx
12673
13173
  var React49 = __toESM(require("react"), 1);
12674
- var import_lucide_react44 = require("lucide-react");
12675
- var import_react_i18next30 = require("react-i18next");
13174
+ var import_lucide_react45 = require("lucide-react");
13175
+ var import_react_i18next32 = require("react-i18next");
12676
13176
 
12677
13177
  // src/dashboard/multi-select/MultiSelectChip.tsx
12678
- var import_lucide_react43 = require("lucide-react");
12679
- var import_react_i18next29 = require("react-i18next");
12680
- var import_jsx_runtime151 = require("react/jsx-runtime");
13178
+ var import_lucide_react44 = require("lucide-react");
13179
+ var import_react_i18next31 = require("react-i18next");
13180
+ var import_jsx_runtime153 = require("react/jsx-runtime");
12681
13181
  function MultiSelectChip({
12682
13182
  option,
12683
13183
  readOnly,
12684
13184
  onRemove
12685
13185
  }) {
12686
- const { t } = (0, import_react_i18next29.useTranslation)();
13186
+ const { t } = (0, import_react_i18next31.useTranslation)();
12687
13187
  const labelText = typeof option.label === "string" ? option.label : String(option.value);
12688
- return /* @__PURE__ */ (0, import_jsx_runtime151.jsxs)("span", { className: "inline-flex items-center gap-2 rounded-[4px] border border-[#acacd5] bg-[#f0f0f8] py-[2px] pl-[10px] pr-1 text-[12px] font-medium text-[var(--chekin-color-brand-navy)]", children: [
12689
- /* @__PURE__ */ (0, import_jsx_runtime151.jsx)("span", { className: "whitespace-nowrap", children: option.label }),
12690
- !readOnly && /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(
13188
+ return /* @__PURE__ */ (0, import_jsx_runtime153.jsxs)("span", { className: "inline-flex items-center gap-2 rounded-[4px] border border-[#acacd5] bg-[#f0f0f8] py-[2px] pl-[10px] pr-1 text-[12px] font-medium text-[var(--chekin-color-brand-navy)]", children: [
13189
+ /* @__PURE__ */ (0, import_jsx_runtime153.jsx)("span", { className: "whitespace-nowrap", children: option.label }),
13190
+ !readOnly && /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(
12691
13191
  "button",
12692
13192
  {
12693
13193
  type: "button",
@@ -12697,14 +13197,14 @@ function MultiSelectChip({
12697
13197
  },
12698
13198
  className: "flex h-[15px] w-[15px] items-center justify-center rounded-[3px] border-0 bg-transparent p-0 text-[#9696b9] hover:shadow-[0_3px_3px_#0f477734]",
12699
13199
  "aria-label": t("remove_item", { label: labelText }),
12700
- children: /* @__PURE__ */ (0, import_jsx_runtime151.jsx)(import_lucide_react43.SquareX, { size: 15, fill: "#9696b9", color: "#f8f8f8", strokeWidth: 1.8 })
13200
+ children: /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(import_lucide_react44.SquareX, { size: 15, fill: "#9696b9", color: "#f8f8f8", strokeWidth: 1.8 })
12701
13201
  }
12702
13202
  )
12703
13203
  ] });
12704
13204
  }
12705
13205
 
12706
13206
  // src/dashboard/multi-select/MultiSelect.tsx
12707
- var import_jsx_runtime152 = require("react/jsx-runtime");
13207
+ var import_jsx_runtime154 = require("react/jsx-runtime");
12708
13208
  var isValueSelected = (selected, option) => selected.some((item) => item.value === option.value);
12709
13209
  function DashboardMultiSelectInternal({
12710
13210
  options = [],
@@ -12744,8 +13244,8 @@ function DashboardMultiSelectInternal({
12744
13244
  const optionRefs = React49.useRef([]);
12745
13245
  const [isFocused, setIsFocused] = React49.useState(false);
12746
13246
  const [highlightedIndex, setHighlightedIndex] = React49.useState(-1);
12747
- const isMobile2 = useIsMobile();
12748
- const { t } = (0, import_react_i18next30.useTranslation)();
13247
+ const isMobile3 = useIsMobile();
13248
+ const { t } = (0, import_react_i18next32.useTranslation)();
12749
13249
  const selectedValues = React49.useMemo(() => value ?? [], [value]);
12750
13250
  const hasValue = selectedValues.length > 0;
12751
13251
  const isEmpty = !hasValue;
@@ -12755,7 +13255,7 @@ function DashboardMultiSelectInternal({
12755
13255
  const errorMessage = typeof error === "string" ? error : void 0;
12756
13256
  const { containerRef, isOpen, closeMenu, setIsOpen } = useSelectMenuState({
12757
13257
  isBlocked,
12758
- isMobile: isMobile2,
13258
+ isMobile: isMobile3,
12759
13259
  onOutsideClick: () => setIsFocused(false)
12760
13260
  });
12761
13261
  const { triggerId, labelId, valueId, listboxId, describedErrorId, errorId, getOptionId: getOptionId2 } = useSelectIds({ name, hasValue, error, hideErrorMessage });
@@ -12797,12 +13297,12 @@ function DashboardMultiSelectInternal({
12797
13297
  });
12798
13298
  }, [isOpen, filteredOptions]);
12799
13299
  React49.useEffect(() => {
12800
- if (!isOpen || !isMobile2) return;
13300
+ if (!isOpen || !isMobile3) return;
12801
13301
  const frame = window.requestAnimationFrame(
12802
13302
  () => mobileSearchInputRef.current?.focus()
12803
13303
  );
12804
13304
  return () => window.cancelAnimationFrame(frame);
12805
- }, [isOpen, isMobile2]);
13305
+ }, [isOpen, isMobile3]);
12806
13306
  const openMenu = () => {
12807
13307
  if (isBlocked) return;
12808
13308
  setIsOpen(true);
@@ -12899,7 +13399,7 @@ function DashboardMultiSelectInternal({
12899
13399
  setIsFocused(false);
12900
13400
  onBlur?.(event);
12901
13401
  };
12902
- return /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
13402
+ return /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(
12903
13403
  SelectFieldShell,
12904
13404
  {
12905
13405
  containerRef,
@@ -12918,7 +13418,7 @@ function DashboardMultiSelectInternal({
12918
13418
  hiddenValue: selectedValues.map((item) => String(item.value)).join(","),
12919
13419
  onBlur: handleInputBlur,
12920
13420
  children: [
12921
- /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
13421
+ /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(
12922
13422
  "div",
12923
13423
  {
12924
13424
  id: triggerId,
@@ -12941,7 +13441,7 @@ function DashboardMultiSelectInternal({
12941
13441
  ),
12942
13442
  children: [
12943
13443
  selectedValues.map(
12944
- (option) => renderChip ? /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(React49.Fragment, { children: renderChip(option, () => removeOption(option)) }, String(option.value)) : /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
13444
+ (option) => renderChip ? /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(React49.Fragment, { children: renderChip(option, () => removeOption(option)) }, String(option.value)) : /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
12945
13445
  MultiSelectChip,
12946
13446
  {
12947
13447
  option,
@@ -12951,7 +13451,7 @@ function DashboardMultiSelectInternal({
12951
13451
  String(option.value)
12952
13452
  )
12953
13453
  ),
12954
- /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
13454
+ /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
12955
13455
  "input",
12956
13456
  {
12957
13457
  ref: inputRef,
@@ -12980,9 +13480,9 @@ function DashboardMultiSelectInternal({
12980
13480
  "aria-activedescendant": isOpen && highlightedIndex >= 0 ? getOptionId2(highlightedIndex) : void 0
12981
13481
  }
12982
13482
  ),
12983
- /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)("span", { className: "ml-auto flex items-center gap-2 pl-2 text-[var(--chekin-color-gray-2)]", children: [
12984
- loading && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(ThreeDotsLoader, { height: 18, width: 18 }),
12985
- hasValue && !readOnly && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
13483
+ /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)("span", { className: "ml-auto flex items-center gap-2 pl-2 text-[var(--chekin-color-gray-2)]", children: [
13484
+ loading && /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(ThreeDotsLoader, { height: 18, width: 18 }),
13485
+ hasValue && !readOnly && /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
12986
13486
  "button",
12987
13487
  {
12988
13488
  type: "button",
@@ -12992,10 +13492,10 @@ function DashboardMultiSelectInternal({
12992
13492
  },
12993
13493
  className: "flex h-5 w-5 items-center justify-center rounded-[3px] border-0 bg-transparent p-0 text-[#9696b9] hover:shadow-[0_3px_3px_#0f477734]",
12994
13494
  "aria-label": t("clear_all"),
12995
- children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(import_lucide_react44.SquareX, { size: 15, fill: "#9696b9", color: "#f8f8f8", strokeWidth: 1.8 })
13495
+ children: /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(import_lucide_react45.SquareX, { size: 15, fill: "#9696b9", color: "#f8f8f8", strokeWidth: 1.8 })
12996
13496
  }
12997
13497
  ),
12998
- /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
13498
+ /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
12999
13499
  RotateArrow,
13000
13500
  {
13001
13501
  shouldRotate: isOpen,
@@ -13008,7 +13508,7 @@ function DashboardMultiSelectInternal({
13008
13508
  ]
13009
13509
  }
13010
13510
  ),
13011
- /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
13511
+ /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
13012
13512
  Fieldset,
13013
13513
  {
13014
13514
  isFocused: isFocused || isOpen,
@@ -13026,11 +13526,11 @@ function DashboardMultiSelectInternal({
13026
13526
  onClick: handleContainerClick
13027
13527
  }
13028
13528
  ),
13029
- /* @__PURE__ */ (0, import_jsx_runtime152.jsxs)(
13529
+ /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(
13030
13530
  SelectMenuPanel,
13031
13531
  {
13032
13532
  isOpen,
13033
- isMobile: isMobile2,
13533
+ isMobile: isMobile3,
13034
13534
  onClose: () => {
13035
13535
  closeMenu();
13036
13536
  setIsFocused(false);
@@ -13039,7 +13539,7 @@ function DashboardMultiSelectInternal({
13039
13539
  className: dropdownClassName,
13040
13540
  drawerClassName,
13041
13541
  children: [
13042
- isMobile2 && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)("div", { className: "border-b border-[#f2f4f8] px-4 pb-2 pt-3", children: /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
13542
+ isMobile3 && /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("div", { className: "border-b border-[#f2f4f8] px-4 pb-2 pt-3", children: /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
13043
13543
  "input",
13044
13544
  {
13045
13545
  ref: mobileSearchInputRef,
@@ -13054,7 +13554,7 @@ function DashboardMultiSelectInternal({
13054
13554
  className: "m-0 box-border h-9 w-full rounded-md border border-[var(--chekin-color-gray-3)] bg-white px-3 text-[16px] font-medium text-[var(--chekin-color-brand-navy)] outline-none transition-colors placeholder:text-[var(--chekin-color-gray-1)] focus:border-[var(--chekin-color-brand-blue)]"
13055
13555
  }
13056
13556
  ) }),
13057
- /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
13557
+ /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
13058
13558
  SelectMenu,
13059
13559
  {
13060
13560
  id: listboxId,
@@ -13076,7 +13576,7 @@ function DashboardMultiSelectInternal({
13076
13576
  isMulti: true
13077
13577
  }
13078
13578
  ),
13079
- canCreateNewOption && /* @__PURE__ */ (0, import_jsx_runtime152.jsx)(
13579
+ canCreateNewOption && /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
13080
13580
  "button",
13081
13581
  {
13082
13582
  type: "button",
@@ -13098,20 +13598,20 @@ var DashboardMultiSelect = React49.forwardRef(
13098
13598
 
13099
13599
  // src/dashboard/creatable-multi-select/CreatableMultiSelect.tsx
13100
13600
  var React50 = __toESM(require("react"), 1);
13101
- var import_jsx_runtime153 = require("react/jsx-runtime");
13601
+ var import_jsx_runtime155 = require("react/jsx-runtime");
13102
13602
  var DashboardCreatableMultiSelect = React50.forwardRef(
13103
13603
  function DashboardCreatableMultiSelect2(props, ref) {
13104
- return /* @__PURE__ */ (0, import_jsx_runtime153.jsx)(DashboardMultiSelect, { ref, ...props, isCreatable: true });
13604
+ return /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(DashboardMultiSelect, { ref, ...props, isCreatable: true });
13105
13605
  }
13106
13606
  );
13107
13607
 
13108
13608
  // src/dashboard/infinite-scroll-select/InfiniteScrollSelect.tsx
13109
13609
  var React51 = __toESM(require("react"), 1);
13110
13610
  var import_react_virtual2 = require("@tanstack/react-virtual");
13111
- var import_react_i18next31 = require("react-i18next");
13611
+ var import_react_i18next33 = require("react-i18next");
13112
13612
 
13113
13613
  // src/dashboard/infinite-scroll-select/InfiniteScrollList.tsx
13114
- var import_jsx_runtime154 = require("react/jsx-runtime");
13614
+ var import_jsx_runtime156 = require("react/jsx-runtime");
13115
13615
  function InfiniteScrollList({
13116
13616
  scrollRef,
13117
13617
  listboxId,
@@ -13132,13 +13632,13 @@ function InfiniteScrollList({
13132
13632
  onHighlight
13133
13633
  }) {
13134
13634
  const virtualItems = virtualizer.getVirtualItems();
13135
- return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
13635
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
13136
13636
  "div",
13137
13637
  {
13138
13638
  ref: scrollRef,
13139
13639
  className: cn("overflow-y-auto", menuClassName),
13140
13640
  style: { height: `${height}px` },
13141
- children: /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
13641
+ children: /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
13142
13642
  "div",
13143
13643
  {
13144
13644
  id: listboxId,
@@ -13155,7 +13655,7 @@ function InfiniteScrollList({
13155
13655
  const isSelected = !isLoaderRow && option ? option.value === value?.value : false;
13156
13656
  const isHighlighted = virtualItem.index === highlightedIndex;
13157
13657
  const isOptionDisabled = Boolean(isBlocked || option?.isDisabled);
13158
- return /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(
13658
+ return /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
13159
13659
  "div",
13160
13660
  {
13161
13661
  "data-index": virtualItem.index,
@@ -13164,10 +13664,10 @@ function InfiniteScrollList({
13164
13664
  height: `${virtualItem.size}px`,
13165
13665
  transform: `translateY(${virtualItem.start}px)`
13166
13666
  },
13167
- children: isLoaderRow ? /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)("div", { className: "flex h-full items-center justify-center gap-2 px-4 text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: [
13168
- /* @__PURE__ */ (0, import_jsx_runtime154.jsx)(ThreeDotsLoader, { height: 36, width: 36 }),
13169
- /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("span", { children: loadingMoreText })
13170
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime154.jsxs)(
13667
+ children: isLoaderRow ? /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: "flex h-full items-center justify-center gap-2 px-4 text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: [
13668
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(ThreeDotsLoader, { height: 36, width: 36 }),
13669
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("span", { children: loadingMoreText })
13670
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
13171
13671
  "button",
13172
13672
  {
13173
13673
  id: getOptionId2(virtualItem.index),
@@ -13186,8 +13686,8 @@ function InfiniteScrollList({
13186
13686
  isOptionDisabled && "cursor-default opacity-30"
13187
13687
  ),
13188
13688
  children: [
13189
- /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("span", { className: "block break-words", children: option?.label }),
13190
- option?.description && /* @__PURE__ */ (0, import_jsx_runtime154.jsx)("span", { className: "ml-2 mt-[3px] shrink-0 text-[12px] font-bold italic text-[#777e91]", children: option.description })
13689
+ /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("span", { className: "block break-words", children: option?.label }),
13690
+ option?.description && /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("span", { className: "ml-2 mt-[3px] shrink-0 text-[12px] font-bold italic text-[#777e91]", children: option.description })
13191
13691
  ]
13192
13692
  }
13193
13693
  )
@@ -13202,7 +13702,7 @@ function InfiniteScrollList({
13202
13702
  }
13203
13703
 
13204
13704
  // src/dashboard/infinite-scroll-select/InfiniteScrollSelect.tsx
13205
- var import_jsx_runtime155 = require("react/jsx-runtime");
13705
+ var import_jsx_runtime157 = require("react/jsx-runtime");
13206
13706
  var DEFAULT_ITEM_HEIGHT = 60;
13207
13707
  var DEFAULT_LIST_HEIGHT = 322;
13208
13708
  var DEFAULT_OVERSCAN = 5;
@@ -13250,8 +13750,8 @@ function DashboardInfiniteScrollSelectInternal({
13250
13750
  const previousHighlightedIndexRef = React51.useRef(-1);
13251
13751
  const lastLoadMoreOptionsLengthRef = React51.useRef(null);
13252
13752
  const [highlightedIndex, setHighlightedIndex] = React51.useState(-1);
13253
- const isMobile2 = useIsMobile();
13254
- const { t } = (0, import_react_i18next31.useTranslation)();
13753
+ const isMobile3 = useIsMobile();
13754
+ const { t } = (0, import_react_i18next33.useTranslation)();
13255
13755
  const resolvedSearchPlaceholder = searchPlaceholder ?? t("search_placeholder");
13256
13756
  const resolvedLoadingMoreText = loadingMoreText ?? t("loading_more");
13257
13757
  const hasValue = Boolean(value);
@@ -13262,7 +13762,7 @@ function DashboardInfiniteScrollSelectInternal({
13262
13762
  const valueLabel = value ? getValueLabel?.(value) ?? String(value.label) : void 0;
13263
13763
  const { containerRef, isOpen, closeMenu, toggleMenu, setIsOpen } = useSelectMenuState({
13264
13764
  isBlocked,
13265
- isMobile: isMobile2
13765
+ isMobile: isMobile3
13266
13766
  });
13267
13767
  const { triggerId, labelId, valueId, listboxId, describedErrorId, errorId, getOptionId: getOptionId2 } = useSelectIds({ name, hasValue, error, hideErrorMessage });
13268
13768
  const { searchValue, setSearchValue, filteredOptions } = useSelectSearch({
@@ -13375,7 +13875,7 @@ function DashboardInfiniteScrollSelectInternal({
13375
13875
  const totalSize = virtualizer.getTotalSize();
13376
13876
  const measuredListHeight = Math.min(listHeight, Math.max(totalSize, itemHeight));
13377
13877
  const activeOptionId = highlightedIndex >= 0 ? getOptionId2(highlightedIndex) : void 0;
13378
- return /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(
13878
+ return /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(
13379
13879
  SelectFieldShell,
13380
13880
  {
13381
13881
  containerRef,
@@ -13393,7 +13893,7 @@ function DashboardInfiniteScrollSelectInternal({
13393
13893
  name,
13394
13894
  hiddenValue: value ? String(value.value) : "",
13395
13895
  children: [
13396
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
13896
+ /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
13397
13897
  SelectTrigger,
13398
13898
  {
13399
13899
  triggerRef,
@@ -13415,7 +13915,7 @@ function DashboardInfiniteScrollSelectInternal({
13415
13915
  onBlur
13416
13916
  }
13417
13917
  ),
13418
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
13918
+ /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
13419
13919
  Fieldset,
13420
13920
  {
13421
13921
  isFocused: isOpen,
@@ -13432,17 +13932,17 @@ function DashboardInfiniteScrollSelectInternal({
13432
13932
  onClick: !isBlocked ? toggleMenu : void 0
13433
13933
  }
13434
13934
  ),
13435
- /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)(
13935
+ /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(
13436
13936
  SelectMenuPanel,
13437
13937
  {
13438
13938
  isOpen,
13439
- isMobile: isMobile2,
13939
+ isMobile: isMobile3,
13440
13940
  onClose: closeMenu,
13441
13941
  title: typeof label === "string" ? label : void 0,
13442
13942
  className: dropdownClassName,
13443
13943
  drawerClassName,
13444
13944
  children: [
13445
- searchable && /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
13945
+ searchable && /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
13446
13946
  SelectSearchInput,
13447
13947
  {
13448
13948
  inputRef: searchInputRef,
@@ -13454,10 +13954,10 @@ function DashboardInfiniteScrollSelectInternal({
13454
13954
  onKeyDown: handleSearchKeyDown
13455
13955
  }
13456
13956
  ),
13457
- filteredOptions.length === 0 && isLoadingMore ? /* @__PURE__ */ (0, import_jsx_runtime155.jsxs)("div", { className: "flex items-center justify-center gap-2 px-4 py-[20px] text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: [
13458
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(ThreeDotsLoader, { height: 18, width: 18 }),
13459
- /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("span", { children: resolvedLoadingMoreText })
13460
- ] }) : filteredOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime155.jsx)("div", { className: "px-4 py-[20px] text-left text-[16px] text-[var(--chekin-color-brand-navy)]", children: emptyMessage ?? t("no_options") }) : /* @__PURE__ */ (0, import_jsx_runtime155.jsx)(
13957
+ filteredOptions.length === 0 && isLoadingMore ? /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)("div", { className: "flex items-center justify-center gap-2 px-4 py-[20px] text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: [
13958
+ /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(ThreeDotsLoader, { height: 18, width: 18 }),
13959
+ /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("span", { children: resolvedLoadingMoreText })
13960
+ ] }) : filteredOptions.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { className: "px-4 py-[20px] text-left text-[16px] text-[var(--chekin-color-brand-navy)]", children: emptyMessage ?? t("no_options") }) : /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
13461
13961
  InfiniteScrollList,
13462
13962
  {
13463
13963
  scrollRef,
@@ -13492,8 +13992,8 @@ var DashboardInfiniteScrollSelect = React51.forwardRef(
13492
13992
 
13493
13993
  // src/dashboard/textarea/Textarea.tsx
13494
13994
  var React52 = __toESM(require("react"), 1);
13495
- var import_react_i18next32 = require("react-i18next");
13496
- var import_jsx_runtime156 = require("react/jsx-runtime");
13995
+ var import_react_i18next34 = require("react-i18next");
13996
+ var import_jsx_runtime158 = require("react/jsx-runtime");
13497
13997
  var LINE_HEIGHT = 20;
13498
13998
  var VERTICAL_PADDING = 32;
13499
13999
  function getEmptyState(empty, value, defaultValue) {
@@ -13529,7 +14029,7 @@ var DashboardTextarea = React52.forwardRef(
13529
14029
  const combinedRef = useCombinedRef(ref, innerRef);
13530
14030
  const reactId = React52.useId();
13531
14031
  const textareaId = id ?? name ?? `dash-textarea-${reactId}`;
13532
- const { t } = (0, import_react_i18next32.useTranslation)();
14032
+ const { t } = (0, import_react_i18next34.useTranslation)();
13533
14033
  const isInvalid = Boolean(invalid || error);
13534
14034
  const isEmpty = getEmptyState(empty, value, defaultValue);
13535
14035
  const isBlocked = Boolean(disabled);
@@ -13550,7 +14050,7 @@ var DashboardTextarea = React52.forwardRef(
13550
14050
  resize();
13551
14051
  onInput?.(event);
13552
14052
  };
13553
- return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
14053
+ return /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(
13554
14054
  "div",
13555
14055
  {
13556
14056
  className: cn(
@@ -13560,18 +14060,18 @@ var DashboardTextarea = React52.forwardRef(
13560
14060
  className
13561
14061
  ),
13562
14062
  children: [
13563
- label && /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)(
14063
+ label && /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(
13564
14064
  "label",
13565
14065
  {
13566
14066
  htmlFor: textareaId,
13567
14067
  className: "mb-2 flex select-none items-center text-[16px] font-medium text-[var(--chekin-color-brand-navy)]",
13568
14068
  children: [
13569
14069
  label,
13570
- tooltip && /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("span", { className: "ml-1 inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(HelpTooltip, { content: tooltip, size: 16 }) })
14070
+ tooltip && /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("span", { className: "ml-1 inline-flex", children: /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(HelpTooltip, { content: tooltip, size: 16 }) })
13571
14071
  ]
13572
14072
  }
13573
14073
  ),
13574
- /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
14074
+ /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
13575
14075
  "textarea",
13576
14076
  {
13577
14077
  ref: combinedRef,
@@ -13600,7 +14100,7 @@ var DashboardTextarea = React52.forwardRef(
13600
14100
  ...textareaProps
13601
14101
  }
13602
14102
  ),
13603
- error && /* @__PURE__ */ (0, import_jsx_runtime156.jsx)(
14103
+ error && /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
13604
14104
  FieldErrorMessage,
13605
14105
  {
13606
14106
  id: `${textareaId}-error`,
@@ -13608,8 +14108,8 @@ var DashboardTextarea = React52.forwardRef(
13608
14108
  className: "mt-[1px] text-[14px]"
13609
14109
  }
13610
14110
  ),
13611
- !error && optional && /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("span", { className: "mt-[1px] block text-left text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: typeof optional === "string" ? optional : t("optional") }),
13612
- !error && helperText && /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("span", { className: "mt-[1px] block text-[12px] font-normal text-[var(--chekin-color-gray-1)]", children: helperText })
14111
+ !error && optional && /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("span", { className: "mt-[1px] block text-left text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: typeof optional === "string" ? optional : t("optional") }),
14112
+ !error && helperText && /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("span", { className: "mt-[1px] block text-[12px] font-normal text-[var(--chekin-color-gray-1)]", children: helperText })
13613
14113
  ]
13614
14114
  }
13615
14115
  );
@@ -13618,8 +14118,8 @@ var DashboardTextarea = React52.forwardRef(
13618
14118
 
13619
14119
  // src/dashboard/datepicker/Datepicker.tsx
13620
14120
  var React54 = __toESM(require("react"), 1);
13621
- var import_lucide_react45 = require("lucide-react");
13622
- var import_react_i18next33 = require("react-i18next");
14121
+ var import_lucide_react46 = require("lucide-react");
14122
+ var import_react_i18next35 = require("react-i18next");
13623
14123
 
13624
14124
  // src/airbnb-fields/datepicker/useDatePickerWheel.ts
13625
14125
  var React53 = __toESM(require("react"), 1);
@@ -14043,7 +14543,7 @@ function useDatePickerWheel({
14043
14543
  }
14044
14544
 
14045
14545
  // src/airbnb-fields/datepicker/DatePickerWheelColumn.tsx
14046
- var import_jsx_runtime157 = require("react/jsx-runtime");
14546
+ var import_jsx_runtime159 = require("react/jsx-runtime");
14047
14547
  var spacerHeight = DATE_PICKER_OPTION_HEIGHT * DATE_PICKER_WHEEL_BUFFER_OPTIONS;
14048
14548
  function AirbnbDatePickerWheelColumn({
14049
14549
  id,
@@ -14057,7 +14557,7 @@ function AirbnbDatePickerWheelColumn({
14057
14557
  onOptionSelect,
14058
14558
  column
14059
14559
  }) {
14060
- return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { className: "relative z-10 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(
14560
+ return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: "relative z-10 min-w-0", children: /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(
14061
14561
  "div",
14062
14562
  {
14063
14563
  id,
@@ -14074,14 +14574,14 @@ function AirbnbDatePickerWheelColumn({
14074
14574
  WebkitOverflowScrolling: "touch"
14075
14575
  },
14076
14576
  children: [
14077
- /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { style: { height: `${spacerHeight}px` } }),
14577
+ /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { style: { height: `${spacerHeight}px` } }),
14078
14578
  items.map((item, index) => {
14079
14579
  const { style } = getWheelOptionStyles(
14080
14580
  index,
14081
14581
  scrollTop,
14082
14582
  DATE_PICKER_OPTION_HEIGHT
14083
14583
  );
14084
- return /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(
14584
+ return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
14085
14585
  "button",
14086
14586
  {
14087
14587
  id: `${id}-option-${index}`,
@@ -14097,14 +14597,14 @@ function AirbnbDatePickerWheelColumn({
14097
14597
  `${column}-${item}-${index}`
14098
14598
  );
14099
14599
  }),
14100
- /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("div", { style: { height: `${spacerHeight}px` } })
14600
+ /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { style: { height: `${spacerHeight}px` } })
14101
14601
  ]
14102
14602
  }
14103
14603
  ) });
14104
14604
  }
14105
14605
 
14106
14606
  // src/airbnb-fields/datepicker/DatePickerContent.tsx
14107
- var import_jsx_runtime158 = require("react/jsx-runtime");
14607
+ var import_jsx_runtime160 = require("react/jsx-runtime");
14108
14608
  function AirbnbDatePickerBody({
14109
14609
  baseId,
14110
14610
  label,
@@ -14126,19 +14626,19 @@ function AirbnbDatePickerBody({
14126
14626
  onOptionSelect,
14127
14627
  onDone
14128
14628
  }) {
14129
- return /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { className: "px-6 pb-4 pt-1 bg-white", children: [
14130
- /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { className: "relative overflow-hidden rounded-[24px]", children: [
14131
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("div", { className: "pointer-events-none absolute inset-x-0 top-0 z-20 h-16 bg-gradient-to-b from-white via-white/80 to-transparent" }),
14132
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 z-20 h-16 bg-gradient-to-t from-white via-white/80 to-transparent" }),
14133
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
14629
+ return /* @__PURE__ */ (0, import_jsx_runtime160.jsxs)("div", { className: "px-6 pb-4 pt-1 bg-white", children: [
14630
+ /* @__PURE__ */ (0, import_jsx_runtime160.jsxs)("div", { className: "relative overflow-hidden rounded-[24px]", children: [
14631
+ /* @__PURE__ */ (0, import_jsx_runtime160.jsx)("div", { className: "pointer-events-none absolute inset-x-0 top-0 z-20 h-16 bg-gradient-to-b from-white via-white/80 to-transparent" }),
14632
+ /* @__PURE__ */ (0, import_jsx_runtime160.jsx)("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 z-20 h-16 bg-gradient-to-t from-white via-white/80 to-transparent" }),
14633
+ /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
14134
14634
  "div",
14135
14635
  {
14136
14636
  "aria-hidden": true,
14137
14637
  className: "pointer-events-none absolute inset-x-0 top-1/2 z-0 h-8 -translate-y-1/2 rounded-[12px] bg-black/[0.04]"
14138
14638
  }
14139
14639
  ),
14140
- /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)("div", { className: "relative grid grid-cols-[1.35fr_0.7fr_1fr] gap-1", children: [
14141
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
14640
+ /* @__PURE__ */ (0, import_jsx_runtime160.jsxs)("div", { className: "relative grid grid-cols-[1.35fr_0.7fr_1fr] gap-1", children: [
14641
+ /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
14142
14642
  AirbnbDatePickerWheelColumn,
14143
14643
  {
14144
14644
  id: `${baseId}-month`,
@@ -14153,7 +14653,7 @@ function AirbnbDatePickerBody({
14153
14653
  onOptionSelect
14154
14654
  }
14155
14655
  ),
14156
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
14656
+ /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
14157
14657
  AirbnbDatePickerWheelColumn,
14158
14658
  {
14159
14659
  id: `${baseId}-day`,
@@ -14168,7 +14668,7 @@ function AirbnbDatePickerBody({
14168
14668
  onOptionSelect
14169
14669
  }
14170
14670
  ),
14171
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
14671
+ /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
14172
14672
  AirbnbDatePickerWheelColumn,
14173
14673
  {
14174
14674
  id: `${baseId}-year`,
@@ -14185,13 +14685,13 @@ function AirbnbDatePickerBody({
14185
14685
  )
14186
14686
  ] })
14187
14687
  ] }),
14188
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(Button, { type: "button", onClick: onDone, className: "mt-4 h-12 mb-8 w-full", children: doneLabel })
14688
+ /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(Button, { type: "button", onClick: onDone, className: "mt-4 h-12 mb-8 w-full", children: doneLabel })
14189
14689
  ] });
14190
14690
  }
14191
14691
  function AirbnbDatePickerContent({
14192
14692
  baseId,
14193
14693
  open,
14194
- isMobile: isMobile2,
14694
+ isMobile: isMobile3,
14195
14695
  label,
14196
14696
  title,
14197
14697
  doneLabel,
@@ -14213,7 +14713,7 @@ function AirbnbDatePickerContent({
14213
14713
  onColumnKeyDown,
14214
14714
  onOptionSelect
14215
14715
  }) {
14216
- const body = /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(
14716
+ const body = /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
14217
14717
  AirbnbDatePickerBody,
14218
14718
  {
14219
14719
  baseId,
@@ -14237,28 +14737,28 @@ function AirbnbDatePickerContent({
14237
14737
  onDone
14238
14738
  }
14239
14739
  );
14240
- if (isMobile2) {
14241
- return /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(Drawer, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(
14740
+ if (isMobile3) {
14741
+ return /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(Drawer, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime160.jsxs)(
14242
14742
  DrawerContent,
14243
14743
  {
14244
14744
  onClose: () => onOpenChange(false),
14245
14745
  className: "rounded-none rounded-t-[32px] border-0 p-0",
14246
14746
  children: [
14247
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(DrawerTitle, { className: "sr-only", children: title }),
14248
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(DrawerDescription, { className: "sr-only", children: label }),
14747
+ /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(DrawerTitle, { className: "sr-only", children: title }),
14748
+ /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(DrawerDescription, { className: "sr-only", children: label }),
14249
14749
  body
14250
14750
  ]
14251
14751
  }
14252
14752
  ) });
14253
14753
  }
14254
- return /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime158.jsxs)(
14754
+ return /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime160.jsxs)(
14255
14755
  DialogContent,
14256
14756
  {
14257
14757
  className: "max-w-[520px] rounded-[28px] border-0 p-0 shadow-xl",
14258
14758
  showCloseButton: false,
14259
14759
  children: [
14260
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(DialogTitle, { className: "sr-only", children: title }),
14261
- /* @__PURE__ */ (0, import_jsx_runtime158.jsx)(DialogDescription, { className: "sr-only", children: label }),
14760
+ /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(DialogTitle, { className: "sr-only", children: title }),
14761
+ /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(DialogDescription, { className: "sr-only", children: label }),
14262
14762
  body
14263
14763
  ]
14264
14764
  }
@@ -14266,7 +14766,7 @@ function AirbnbDatePickerContent({
14266
14766
  }
14267
14767
 
14268
14768
  // src/dashboard/datepicker/Datepicker.tsx
14269
- var import_jsx_runtime159 = require("react/jsx-runtime");
14769
+ var import_jsx_runtime161 = require("react/jsx-runtime");
14270
14770
  var MONTHS_IN_YEAR2 = 12;
14271
14771
  function getMonthLabels2(locale) {
14272
14772
  const formatter = new Intl.DateTimeFormat(locale, { month: "long" });
@@ -14343,7 +14843,7 @@ var DashboardDatepicker = React54.forwardRef(
14343
14843
  const yearId = `${baseId}-year`;
14344
14844
  const labelId = `${baseId}-label`;
14345
14845
  const errorId = `${baseId}-error`;
14346
- const { t } = (0, import_react_i18next33.useTranslation)();
14846
+ const { t } = (0, import_react_i18next35.useTranslation)();
14347
14847
  const resolvedMonthLabels = React54.useMemo(
14348
14848
  () => monthLabels ?? getMonthLabels2(locale),
14349
14849
  [locale, monthLabels]
@@ -14366,7 +14866,7 @@ var DashboardDatepicker = React54.forwardRef(
14366
14866
  const [focusedField, setFocusedField] = React54.useState(null);
14367
14867
  const [monthInputValue, setMonthInputValue] = React54.useState("");
14368
14868
  const [monthHighlightIndex, setMonthHighlightIndex] = React54.useState(-1);
14369
- const isMobile2 = useIsMobile();
14869
+ const isMobile3 = useIsMobile();
14370
14870
  React54.useImperativeHandle(ref, () => dayInputRef.current, []);
14371
14871
  React54.useEffect(() => {
14372
14872
  if (!isControlled) return;
@@ -14416,7 +14916,7 @@ var DashboardDatepicker = React54.forwardRef(
14416
14916
  useOutsideClick({
14417
14917
  elementRef: containerRef,
14418
14918
  onOutsideClick: () => setIsMonthOpen(false),
14419
- isDisabled: !isMonthOpen || isMobile2
14919
+ isDisabled: !isMonthOpen || isMobile3
14420
14920
  });
14421
14921
  const emitChange = React54.useCallback(
14422
14922
  (nextDay, nextMonth, nextYear) => {
@@ -14525,7 +15025,7 @@ var DashboardDatepicker = React54.forwardRef(
14525
15025
  setIsWheelOpen(false);
14526
15026
  mobileTriggerRef.current?.focus();
14527
15027
  }, []);
14528
- const showCoverage = isEmpty && !isFocused && !isMobile2;
15028
+ const showCoverage = isEmpty && !isFocused && !isMobile3;
14529
15029
  const wheel = useDatePickerWheel({
14530
15030
  isOpen: isWheelOpen,
14531
15031
  value: currentDate,
@@ -14549,7 +15049,7 @@ var DashboardDatepicker = React54.forwardRef(
14549
15049
  const triggerText = currentDate ? (formatValue ?? defaultFormatValue)(currentDate) : void 0;
14550
15050
  const monthListboxId = `${monthId}-listbox`;
14551
15051
  const getMonthOptionId = (index) => `${monthId}-option-${index}`;
14552
- const monthPanelContent = filteredMonths.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: "px-4 py-3 text-left text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: t("no_options") }) : /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
15052
+ const monthPanelContent = filteredMonths.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: "px-4 py-3 text-left text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: t("no_options") }) : /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
14553
15053
  "ul",
14554
15054
  {
14555
15055
  ref: monthListRef,
@@ -14560,7 +15060,7 @@ var DashboardDatepicker = React54.forwardRef(
14560
15060
  children: filteredMonths.map((option, position) => {
14561
15061
  const isSelected = option.index === monthIndex;
14562
15062
  const isHighlighted = position === monthHighlightIndex;
14563
- return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("li", { role: "presentation", children: /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
15063
+ return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("li", { role: "presentation", children: /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
14564
15064
  "button",
14565
15065
  {
14566
15066
  id: getMonthOptionId(option.index),
@@ -14587,7 +15087,7 @@ var DashboardDatepicker = React54.forwardRef(
14587
15087
  isBlocked && "cursor-not-allowed",
14588
15088
  loading && "cursor-progress"
14589
15089
  );
14590
- return /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
15090
+ return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
14591
15091
  "div",
14592
15092
  {
14593
15093
  ref: containerRef,
@@ -14598,9 +15098,9 @@ var DashboardDatepicker = React54.forwardRef(
14598
15098
  className
14599
15099
  ),
14600
15100
  style: wrapperWidth ? { width: wrapperWidth } : void 0,
14601
- children: /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("div", { className: "relative min-h-[68px] w-full", children: [
14602
- /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("div", { className: "relative w-full", children: [
14603
- isMobile2 ? /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(
15101
+ children: /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)("div", { className: "relative min-h-[68px] w-full", children: [
15102
+ /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)("div", { className: "relative w-full", children: [
15103
+ isMobile3 ? /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)(
14604
15104
  "button",
14605
15105
  {
14606
15106
  ref: mobileTriggerRef,
@@ -14619,11 +15119,11 @@ var DashboardDatepicker = React54.forwardRef(
14619
15119
  (isBlocked || readOnly) && "cursor-not-allowed"
14620
15120
  ),
14621
15121
  children: [
14622
- /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("span", { className: "block min-w-0 flex-1 truncate text-left", children: triggerText ?? (isWheelOpen ? mobilePlaceholder : null) }),
14623
- /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("span", { className: "pointer-events-none flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: [
14624
- loading && /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(ThreeDotsLoader, { height: 18, width: 18 }),
14625
- /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
14626
- import_lucide_react45.ChevronDown,
15122
+ /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("span", { className: "block min-w-0 flex-1 truncate text-left", children: triggerText ?? (isWheelOpen ? mobilePlaceholder : null) }),
15123
+ /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)("span", { className: "pointer-events-none flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: [
15124
+ loading && /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(ThreeDotsLoader, { height: 18, width: 18 }),
15125
+ /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
15126
+ import_lucide_react46.ChevronDown,
14627
15127
  {
14628
15128
  size: 16,
14629
15129
  className: cn(
@@ -14635,14 +15135,14 @@ var DashboardDatepicker = React54.forwardRef(
14635
15135
  ] })
14636
15136
  ]
14637
15137
  }
14638
- ) : /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)(
15138
+ ) : /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)(
14639
15139
  "div",
14640
15140
  {
14641
15141
  className: cn(
14642
15142
  "relative box-border grid h-12 w-full grid-cols-[minmax(0,1fr)_minmax(96px,140px)_minmax(0,1fr)] items-center rounded-[6px] text-[16px] font-medium text-[var(--chekin-color-brand-navy)]"
14643
15143
  ),
14644
15144
  children: [
14645
- /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: "flex h-full min-w-0 items-center px-2 sm:px-4", children: /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
15145
+ /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: "flex h-full min-w-0 items-center px-2 sm:px-4", children: /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
14646
15146
  "input",
14647
15147
  {
14648
15148
  ref: dayInputRef,
@@ -14664,8 +15164,8 @@ var DashboardDatepicker = React54.forwardRef(
14664
15164
  className: subInputClass
14665
15165
  }
14666
15166
  ) }),
14667
- /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("div", { className: "relative flex h-full min-w-0 items-center gap-1 border-x border-[var(--chekin-color-gray-3)] px-2 sm:px-3", children: [
14668
- /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
15167
+ /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)("div", { className: "relative flex h-full min-w-0 items-center gap-1 border-x border-[var(--chekin-color-gray-3)] px-2 sm:px-3", children: [
15168
+ /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
14669
15169
  "input",
14670
15170
  {
14671
15171
  ref: monthInputRef,
@@ -14708,8 +15208,8 @@ var DashboardDatepicker = React54.forwardRef(
14708
15208
  )
14709
15209
  }
14710
15210
  ),
14711
- /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
14712
- import_lucide_react45.ChevronDown,
15211
+ /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
15212
+ import_lucide_react46.ChevronDown,
14713
15213
  {
14714
15214
  size: 14,
14715
15215
  onMouseDown: (event) => {
@@ -14725,8 +15225,8 @@ var DashboardDatepicker = React54.forwardRef(
14725
15225
  }
14726
15226
  )
14727
15227
  ] }),
14728
- /* @__PURE__ */ (0, import_jsx_runtime159.jsxs)("div", { className: "flex h-full min-w-0 items-center px-2 sm:px-4", children: [
14729
- /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
15228
+ /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)("div", { className: "flex h-full min-w-0 items-center px-2 sm:px-4", children: [
15229
+ /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
14730
15230
  "input",
14731
15231
  {
14732
15232
  ref: yearInputRef,
@@ -14748,7 +15248,7 @@ var DashboardDatepicker = React54.forwardRef(
14748
15248
  className: subInputClass
14749
15249
  }
14750
15250
  ),
14751
- loading && /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
15251
+ loading && /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
14752
15252
  ThreeDotsLoader,
14753
15253
  {
14754
15254
  height: 18,
@@ -14760,7 +15260,7 @@ var DashboardDatepicker = React54.forwardRef(
14760
15260
  ]
14761
15261
  }
14762
15262
  ),
14763
- showCoverage && /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
15263
+ showCoverage && /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
14764
15264
  "div",
14765
15265
  {
14766
15266
  className: "absolute inset-0 cursor-text rounded-[6px] bg-[var(--chekin-color-surface-input-empty)]",
@@ -14768,7 +15268,7 @@ var DashboardDatepicker = React54.forwardRef(
14768
15268
  "aria-hidden": "true"
14769
15269
  }
14770
15270
  ),
14771
- /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
15271
+ /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
14772
15272
  Fieldset,
14773
15273
  {
14774
15274
  isFocused,
@@ -14783,12 +15283,12 @@ var DashboardDatepicker = React54.forwardRef(
14783
15283
  legend: label,
14784
15284
  label,
14785
15285
  tooltip,
14786
- onClick: isMobile2 ? openWheel : showCoverage ? focusDayInput : void 0
15286
+ onClick: isMobile3 ? openWheel : showCoverage ? focusDayInput : void 0
14787
15287
  }
14788
15288
  ),
14789
- isMonthOpen && !isMobile2 && /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("div", { className: "absolute left-0 right-0 top-full z-30 mx-auto mt-1 w-full max-w-[260px] overflow-hidden rounded-md bg-white shadow-[0_30px_30px_0_rgba(33,72,255,0.2)] sm:left-1/2 sm:right-auto sm:-translate-x-1/2", children: monthPanelContent })
15289
+ isMonthOpen && !isMobile3 && /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: "absolute left-0 right-0 top-full z-30 mx-auto mt-1 w-full max-w-[260px] overflow-hidden rounded-md bg-white shadow-[0_30px_30px_0_rgba(33,72,255,0.2)] sm:left-1/2 sm:right-auto sm:-translate-x-1/2", children: monthPanelContent })
14790
15290
  ] }),
14791
- isMobile2 && /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
15291
+ isMobile3 && /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
14792
15292
  AirbnbDatePickerContent,
14793
15293
  {
14794
15294
  baseId: wheelBaseId,
@@ -14816,9 +15316,9 @@ var DashboardDatepicker = React54.forwardRef(
14816
15316
  onOptionSelect: wheel.handleOptionSelect
14817
15317
  }
14818
15318
  ),
14819
- !error && optional && /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("span", { className: "mt-[1px] block text-left text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: typeof optional === "string" ? optional : t("optional") }),
14820
- !error && helperText && /* @__PURE__ */ (0, import_jsx_runtime159.jsx)("span", { className: "mt-[1px] block text-[12px] font-normal text-[var(--chekin-color-gray-1)]", children: helperText }),
14821
- error && !hideErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime159.jsx)(
15319
+ !error && optional && /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("span", { className: "mt-[1px] block text-left text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: typeof optional === "string" ? optional : t("optional") }),
15320
+ !error && helperText && /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("span", { className: "mt-[1px] block text-[12px] font-normal text-[var(--chekin-color-gray-1)]", children: helperText }),
15321
+ error && !hideErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
14822
15322
  FieldErrorMessage,
14823
15323
  {
14824
15324
  id: errorId,
@@ -14834,7 +15334,7 @@ var DashboardDatepicker = React54.forwardRef(
14834
15334
 
14835
15335
  // src/dashboard/date-range-picker/DateRangePicker.tsx
14836
15336
  var React58 = __toESM(require("react"), 1);
14837
- var import_react_i18next34 = require("react-i18next");
15337
+ var import_react_i18next36 = require("react-i18next");
14838
15338
 
14839
15339
  // src/dashboard/date-range-picker/isDayBlocked.ts
14840
15340
  var import_date_fns2 = require("date-fns");
@@ -15044,8 +15544,8 @@ function resolveRangeSelection({
15044
15544
  }
15045
15545
 
15046
15546
  // src/dashboard/date-range-picker/components/DateRangeInputs.tsx
15047
- var import_lucide_react46 = require("lucide-react");
15048
- var import_jsx_runtime160 = require("react/jsx-runtime");
15547
+ var import_lucide_react47 = require("lucide-react");
15548
+ var import_jsx_runtime162 = require("react/jsx-runtime");
15049
15549
  var DEFAULT_PLACEHOLDER = "00-00-0000";
15050
15550
  var inputBaseClass = "m-0 box-border h-full w-full min-w-0 border-0 bg-transparent text-[16px] font-medium leading-5 text-[var(--chekin-color-brand-navy)] outline-none placeholder:text-[var(--chekin-color-gray-1)]";
15051
15551
  var iconButtonClass = "flex h-5 w-5 items-center justify-center rounded-[3px] border-0 bg-transparent p-0 text-[#9696b9] outline-none hover:shadow-[0_3px_3px_#0f477734] disabled:cursor-not-allowed";
@@ -15087,7 +15587,7 @@ function DateRangeInputs({
15087
15587
  isBlocked && "cursor-not-allowed",
15088
15588
  loading && "cursor-progress"
15089
15589
  );
15090
- return /* @__PURE__ */ (0, import_jsx_runtime160.jsxs)(
15590
+ return /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(
15091
15591
  "div",
15092
15592
  {
15093
15593
  className: cn(
@@ -15096,7 +15596,7 @@ function DateRangeInputs({
15096
15596
  ),
15097
15597
  onClick: onRowClick,
15098
15598
  children: [
15099
- /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
15599
+ /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
15100
15600
  "input",
15101
15601
  {
15102
15602
  ref: fromInputRef,
@@ -15120,7 +15620,7 @@ function DateRangeInputs({
15120
15620
  )
15121
15621
  }
15122
15622
  ),
15123
- /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
15623
+ /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
15124
15624
  "span",
15125
15625
  {
15126
15626
  "aria-hidden": "true",
@@ -15131,7 +15631,7 @@ function DateRangeInputs({
15131
15631
  children: "\u2192"
15132
15632
  }
15133
15633
  ),
15134
- /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
15634
+ /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
15135
15635
  "input",
15136
15636
  {
15137
15637
  ref: toInputRef,
@@ -15155,9 +15655,9 @@ function DateRangeInputs({
15155
15655
  )
15156
15656
  }
15157
15657
  ),
15158
- /* @__PURE__ */ (0, import_jsx_runtime160.jsxs)("span", { className: "ml-auto flex shrink-0 items-center gap-2 pl-2 text-[var(--chekin-color-gray-2)]", children: [
15159
- loading && /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(ThreeDotsLoader, { height: 18, width: 18 }),
15160
- !readOnly && !hideClearDates && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
15658
+ /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)("span", { className: "ml-auto flex shrink-0 items-center gap-2 pl-2 text-[var(--chekin-color-gray-2)]", children: [
15659
+ loading && /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(ThreeDotsLoader, { height: 18, width: 18 }),
15660
+ !readOnly && !hideClearDates && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
15161
15661
  "button",
15162
15662
  {
15163
15663
  type: "button",
@@ -15165,10 +15665,10 @@ function DateRangeInputs({
15165
15665
  onClick: onReset,
15166
15666
  className: iconButtonClass,
15167
15667
  "aria-label": clearLabel,
15168
- children: /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(import_lucide_react46.SquareX, { size: 16, fill: "#9696b9", color: "#f8f8f8", strokeWidth: 1.8 })
15668
+ children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(import_lucide_react47.SquareX, { size: 16, fill: "#9696b9", color: "#f8f8f8", strokeWidth: 1.8 })
15169
15669
  }
15170
15670
  ),
15171
- !readOnly && !hideCalendarIcon && /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(
15671
+ !readOnly && !hideCalendarIcon && /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
15172
15672
  "button",
15173
15673
  {
15174
15674
  type: "button",
@@ -15180,7 +15680,7 @@ function DateRangeInputs({
15180
15680
  focusedInput !== null || isOpen ? "text-[var(--chekin-color-brand-blue)]" : "text-[var(--chekin-color-gray-2)]"
15181
15681
  ),
15182
15682
  "aria-label": openCalendarLabel,
15183
- children: /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(import_lucide_react46.CalendarDays, { size: 18 })
15683
+ children: /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(import_lucide_react47.CalendarDays, { size: 18 })
15184
15684
  }
15185
15685
  )
15186
15686
  ] })
@@ -15190,7 +15690,7 @@ function DateRangeInputs({
15190
15690
  }
15191
15691
 
15192
15692
  // src/dashboard/date-range-picker/components/DateRangeCalendar.tsx
15193
- var import_jsx_runtime161 = require("react/jsx-runtime");
15693
+ var import_jsx_runtime163 = require("react/jsx-runtime");
15194
15694
  function DateRangeCalendar({
15195
15695
  value,
15196
15696
  month,
@@ -15206,7 +15706,7 @@ function DateRangeCalendar({
15206
15706
  components,
15207
15707
  ...dayPickerProps
15208
15708
  }) {
15209
- return /* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
15709
+ return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
15210
15710
  Calendar,
15211
15711
  {
15212
15712
  mode: "range",
@@ -15229,10 +15729,10 @@ function DateRangeCalendar({
15229
15729
  }
15230
15730
 
15231
15731
  // src/dashboard/date-range-picker/components/DateRangePopover.tsx
15232
- var import_jsx_runtime162 = require("react/jsx-runtime");
15732
+ var import_jsx_runtime164 = require("react/jsx-runtime");
15233
15733
  function DateRangePopover({
15234
15734
  isOpen,
15235
- isMobile: isMobile2,
15735
+ isMobile: isMobile3,
15236
15736
  openDirection,
15237
15737
  drawerTitle,
15238
15738
  drawerDescription,
@@ -15240,31 +15740,31 @@ function DateRangePopover({
15240
15740
  children
15241
15741
  }) {
15242
15742
  if (!isOpen) return null;
15243
- if (isMobile2) {
15244
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
15743
+ if (isMobile3) {
15744
+ return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
15245
15745
  Drawer,
15246
15746
  {
15247
15747
  open: isOpen,
15248
15748
  onOpenChange: (next) => {
15249
15749
  if (!next) onClose();
15250
15750
  },
15251
- children: /* @__PURE__ */ (0, import_jsx_runtime162.jsxs)(
15751
+ children: /* @__PURE__ */ (0, import_jsx_runtime164.jsxs)(
15252
15752
  DrawerContent,
15253
15753
  {
15254
15754
  onClose,
15255
15755
  lockScroll: false,
15256
15756
  className: "max-h-[calc(100vh-1rem)]",
15257
15757
  children: [
15258
- /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(DrawerTitle, { className: "sr-only", children: drawerTitle }),
15259
- /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(DrawerDescription, { className: "sr-only", children: drawerDescription }),
15260
- /* @__PURE__ */ (0, import_jsx_runtime162.jsx)("div", { className: "flex items-start justify-center overflow-x-auto px-2 pb-4 pt-1", children })
15758
+ /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(DrawerTitle, { className: "sr-only", children: drawerTitle }),
15759
+ /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(DrawerDescription, { className: "sr-only", children: drawerDescription }),
15760
+ /* @__PURE__ */ (0, import_jsx_runtime164.jsx)("div", { className: "flex items-start justify-center overflow-x-auto px-2 pb-4 pt-1", children })
15261
15761
  ]
15262
15762
  }
15263
15763
  )
15264
15764
  }
15265
15765
  );
15266
15766
  }
15267
- return /* @__PURE__ */ (0, import_jsx_runtime162.jsx)(
15767
+ return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(
15268
15768
  "div",
15269
15769
  {
15270
15770
  className: cn(
@@ -15277,7 +15777,7 @@ function DateRangePopover({
15277
15777
  }
15278
15778
 
15279
15779
  // src/dashboard/date-range-picker/DateRangePicker.tsx
15280
- var import_jsx_runtime163 = require("react/jsx-runtime");
15780
+ var import_jsx_runtime165 = require("react/jsx-runtime");
15281
15781
  var DashboardDateRangePicker = React58.forwardRef(function DashboardDateRangePicker2({
15282
15782
  label,
15283
15783
  value: externalValue,
@@ -15350,8 +15850,8 @@ var DashboardDateRangePicker = React58.forwardRef(function DashboardDateRangePic
15350
15850
  const [isOpen, setIsOpen] = React58.useState(false);
15351
15851
  const [focusedInput, setFocusedInput] = React58.useState(null);
15352
15852
  const [autoFocus, setAutoFocus] = React58.useState(false);
15353
- const isMobile2 = useIsMobile();
15354
- const { t } = (0, import_react_i18next34.useTranslation)();
15853
+ const isMobile3 = useIsMobile();
15854
+ const { t } = (0, import_react_i18next36.useTranslation)();
15355
15855
  const drawerTitle = label ?? t("select_dates");
15356
15856
  const drawerDescription = label ?? t("pick_date_range");
15357
15857
  const isEmpty = !value?.from && !value?.to;
@@ -15359,7 +15859,7 @@ var DashboardDateRangePicker = React58.forwardRef(function DashboardDateRangePic
15359
15859
  const isInvalid = Boolean(invalid || error);
15360
15860
  const isFocused = focusedInput !== null || isOpen;
15361
15861
  const wrapperWidth = toCssSize(width);
15362
- const monthsToShow = numberOfMonths ?? (isMobile2 ? 1 : 2);
15862
+ const monthsToShow = numberOfMonths ?? (isMobile3 ? 1 : 2);
15363
15863
  const closeCalendar = React58.useCallback(() => {
15364
15864
  setIsOpen(false);
15365
15865
  setFocusedInput(null);
@@ -15373,7 +15873,7 @@ var DashboardDateRangePicker = React58.forwardRef(function DashboardDateRangePic
15373
15873
  useOutsideClick({
15374
15874
  elementRef: containerRef,
15375
15875
  onOutsideClick: closeCalendar,
15376
- isDisabled: !isOpen || isMobile2
15876
+ isDisabled: !isOpen || isMobile3
15377
15877
  });
15378
15878
  const handlePickerChange = React58.useCallback(
15379
15879
  (range, pickedDate) => {
@@ -15438,7 +15938,7 @@ var DashboardDateRangePicker = React58.forwardRef(function DashboardDateRangePic
15438
15938
  syncMonthToValue
15439
15939
  ]
15440
15940
  );
15441
- return /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
15941
+ return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
15442
15942
  "div",
15443
15943
  {
15444
15944
  ref: containerRef,
@@ -15449,9 +15949,9 @@ var DashboardDateRangePicker = React58.forwardRef(function DashboardDateRangePic
15449
15949
  className
15450
15950
  ),
15451
15951
  style: wrapperWidth ? { width: wrapperWidth } : void 0,
15452
- children: /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)("div", { className: "relative min-h-[68px] w-full", children: [
15453
- /* @__PURE__ */ (0, import_jsx_runtime163.jsxs)("div", { className: "relative w-full", children: [
15454
- /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
15952
+ children: /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)("div", { className: "relative min-h-[68px] w-full", children: [
15953
+ /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)("div", { className: "relative w-full", children: [
15954
+ /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
15455
15955
  DateRangeInputs,
15456
15956
  {
15457
15957
  fromId,
@@ -15502,7 +16002,7 @@ var DashboardDateRangePicker = React58.forwardRef(function DashboardDateRangePic
15502
16002
  onToggleCalendar: toggleCalendar
15503
16003
  }
15504
16004
  ),
15505
- /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
16005
+ /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
15506
16006
  Fieldset,
15507
16007
  {
15508
16008
  isFocused,
@@ -15519,16 +16019,16 @@ var DashboardDateRangePicker = React58.forwardRef(function DashboardDateRangePic
15519
16019
  tooltip
15520
16020
  }
15521
16021
  ),
15522
- /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
16022
+ /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
15523
16023
  DateRangePopover,
15524
16024
  {
15525
- isOpen: isOpen && !isMobile2,
16025
+ isOpen: isOpen && !isMobile3,
15526
16026
  isMobile: false,
15527
16027
  openDirection,
15528
16028
  drawerTitle,
15529
16029
  drawerDescription,
15530
16030
  onClose: closeCalendar,
15531
- children: /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
16031
+ children: /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
15532
16032
  DateRangeCalendar,
15533
16033
  {
15534
16034
  value,
@@ -15549,16 +16049,16 @@ var DashboardDateRangePicker = React58.forwardRef(function DashboardDateRangePic
15549
16049
  }
15550
16050
  )
15551
16051
  ] }),
15552
- /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
16052
+ /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
15553
16053
  DateRangePopover,
15554
16054
  {
15555
- isOpen: isOpen && isMobile2,
16055
+ isOpen: isOpen && isMobile3,
15556
16056
  isMobile: true,
15557
16057
  openDirection,
15558
16058
  drawerTitle,
15559
16059
  drawerDescription,
15560
16060
  onClose: closeCalendar,
15561
- children: /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
16061
+ children: /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
15562
16062
  DateRangeCalendar,
15563
16063
  {
15564
16064
  value,
@@ -15578,9 +16078,9 @@ var DashboardDateRangePicker = React58.forwardRef(function DashboardDateRangePic
15578
16078
  )
15579
16079
  }
15580
16080
  ),
15581
- !error && optional && /* @__PURE__ */ (0, import_jsx_runtime163.jsx)("span", { className: "mt-[1px] block text-left text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: typeof optional === "string" ? optional : t("optional") }),
15582
- !error && helperText && /* @__PURE__ */ (0, import_jsx_runtime163.jsx)("span", { className: "mt-[1px] block text-[12px] font-normal text-[var(--chekin-color-gray-1)]", children: helperText }),
15583
- error && !hideErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime163.jsx)(
16081
+ !error && optional && /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("span", { className: "mt-[1px] block text-left text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: typeof optional === "string" ? optional : t("optional") }),
16082
+ !error && helperText && /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("span", { className: "mt-[1px] block text-[12px] font-normal text-[var(--chekin-color-gray-1)]", children: helperText }),
16083
+ error && !hideErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
15584
16084
  FieldErrorMessage,
15585
16085
  {
15586
16086
  id: errorId,
@@ -15595,7 +16095,7 @@ var DashboardDateRangePicker = React58.forwardRef(function DashboardDateRangePic
15595
16095
 
15596
16096
  // src/dashboard/date-range-picker/useValidateDates.ts
15597
16097
  var React59 = __toESM(require("react"), 1);
15598
- var import_react_i18next35 = require("react-i18next");
16098
+ var import_react_i18next37 = require("react-i18next");
15599
16099
  var import_date_fns4 = require("date-fns");
15600
16100
  var import_react_day_picker2 = require("react-day-picker");
15601
16101
  function isAfterMax(date, maxDate) {
@@ -15614,7 +16114,7 @@ function useValidateDates({
15614
16114
  onSuccess,
15615
16115
  displayFormat
15616
16116
  }) {
15617
- const { t } = (0, import_react_i18next35.useTranslation)();
16117
+ const { t } = (0, import_react_i18next37.useTranslation)();
15618
16118
  const handleError = useEvent(onError);
15619
16119
  const handleSuccess = useEvent(onSuccess);
15620
16120
  const errorFormatter = React59.useMemo(
@@ -15673,7 +16173,7 @@ function useValidateDates({
15673
16173
  // src/dashboard/time-picker/TimePicker.tsx
15674
16174
  var React60 = __toESM(require("react"), 1);
15675
16175
  var import_date_fns5 = require("date-fns");
15676
- var import_jsx_runtime164 = require("react/jsx-runtime");
16176
+ var import_jsx_runtime166 = require("react/jsx-runtime");
15677
16177
  var SHORT_TIME_FORMAT = "HH:mm";
15678
16178
  function parseTime(value) {
15679
16179
  return (0, import_date_fns5.parse)(value, SHORT_TIME_FORMAT, /* @__PURE__ */ new Date());
@@ -15722,15 +16222,15 @@ var DashboardTimePicker = React60.forwardRef(
15722
16222
  const settings = timeSettings ?? FORMAT_SETTINGS[formatName];
15723
16223
  return buildOptions(settings);
15724
16224
  }, [formatName, options, timeSettings]);
15725
- return /* @__PURE__ */ (0, import_jsx_runtime164.jsx)(DashboardSelect, { ref, ...selectProps, options: resolvedOptions });
16225
+ return /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(DashboardSelect, { ref, ...selectProps, options: resolvedOptions });
15726
16226
  }
15727
16227
  );
15728
16228
 
15729
16229
  // src/dashboard/file-input/FileInput.tsx
15730
16230
  var React61 = __toESM(require("react"), 1);
15731
- var import_lucide_react47 = require("lucide-react");
15732
- var import_react_i18next36 = require("react-i18next");
15733
- var import_jsx_runtime165 = require("react/jsx-runtime");
16231
+ var import_lucide_react48 = require("lucide-react");
16232
+ var import_react_i18next38 = require("react-i18next");
16233
+ var import_jsx_runtime167 = require("react/jsx-runtime");
15734
16234
  function defaultDownload(url) {
15735
16235
  window.open(url, "_blank", "noopener,noreferrer");
15736
16236
  }
@@ -15759,7 +16259,7 @@ var DashboardFileInput = React61.forwardRef(
15759
16259
  }, ref) {
15760
16260
  const internalRef = React61.useRef(null);
15761
16261
  const inputRef = useCombinedRef(ref, internalRef);
15762
- const { t } = (0, import_react_i18next36.useTranslation)();
16262
+ const { t } = (0, import_react_i18next38.useTranslation)();
15763
16263
  const resolvedLabel = label ?? t("upload_file");
15764
16264
  const resolvedDownloadLabel = downloadLabel ?? t("download_attachment");
15765
16265
  const reactId = React61.useId();
@@ -15788,7 +16288,7 @@ var DashboardFileInput = React61.forwardRef(
15788
16288
  event.stopPropagation();
15789
16289
  if (isUrl) onDownload(value);
15790
16290
  };
15791
- return /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)(
16291
+ return /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(
15792
16292
  "label",
15793
16293
  {
15794
16294
  htmlFor: inputId,
@@ -15801,7 +16301,7 @@ var DashboardFileInput = React61.forwardRef(
15801
16301
  ),
15802
16302
  style: wrapperWidth ? { width: wrapperWidth } : void 0,
15803
16303
  children: [
15804
- /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
16304
+ /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
15805
16305
  "input",
15806
16306
  {
15807
16307
  ref: inputRef,
@@ -15817,9 +16317,9 @@ var DashboardFileInput = React61.forwardRef(
15817
16317
  "aria-invalid": isInvalid
15818
16318
  }
15819
16319
  ),
15820
- /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)("div", { className: "relative min-h-[68px] w-full", children: [
15821
- /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)("div", { className: "relative w-full", children: [
15822
- /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)(
16320
+ /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)("div", { className: "relative min-h-[68px] w-full", children: [
16321
+ /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)("div", { className: "relative w-full", children: [
16322
+ /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(
15823
16323
  "div",
15824
16324
  {
15825
16325
  className: cn(
@@ -15827,25 +16327,25 @@ var DashboardFileInput = React61.forwardRef(
15827
16327
  isEmpty && "bg-[var(--chekin-color-surface-input-empty)]"
15828
16328
  ),
15829
16329
  children: [
15830
- hasFileChip ? /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)(
16330
+ hasFileChip ? /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(
15831
16331
  "div",
15832
16332
  {
15833
16333
  className: "inline-flex h-6 max-w-[85%] items-center rounded-[4px] border border-[#acacd5] bg-[#f0f0f8] pl-[10px] pr-1",
15834
16334
  onClick: (event) => event.preventDefault(),
15835
16335
  children: [
15836
- isUrl ? /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)(
16336
+ isUrl ? /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)(
15837
16337
  "button",
15838
16338
  {
15839
16339
  type: "button",
15840
16340
  onClick: handleDownload,
15841
16341
  className: "inline-flex items-center gap-[7px] truncate border-0 bg-transparent p-0 text-[14px] font-medium text-[var(--chekin-color-brand-navy)] outline-none",
15842
16342
  children: [
15843
- /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("span", { className: "truncate", children: resolvedDownloadLabel }),
15844
- /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(import_lucide_react47.Download, { size: 15 })
16343
+ /* @__PURE__ */ (0, import_jsx_runtime167.jsx)("span", { className: "truncate", children: resolvedDownloadLabel }),
16344
+ /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(import_lucide_react48.Download, { size: 15 })
15845
16345
  ]
15846
16346
  }
15847
- ) : /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("span", { className: "truncate text-[14px] font-medium text-[var(--chekin-color-brand-navy)]", children: value.name }),
15848
- /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
16347
+ ) : /* @__PURE__ */ (0, import_jsx_runtime167.jsx)("span", { className: "truncate text-[14px] font-medium text-[var(--chekin-color-brand-navy)]", children: value.name }),
16348
+ /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
15849
16349
  "button",
15850
16350
  {
15851
16351
  type: "button",
@@ -15853,20 +16353,20 @@ var DashboardFileInput = React61.forwardRef(
15853
16353
  onClick: handleClear,
15854
16354
  className: "ml-2 flex h-[15px] w-[15px] items-center justify-center rounded-[3px] border-0 bg-transparent p-0 text-[#9696b9] outline-none hover:shadow-[0_3px_3px_#0f477734]",
15855
16355
  "aria-label": t("remove_file"),
15856
- children: /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(import_lucide_react47.SquareX, { size: 15, fill: "#9696b9", color: "#f8f8f8", strokeWidth: 1.8 })
16356
+ children: /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(import_lucide_react48.SquareX, { size: 15, fill: "#9696b9", color: "#f8f8f8", strokeWidth: 1.8 })
15857
16357
  }
15858
16358
  )
15859
16359
  ]
15860
16360
  }
15861
- ) : /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("span", { className: "block min-w-0 flex-1 truncate text-left text-[var(--chekin-color-gray-1)]", children: placeholder ?? "" }),
15862
- /* @__PURE__ */ (0, import_jsx_runtime165.jsxs)("span", { className: "ml-auto flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: [
15863
- loading && /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(ThreeDotsLoader, { height: 18, width: 18 }),
15864
- /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(import_lucide_react47.Paperclip, { size: 20 })
16361
+ ) : /* @__PURE__ */ (0, import_jsx_runtime167.jsx)("span", { className: "block min-w-0 flex-1 truncate text-left text-[var(--chekin-color-gray-1)]", children: placeholder ?? "" }),
16362
+ /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)("span", { className: "ml-auto flex items-center gap-2 text-[var(--chekin-color-gray-2)]", children: [
16363
+ loading && /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(ThreeDotsLoader, { height: 18, width: 18 }),
16364
+ /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(import_lucide_react48.Paperclip, { size: 20 })
15865
16365
  ] })
15866
16366
  ]
15867
16367
  }
15868
16368
  ),
15869
- /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
16369
+ /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
15870
16370
  Fieldset,
15871
16371
  {
15872
16372
  isFocused: false,
@@ -15884,9 +16384,9 @@ var DashboardFileInput = React61.forwardRef(
15884
16384
  }
15885
16385
  )
15886
16386
  ] }),
15887
- !error && optional && /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("span", { className: "mt-[1px] block text-left text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: typeof optional === "string" ? optional : t("optional") }),
15888
- !error && helperText && /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("span", { className: "mt-[1px] block text-[12px] font-normal text-[var(--chekin-color-gray-1)]", children: helperText }),
15889
- error && !hideErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime165.jsx)(
16387
+ !error && optional && /* @__PURE__ */ (0, import_jsx_runtime167.jsx)("span", { className: "mt-[1px] block text-left text-[14px] font-medium text-[var(--chekin-color-gray-1)]", children: typeof optional === "string" ? optional : t("optional") }),
16388
+ !error && helperText && /* @__PURE__ */ (0, import_jsx_runtime167.jsx)("span", { className: "mt-[1px] block text-[12px] font-normal text-[var(--chekin-color-gray-1)]", children: helperText }),
16389
+ error && !hideErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime167.jsx)(
15890
16390
  FieldErrorMessage,
15891
16391
  {
15892
16392
  id: errorId,
@@ -15903,7 +16403,7 @@ var DashboardFileInput = React61.forwardRef(
15903
16403
 
15904
16404
  // src/dashboard/select-icons-box/SelectIconsBox.tsx
15905
16405
  var React62 = __toESM(require("react"), 1);
15906
- var import_jsx_runtime166 = require("react/jsx-runtime");
16406
+ var import_jsx_runtime168 = require("react/jsx-runtime");
15907
16407
  function DashboardSelectIconsBox({
15908
16408
  children,
15909
16409
  icons,
@@ -15939,7 +16439,7 @@ function DashboardSelectIconsBox({
15939
16439
  onSelect(iconName);
15940
16440
  setOpen(false);
15941
16441
  };
15942
- return /* @__PURE__ */ (0, import_jsx_runtime166.jsxs)(
16442
+ return /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)(
15943
16443
  "div",
15944
16444
  {
15945
16445
  ref: containerRef,
@@ -15947,7 +16447,7 @@ function DashboardSelectIconsBox({
15947
16447
  className: cn("relative inline-block", className),
15948
16448
  children: [
15949
16449
  children,
15950
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
16450
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
15951
16451
  "div",
15952
16452
  {
15953
16453
  className: cn(
@@ -15958,7 +16458,7 @@ function DashboardSelectIconsBox({
15958
16458
  boxClassName
15959
16459
  ),
15960
16460
  style: { gridTemplateColumns: `repeat(${columns}, minmax(0, 1fr))` },
15961
- children: icons.map((iconName) => /* @__PURE__ */ (0, import_jsx_runtime166.jsx)(
16461
+ children: icons.map((iconName) => /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
15962
16462
  "button",
15963
16463
  {
15964
16464
  type: "button",
@@ -16039,14 +16539,14 @@ function getErrorMessage(error) {
16039
16539
 
16040
16540
  // src/lib/toastResponseError.tsx
16041
16541
  var import_i18next = __toESM(require("i18next"), 1);
16042
- var import_jsx_runtime167 = require("react/jsx-runtime");
16542
+ var import_jsx_runtime169 = require("react/jsx-runtime");
16043
16543
  function addSupportEmailToMessage(message, prefixText) {
16044
16544
  if (typeof message !== "string") {
16045
16545
  return message;
16046
16546
  }
16047
16547
  const builtMessage = `${prefixText ? `${prefixText} ` : ""}${message}`;
16048
- return /* @__PURE__ */ (0, import_jsx_runtime167.jsxs)("div", { children: [
16049
- /* @__PURE__ */ (0, import_jsx_runtime167.jsx)("div", { children: builtMessage }),
16548
+ return /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)("div", { children: [
16549
+ /* @__PURE__ */ (0, import_jsx_runtime169.jsx)("div", { children: builtMessage }),
16050
16550
  import_i18next.default.t("reach_us_at_email")
16051
16551
  ] });
16052
16552
  }
@@ -16061,13 +16561,13 @@ function toastResponseError(error, options = {}) {
16061
16561
  }
16062
16562
 
16063
16563
  // src/legacy-fields/textarea/Textarea.tsx
16064
- var import_react86 = require("react");
16065
- var import_jsx_runtime168 = require("react/jsx-runtime");
16066
- var LegacyTextarea = (0, import_react86.forwardRef)(
16564
+ var import_react89 = require("react");
16565
+ var import_jsx_runtime170 = require("react/jsx-runtime");
16566
+ var LegacyTextarea = (0, import_react89.forwardRef)(
16067
16567
  ({ className, textareaClassName, label, disabled, name, invalid, ...textareaProps }, ref) => {
16068
- const inputId = (0, import_react86.useId)();
16069
- return /* @__PURE__ */ (0, import_jsx_runtime168.jsxs)("div", { className: cn("relative", className), children: [
16070
- /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
16568
+ const inputId = (0, import_react89.useId)();
16569
+ return /* @__PURE__ */ (0, import_jsx_runtime170.jsxs)("div", { className: cn("relative", className), children: [
16570
+ /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
16071
16571
  "textarea",
16072
16572
  {
16073
16573
  ref,
@@ -16083,7 +16583,7 @@ var LegacyTextarea = (0, import_react86.forwardRef)(
16083
16583
  ...textareaProps
16084
16584
  }
16085
16585
  ),
16086
- label && /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
16586
+ label && /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
16087
16587
  "label",
16088
16588
  {
16089
16589
  htmlFor: inputId,
@@ -16102,13 +16602,13 @@ LegacyTextarea.displayName = "LegacyTextarea";
16102
16602
 
16103
16603
  // src/airbnb-fields/datepicker/DatePicker.tsx
16104
16604
  var React64 = __toESM(require("react"), 1);
16105
- var import_lucide_react49 = require("lucide-react");
16605
+ var import_lucide_react50 = require("lucide-react");
16106
16606
 
16107
16607
  // src/airbnb-fields/field-trigger/FieldTrigger.tsx
16108
16608
  var React63 = __toESM(require("react"), 1);
16109
- var import_lucide_react48 = require("lucide-react");
16110
- var import_react_i18next37 = require("react-i18next");
16111
- var import_jsx_runtime169 = require("react/jsx-runtime");
16609
+ var import_lucide_react49 = require("lucide-react");
16610
+ var import_react_i18next39 = require("react-i18next");
16611
+ var import_jsx_runtime171 = require("react/jsx-runtime");
16112
16612
  var AirbnbFieldTrigger = React63.forwardRef(
16113
16613
  ({
16114
16614
  as = "button",
@@ -16140,20 +16640,20 @@ var AirbnbFieldTrigger = React63.forwardRef(
16140
16640
  onKeyDown,
16141
16641
  ...props
16142
16642
  }, ref) => {
16143
- const { t } = (0, import_react_i18next37.useTranslation)();
16643
+ const { t } = (0, import_react_i18next39.useTranslation)();
16144
16644
  const hasValue = Boolean(valueText);
16145
16645
  const isRaised = hasValue || forceFloatingLabel;
16146
16646
  const optionalLabel = optional ? typeof optional === "string" ? optional : t("optional") : void 0;
16147
16647
  const visibleLabelText = labelText ?? label;
16148
16648
  const hasLabelMeta = Boolean(optionalLabel) || Boolean(tooltip);
16149
- const resolvedLabelText = visibleLabelText && hasLabelMeta ? /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)("span", { className: "inline-flex max-w-full items-center gap-1.5 align-middle", children: [
16150
- /* @__PURE__ */ (0, import_jsx_runtime169.jsx)("span", { className: "min-w-0 truncate", children: visibleLabelText }),
16151
- optionalLabel && /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)("span", { className: "shrink-0 text-[12px] relative top-[1px] font-normal leading-4 text-current opacity-70", children: [
16649
+ const resolvedLabelText = visibleLabelText && hasLabelMeta ? /* @__PURE__ */ (0, import_jsx_runtime171.jsxs)("span", { className: "inline-flex max-w-full items-center gap-1.5 align-middle", children: [
16650
+ /* @__PURE__ */ (0, import_jsx_runtime171.jsx)("span", { className: "min-w-0 truncate", children: visibleLabelText }),
16651
+ optionalLabel && /* @__PURE__ */ (0, import_jsx_runtime171.jsxs)("span", { className: "shrink-0 text-[12px] relative top-[1px] font-normal leading-4 text-current opacity-70", children: [
16152
16652
  "(",
16153
16653
  optionalLabel,
16154
16654
  ")"
16155
16655
  ] }),
16156
- tooltip && /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
16656
+ tooltip && /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
16157
16657
  HelpTooltip,
16158
16658
  {
16159
16659
  content: tooltip,
@@ -16169,10 +16669,10 @@ var AirbnbFieldTrigger = React63.forwardRef(
16169
16669
  const hasInvalidState = Boolean(error);
16170
16670
  const errorMessage = typeof error === "string" ? error : void 0;
16171
16671
  const isBlocked = Boolean(disabled) || Boolean(loading);
16172
- const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)("span", { className: "flex items-center gap-2", children: [
16672
+ const resolvedTrailingAdornment = loading || trailingAdornment ? /* @__PURE__ */ (0, import_jsx_runtime171.jsxs)("span", { className: "flex items-center gap-2", children: [
16173
16673
  trailingAdornment,
16174
- loading && /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
16175
- import_lucide_react48.Loader2,
16674
+ loading && /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
16675
+ import_lucide_react49.Loader2,
16176
16676
  {
16177
16677
  "aria-hidden": "true",
16178
16678
  className: "h-5 w-5 animate-spin text-[var(--chekin-color-gray-1)]"
@@ -16187,8 +16687,8 @@ var AirbnbFieldTrigger = React63.forwardRef(
16187
16687
  disabled ? "cursor-not-allowed opacity-50" : loading ? "cursor-progress" : isAirbnbVariant ? "cursor-pointer" : "cursor-text",
16188
16688
  className
16189
16689
  );
16190
- const sharedContent = /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)(import_jsx_runtime169.Fragment, { children: [
16191
- /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)(
16690
+ const sharedContent = /* @__PURE__ */ (0, import_jsx_runtime171.jsxs)(import_jsx_runtime171.Fragment, { children: [
16691
+ /* @__PURE__ */ (0, import_jsx_runtime171.jsxs)(
16192
16692
  "span",
16193
16693
  {
16194
16694
  className: cn(
@@ -16197,7 +16697,7 @@ var AirbnbFieldTrigger = React63.forwardRef(
16197
16697
  contentClassName
16198
16698
  ),
16199
16699
  children: [
16200
- /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
16700
+ /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
16201
16701
  "span",
16202
16702
  {
16203
16703
  id: labelId,
@@ -16210,7 +16710,7 @@ var AirbnbFieldTrigger = React63.forwardRef(
16210
16710
  children: animatedLabel
16211
16711
  }
16212
16712
  ),
16213
- children ? children : hasValue ? /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
16713
+ children ? children : hasValue ? /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
16214
16714
  "span",
16215
16715
  {
16216
16716
  id: valueId,
@@ -16221,11 +16721,11 @@ var AirbnbFieldTrigger = React63.forwardRef(
16221
16721
  ),
16222
16722
  children: valueText
16223
16723
  }
16224
- ) : /* @__PURE__ */ (0, import_jsx_runtime169.jsx)("span", { id: helperTextId, className: "sr-only", children: placeholder ?? label })
16724
+ ) : /* @__PURE__ */ (0, import_jsx_runtime171.jsx)("span", { id: helperTextId, className: "sr-only", children: placeholder ?? label })
16225
16725
  ]
16226
16726
  }
16227
16727
  ),
16228
- resolvedTrailingAdornment && /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
16728
+ resolvedTrailingAdornment && /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
16229
16729
  "span",
16230
16730
  {
16231
16731
  "aria-hidden": "true",
@@ -16237,9 +16737,9 @@ var AirbnbFieldTrigger = React63.forwardRef(
16237
16737
  }
16238
16738
  )
16239
16739
  ] });
16240
- return /* @__PURE__ */ (0, import_jsx_runtime169.jsxs)("div", { className: "w-full", children: [
16241
- topLabel && /* @__PURE__ */ (0, import_jsx_runtime169.jsx)("p", { className: "mb-3 text-[16px] font-semibold leading-5 text-[#222222]", children: topLabel }),
16242
- as === "button" ? /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
16740
+ return /* @__PURE__ */ (0, import_jsx_runtime171.jsxs)("div", { className: "w-full", children: [
16741
+ topLabel && /* @__PURE__ */ (0, import_jsx_runtime171.jsx)("p", { className: "mb-3 text-[16px] font-semibold leading-5 text-[#222222]", children: topLabel }),
16742
+ as === "button" ? /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
16243
16743
  "button",
16244
16744
  {
16245
16745
  id,
@@ -16256,7 +16756,7 @@ var AirbnbFieldTrigger = React63.forwardRef(
16256
16756
  ...props,
16257
16757
  children: sharedContent
16258
16758
  }
16259
- ) : /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(
16759
+ ) : /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
16260
16760
  "div",
16261
16761
  {
16262
16762
  id,
@@ -16273,14 +16773,14 @@ var AirbnbFieldTrigger = React63.forwardRef(
16273
16773
  children: sharedContent
16274
16774
  }
16275
16775
  ),
16276
- errorMessage && !hideErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime169.jsx)(FieldErrorMessage, { id: errorId, message: errorMessage })
16776
+ errorMessage && !hideErrorMessage && /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(FieldErrorMessage, { id: errorId, message: errorMessage })
16277
16777
  ] });
16278
16778
  }
16279
16779
  );
16280
16780
  AirbnbFieldTrigger.displayName = "AirbnbFieldTrigger";
16281
16781
 
16282
16782
  // src/airbnb-fields/datepicker/DatePicker.tsx
16283
- var import_jsx_runtime170 = require("react/jsx-runtime");
16783
+ var import_jsx_runtime172 = require("react/jsx-runtime");
16284
16784
  var DEFAULT_MIN_DATE = new Date(1920, 0, 1);
16285
16785
  var AirbnbDatePicker = React64.forwardRef(
16286
16786
  ({
@@ -16307,7 +16807,7 @@ var AirbnbDatePicker = React64.forwardRef(
16307
16807
  doneLabel = "Done",
16308
16808
  formatValue = formatDateValue
16309
16809
  }, ref) => {
16310
- const { isMatch: isMobile2 } = useScreenResize(DEVICE.mobileXL);
16810
+ const { isMatch: isMobile3 } = useScreenResize(DEVICE.mobileXL);
16311
16811
  const [isOpen, setIsOpen] = React64.useState(false);
16312
16812
  const triggerId = React64.useId();
16313
16813
  const pickerId = React64.useId();
@@ -16397,8 +16897,8 @@ var AirbnbDatePicker = React64.forwardRef(
16397
16897
  setIsOpen(false);
16398
16898
  }
16399
16899
  }, [isBlocked]);
16400
- return /* @__PURE__ */ (0, import_jsx_runtime170.jsxs)("div", { className: cn("relative w-full max-w-[var(--max-field-width)]", className), children: [
16401
- name && /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
16900
+ return /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)("div", { className: cn("relative w-full max-w-[var(--max-field-width)]", className), children: [
16901
+ name && /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
16402
16902
  "input",
16403
16903
  {
16404
16904
  type: "hidden",
@@ -16406,7 +16906,7 @@ var AirbnbDatePicker = React64.forwardRef(
16406
16906
  value: resolvedValue ? formatDateInputValue(resolvedValue) : ""
16407
16907
  }
16408
16908
  ),
16409
- /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
16909
+ /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
16410
16910
  AirbnbFieldTrigger,
16411
16911
  {
16412
16912
  id: triggerId,
@@ -16433,15 +16933,15 @@ var AirbnbDatePicker = React64.forwardRef(
16433
16933
  onClick: handleTriggerClick,
16434
16934
  onKeyDown: handleTriggerKeyDown,
16435
16935
  onBlur,
16436
- trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(import_lucide_react49.Calendar, { className: "h-5 w-5 text-[#1F1F1B]", strokeWidth: 2 })
16936
+ trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(import_lucide_react50.Calendar, { className: "h-5 w-5 text-[#1F1F1B]", strokeWidth: 2 })
16437
16937
  }
16438
16938
  ),
16439
- /* @__PURE__ */ (0, import_jsx_runtime170.jsx)(
16939
+ /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
16440
16940
  AirbnbDatePickerContent,
16441
16941
  {
16442
16942
  baseId: pickerId,
16443
16943
  open: isOpen,
16444
- isMobile: isMobile2,
16944
+ isMobile: isMobile3,
16445
16945
  label,
16446
16946
  title: mobileTitle ?? label,
16447
16947
  doneLabel,
@@ -16471,7 +16971,7 @@ AirbnbDatePicker.displayName = "AirbnbDatePicker";
16471
16971
 
16472
16972
  // src/airbnb-fields/input/Input.tsx
16473
16973
  var React65 = __toESM(require("react"), 1);
16474
- var import_jsx_runtime171 = require("react/jsx-runtime");
16974
+ var import_jsx_runtime173 = require("react/jsx-runtime");
16475
16975
  var getInputValue = (value) => value != null ? String(value) : "";
16476
16976
  var AirbnbInput = React65.forwardRef(
16477
16977
  ({
@@ -16554,7 +17054,7 @@ var AirbnbInput = React65.forwardRef(
16554
17054
  setIsFocused(false);
16555
17055
  onBlur?.(event);
16556
17056
  };
16557
- return /* @__PURE__ */ (0, import_jsx_runtime171.jsx)("div", { className: cn("w-full max-w-[var(--max-field-width)]", wrapperClassName), children: /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
17057
+ return /* @__PURE__ */ (0, import_jsx_runtime173.jsx)("div", { className: cn("w-full max-w-[var(--max-field-width)]", wrapperClassName), children: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
16558
17058
  AirbnbFieldTrigger,
16559
17059
  {
16560
17060
  as: "div",
@@ -16586,7 +17086,7 @@ var AirbnbInput = React65.forwardRef(
16586
17086
  forceFloatingLabel: shouldShowLabel,
16587
17087
  forceLabelText: hasLabelMeta,
16588
17088
  hideErrorMessage: !renderErrorMessage,
16589
- children: /* @__PURE__ */ (0, import_jsx_runtime171.jsx)(
17089
+ children: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
16590
17090
  "input",
16591
17091
  {
16592
17092
  ...props,
@@ -16623,13 +17123,13 @@ AirbnbInput.displayName = "AirbnbInput";
16623
17123
 
16624
17124
  // src/airbnb-fields/phone-field/PhoneField.tsx
16625
17125
  var React71 = __toESM(require("react"), 1);
16626
- var import_lucide_react51 = require("lucide-react");
17126
+ var import_lucide_react52 = require("lucide-react");
16627
17127
 
16628
17128
  // src/airbnb-fields/select/Select.tsx
16629
17129
  var React70 = __toESM(require("react"), 1);
16630
17130
 
16631
17131
  // src/airbnb-fields/select/SelectDesktopMenu.tsx
16632
- var import_jsx_runtime172 = require("react/jsx-runtime");
17132
+ var import_jsx_runtime174 = require("react/jsx-runtime");
16633
17133
  function AirbnbSelectDesktopMenu({
16634
17134
  id,
16635
17135
  options,
@@ -16648,7 +17148,7 @@ function AirbnbSelectDesktopMenu({
16648
17148
  noOptionsMessage
16649
17149
  }) {
16650
17150
  const emptyMessage = noOptionsMessage?.();
16651
- return /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)(
17151
+ return /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(
16652
17152
  "div",
16653
17153
  {
16654
17154
  id,
@@ -16661,12 +17161,12 @@ function AirbnbSelectDesktopMenu({
16661
17161
  onKeyDown,
16662
17162
  className: cn("max-h-[280px] overflow-y-auto p-2 outline-none", menuClassName),
16663
17163
  children: [
16664
- options.length === 0 && emptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime172.jsx)("div", { className: "px-4 py-3 text-base leading-6 text-[#6C6C6C]", children: emptyMessage }) : null,
17164
+ options.length === 0 && emptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "px-4 py-3 text-base leading-6 text-[#6C6C6C]", children: emptyMessage }) : null,
16665
17165
  options.map((option, index) => {
16666
17166
  const isSelected = selectedValue?.value === option.value;
16667
17167
  const isHighlighted = index === highlightedIndex;
16668
17168
  const optionKey = `${String(option.value)}-${index}`;
16669
- return /* @__PURE__ */ (0, import_jsx_runtime172.jsx)(
17169
+ return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
16670
17170
  "button",
16671
17171
  {
16672
17172
  id: getOptionId2(index),
@@ -16698,7 +17198,7 @@ function AirbnbSelectDesktopMenu({
16698
17198
  }
16699
17199
 
16700
17200
  // src/airbnb-fields/select/SelectDesktopContent.tsx
16701
- var import_jsx_runtime173 = require("react/jsx-runtime");
17201
+ var import_jsx_runtime175 = require("react/jsx-runtime");
16702
17202
  function AirbnbSelectDesktopContent({
16703
17203
  isOpen,
16704
17204
  listboxId,
@@ -16719,14 +17219,14 @@ function AirbnbSelectDesktopContent({
16719
17219
  noOptionsMessage
16720
17220
  }) {
16721
17221
  if (!isOpen) return null;
16722
- return /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
17222
+ return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
16723
17223
  "div",
16724
17224
  {
16725
17225
  className: cn(
16726
17226
  "absolute left-0 right-0 top-[calc(100%+8px)] z-20 overflow-hidden rounded-[20px] border border-[#DEDAD2] bg-white shadow-[0_14px_30px_rgba(18,18,18,0.08)]",
16727
17227
  dropdownClassName
16728
17228
  ),
16729
- children: /* @__PURE__ */ (0, import_jsx_runtime173.jsx)(
17229
+ children: /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
16730
17230
  AirbnbSelectDesktopMenu,
16731
17231
  {
16732
17232
  id: listboxId,
@@ -16824,7 +17324,7 @@ function getMobileOptionStyles(index, scrollTop) {
16824
17324
  }
16825
17325
 
16826
17326
  // src/airbnb-fields/select/SelectMobileWheel.tsx
16827
- var import_jsx_runtime174 = require("react/jsx-runtime");
17327
+ var import_jsx_runtime176 = require("react/jsx-runtime");
16828
17328
  function AirbnbSelectMobileWheel({
16829
17329
  id,
16830
17330
  options,
@@ -16843,7 +17343,7 @@ function AirbnbSelectMobileWheel({
16843
17343
  }) {
16844
17344
  const spacerHeight2 = getWheelSpacerHeight();
16845
17345
  const emptyMessage = noOptionsMessage?.();
16846
- return /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(
17346
+ return /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(
16847
17347
  "div",
16848
17348
  {
16849
17349
  id,
@@ -16855,10 +17355,10 @@ function AirbnbSelectMobileWheel({
16855
17355
  onKeyDown,
16856
17356
  className: cn("relative overflow-hidden outline-none", menuClassName),
16857
17357
  children: [
16858
- options.length === 0 && emptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "flex min-h-[160px] items-center justify-center px-4 text-center text-base leading-6 text-[#6C6C6C]", children: emptyMessage }) : null,
16859
- /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "pointer-events-none absolute inset-x-0 top-0 h-16 bg-gradient-to-b from-white via-white/80 to-transparent" }),
16860
- /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-white via-white/80 to-transparent" }),
16861
- /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
17358
+ options.length === 0 && emptyMessage ? /* @__PURE__ */ (0, import_jsx_runtime176.jsx)("div", { className: "flex min-h-[160px] items-center justify-center px-4 text-center text-base leading-6 text-[#6C6C6C]", children: emptyMessage }) : null,
17359
+ /* @__PURE__ */ (0, import_jsx_runtime176.jsx)("div", { className: "pointer-events-none absolute inset-x-0 top-0 h-16 bg-gradient-to-b from-white via-white/80 to-transparent" }),
17360
+ /* @__PURE__ */ (0, import_jsx_runtime176.jsx)("div", { className: "pointer-events-none absolute inset-x-0 bottom-0 h-16 bg-gradient-to-t from-white via-white/80 to-transparent" }),
17361
+ /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
16862
17362
  "div",
16863
17363
  {
16864
17364
  "aria-hidden": true,
@@ -16868,7 +17368,7 @@ function AirbnbSelectMobileWheel({
16868
17368
  )
16869
17369
  }
16870
17370
  ),
16871
- /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(
17371
+ /* @__PURE__ */ (0, import_jsx_runtime176.jsxs)(
16872
17372
  "div",
16873
17373
  {
16874
17374
  ref: listRef,
@@ -16883,11 +17383,11 @@ function AirbnbSelectMobileWheel({
16883
17383
  WebkitOverflowScrolling: "touch"
16884
17384
  },
16885
17385
  children: [
16886
- /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { style: { height: `${spacerHeight2}px` } }),
17386
+ /* @__PURE__ */ (0, import_jsx_runtime176.jsx)("div", { style: { height: `${spacerHeight2}px` } }),
16887
17387
  options.map((option, index) => {
16888
17388
  const { distance, style } = getMobileOptionStyles(index, scrollTop);
16889
17389
  const optionKey = `${String(option.value)}-${index}`;
16890
- return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
17390
+ return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
16891
17391
  "button",
16892
17392
  {
16893
17393
  id: getOptionId2(index),
@@ -16908,7 +17408,7 @@ function AirbnbSelectMobileWheel({
16908
17408
  optionKey
16909
17409
  );
16910
17410
  }),
16911
- /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { style: { height: `${spacerHeight2}px` } })
17411
+ /* @__PURE__ */ (0, import_jsx_runtime176.jsx)("div", { style: { height: `${spacerHeight2}px` } })
16912
17412
  ]
16913
17413
  }
16914
17414
  )
@@ -16918,7 +17418,7 @@ function AirbnbSelectMobileWheel({
16918
17418
  }
16919
17419
 
16920
17420
  // src/airbnb-fields/select/SelectMobileContent.tsx
16921
- var import_jsx_runtime175 = require("react/jsx-runtime");
17421
+ var import_jsx_runtime177 = require("react/jsx-runtime");
16922
17422
  function AirbnbSelectMobileContent({
16923
17423
  open,
16924
17424
  onOpenChange,
@@ -16942,11 +17442,11 @@ function AirbnbSelectMobileContent({
16942
17442
  getOptionId: getOptionId2,
16943
17443
  noOptionsMessage
16944
17444
  }) {
16945
- return /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(Drawer, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)(DrawerContent, { onClose, lockScroll: false, children: [
16946
- /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
16947
- /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(DrawerDescription, { className: "sr-only", children: label }),
16948
- /* @__PURE__ */ (0, import_jsx_runtime175.jsxs)("div", { className: "px-6 pb-4 pt-1", children: [
16949
- /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(
17445
+ return /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(Drawer, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime177.jsxs)(DrawerContent, { onClose, lockScroll: false, children: [
17446
+ /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
17447
+ /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(DrawerDescription, { className: "sr-only", children: label }),
17448
+ /* @__PURE__ */ (0, import_jsx_runtime177.jsxs)("div", { className: "px-6 pb-4 pt-1", children: [
17449
+ /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
16950
17450
  AirbnbSelectMobileWheel,
16951
17451
  {
16952
17452
  id: listboxId,
@@ -16965,15 +17465,15 @@ function AirbnbSelectMobileContent({
16965
17465
  noOptionsMessage
16966
17466
  }
16967
17467
  ),
16968
- /* @__PURE__ */ (0, import_jsx_runtime175.jsx)(Button, { type: "button", onClick: onDone, className: "mt-4 h-12 mb-8 w-full", children: doneLabel })
17468
+ /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(Button, { type: "button", onClick: onDone, className: "mt-4 h-12 mb-8 w-full", children: doneLabel })
16969
17469
  ] })
16970
17470
  ] }) });
16971
17471
  }
16972
17472
 
16973
17473
  // src/airbnb-fields/select/SelectTrigger.tsx
16974
17474
  var React66 = __toESM(require("react"), 1);
16975
- var import_lucide_react50 = require("lucide-react");
16976
- var import_jsx_runtime176 = require("react/jsx-runtime");
17475
+ var import_lucide_react51 = require("lucide-react");
17476
+ var import_jsx_runtime178 = require("react/jsx-runtime");
16977
17477
  var AirbnbSelectTrigger = React66.forwardRef(
16978
17478
  ({
16979
17479
  id,
@@ -16999,7 +17499,7 @@ var AirbnbSelectTrigger = React66.forwardRef(
16999
17499
  onKeyDown,
17000
17500
  onBlur
17001
17501
  }, ref) => {
17002
- return /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
17502
+ return /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
17003
17503
  AirbnbFieldTrigger,
17004
17504
  {
17005
17505
  id,
@@ -17028,8 +17528,8 @@ var AirbnbSelectTrigger = React66.forwardRef(
17028
17528
  onClick,
17029
17529
  onKeyDown,
17030
17530
  onBlur,
17031
- trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime176.jsx)(
17032
- import_lucide_react50.ChevronDown,
17531
+ trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
17532
+ import_lucide_react51.ChevronDown,
17033
17533
  {
17034
17534
  className: open ? "h-6 w-6 rotate-180 text-[#1F1F1B] transition-transform" : "h-6 w-6 text-[#1F1F1B] transition-transform"
17035
17535
  }
@@ -17043,7 +17543,7 @@ AirbnbSelectTrigger.displayName = "AirbnbSelectTrigger";
17043
17543
  // src/airbnb-fields/select/useDesktopSelect.ts
17044
17544
  var React67 = __toESM(require("react"), 1);
17045
17545
  function useDesktopSelect({
17046
- isMobile: isMobile2,
17546
+ isMobile: isMobile3,
17047
17547
  isOpen,
17048
17548
  options,
17049
17549
  value,
@@ -17056,7 +17556,7 @@ function useDesktopSelect({
17056
17556
  const optionRefs = React67.useRef([]);
17057
17557
  const selectedIndex = getOptionIndex2(options, value);
17058
17558
  React67.useEffect(() => {
17059
- if (!isOpen || isMobile2) return;
17559
+ if (!isOpen || isMobile3) return;
17060
17560
  setHighlightedIndex((currentIndex) => {
17061
17561
  if (currentIndex >= 0) {
17062
17562
  return currentIndex;
@@ -17069,13 +17569,13 @@ function useDesktopSelect({
17069
17569
  return () => {
17070
17570
  window.cancelAnimationFrame(frameId);
17071
17571
  };
17072
- }, [isMobile2, isOpen, options, selectedIndex]);
17572
+ }, [isMobile3, isOpen, options, selectedIndex]);
17073
17573
  React67.useEffect(() => {
17074
- if (!isOpen || isMobile2 || highlightedIndex < 0) return;
17574
+ if (!isOpen || isMobile3 || highlightedIndex < 0) return;
17075
17575
  optionRefs.current[highlightedIndex]?.scrollIntoView({
17076
17576
  block: "nearest"
17077
17577
  });
17078
- }, [highlightedIndex, isMobile2, isOpen]);
17578
+ }, [highlightedIndex, isMobile3, isOpen]);
17079
17579
  React67.useEffect(() => {
17080
17580
  if (isOpen) return;
17081
17581
  setHighlightedIndex(-1);
@@ -17193,7 +17693,7 @@ function useDesktopSelect({
17193
17693
 
17194
17694
  // src/airbnb-fields/select/useMobileSelectWheel.ts
17195
17695
  var React68 = __toESM(require("react"), 1);
17196
- function useMobileSelectWheel({ isMobile: isMobile2, isOpen, options, value, disabled }) {
17696
+ function useMobileSelectWheel({ isMobile: isMobile3, isOpen, options, value, disabled }) {
17197
17697
  const [pendingValue, setPendingValue] = React68.useState(
17198
17698
  value ?? null
17199
17699
  );
@@ -17248,14 +17748,14 @@ function useMobileSelectWheel({ isMobile: isMobile2, isOpen, options, value, dis
17248
17748
  setPendingValue(value ?? null);
17249
17749
  }, [value]);
17250
17750
  React68.useLayoutEffect(() => {
17251
- if (!isMobile2 || !isOpen) return;
17751
+ if (!isMobile3 || !isOpen) return;
17252
17752
  const frameId = window.requestAnimationFrame(() => {
17253
17753
  syncScrollPosition(value ?? null, "instant");
17254
17754
  });
17255
17755
  return () => {
17256
17756
  window.cancelAnimationFrame(frameId);
17257
17757
  };
17258
- }, [isMobile2, isOpen, syncScrollPosition, value]);
17758
+ }, [isMobile3, isOpen, syncScrollPosition, value]);
17259
17759
  const settleScroll = React68.useCallback(() => {
17260
17760
  if (!mobileListRef.current) return;
17261
17761
  const nextIndex = Math.round(mobileListRef.current.scrollTop / MOBILE_OPTION_HEIGHT);
@@ -17390,7 +17890,7 @@ function useSelectIds2({ name, hasValue, error, hideErrorMessage }) {
17390
17890
  }
17391
17891
 
17392
17892
  // src/airbnb-fields/select/Select.tsx
17393
- var import_jsx_runtime177 = require("react/jsx-runtime");
17893
+ var import_jsx_runtime179 = require("react/jsx-runtime");
17394
17894
  var AirbnbSelect = React70.forwardRef(function AirbnbSelect2({
17395
17895
  options = [],
17396
17896
  value,
@@ -17417,7 +17917,7 @@ var AirbnbSelect = React70.forwardRef(function AirbnbSelect2({
17417
17917
  name,
17418
17918
  noOptionsMessage
17419
17919
  }, ref) {
17420
- const { isMatch: isMobile2 } = useScreenResize(DEVICE.mobileXL);
17920
+ const { isMatch: isMobile3 } = useScreenResize(DEVICE.mobileXL);
17421
17921
  const [isOpen, setIsOpen] = React70.useState(false);
17422
17922
  const containerRef = React70.useRef(null);
17423
17923
  const hasValue = Boolean(value);
@@ -17448,7 +17948,7 @@ var AirbnbSelect = React70.forwardRef(function AirbnbSelect2({
17448
17948
  moveByStep,
17449
17949
  moveToBoundary
17450
17950
  } = useMobileSelectWheel({
17451
- isMobile: isMobile2,
17951
+ isMobile: isMobile3,
17452
17952
  isOpen,
17453
17953
  options,
17454
17954
  value,
@@ -17465,7 +17965,7 @@ var AirbnbSelect = React70.forwardRef(function AirbnbSelect2({
17465
17965
  handleMenuKeyDown,
17466
17966
  handleTriggerKeyDown
17467
17967
  } = useDesktopSelect({
17468
- isMobile: isMobile2,
17968
+ isMobile: isMobile3,
17469
17969
  isOpen,
17470
17970
  options,
17471
17971
  value,
@@ -17478,7 +17978,7 @@ var AirbnbSelect = React70.forwardRef(function AirbnbSelect2({
17478
17978
  useOutsideClick({
17479
17979
  elementRef: containerRef,
17480
17980
  onOutsideClick: () => setIsOpen(false),
17481
- isDisabled: !isOpen || isMobile2
17981
+ isDisabled: !isOpen || isMobile3
17482
17982
  });
17483
17983
  React70.useEffect(() => {
17484
17984
  if (isBlocked) {
@@ -17521,14 +18021,14 @@ var AirbnbSelect = React70.forwardRef(function AirbnbSelect2({
17521
18021
  if (isBlocked) return;
17522
18022
  setIsOpen((prev) => {
17523
18023
  const nextOpen = !prev;
17524
- if (isMobile2) {
18024
+ if (isMobile3) {
17525
18025
  syncPendingValue(value ?? null);
17526
18026
  }
17527
18027
  return nextOpen;
17528
18028
  });
17529
- }, [isBlocked, isMobile2, syncPendingValue, value]);
18029
+ }, [isBlocked, isMobile3, syncPendingValue, value]);
17530
18030
  const handleRootTriggerKeyDown = (event) => {
17531
- if (isMobile2) {
18031
+ if (isMobile3) {
17532
18032
  if (isBlocked) return;
17533
18033
  if (event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === "Enter" || event.key === " ") {
17534
18034
  event.preventDefault();
@@ -17570,13 +18070,13 @@ var AirbnbSelect = React70.forwardRef(function AirbnbSelect2({
17570
18070
  handleMobileOpenChange(false);
17571
18071
  }
17572
18072
  };
17573
- return /* @__PURE__ */ (0, import_jsx_runtime177.jsxs)(
18073
+ return /* @__PURE__ */ (0, import_jsx_runtime179.jsxs)(
17574
18074
  "div",
17575
18075
  {
17576
18076
  ref: containerRef,
17577
18077
  className: cn("relative w-full max-w-[var(--max-field-width)]", className),
17578
18078
  children: [
17579
- name && /* @__PURE__ */ (0, import_jsx_runtime177.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
18079
+ name && /* @__PURE__ */ (0, import_jsx_runtime179.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
17580
18080
  renderTrigger ? renderTrigger({
17581
18081
  id: triggerId,
17582
18082
  open: isOpen,
@@ -17598,7 +18098,7 @@ var AirbnbSelect = React70.forwardRef(function AirbnbSelect2({
17598
18098
  onClick: handleTriggerClick,
17599
18099
  onKeyDown: handleRootTriggerKeyDown,
17600
18100
  onBlur
17601
- }) : /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
18101
+ }) : /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
17602
18102
  AirbnbSelectTrigger,
17603
18103
  {
17604
18104
  id: triggerId,
@@ -17626,7 +18126,7 @@ var AirbnbSelect = React70.forwardRef(function AirbnbSelect2({
17626
18126
  onBlur
17627
18127
  }
17628
18128
  ),
17629
- isMobile2 ? /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
18129
+ isMobile3 ? /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
17630
18130
  AirbnbSelectMobileContent,
17631
18131
  {
17632
18132
  open: isOpen,
@@ -17651,7 +18151,7 @@ var AirbnbSelect = React70.forwardRef(function AirbnbSelect2({
17651
18151
  getOptionId: getOptionId2,
17652
18152
  noOptionsMessage
17653
18153
  }
17654
- ) : /* @__PURE__ */ (0, import_jsx_runtime177.jsx)(
18154
+ ) : /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
17655
18155
  AirbnbSelectDesktopContent,
17656
18156
  {
17657
18157
  isOpen,
@@ -17685,7 +18185,7 @@ var AirbnbSelect = React70.forwardRef(function AirbnbSelect2({
17685
18185
  });
17686
18186
 
17687
18187
  // src/airbnb-fields/phone-field/PhoneField.tsx
17688
- var import_jsx_runtime178 = require("react/jsx-runtime");
18188
+ var import_jsx_runtime180 = require("react/jsx-runtime");
17689
18189
  function formatPhoneCodeOptionLabel(option) {
17690
18190
  const label = String(option.label);
17691
18191
  const value = String(option.value);
@@ -17732,9 +18232,9 @@ var AirbnbPhoneField = React71.forwardRef(
17732
18232
  const hasInvalidState = Boolean(error) || Boolean(invalid);
17733
18233
  const isBlocked = Boolean(disabled) || Boolean(loading);
17734
18234
  const isCodeBlocked = isBlocked || Boolean(codeReadOnly);
17735
- return /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)("div", { className: cn("w-full max-w-[var(--max-field-width)]", className), children: [
17736
- name && /* @__PURE__ */ (0, import_jsx_runtime178.jsx)("input", { type: "hidden", name, value: combinedValue, disabled }),
17737
- codeName && /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
18235
+ return /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)("div", { className: cn("w-full max-w-[var(--max-field-width)]", className), children: [
18236
+ name && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)("input", { type: "hidden", name, value: combinedValue, disabled }),
18237
+ codeName && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
17738
18238
  "input",
17739
18239
  {
17740
18240
  type: "hidden",
@@ -17743,7 +18243,7 @@ var AirbnbPhoneField = React71.forwardRef(
17743
18243
  disabled
17744
18244
  }
17745
18245
  ),
17746
- numberName && /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
18246
+ numberName && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
17747
18247
  "input",
17748
18248
  {
17749
18249
  type: "hidden",
@@ -17752,7 +18252,7 @@ var AirbnbPhoneField = React71.forwardRef(
17752
18252
  disabled
17753
18253
  }
17754
18254
  ),
17755
- topLabel && /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
18255
+ topLabel && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
17756
18256
  "label",
17757
18257
  {
17758
18258
  htmlFor: inputId,
@@ -17760,8 +18260,8 @@ var AirbnbPhoneField = React71.forwardRef(
17760
18260
  children: topLabel
17761
18261
  }
17762
18262
  ),
17763
- /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)("div", { className: "flex items-stretch", children: [
17764
- /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
18263
+ /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)("div", { className: "flex items-stretch", children: [
18264
+ /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
17765
18265
  AirbnbSelect,
17766
18266
  {
17767
18267
  ref,
@@ -17792,7 +18292,7 @@ var AirbnbPhoneField = React71.forwardRef(
17792
18292
  onClick,
17793
18293
  onKeyDown,
17794
18294
  valueLabel
17795
- }) => /* @__PURE__ */ (0, import_jsx_runtime178.jsxs)(
18295
+ }) => /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)(
17796
18296
  "button",
17797
18297
  {
17798
18298
  id,
@@ -17814,9 +18314,9 @@ var AirbnbPhoneField = React71.forwardRef(
17814
18314
  triggerDisabled ? "cursor-not-allowed opacity-50" : triggerLoading ? "cursor-progress" : "cursor-pointer"
17815
18315
  ),
17816
18316
  children: [
17817
- /* @__PURE__ */ (0, import_jsx_runtime178.jsx)("span", { children: valueLabel ?? codePlaceholder }),
17818
- /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
17819
- import_lucide_react51.ChevronDown,
18317
+ /* @__PURE__ */ (0, import_jsx_runtime180.jsx)("span", { children: valueLabel ?? codePlaceholder }),
18318
+ /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
18319
+ import_lucide_react52.ChevronDown,
17820
18320
  {
17821
18321
  className: cn("h-5 w-5 transition-transform", open ? "rotate-180" : ""),
17822
18322
  strokeWidth: 2
@@ -17827,7 +18327,7 @@ var AirbnbPhoneField = React71.forwardRef(
17827
18327
  )
17828
18328
  }
17829
18329
  ),
17830
- /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(
18330
+ /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
17831
18331
  AirbnbInput,
17832
18332
  {
17833
18333
  id: inputId,
@@ -17859,7 +18359,7 @@ var AirbnbPhoneField = React71.forwardRef(
17859
18359
  }
17860
18360
  )
17861
18361
  ] }),
17862
- error && /* @__PURE__ */ (0, import_jsx_runtime178.jsx)(FieldErrorMessage, { message: error })
18362
+ error && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(FieldErrorMessage, { message: error })
17863
18363
  ] });
17864
18364
  }
17865
18365
  );
@@ -17867,10 +18367,10 @@ AirbnbPhoneField.displayName = "AirbnbPhoneField";
17867
18367
 
17868
18368
  // src/airbnb-fields/searchable-select/SearchableSelect.tsx
17869
18369
  var React72 = __toESM(require("react"), 1);
17870
- var import_lucide_react52 = require("lucide-react");
18370
+ var import_lucide_react53 = require("lucide-react");
17871
18371
  var import_react_virtual3 = require("@tanstack/react-virtual");
17872
- var import_react87 = require("react");
17873
- var import_jsx_runtime179 = require("react/jsx-runtime");
18372
+ var import_react90 = require("react");
18373
+ var import_jsx_runtime181 = require("react/jsx-runtime");
17874
18374
  var ROW_HEIGHT = 48;
17875
18375
  var DESKTOP_LIST_HEIGHT = 280;
17876
18376
  var MOBILE_LIST_HEIGHT = 420;
@@ -17910,7 +18410,7 @@ var AirbnbSearchableSelectInternal = ({
17910
18410
  noOptionsMessage,
17911
18411
  loadingMessage
17912
18412
  }, ref) => {
17913
- const { isMatch: isMobile2 } = useScreenResize(DEVICE.mobileXL);
18413
+ const { isMatch: isMobile3 } = useScreenResize(DEVICE.mobileXL);
17914
18414
  const reactId = React72.useId();
17915
18415
  const [open, setOpen] = React72.useState(false);
17916
18416
  const [internalSearchValue, setInternalSearchValue] = React72.useState("");
@@ -17945,10 +18445,10 @@ var AirbnbSearchableSelectInternal = ({
17945
18445
  useOutsideClick({
17946
18446
  elementRef: containerRef,
17947
18447
  onOutsideClick: () => closeSelect(),
17948
- isDisabled: !open || isMobile2
18448
+ isDisabled: !open || isMobile3
17949
18449
  });
17950
18450
  const handleOnOpenChange = useEvent(onOpenChange);
17951
- const setSelectOpen = (0, import_react87.useCallback)(
18451
+ const setSelectOpen = (0, import_react90.useCallback)(
17952
18452
  (nextOpen, options2) => {
17953
18453
  setOpen(nextOpen);
17954
18454
  handleOnOpenChange?.(nextOpen);
@@ -18039,7 +18539,7 @@ var AirbnbSearchableSelectInternal = ({
18039
18539
  }
18040
18540
  }
18041
18541
  }
18042
- const content = /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
18542
+ const content = /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
18043
18543
  AirbnbSearchableSelectContent,
18044
18544
  {
18045
18545
  inputId: searchInputId,
@@ -18058,7 +18558,7 @@ var AirbnbSearchableSelectInternal = ({
18058
18558
  menuClassName,
18059
18559
  noOptionsMessage,
18060
18560
  loadingMessage,
18061
- height: isMobile2 ? MOBILE_LIST_HEIGHT : DESKTOP_LIST_HEIGHT,
18561
+ height: isMobile3 ? MOBILE_LIST_HEIGHT : DESKTOP_LIST_HEIGHT,
18062
18562
  idPrefix: reactId,
18063
18563
  onSearchChange: handleSearchChange,
18064
18564
  onSearchKeyDown: handleSearchKeyDown,
@@ -18067,9 +18567,9 @@ var AirbnbSearchableSelectInternal = ({
18067
18567
  }
18068
18568
  );
18069
18569
  React72.useImperativeHandle(ref, () => triggerRef.current, []);
18070
- return /* @__PURE__ */ (0, import_jsx_runtime179.jsxs)("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
18071
- name && /* @__PURE__ */ (0, import_jsx_runtime179.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
18072
- /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
18570
+ return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { ref: containerRef, className: cn("relative w-full max-w-[425px]", className), children: [
18571
+ name && /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("input", { type: "hidden", name, value: value ? String(value.value) : "" }),
18572
+ /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
18073
18573
  AirbnbFieldTrigger,
18074
18574
  {
18075
18575
  id: `${reactId}-trigger`,
@@ -18104,8 +18604,8 @@ var AirbnbSearchableSelectInternal = ({
18104
18604
  },
18105
18605
  onKeyDown: handleTriggerKeyDown,
18106
18606
  onBlur,
18107
- trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
18108
- import_lucide_react52.ChevronDown,
18607
+ trailingAdornment: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
18608
+ import_lucide_react53.ChevronDown,
18109
18609
  {
18110
18610
  className: cn(
18111
18611
  "h-6 w-6 text-[#1F1F1B] transition-transform",
@@ -18115,7 +18615,7 @@ var AirbnbSearchableSelectInternal = ({
18115
18615
  )
18116
18616
  }
18117
18617
  ),
18118
- isMobile2 ? /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
18618
+ isMobile3 ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
18119
18619
  Drawer,
18120
18620
  {
18121
18621
  open,
@@ -18127,13 +18627,13 @@ var AirbnbSearchableSelectInternal = ({
18127
18627
  }
18128
18628
  closeSelect();
18129
18629
  },
18130
- children: /* @__PURE__ */ (0, import_jsx_runtime179.jsxs)(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
18131
- /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
18132
- /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(DrawerDescription, { className: "sr-only", children: label }),
18133
- /* @__PURE__ */ (0, import_jsx_runtime179.jsx)("div", { className: "px-5 pb-5 pt-1", children: content })
18630
+ children: /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)(DrawerContent, { onClose: closeSelect, lockScroll: false, children: [
18631
+ /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(DrawerTitle, { className: "sr-only", children: mobileTitle ?? label }),
18632
+ /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(DrawerDescription, { className: "sr-only", children: label }),
18633
+ /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: "px-5 pb-5 pt-1", children: content })
18134
18634
  ] })
18135
18635
  }
18136
- ) : open ? /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
18636
+ ) : open ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
18137
18637
  "div",
18138
18638
  {
18139
18639
  className: cn(
@@ -18200,16 +18700,16 @@ function AirbnbSearchableSelectContent({
18200
18700
  virtualizer.scrollToIndex(highlightedIndex, { align: "auto" });
18201
18701
  }
18202
18702
  }, [highlightedIndex, virtualizer]);
18203
- return /* @__PURE__ */ (0, import_jsx_runtime179.jsxs)("div", { className: "p-2", children: [
18204
- /* @__PURE__ */ (0, import_jsx_runtime179.jsxs)("div", { className: "relative mb-2", children: [
18205
- /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
18206
- import_lucide_react52.Search,
18703
+ return /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: "p-2", children: [
18704
+ /* @__PURE__ */ (0, import_jsx_runtime181.jsxs)("div", { className: "relative mb-2", children: [
18705
+ /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
18706
+ import_lucide_react53.Search,
18207
18707
  {
18208
18708
  "aria-hidden": "true",
18209
18709
  className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 text-[#9696B9]"
18210
18710
  }
18211
18711
  ),
18212
- /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
18712
+ /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
18213
18713
  "input",
18214
18714
  {
18215
18715
  id: inputId,
@@ -18228,7 +18728,7 @@ function AirbnbSearchableSelectContent({
18228
18728
  }
18229
18729
  )
18230
18730
  ] }),
18231
- loading && options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime179.jsx)("div", { className: "px-4 py-5 text-center text-base leading-6 text-[#6C6C6C]", children: loadingText }) : options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime179.jsx)("div", { className: "px-4 py-5 text-center text-base leading-6 text-[#6C6C6C]", children: emptyMessage }) : /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
18731
+ loading && options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: "px-4 py-5 text-center text-base leading-6 text-[#6C6C6C]", children: loadingText }) : options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("div", { className: "px-4 py-5 text-center text-base leading-6 text-[#6C6C6C]", children: emptyMessage }) : /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
18232
18732
  "div",
18233
18733
  {
18234
18734
  id: listboxId,
@@ -18237,7 +18737,7 @@ function AirbnbSearchableSelectContent({
18237
18737
  "aria-labelledby": labelId,
18238
18738
  className: cn("overflow-y-auto outline-none", menuClassName),
18239
18739
  style: { height: Math.min(height, rowCount * ROW_HEIGHT) },
18240
- children: /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
18740
+ children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
18241
18741
  "div",
18242
18742
  {
18243
18743
  className: "relative w-full",
@@ -18245,7 +18745,7 @@ function AirbnbSearchableSelectContent({
18245
18745
  children: virtualItems.map((virtualItem) => {
18246
18746
  const option = options[virtualItem.index];
18247
18747
  if (!option) {
18248
- return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
18748
+ return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
18249
18749
  "div",
18250
18750
  {
18251
18751
  className: "absolute left-0 top-0 flex w-full items-center px-4 text-base leading-6 text-[#6C6C6C]",
@@ -18260,7 +18760,7 @@ function AirbnbSearchableSelectContent({
18260
18760
  }
18261
18761
  const isSelected = value?.value === option.value;
18262
18762
  const isHighlighted = virtualItem.index === highlightedIndex;
18263
- return /* @__PURE__ */ (0, import_jsx_runtime179.jsx)(
18763
+ return /* @__PURE__ */ (0, import_jsx_runtime181.jsx)(
18264
18764
  "button",
18265
18765
  {
18266
18766
  id: getOptionId(idPrefix, virtualItem.index),
@@ -18282,7 +18782,7 @@ function AirbnbSearchableSelectContent({
18282
18782
  height: `${virtualItem.size}px`,
18283
18783
  transform: `translateY(${virtualItem.start}px)`
18284
18784
  },
18285
- children: /* @__PURE__ */ (0, import_jsx_runtime179.jsx)("span", { className: "truncate text-center", children: String(option.label) })
18785
+ children: /* @__PURE__ */ (0, import_jsx_runtime181.jsx)("span", { className: "truncate text-center", children: String(option.label) })
18286
18786
  },
18287
18787
  `${String(option.value)}-${virtualItem.index}`
18288
18788
  );
@@ -18312,15 +18812,15 @@ function getNextEnabledIndex(options, startIndex, step) {
18312
18812
 
18313
18813
  // src/airbnb-fields/search-input/SearchInput.tsx
18314
18814
  var React73 = __toESM(require("react"), 1);
18315
- var import_react_i18next38 = require("react-i18next");
18316
- var import_lucide_react53 = require("lucide-react");
18317
- var import_jsx_runtime180 = require("react/jsx-runtime");
18815
+ var import_react_i18next40 = require("react-i18next");
18816
+ var import_lucide_react54 = require("lucide-react");
18817
+ var import_jsx_runtime182 = require("react/jsx-runtime");
18318
18818
  var AirbnbSearchInput = React73.forwardRef(({ onReset, placeholder, wrapperClassName, ...props }, ref) => {
18319
- const { t } = (0, import_react_i18next38.useTranslation)();
18819
+ const { t } = (0, import_react_i18next40.useTranslation)();
18320
18820
  const placeholderText = placeholder || t("search_property") + "...";
18321
- return /* @__PURE__ */ (0, import_jsx_runtime180.jsxs)("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
18322
- /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(import_lucide_react53.Search, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[#9696B9]" }),
18323
- /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
18821
+ return /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)("div", { className: cn("input-wrapper relative", wrapperClassName), children: [
18822
+ /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(import_lucide_react54.Search, { className: "absolute left-4 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[#9696B9]" }),
18823
+ /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
18324
18824
  "input",
18325
18825
  {
18326
18826
  ...props,
@@ -18339,13 +18839,13 @@ var AirbnbSearchInput = React73.forwardRef(({ onReset, placeholder, wrapperClass
18339
18839
  )
18340
18840
  }
18341
18841
  ),
18342
- onReset && /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(
18842
+ onReset && /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
18343
18843
  Button,
18344
18844
  {
18345
18845
  variant: "ghost",
18346
18846
  onClick: onReset,
18347
18847
  className: "absolute right-0 top-1/2 h-5 w-5 -translate-y-1/2 transform text-[#9696B9]",
18348
- children: /* @__PURE__ */ (0, import_jsx_runtime180.jsx)(import_lucide_react53.X, { className: "h-5 w-5" })
18848
+ children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(import_lucide_react54.X, { className: "h-5 w-5" })
18349
18849
  }
18350
18850
  )
18351
18851
  ] });
@@ -18526,6 +19026,7 @@ AirbnbSearchInput.displayName = "AirbnbSearchInput";
18526
19026
  LegacyTextarea,
18527
19027
  Link,
18528
19028
  LoadingBar,
19029
+ MobileWebcam,
18529
19030
  Modal,
18530
19031
  ModalButton,
18531
19032
  ModalLoader,