akeyless-client-commons 1.0.50 → 1.0.52

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.
@@ -465,11 +465,248 @@ var ErrorBoundary = /*#__PURE__*/ function(_React_Component) {
465
465
  }(React.Component);
466
466
  // src/components/utils/loaders.tsx
467
467
  import { ClipLoader } from "react-spinners";
468
+ // src/helpers/firebase.ts
469
+ import moment from "moment";
470
+ import { initializeApp } from "firebase/app";
471
+ import { getStorage } from "firebase/storage";
472
+ import { getAuth, GoogleAuthProvider, signInWithPopup } from "firebase/auth";
473
+ import { initializeAppCheck, ReCaptchaEnterpriseProvider } from "firebase/app-check";
474
+ import { addDoc, collection, deleteDoc, doc, getDoc, getDocs, query, setDoc, Timestamp, where, getFirestore, onSnapshot, orderBy } from "firebase/firestore";
475
+ import { useCallback } from "react";
476
+ var initApp = function() {
477
+ var isNodeEnv2 = typeof process !== "undefined" && process.env;
478
+ var firebaseConfig = {
479
+ apiKey: isNodeEnv2 ? process.env.NEXT_PUBLIC_API_KEY : import.meta.env.VITE_API_KEY,
480
+ authDomain: isNodeEnv2 ? process.env.NEXT_PUBLIC_AUTH_DOMAIN : import.meta.env.VITE_AUTH_DOMAIN,
481
+ projectId: isNodeEnv2 ? process.env.NEXT_PUBLIC_PROJECT_ID : import.meta.env.VITE_PROJECT_ID,
482
+ storageBucket: isNodeEnv2 ? process.env.NEXT_PUBLIC_STORAGE_BUCKET : import.meta.env.VITE_STORAGE_BUCKET,
483
+ messagingSenderId: isNodeEnv2 ? process.env.NEXT_PUBLIC_MESSAGING_SENDER_ID : import.meta.env.VITE_MESSAGING_SENDER_ID,
484
+ appId: isNodeEnv2 ? process.env.NEXT_PUBLIC_APP_ID : import.meta.env.VITE_APP_ID
485
+ };
486
+ try {
487
+ var app2 = initializeApp(firebaseConfig);
488
+ var auth2 = getAuth(app2);
489
+ auth2.settings.appVerificationDisabledForTesting = false;
490
+ var db2 = getFirestore(app2);
491
+ var storage2 = getStorage(app2);
492
+ var googleLoginProvider2 = new GoogleAuthProvider();
493
+ var recaptchaSiteKey = isNodeEnv2 ? process.env.NEXT_PUBLIC_RECAPTCHA_SITE_KEY : import.meta.env.VITE_RECAPTCHA_SITE_KEY;
494
+ var result = {
495
+ db: db2,
496
+ auth: auth2,
497
+ storage: storage2,
498
+ app: app2,
499
+ googleLoginProvider: googleLoginProvider2
500
+ };
501
+ if (recaptchaSiteKey) {
502
+ result.appCheck = initializeAppCheck(app2, {
503
+ provider: new ReCaptchaEnterpriseProvider(recaptchaSiteKey),
504
+ isTokenAutoRefreshEnabled: true
505
+ });
506
+ }
507
+ return result;
508
+ } catch (error) {
509
+ console.error("Failed to initialize Firebase app:", error);
510
+ return {};
511
+ }
512
+ };
513
+ var _initApp = initApp(), db = _initApp.db, auth = _initApp.auth, storage = _initApp.storage, app = _initApp.app, appCheck = _initApp.appCheck, googleLoginProvider = _initApp.googleLoginProvider;
514
+ var useLoginWithGoogle = function() {
515
+ var signInWithGoogle = useCallback(/*#__PURE__*/ _async_to_generator(function() {
516
+ var result, user;
517
+ return _ts_generator(this, function(_state) {
518
+ switch(_state.label){
519
+ case 0:
520
+ return [
521
+ 4,
522
+ signInWithPopup(auth, googleLoginProvider)
523
+ ];
524
+ case 1:
525
+ result = _state.sent();
526
+ user = result.user;
527
+ return [
528
+ 2,
529
+ user
530
+ ];
531
+ }
532
+ });
533
+ }), [
534
+ auth,
535
+ googleLoginProvider
536
+ ]);
537
+ return signInWithGoogle;
538
+ };
539
+ var collections = {
540
+ clients: collection(db, "nx-clients"),
541
+ sites: collection(db, "nx-sites"),
542
+ cars: collection(db, "units"),
543
+ users: collection(db, "nx-users"),
544
+ lastLocations: collection(db, "last_locations"),
545
+ ermEvents: collection(db, "erm_events_general"),
546
+ erm2Events: collection(db, "erm2_events_general"),
547
+ ruptelaEvents: collection(db, "ruptela_events_general"),
548
+ polygons: collection(db, "nx-polygons"),
549
+ polygonEvents: collection(db, "polygon_events"),
550
+ polygonCars: collection(db, "polygon_cars"),
551
+ canbus: collection(db, "erm_canbus_parameters"),
552
+ states: collection(db, "erm_states"),
553
+ app_pro_commands_queue: collection(db, "app_pro_commands_queue"),
554
+ trips: collection(db, "erm2_trip"),
555
+ tripsDetails: collection(db, "erm2_trip_details"),
556
+ audit: collection(db, "nx-audit"),
557
+ nx_settings: collection(db, "nx-settings"),
558
+ settings: collection(db, "settings"),
559
+ translations: collection(db, "nx-translations"),
560
+ nx_cars: collection(db, "nx-cars"),
561
+ boards: collection(db, "boards"),
562
+ protection_types: collection(db, "protectionTypes"),
563
+ board_types: collection(db, "boardTypes"),
564
+ charge_capacities: collection(db, "nx-charge-capacities")
565
+ };
566
+ var fire_base_TIME_TEMP = Timestamp.now;
567
+ // src/helpers/global.ts
568
+ import { CountryOptions } from "akeyless-types-commons";
569
+ import axios from "axios";
570
+ // src/helpers/phoneNumber.ts
571
+ import { parsePhoneNumberFromString } from "libphonenumber-js";
572
+ // src/helpers/global.ts
573
+ import { isEqual } from "lodash";
574
+ var renderOnce = function() {
575
+ return true;
576
+ };
577
+ var getLocationUrl = function(lng, lat) {
578
+ return "https://www.google.com/maps?q=".concat(lat, ",").concat(lng);
579
+ };
580
+ var isNodeEnv = typeof process !== "undefined" && process.env;
581
+ var _ref = {
582
+ mode: isNodeEnv ? process.env.NEXT_PUBLIC_MODE : import.meta.env.VITE_MODE,
583
+ isLocal: (isNodeEnv ? process.env.NEXT_PUBLIC_IS_LOCAL : import.meta.env.VITE_is_local) === "true"
584
+ }, mode = _ref.mode, isLocal = _ref.isLocal;
585
+ // src/helpers/forms.ts
586
+ import XRegExp from "xregexp";
587
+ var textRegex = XRegExp("[^\\p{L}\\s-]", "gu");
588
+ var numbersRegex = XRegExp("[^0-9\\s-+]", "g");
589
+ var numbersOnlyRegex = XRegExp("[^0-9]", "g");
590
+ var priceRegex = XRegExp("[^0-9.]", "g");
591
+ var emailRegex = XRegExp("[^\\p{L}0-9.@\\s-]", "gu");
592
+ var colorRegex = XRegExp("[^#0-9A-Fa-f]", "g");
593
+ var carsRegex = XRegExp("[^\\p{L}0-9,_]", "gu");
594
+ var textNumbersRegex = XRegExp("[^\\p{L}0-9\\s+\\-]", "gu");
595
+ var addressRegex = XRegExp("[^\\p{L}0-9\\s.,+-\\-]", "gu");
596
+ var chartsRegex = XRegExp("[^\\p{L}0-9\\s.,_@!+-\\-]", "gu");
597
+ var handleChange = function(e) {
598
+ e.target.setCustomValidity("");
599
+ var validation = e.target.getAttribute("data-validation");
600
+ if (validation === "text") {
601
+ e.target.value = XRegExp.replace(e.target.value, textRegex, "");
602
+ } else if (validation === "numbers") {
603
+ e.target.value = XRegExp.replace(e.target.value, numbersRegex, "");
604
+ } else if (validation === "numbersOnly") {
605
+ e.target.value = XRegExp.replace(e.target.value, numbersOnlyRegex, "");
606
+ } else if (validation === "price") {
607
+ e.target.value = XRegExp.replace(e.target.value, priceRegex, "");
608
+ } else if (validation === "textNumbers") {
609
+ e.target.value = XRegExp.replace(e.target.value, textNumbersRegex, "");
610
+ } else if (validation === "email") {
611
+ e.target.value = XRegExp.replace(e.target.value, emailRegex, "");
612
+ } else if (validation === "color") {
613
+ e.target.value = XRegExp.replace(e.target.value, colorRegex, "");
614
+ } else if (validation === "address") {
615
+ e.target.value = XRegExp.replace(e.target.value, addressRegex, "");
616
+ } else if (validation === "cars") {
617
+ e.target.value = XRegExp.replace(e.target.value, carsRegex, "");
618
+ } else if (validation === "charts") {
619
+ e.target.value = XRegExp.replace(e.target.value, chartsRegex, "");
620
+ }
621
+ };
622
+ var handlePaste = function(e) {
623
+ var validation = e.currentTarget.getAttribute("data-validation");
624
+ var pasteData = e.clipboardData.getData("text");
625
+ if (validation === "text") {
626
+ pasteData = XRegExp.replace(pasteData, textRegex, "");
627
+ } else if (validation === "numbers") {
628
+ pasteData = XRegExp.replace(pasteData, numbersRegex, "");
629
+ } else if (validation === "numbersOnly") {
630
+ pasteData = XRegExp.replace(pasteData, numbersOnlyRegex, "");
631
+ } else if (validation === "price") {
632
+ pasteData = XRegExp.replace(pasteData, priceRegex, "");
633
+ } else if (validation === "textNumbers") {
634
+ pasteData = XRegExp.replace(pasteData, textNumbersRegex, "");
635
+ } else if (validation === "email") {
636
+ pasteData = XRegExp.replace(pasteData, emailRegex, "");
637
+ } else if (validation === "color") {
638
+ pasteData = XRegExp.replace(pasteData, colorRegex, "");
639
+ } else if (validation === "address") {
640
+ pasteData = XRegExp.replace(pasteData, addressRegex, "");
641
+ } else if (validation === "cars") {
642
+ pasteData = XRegExp.replace(pasteData, carsRegex, "");
643
+ } else if (validation === "charts") {
644
+ pasteData = XRegExp.replace(pasteData, chartsRegex, "");
645
+ }
646
+ e.preventDefault();
647
+ document.execCommand("insertText", false, pasteData);
648
+ };
649
+ var handleInvalid = function(e, requireError) {
650
+ e.target.setCustomValidity(requireError || "This filed is required !");
651
+ };
652
+ var useValidation = function(validationType, requireError) {
653
+ return {
654
+ onChange: handleChange,
655
+ onPaste: handlePaste,
656
+ onInvalid: function(e) {
657
+ return handleInvalid(e, requireError);
658
+ },
659
+ "data-validation": validationType
660
+ };
661
+ };
662
+ var getFormElementValue = function(form, name) {
663
+ var _form_elements_namedItem;
664
+ return ((_form_elements_namedItem = form.elements.namedItem(name)) === null || _form_elements_namedItem === void 0 ? void 0 : _form_elements_namedItem.value) || "";
665
+ };
666
+ // src/lib/utils.ts
667
+ import { clsx } from "clsx";
668
+ import { twMerge } from "tailwind-merge";
669
+ function cn() {
670
+ for(var _len = arguments.length, inputs = new Array(_len), _key = 0; _key < _len; _key++){
671
+ inputs[_key] = arguments[_key];
672
+ }
673
+ return twMerge(clsx(inputs));
674
+ }
675
+ // src/helpers/time_helpers.ts
676
+ import { Timestamp as Timestamp2 } from "firebase/firestore";
677
+ import moment2 from "moment-timezone";
678
+ function timestamp_to_string(firebaseTimestamp, options) {
679
+ var date;
680
+ if (_instanceof(firebaseTimestamp, Timestamp2)) {
681
+ date = firebaseTimestamp.toDate();
682
+ } else if (_instanceof(firebaseTimestamp, Date)) {
683
+ date = firebaseTimestamp;
684
+ } else if (typeof firebaseTimestamp === "string") {
685
+ date = moment2.utc(firebaseTimestamp, (options === null || options === void 0 ? void 0 : options.fromFormat) || "DD/MM/YYYY HH:mm:ss").toDate();
686
+ if (isNaN(date.getTime())) {
687
+ throw new Error("Invalid date string format");
688
+ }
689
+ } else {
690
+ throw new Error("Invalid input: firebaseTimestamp must be a Timestamp, Date, or valid date string.");
691
+ }
692
+ if (options === null || options === void 0 ? void 0 : options.tz) {
693
+ var result = moment2(date).tz(options === null || options === void 0 ? void 0 : options.tz).format((options === null || options === void 0 ? void 0 : options.format) || "DD/MM/YYYY HH:mm:ss");
694
+ return result;
695
+ }
696
+ return moment2.utc(date).format((options === null || options === void 0 ? void 0 : options.format) || "DD/MM/YYYY HH:mm:ss");
697
+ }
698
+ // src/helpers/api.ts
699
+ import axios2 from "axios";
700
+ var baseDomain = mode === "qa" ? "https://nx-api.xyz/api" : "https://nx-api.info/api";
701
+ var devicesDomain = isLocal ? "http://localhost:9001/api/devices" : baseDomain + "/devices";
702
+ var biDomain = isLocal ? "http://localhost:9002/api/bi" : baseDomain + "/bi";
703
+ var callCenterDomain = isLocal ? "http://localhost:9003/api/call-center" : baseDomain + "/call-center";
704
+ // src/components/utils/loaders.tsx
468
705
  import { jsx as jsx3 } from "react/jsx-runtime";
469
706
  var Loader = function(param) {
470
707
  var color = param.color, size3 = param.size, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
471
708
  return /* @__PURE__ */ jsx3("div", {
472
- className: "flex items-center justify-center ".concat(className),
709
+ className: cn("flex items-center justify-center", className),
473
710
  style: style,
474
711
  children: /* @__PURE__ */ jsx3(ClipLoader, {
475
712
  loading: true,
@@ -478,15 +715,6 @@ var Loader = function(param) {
478
715
  })
479
716
  });
480
717
  };
481
- // src/lib/utils.ts
482
- import { clsx } from "clsx";
483
- import { twMerge } from "tailwind-merge";
484
- function cn() {
485
- for(var _len = arguments.length, inputs = new Array(_len), _key = 0; _key < _len; _key++){
486
- inputs[_key] = arguments[_key];
487
- }
488
- return twMerge(clsx(inputs));
489
- }
490
718
  // src/components/utils/global.tsx
491
719
  import { jsxs as jsxs2 } from "react/jsx-runtime";
492
720
  var Version = function(param) {
@@ -499,26 +727,130 @@ var Version = function(param) {
499
727
  ]
500
728
  });
501
729
  };
730
+ // src/components/utils/LoginWithGoogle.tsx
731
+ import { useState } from "react";
732
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
733
+ var GoogleSvg = function(param) {
734
+ var _param_width = param.width, width = _param_width === void 0 ? "20px" : _param_width, _param_height = param.height, height = _param_height === void 0 ? "20px" : _param_height, _param_viewBox = param.viewBox, viewBox = _param_viewBox === void 0 ? "0 0 256 266" : _param_viewBox;
735
+ return /* @__PURE__ */ jsxs3("svg", {
736
+ xmlns: "http://www.w3.org/2000/svg",
737
+ width: width,
738
+ height: height,
739
+ viewBox: viewBox,
740
+ preserveAspectRatio: "xMidYMid",
741
+ children: [
742
+ /* @__PURE__ */ jsx4("path", {
743
+ d: "M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",
744
+ fill: "#4285F4"
745
+ }),
746
+ /* @__PURE__ */ jsx4("path", {
747
+ d: "M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",
748
+ fill: "#34A853"
749
+ }),
750
+ /* @__PURE__ */ jsx4("path", {
751
+ d: "M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",
752
+ fill: "#FBBC05"
753
+ }),
754
+ /* @__PURE__ */ jsx4("path", {
755
+ d: "M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",
756
+ fill: "#EB4335"
757
+ })
758
+ ]
759
+ });
760
+ };
761
+ var LoginWithGoogleButton = function(param) {
762
+ var label = param.label, className = param.className, containerClassName = param.containerClassName, onClick = param.onClick, _param_loaderProps = param.loaderProps, loaderProps = _param_loaderProps === void 0 ? {
763
+ color: "#000"
764
+ } : _param_loaderProps, googleSvgProps = param.googleSvgProps;
765
+ var signInWithGoogle = useLoginWithGoogle();
766
+ var _useState = _sliced_to_array(useState(false), 2), isLoading = _useState[0], setIsLoading = _useState[1];
767
+ var onLoginClick = /*#__PURE__*/ function() {
768
+ var _ref = _async_to_generator(function(e) {
769
+ var user, error;
770
+ return _ts_generator(this, function(_state) {
771
+ switch(_state.label){
772
+ case 0:
773
+ _state.trys.push([
774
+ 0,
775
+ 3,
776
+ 4,
777
+ 5
778
+ ]);
779
+ setIsLoading(true);
780
+ return [
781
+ 4,
782
+ signInWithGoogle()
783
+ ];
784
+ case 1:
785
+ user = _state.sent();
786
+ return [
787
+ 4,
788
+ onClick(e, user)
789
+ ];
790
+ case 2:
791
+ _state.sent();
792
+ return [
793
+ 3,
794
+ 5
795
+ ];
796
+ case 3:
797
+ error = _state.sent();
798
+ console.error("error from login with google:", error);
799
+ return [
800
+ 3,
801
+ 5
802
+ ];
803
+ case 4:
804
+ setIsLoading(false);
805
+ return [
806
+ 7
807
+ ];
808
+ case 5:
809
+ return [
810
+ 2
811
+ ];
812
+ }
813
+ });
814
+ });
815
+ return function onLoginClick(e) {
816
+ return _ref.apply(this, arguments);
817
+ };
818
+ }();
819
+ return /* @__PURE__ */ jsx4("div", {
820
+ className: cn("flex justify-center", containerClassName),
821
+ children: /* @__PURE__ */ jsxs3("button", {
822
+ className: cn("center gap-2 py-2 w-11/12 max-w-80 ", "shadow-sm hover:border-[#303edb] border-[1px] rounded-lg text-lg", className),
823
+ onClick: function(e) {
824
+ return onLoginClick(e);
825
+ },
826
+ disabled: isLoading,
827
+ children: [
828
+ label,
829
+ isLoading ? /* @__PURE__ */ jsx4(Loader, _object_spread({}, loaderProps)) : /* @__PURE__ */ jsx4(GoogleSvg, _object_spread({}, googleSvgProps))
830
+ ]
831
+ })
832
+ });
833
+ };
502
834
  // src/components/table/components.tsx
503
835
  import ExcelJS from "exceljs";
504
836
  import { saveAs } from "file-saver";
505
837
  import { memo, useMemo as useMemo6 } from "react";
506
838
  // src/assets/svg.tsx
507
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
839
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
508
840
  var RedXSvg = function(param) {
509
841
  var height = param.height, width = param.width, viewBox = param.viewBox;
510
- return /* @__PURE__ */ jsxs3("svg", {
842
+ return /* @__PURE__ */ jsxs4("svg", {
511
843
  xmlns: "http://www.w3.org/2000/svg",
512
844
  width: width || "32",
513
845
  height: height || "32",
514
846
  viewBox: viewBox || "0 0 32 32",
515
847
  fill: "none",
516
848
  children: [
517
- /* @__PURE__ */ jsx4("path", {
849
+ /* @__PURE__ */ jsx5("path", {
518
850
  d: "M21.0801 10.3C20.6101 9.80996 19.8301 9.79996 19.3401 10.27L15.6101 13.89L11.8801 10.27C11.3901 9.79996 10.6101 9.80996 10.1401 10.3C9.67008 10.79 9.68008 11.57 10.1701 12.04L13.8501 15.61L10.1701 19.18C9.68008 19.65 9.67008 20.43 10.1401 20.92C10.6101 21.41 11.3901 21.42 11.8801 20.95L15.6101 17.33L19.3401 20.95C19.5701 21.17 19.8801 21.3 20.2001 21.3C20.8801 21.29 21.4301 20.73 21.4201 20.04C21.4201 19.72 21.2901 19.41 21.0601 19.19L17.3801 15.62L21.0601 12.05C21.5501 11.58 21.5601 10.8 21.0901 10.31L21.0801 10.3Z",
519
851
  fill: "#FF4C2B"
520
852
  }),
521
- /* @__PURE__ */ jsx4("path", {
853
+ /* @__PURE__ */ jsx5("path", {
522
854
  d: "M15.61 0C6.99 0 0 6.99 0 15.61C0.86 36.32 30.36 36.31 31.22 15.61C31.21 6.99 24.23 0 15.61 0ZM15.61 28.76C8.35 28.76 2.47 22.87 2.46 15.61C3.18 -1.84 28.04 -1.83 28.76 15.61C28.76 22.87 22.87 28.75 15.61 28.76Z",
523
855
  fill: "#FF4C2B"
524
856
  })
@@ -527,20 +859,20 @@ var RedXSvg = function(param) {
527
859
  };
528
860
  var RedXSvg2 = function(param) {
529
861
  var height = param.height, width = param.width, viewBox = param.viewBox;
530
- return /* @__PURE__ */ jsx4("svg", {
862
+ return /* @__PURE__ */ jsx5("svg", {
531
863
  xmlns: "http://www.w3.org/2000/svg",
532
864
  width: width || "18px",
533
865
  height: height || "18px",
534
866
  viewBox: viewBox || "0,0,256,256",
535
867
  fillRule: "nonzero",
536
- children: /* @__PURE__ */ jsx4("g", {
868
+ children: /* @__PURE__ */ jsx5("g", {
537
869
  fill: "#e90404",
538
870
  fillRule: "nonzero",
539
871
  stroke: "none",
540
872
  strokeWidth: "1",
541
- children: /* @__PURE__ */ jsx4("g", {
873
+ children: /* @__PURE__ */ jsx5("g", {
542
874
  transform: "scale(10.66667,10.66667)",
543
- children: /* @__PURE__ */ jsx4("path", {
875
+ children: /* @__PURE__ */ jsx5("path", {
544
876
  d: "M4.99023,3.99023c-0.40692,0.00011 -0.77321,0.24676 -0.92633,0.62377c-0.15312,0.37701 -0.06255,0.80921 0.22907,1.09303l6.29297,6.29297l-6.29297,6.29297c-0.26124,0.25082 -0.36647,0.62327 -0.27511,0.97371c0.09136,0.35044 0.36503,0.62411 0.71547,0.71547c0.35044,0.09136 0.72289,-0.01388 0.97371,-0.27511l6.29297,-6.29297l6.29297,6.29297c0.25082,0.26124 0.62327,0.36648 0.97371,0.27512c0.35044,-0.09136 0.62411,-0.36503 0.71547,-0.71547c0.09136,-0.35044 -0.01388,-0.72289 -0.27512,-0.97371l-6.29297,-6.29297l6.29297,-6.29297c0.29576,-0.28749 0.38469,-0.72707 0.22393,-1.10691c-0.16075,-0.37985 -0.53821,-0.62204 -0.9505,-0.60988c-0.2598,0.00774 -0.50638,0.11632 -0.6875,0.30273l-6.29297,6.29297l-6.29297,-6.29297c-0.18827,-0.19353 -0.4468,-0.30272 -0.7168,-0.30273z"
545
877
  })
546
878
  })
@@ -549,18 +881,18 @@ var RedXSvg2 = function(param) {
549
881
  };
550
882
  var GreenVSvg = function(param) {
551
883
  var height = param.height, width = param.width, viewBox = param.viewBox;
552
- return /* @__PURE__ */ jsxs3("svg", {
884
+ return /* @__PURE__ */ jsxs4("svg", {
553
885
  xmlns: "http://www.w3.org/2000/svg",
554
886
  width: width || "32",
555
887
  height: height || "32",
556
888
  viewBox: viewBox || "0 0 32 32",
557
889
  fill: "none",
558
890
  children: [
559
- /* @__PURE__ */ jsx4("path", {
891
+ /* @__PURE__ */ jsx5("path", {
560
892
  d: "M15.61 0C6.99 0 0.01 6.99 0 15.61C0.86 36.32 30.36 36.31 31.22 15.61C31.21 6.99 24.23 0 15.61 0ZM15.61 28.76C8.35 28.76 2.47 22.87 2.46 15.61C3.18 -1.84 28.04 -1.83 28.76 15.61C28.76 22.87 22.87 28.75 15.61 28.76Z",
561
893
  fill: "#3B8F08"
562
894
  }),
563
- /* @__PURE__ */ jsx4("path", {
895
+ /* @__PURE__ */ jsx5("path", {
564
896
  d: "M21.66 10.15L13.37 18.44L9.58003 14.54C9.10003 14.06 8.32003 14.07 7.84003 14.54C7.38003 15.01 7.36003 15.76 7.82003 16.24L12.48 21.03C12.96 21.52 13.74 21.52 14.23 21.05L23.41 11.87C23.88 11.38 23.87 10.6 23.38 10.13C22.9 9.67003 22.15 9.67003 21.68 10.13L21.66 10.15Z",
565
897
  fill: "#3B8F08"
566
898
  })
@@ -568,9 +900,9 @@ var GreenVSvg = function(param) {
568
900
  });
569
901
  };
570
902
  // src/assets/table.tsx
571
- import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
903
+ import { Fragment, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
572
904
  var sortSvg = function(upside_down) {
573
- return /* @__PURE__ */ jsxs4("svg", {
905
+ return /* @__PURE__ */ jsxs5("svg", {
574
906
  style: upside_down ? {
575
907
  transform: "rotate(180deg)"
576
908
  } : {},
@@ -583,13 +915,13 @@ var sortSvg = function(upside_down) {
583
915
  preserveAspectRatio: "xMidYMid meet",
584
916
  children: [
585
917
  " ",
586
- /* @__PURE__ */ jsxs4("g", {
918
+ /* @__PURE__ */ jsxs5("g", {
587
919
  transform: "translate(0.000000,1536.000000) scale(0.100000,-0.100000)",
588
920
  fill: "#fff",
589
921
  stroke: "none",
590
922
  children: [
591
923
  " ",
592
- /* @__PURE__ */ jsx5("path", {
924
+ /* @__PURE__ */ jsx6("path", {
593
925
  d: "M6465 15350 c3 -5 -27 -25 -68 -44 -40 -19 -103 -57 -140 -86 -37 -28 -584 -569 -1215 -1203 -631 -633 -1699 -1705 -2374 -2382 -674 -676 -1237 -1243 -1249 -1260 -13 -16 -37 -46 -53 -65 -36 -41 -108 -185 -126 -250 -32 -119 -30 -352 3 -465 35 -120 102 -231 197 -325 132 -133 288 -208 479 -231 214 -26 418 31 596 166 39 29 703 685 1477 1458 774 772 1432 1421 1461 1441 105 73 239 71 347 -3 52 -36 70 -57 107 -131 17 -33 18 -252 24 -4710 6 -4979 3 -4715 49 -4855 118 -363 507 -605 876 -545 77 13 201 53 245 79 19 12 45 26 59 31 41 18 157 119 206 179 43 53 113 173 127 217 3 11 16 51 29 89 l22 70 6 4690 c5 4887 4 4736 43 4784 6 7 16 23 22 34 20 42 116 103 188 120 42 10 75 13 85 8 10 -5 34 -11 55 -15 20 -4 59 -21 85 -38 26 -17 686 -671 1467 -1453 781 -782 1443 -1439 1470 -1459 68 -49 178 -106 245 -128 30 -10 100 -24 155 -32 87 -12 114 -12 200 1 128 18 187 39 360 131 37 19 178 162 211 212 36 56 94 176 94 194 0 7 7 31 16 52 23 55 23 352 0 406 -9 21 -16 46 -16 56 0 30 -83 185 -130 242 -80 98 -4793 4810 -4865 4865 -66 50 -182 111 -250 132 -16 5 -29 15 -27 21 1 9 -62 12 -249 12 -157 0 -248 -4 -244 -10z"
594
926
  }),
595
927
  " "
@@ -600,8 +932,8 @@ var sortSvg = function(upside_down) {
600
932
  });
601
933
  };
602
934
  var emptyFilterSvg = function(solid) {
603
- return /* @__PURE__ */ jsx5(Fragment, {
604
- children: solid ? /* @__PURE__ */ jsxs4("svg", {
935
+ return /* @__PURE__ */ jsx6(Fragment, {
936
+ children: solid ? /* @__PURE__ */ jsxs5("svg", {
605
937
  version: "1.0",
606
938
  xmlns: "http://www.w3.org/2000/svg",
607
939
  width: "13",
@@ -610,13 +942,13 @@ var emptyFilterSvg = function(solid) {
610
942
  preserveAspectRatio: "xMidYMid meet",
611
943
  children: [
612
944
  " ",
613
- /* @__PURE__ */ jsxs4("g", {
945
+ /* @__PURE__ */ jsxs5("g", {
614
946
  transform: "translate(0.000000,900.000000) scale(0.100000,-0.100000)",
615
947
  fill: "#fff",
616
948
  stroke: "none",
617
949
  children: [
618
950
  " ",
619
- /* @__PURE__ */ jsx5("path", {
951
+ /* @__PURE__ */ jsx6("path", {
620
952
  d: "M382 8980 c-7 -11 -19 -20 -27 -20 -46 0 -166 -99 -196 -162 -46 -95 -51 -115 -47 -199 3 -70 9 -95 37 -149 42 -85 45 -90 118 -190 34 -47 72 -98 83 -115 12 -16 50 -70 85 -120 143 -200 188 -263 235 -330 27 -38 56 -79 64 -90 8 -11 46 -65 85 -120 38 -55 96 -136 128 -179 32 -44 60 -84 62 -90 2 -6 32 -48 65 -93 34 -45 99 -137 146 -203 47 -66 113 -159 148 -205 34 -46 62 -87 62 -90 0 -4 20 -33 45 -65 25 -32 45 -61 45 -64 0 -3 33 -50 73 -105 39 -54 106 -146 147 -205 41 -58 103 -144 138 -191 34 -46 62 -87 62 -90 0 -3 22 -36 50 -73 27 -37 61 -83 75 -102 14 -19 59 -82 100 -140 41 -58 95 -133 120 -167 25 -34 45 -66 45 -70 0 -4 13 -22 28 -40 15 -17 47 -61 72 -97 25 -37 74 -107 110 -156 36 -50 99 -138 140 -196 41 -58 108 -150 148 -205 39 -54 72 -102 72 -105 0 -3 20 -32 45 -64 25 -32 45 -62 45 -67 0 -5 14 -22 30 -38 17 -16 30 -33 30 -38 0 -5 19 -34 43 -65 90 -122 154 -259 178 -387 11 -56 14 -423 19 -1850 l5 -1780 29 -58 c36 -71 112 -148 168 -171 24 -10 51 -22 60 -27 24 -12 205 -11 213 1 3 6 15 10 25 10 11 0 34 6 52 14 18 8 52 21 76 30 64 24 118 44 165 62 23 8 55 22 70 30 16 8 36 14 46 14 9 0 26 7 37 15 10 8 27 15 37 15 11 0 31 6 45 14 15 8 47 22 72 31 25 9 60 23 78 31 18 8 39 14 47 14 7 0 26 6 42 14 15 8 48 22 73 31 25 10 57 23 72 31 14 8 35 14 45 14 11 0 28 7 39 15 10 8 26 15 35 15 14 0 62 19 197 76 18 8 40 14 48 14 9 0 28 6 42 14 28 15 36 18 235 92 23 9 56 22 72 29 17 7 50 21 75 31 84 34 127 77 181 182 9 18 20 56 24 85 4 28 10 714 14 1522 6 1402 7 1472 25 1520 41 109 110 235 188 344 46 62 88 121 93 130 6 9 30 45 55 80 72 101 159 222 250 351 47 67 113 159 148 205 34 46 62 87 62 90 0 4 27 42 60 85 33 43 60 81 60 84 0 3 22 36 50 73 27 37 60 83 72 101 13 18 30 41 38 52 8 10 35 49 60 85 25 37 73 104 108 150 34 46 62 87 62 90 0 3 33 50 73 103 40 53 81 111 91 127 11 17 45 65 78 107 32 43 58 80 58 83 0 4 20 33 45 65 25 32 45 63 45 70 0 6 7 13 15 16 8 4 15 10 15 16 0 5 26 44 58 86 32 42 70 95 85 117 64 95 144 206 208 292 38 51 69 95 69 99 0 3 13 23 29 43 26 33 92 126 193 271 21 30 48 68 60 85 85 112 108 144 108 150 0 3 27 42 60 85 33 43 60 81 60 85 0 3 28 44 63 90 34 47 82 114 107 151 25 36 50 71 56 77 5 7 32 44 58 82 27 39 62 86 77 106 16 20 29 42 29 48 0 6 4 11 8 11 5 0 25 32 45 71 36 68 37 75 37 175 0 118 -13 163 -69 234 -37 48 -127 112 -173 124 -16 3 -28 13 -28 21 0 13 -486 15 -4103 15 -4091 0 -4102 0 -4115 -20z"
621
953
  }),
622
954
  " "
@@ -624,7 +956,7 @@ var emptyFilterSvg = function(solid) {
624
956
  }),
625
957
  " "
626
958
  ]
627
- }) : /* @__PURE__ */ jsxs4("svg", {
959
+ }) : /* @__PURE__ */ jsxs5("svg", {
628
960
  version: "1.0",
629
961
  xmlns: "http://www.w3.org/2000/svg",
630
962
  width: "13",
@@ -633,13 +965,13 @@ var emptyFilterSvg = function(solid) {
633
965
  preserveAspectRatio: "xMidYMid meet",
634
966
  children: [
635
967
  " ",
636
- /* @__PURE__ */ jsxs4("g", {
968
+ /* @__PURE__ */ jsxs5("g", {
637
969
  transform: "translate(0.000000,300.000000) scale(0.050000,-0.050000)",
638
970
  fill: "#fff",
639
971
  stroke: "none",
640
972
  children: [
641
973
  " ",
642
- /* @__PURE__ */ jsx5("path", {
974
+ /* @__PURE__ */ jsx6("path", {
643
975
  d: "M58 5702 c-100 -101 -84 -148 136 -416 107 -130 242 -294 301 -366 58 -71 173 -211 254 -310 81 -99 441 -535 799 -969 l652 -789 0 -1201 c0 -1396 2 -1411 182 -1411 60 0 1302 604 1360 662 36 36 38 79 38 935 0 494 5 925 12 959 8 41 370 495 1110 1393 1202 1459 1158 1394 1040 1513 l-59 58 -2883 0 -2883 0 -59 -58z m5349 -327 c-16 -26 -150 -190 -683 -835 -169 -203 -381 -460 -472 -570 -90 -110 -290 -352 -443 -537 -154 -186 -301 -369 -329 -408 l-50 -70 -6 -913 -5 -913 -410 -205 c-225 -112 -413 -204 -418 -204 -6 0 -12 503 -15 1117 l-6 1118 -50 70 c-27 39 -175 222 -329 408 -153 185 -353 427 -443 537 -91 110 -303 367 -472 570 -533 645 -667 809 -683 835 -12 20 474 25 2407 25 1933 0 2419 -5 2407 -25z"
644
976
  }),
645
977
  " "
@@ -651,194 +983,112 @@ var emptyFilterSvg = function(solid) {
651
983
  });
652
984
  };
653
985
  var slashFilterSvg = function(solid) {
654
- return /* @__PURE__ */ jsx5(Fragment, {
655
- children: solid ? /* @__PURE__ */ jsx5("div", {
656
- className: "mt-[-4px] mr-[-2px] ",
657
- children: /* @__PURE__ */ jsxs4("svg", {
658
- version: "1.0",
659
- xmlns: "http://www.w3.org/2000/svg",
660
- width: "18",
661
- height: "20",
662
- viewBox: "0 0 900.000000 900.000000",
663
- preserveAspectRatio: "xMidYMid meet",
664
- children: [
665
- " ",
666
- /* @__PURE__ */ jsxs4("g", {
667
- transform: "translate(0.000000,900.000000) scale(0.100000,-0.100000)",
668
- fill: "#fff",
669
- stroke: "none",
670
- children: [
671
- " ",
672
- /* @__PURE__ */ jsx5("path", {
673
- d: "M1000 8221 c-71 -27 -103 -47 -149 -92 -122 -123 -144 -294 -58 -456 22 -42 6838 -6858 6880 -6880 162 -86 333 -64 456 58 123 123 144 294 57 458 -10 19 -508 525 -1107 1124 l-1089 1089 1 256 1 257 676 1350 677 1350 115 6 c125 6 173 20 244 68 54 37 89 78 124 145 24 46 27 61 27 161 0 100 -3 115 -28 162 -52 100 -119 157 -225 194 -54 18 -131 19 -2817 19 l-2762 0 -341 340 c-188 186 -356 347 -374 357 -103 55 -220 68 -308 34z"
674
- }),
675
- " ",
676
- /* @__PURE__ */ jsx5("path", {
677
- d: "M2340 5338 c0 -7 146 -305 325 -662 l325 -649 0 -1112 c0 -1043 1 -1114 18 -1160 27 -76 47 -107 94 -154 48 -47 80 -67 153 -93 46 -17 120 -18 1231 -18 1085 0 1186 1 1235 17 30 9 66 24 81 33 68 40 158 146 158 186 0 14 -3600 3624 -3614 3624 -3 0 -6 -6 -6 -12z"
678
- }),
679
- " "
680
- ]
681
- }),
682
- " "
683
- ]
684
- })
685
- }) : /* @__PURE__ */ jsx5("div", {
986
+ return /* @__PURE__ */ jsx6(Fragment, {
987
+ children: solid ? /* @__PURE__ */ jsx6("div", {
686
988
  className: "mt-[-4px] mr-[-2px] ",
687
- children: /* @__PURE__ */ jsxs4("svg", {
989
+ children: /* @__PURE__ */ jsxs5("svg", {
688
990
  version: "1.0",
689
991
  xmlns: "http://www.w3.org/2000/svg",
690
992
  width: "18",
691
993
  height: "20",
692
994
  viewBox: "0 0 900.000000 900.000000",
693
- preserveAspectRatio: "xMidYMid meet",
694
- children: [
695
- " ",
696
- /* @__PURE__ */ jsxs4("g", {
697
- transform: "translate(0.000000,900.000000) scale(0.100000,-0.100000)",
698
- fill: "#fff",
699
- stroke: "none",
700
- children: [
701
- " ",
702
- /* @__PURE__ */ jsx5("path", {
703
- d: "M1000 8221 c-71 -27 -103 -47 -149 -92 -122 -123 -144 -294 -58 -456 22 -42 6838 -6858 6880 -6880 162 -86 333 -64 456 58 123 123 144 294 57 458 -10 19 -508 525 -1107 1124 l-1089 1089 1 256 1 257 676 1350 677 1350 115 6 c125 6 173 20 244 68 54 37 89 78 124 145 24 46 27 61 27 161 0 100 -3 115 -28 162 -52 100 -119 157 -225 194 -54 18 -131 19 -2817 19 l-2762 0 -341 340 c-188 186 -356 347 -374 357 -103 55 -220 68 -308 34z m5494 -1490 c6 -10 -1204 -2436 -1226 -2458 -13 -13 -168 139 -1247 1217 -677 677 -1231 1236 -1231 1241 0 12 3697 12 3704 0z"
704
- }),
705
- " ",
706
- /* @__PURE__ */ jsx5("path", {
707
- d: "M2340 5338 c0 -7 146 -305 325 -662 l325 -649 0 -1112 c0 -1043 1 -1114 18 -1160 27 -76 47 -107 94 -154 48 -47 80 -67 153 -93 46 -17 120 -18 1231 -18 1085 0 1186 1 1235 17 30 9 66 24 81 33 68 40 158 146 158 185 0 18 -692 715 -709 715 -6 0 -11 -38 -13 -97 l-3 -98 -745 0 -745 0 -3 858 -2 859 -694 694 c-382 382 -697 694 -700 694 -3 0 -6 -6 -6 -12z"
708
- }),
709
- " "
710
- ]
711
- }),
712
- " "
713
- ]
714
- })
715
- })
716
- });
717
- };
718
- var exportToExcelSvg = function(width, height, viewBox) {
719
- return /* @__PURE__ */ jsxs4("svg", {
720
- version: "1.0",
721
- xmlns: "http://www.w3.org/2000/svg",
722
- width: width || "18",
723
- height: height || "18",
724
- viewBox: viewBox || "0 0 150.000000 150.000000",
725
- preserveAspectRatio: "xMidYMid meet",
726
- children: [
727
- " ",
728
- /* @__PURE__ */ jsxs4("g", {
729
- transform: "translate(0.000000,150.000000) scale(0.100000,-0.100000)",
730
- fill: "#ffffff",
731
- stroke: "none",
732
- children: [
733
- " ",
734
- /* @__PURE__ */ jsx5("path", {
735
- d: "M205 1418 c-3 -7 -4 -317 -3 -688 l3 -675 435 -3 c239 -1 441 0 449 3 11 4 9 11 -9 30 l-23 25 -396 2 -396 3 0 625 0 625 280 0 280 0 5 -190 5 -190 190 -5 190 -5 5 -175 5 -175 25 0 25 0 3 200 2 199 -202 203 -203 203 -333 0 c-257 0 -334 -3 -337 -12z m828 -235 c70 -70 127 -131 127 -135 0 -5 -60 -7 -132 -6 l-133 3 -3 133 c-1 72 1 132 6 132 4 0 65 -57 135 -127z"
736
- }),
737
- " ",
738
- /* @__PURE__ */ jsx5("path", {
739
- d: "M518 915 c-6 -6 9 -37 42 -90 11 -16 23 -37 27 -45 4 -8 19 -36 35 -61 15 -25 28 -56 28 -68 0 -20 -29 -69 -121 -209 -16 -24 -29 -47 -29 -53 0 -5 31 -9 68 -9 l69 0 42 82 c60 116 66 118 107 35 56 -114 53 -112 127 -115 51 -2 67 0 67 11 0 7 -5 18 -11 24 -11 11 -26 36 -49 78 -6 11 -19 34 -30 50 -11 17 -24 40 -29 52 -5 11 -15 24 -20 28 -26 16 -18 33 97 212 25 39 39 70 34 75 -5 5 -36 8 -68 6 l-59 -3 -42 -84 c-24 -46 -45 -86 -48 -89 -6 -6 -44 40 -45 54 0 6 -13 35 -29 65 l-28 54 -65 3 c-35 2 -67 0 -70 -3z"
740
- }),
741
- " ",
742
- /* @__PURE__ */ jsx5("path", {
743
- d: "M1135 548 c-3 -7 -6 -67 -7 -133 l-3 -120 -55 -3 c-30 -1 -61 -5 -68 -7 -8 -3 28 -53 95 -132 122 -146 129 -153 140 -153 4 0 22 17 38 37 26 32 53 63 175 206 13 15 30 27 38 27 9 0 12 3 8 7 -3 4 -39 9 -79 12 l-72 6 -5 130 -5 130 -98 3 c-72 2 -99 -1 -102 -10z m145 -183 l5 -130 28 -3 c15 -2 27 -8 27 -14 0 -18 -92 -128 -107 -128 -11 1 -97 107 -101 125 -2 8 7 15 25 17 l28 3 3 120 c1 66 4 126 7 133 3 9 18 12 42 10 l38 -3 5 -130z"
744
- }),
745
- " "
746
- ]
747
- }),
748
- " "
749
- ]
750
- });
751
- };
752
- // src/components/table/hooks.tsx
753
- import { useContext as useContext2, useDeferredValue, useState as useState2, useTransition } from "react";
754
- import { create } from "zustand";
755
- import { isEqual as isEqual2 } from "lodash";
756
- // src/components/table/Table.tsx
757
- import React2, { createContext, useMemo } from "react";
758
- import { isEqual } from "lodash";
759
- // src/helpers/forms.ts
760
- import XRegExp from "xregexp";
761
- var textRegex = XRegExp("[^\\p{L}\\s-]", "gu");
762
- var numbersRegex = XRegExp("[^0-9\\s-+]", "g");
763
- var numbersOnlyRegex = XRegExp("[^0-9]", "g");
764
- var priceRegex = XRegExp("[^0-9.]", "g");
765
- var emailRegex = XRegExp("[^\\p{L}0-9.@\\s-]", "gu");
766
- var colorRegex = XRegExp("[^#0-9A-Fa-f]", "g");
767
- var carsRegex = XRegExp("[^\\p{L}0-9,_]", "gu");
768
- var textNumbersRegex = XRegExp("[^\\p{L}0-9\\s+\\-]", "gu");
769
- var addressRegex = XRegExp("[^\\p{L}0-9\\s.,+-\\-]", "gu");
770
- var chartsRegex = XRegExp("[^\\p{L}0-9\\s.,_@!+-\\-]", "gu");
771
- var handleChange = function(e) {
772
- e.target.setCustomValidity("");
773
- var validation = e.target.getAttribute("data-validation");
774
- if (validation === "text") {
775
- e.target.value = XRegExp.replace(e.target.value, textRegex, "");
776
- } else if (validation === "numbers") {
777
- e.target.value = XRegExp.replace(e.target.value, numbersRegex, "");
778
- } else if (validation === "numbersOnly") {
779
- e.target.value = XRegExp.replace(e.target.value, numbersOnlyRegex, "");
780
- } else if (validation === "price") {
781
- e.target.value = XRegExp.replace(e.target.value, priceRegex, "");
782
- } else if (validation === "textNumbers") {
783
- e.target.value = XRegExp.replace(e.target.value, textNumbersRegex, "");
784
- } else if (validation === "email") {
785
- e.target.value = XRegExp.replace(e.target.value, emailRegex, "");
786
- } else if (validation === "color") {
787
- e.target.value = XRegExp.replace(e.target.value, colorRegex, "");
788
- } else if (validation === "address") {
789
- e.target.value = XRegExp.replace(e.target.value, addressRegex, "");
790
- } else if (validation === "cars") {
791
- e.target.value = XRegExp.replace(e.target.value, carsRegex, "");
792
- } else if (validation === "charts") {
793
- e.target.value = XRegExp.replace(e.target.value, chartsRegex, "");
794
- }
795
- };
796
- var handlePaste = function(e) {
797
- var validation = e.currentTarget.getAttribute("data-validation");
798
- var pasteData = e.clipboardData.getData("text");
799
- if (validation === "text") {
800
- pasteData = XRegExp.replace(pasteData, textRegex, "");
801
- } else if (validation === "numbers") {
802
- pasteData = XRegExp.replace(pasteData, numbersRegex, "");
803
- } else if (validation === "numbersOnly") {
804
- pasteData = XRegExp.replace(pasteData, numbersOnlyRegex, "");
805
- } else if (validation === "price") {
806
- pasteData = XRegExp.replace(pasteData, priceRegex, "");
807
- } else if (validation === "textNumbers") {
808
- pasteData = XRegExp.replace(pasteData, textNumbersRegex, "");
809
- } else if (validation === "email") {
810
- pasteData = XRegExp.replace(pasteData, emailRegex, "");
811
- } else if (validation === "color") {
812
- pasteData = XRegExp.replace(pasteData, colorRegex, "");
813
- } else if (validation === "address") {
814
- pasteData = XRegExp.replace(pasteData, addressRegex, "");
815
- } else if (validation === "cars") {
816
- pasteData = XRegExp.replace(pasteData, carsRegex, "");
817
- } else if (validation === "charts") {
818
- pasteData = XRegExp.replace(pasteData, chartsRegex, "");
819
- }
820
- e.preventDefault();
821
- document.execCommand("insertText", false, pasteData);
822
- };
823
- var handleInvalid = function(e, requireError) {
824
- e.target.setCustomValidity(requireError || "This filed is required !");
825
- };
826
- var useValidation = function(validationType, requireError) {
827
- return {
828
- onChange: handleChange,
829
- onPaste: handlePaste,
830
- onInvalid: function(e) {
831
- return handleInvalid(e, requireError);
832
- },
833
- "data-validation": validationType
834
- };
995
+ preserveAspectRatio: "xMidYMid meet",
996
+ children: [
997
+ " ",
998
+ /* @__PURE__ */ jsxs5("g", {
999
+ transform: "translate(0.000000,900.000000) scale(0.100000,-0.100000)",
1000
+ fill: "#fff",
1001
+ stroke: "none",
1002
+ children: [
1003
+ " ",
1004
+ /* @__PURE__ */ jsx6("path", {
1005
+ d: "M1000 8221 c-71 -27 -103 -47 -149 -92 -122 -123 -144 -294 -58 -456 22 -42 6838 -6858 6880 -6880 162 -86 333 -64 456 58 123 123 144 294 57 458 -10 19 -508 525 -1107 1124 l-1089 1089 1 256 1 257 676 1350 677 1350 115 6 c125 6 173 20 244 68 54 37 89 78 124 145 24 46 27 61 27 161 0 100 -3 115 -28 162 -52 100 -119 157 -225 194 -54 18 -131 19 -2817 19 l-2762 0 -341 340 c-188 186 -356 347 -374 357 -103 55 -220 68 -308 34z"
1006
+ }),
1007
+ " ",
1008
+ /* @__PURE__ */ jsx6("path", {
1009
+ d: "M2340 5338 c0 -7 146 -305 325 -662 l325 -649 0 -1112 c0 -1043 1 -1114 18 -1160 27 -76 47 -107 94 -154 48 -47 80 -67 153 -93 46 -17 120 -18 1231 -18 1085 0 1186 1 1235 17 30 9 66 24 81 33 68 40 158 146 158 186 0 14 -3600 3624 -3614 3624 -3 0 -6 -6 -6 -12z"
1010
+ }),
1011
+ " "
1012
+ ]
1013
+ }),
1014
+ " "
1015
+ ]
1016
+ })
1017
+ }) : /* @__PURE__ */ jsx6("div", {
1018
+ className: "mt-[-4px] mr-[-2px] ",
1019
+ children: /* @__PURE__ */ jsxs5("svg", {
1020
+ version: "1.0",
1021
+ xmlns: "http://www.w3.org/2000/svg",
1022
+ width: "18",
1023
+ height: "20",
1024
+ viewBox: "0 0 900.000000 900.000000",
1025
+ preserveAspectRatio: "xMidYMid meet",
1026
+ children: [
1027
+ " ",
1028
+ /* @__PURE__ */ jsxs5("g", {
1029
+ transform: "translate(0.000000,900.000000) scale(0.100000,-0.100000)",
1030
+ fill: "#fff",
1031
+ stroke: "none",
1032
+ children: [
1033
+ " ",
1034
+ /* @__PURE__ */ jsx6("path", {
1035
+ d: "M1000 8221 c-71 -27 -103 -47 -149 -92 -122 -123 -144 -294 -58 -456 22 -42 6838 -6858 6880 -6880 162 -86 333 -64 456 58 123 123 144 294 57 458 -10 19 -508 525 -1107 1124 l-1089 1089 1 256 1 257 676 1350 677 1350 115 6 c125 6 173 20 244 68 54 37 89 78 124 145 24 46 27 61 27 161 0 100 -3 115 -28 162 -52 100 -119 157 -225 194 -54 18 -131 19 -2817 19 l-2762 0 -341 340 c-188 186 -356 347 -374 357 -103 55 -220 68 -308 34z m5494 -1490 c6 -10 -1204 -2436 -1226 -2458 -13 -13 -168 139 -1247 1217 -677 677 -1231 1236 -1231 1241 0 12 3697 12 3704 0z"
1036
+ }),
1037
+ " ",
1038
+ /* @__PURE__ */ jsx6("path", {
1039
+ d: "M2340 5338 c0 -7 146 -305 325 -662 l325 -649 0 -1112 c0 -1043 1 -1114 18 -1160 27 -76 47 -107 94 -154 48 -47 80 -67 153 -93 46 -17 120 -18 1231 -18 1085 0 1186 1 1235 17 30 9 66 24 81 33 68 40 158 146 158 185 0 18 -692 715 -709 715 -6 0 -11 -38 -13 -97 l-3 -98 -745 0 -745 0 -3 858 -2 859 -694 694 c-382 382 -697 694 -700 694 -3 0 -6 -6 -6 -12z"
1040
+ }),
1041
+ " "
1042
+ ]
1043
+ }),
1044
+ " "
1045
+ ]
1046
+ })
1047
+ })
1048
+ });
835
1049
  };
836
- var getFormElementValue = function(form, name) {
837
- var _form_elements_namedItem;
838
- return ((_form_elements_namedItem = form.elements.namedItem(name)) === null || _form_elements_namedItem === void 0 ? void 0 : _form_elements_namedItem.value) || "";
1050
+ var exportToExcelSvg = function(width, height, viewBox) {
1051
+ return /* @__PURE__ */ jsxs5("svg", {
1052
+ version: "1.0",
1053
+ xmlns: "http://www.w3.org/2000/svg",
1054
+ width: width || "18",
1055
+ height: height || "18",
1056
+ viewBox: viewBox || "0 0 150.000000 150.000000",
1057
+ preserveAspectRatio: "xMidYMid meet",
1058
+ children: [
1059
+ " ",
1060
+ /* @__PURE__ */ jsxs5("g", {
1061
+ transform: "translate(0.000000,150.000000) scale(0.100000,-0.100000)",
1062
+ fill: "#ffffff",
1063
+ stroke: "none",
1064
+ children: [
1065
+ " ",
1066
+ /* @__PURE__ */ jsx6("path", {
1067
+ d: "M205 1418 c-3 -7 -4 -317 -3 -688 l3 -675 435 -3 c239 -1 441 0 449 3 11 4 9 11 -9 30 l-23 25 -396 2 -396 3 0 625 0 625 280 0 280 0 5 -190 5 -190 190 -5 190 -5 5 -175 5 -175 25 0 25 0 3 200 2 199 -202 203 -203 203 -333 0 c-257 0 -334 -3 -337 -12z m828 -235 c70 -70 127 -131 127 -135 0 -5 -60 -7 -132 -6 l-133 3 -3 133 c-1 72 1 132 6 132 4 0 65 -57 135 -127z"
1068
+ }),
1069
+ " ",
1070
+ /* @__PURE__ */ jsx6("path", {
1071
+ d: "M518 915 c-6 -6 9 -37 42 -90 11 -16 23 -37 27 -45 4 -8 19 -36 35 -61 15 -25 28 -56 28 -68 0 -20 -29 -69 -121 -209 -16 -24 -29 -47 -29 -53 0 -5 31 -9 68 -9 l69 0 42 82 c60 116 66 118 107 35 56 -114 53 -112 127 -115 51 -2 67 0 67 11 0 7 -5 18 -11 24 -11 11 -26 36 -49 78 -6 11 -19 34 -30 50 -11 17 -24 40 -29 52 -5 11 -15 24 -20 28 -26 16 -18 33 97 212 25 39 39 70 34 75 -5 5 -36 8 -68 6 l-59 -3 -42 -84 c-24 -46 -45 -86 -48 -89 -6 -6 -44 40 -45 54 0 6 -13 35 -29 65 l-28 54 -65 3 c-35 2 -67 0 -70 -3z"
1072
+ }),
1073
+ " ",
1074
+ /* @__PURE__ */ jsx6("path", {
1075
+ d: "M1135 548 c-3 -7 -6 -67 -7 -133 l-3 -120 -55 -3 c-30 -1 -61 -5 -68 -7 -8 -3 28 -53 95 -132 122 -146 129 -153 140 -153 4 0 22 17 38 37 26 32 53 63 175 206 13 15 30 27 38 27 9 0 12 3 8 7 -3 4 -39 9 -79 12 l-72 6 -5 130 -5 130 -98 3 c-72 2 -99 -1 -102 -10z m145 -183 l5 -130 28 -3 c15 -2 27 -8 27 -14 0 -18 -92 -128 -107 -128 -11 1 -97 107 -101 125 -2 8 7 15 25 17 l28 3 3 120 c1 66 4 126 7 133 3 9 18 12 42 10 l38 -3 5 -130z"
1076
+ }),
1077
+ " "
1078
+ ]
1079
+ }),
1080
+ " "
1081
+ ]
1082
+ });
839
1083
  };
1084
+ // src/components/table/hooks.tsx
1085
+ import { useContext as useContext2, useDeferredValue, useState as useState3, useTransition } from "react";
1086
+ import { create } from "zustand";
1087
+ import { isEqual as isEqual3 } from "lodash";
840
1088
  // src/components/table/Table.tsx
841
- import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
1089
+ import React2, { createContext, useMemo } from "react";
1090
+ import { isEqual as isEqual2 } from "lodash";
1091
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
842
1092
  var TableContext = createContext(null);
843
1093
  var TableProvider = function(props) {
844
1094
  var // basic props
@@ -935,9 +1185,9 @@ var TableProvider = function(props) {
935
1185
  handleFilterClick: handleFilterClick,
936
1186
  closeFilterWindow: closeFilterWindow
937
1187
  });
938
- return /* @__PURE__ */ jsx6(TableContext.Provider, {
1188
+ return /* @__PURE__ */ jsx7(TableContext.Provider, {
939
1189
  value: providerValues,
940
- children: /* @__PURE__ */ jsx6("div", {
1190
+ children: /* @__PURE__ */ jsx7("div", {
941
1191
  className: "flex flex-col gap-2 ".concat(containerClassName),
942
1192
  style: _object_spread_props(_object_spread({}, containerStyle), {
943
1193
  direction: direction
@@ -948,45 +1198,45 @@ var TableProvider = function(props) {
948
1198
  };
949
1199
  var TableBase = function(props) {
950
1200
  var containerHeaderClassName = props.containerHeaderClassName, optionalElement = props.optionalElement, tableContainerClass = props.tableContainerClass, tableContainerStyle = props.tableContainerStyle, tableStyle = props.tableStyle, includeSearch = props.includeSearch, exportToExcelKeys = props.exportToExcelKeys, sumColumns = props.sumColumns, direction = props.direction, maxRowsLabel1 = props.maxRowsLabel1, maxRowsLabel2 = props.maxRowsLabel2, searchContainerClassName = props.searchContainerClassName;
951
- return /* @__PURE__ */ jsxs5(TableProvider, _object_spread_props(_object_spread({}, props), {
1201
+ return /* @__PURE__ */ jsxs6(TableProvider, _object_spread_props(_object_spread({}, props), {
952
1202
  children: [
953
- /* @__PURE__ */ jsxs5("div", {
1203
+ /* @__PURE__ */ jsxs6("div", {
954
1204
  style: {
955
1205
  direction: direction
956
1206
  },
957
1207
  className: cn("flex justify-start items-center gap-2", containerHeaderClassName || ""),
958
1208
  children: [
959
- /* @__PURE__ */ jsxs5("div", {
1209
+ /* @__PURE__ */ jsxs6("div", {
960
1210
  className: cn("flex justify-start items-center gap-2", searchContainerClassName),
961
1211
  children: [
962
- includeSearch && /* @__PURE__ */ jsx6(Search, {}),
963
- exportToExcelKeys && /* @__PURE__ */ jsx6(ExportToExcel, {})
1212
+ includeSearch && /* @__PURE__ */ jsx7(Search, {}),
1213
+ exportToExcelKeys && /* @__PURE__ */ jsx7(ExportToExcel, {})
964
1214
  ]
965
1215
  }),
966
- maxRowsLabel1 && maxRowsLabel2 && /* @__PURE__ */ jsx6(MaxRowsLabel, {}),
1216
+ maxRowsLabel1 && maxRowsLabel2 && /* @__PURE__ */ jsx7(MaxRowsLabel, {}),
967
1217
  optionalElement && optionalElement
968
1218
  ]
969
1219
  }),
970
- /* @__PURE__ */ jsx6("div", {
1220
+ /* @__PURE__ */ jsx7("div", {
971
1221
  style: _object_spread_props(_object_spread({}, tableContainerStyle || {}), {
972
1222
  direction: direction
973
1223
  }),
974
1224
  className: cn("animate-slide-in-up overflow-y-auto", tableContainerClass || ""),
975
- children: /* @__PURE__ */ jsxs5("table", {
1225
+ children: /* @__PURE__ */ jsxs6("table", {
976
1226
  style: tableStyle,
977
1227
  className: "min-w-full text-sm font-light relative",
978
1228
  children: [
979
- /* @__PURE__ */ jsx6(TableHead, {}),
980
- /* @__PURE__ */ jsx6(TableBody, {})
1229
+ /* @__PURE__ */ jsx7(TableHead, {}),
1230
+ /* @__PURE__ */ jsx7(TableBody, {})
981
1231
  ]
982
1232
  })
983
1233
  }),
984
- sumColumns && /* @__PURE__ */ jsx6(Summary, {})
1234
+ sumColumns && /* @__PURE__ */ jsx7(Summary, {})
985
1235
  ]
986
1236
  }));
987
1237
  };
988
1238
  var areEqual = function(prevProps, nextProps) {
989
- return isEqual(prevProps, nextProps);
1239
+ return isEqual2(prevProps, nextProps);
990
1240
  };
991
1241
  var Table = React2.memo(TableBase, areEqual);
992
1242
  Table.displayName = "Table";
@@ -1003,8 +1253,8 @@ var useFilter = function(param) {
1003
1253
  var initFilter = filterableColumns.reduce(function(acc, col) {
1004
1254
  return _object_spread_props(_object_spread({}, acc), _define_property({}, col.dataKey, []));
1005
1255
  }, {});
1006
- var _useState2 = _sliced_to_array(useState2(initFilter), 2), filters = _useState2[0], setFilters = _useState2[1];
1007
- var _useState21 = _sliced_to_array(useState2(""), 2), filterPopupsDisplay = _useState21[0], setFilterPopupsDisplay = _useState21[1];
1256
+ var _useState3 = _sliced_to_array(useState3(initFilter), 2), filters = _useState3[0], setFilters = _useState3[1];
1257
+ var _useState31 = _sliced_to_array(useState3(""), 2), filterPopupsDisplay = _useState31[0], setFilterPopupsDisplay = _useState31[1];
1008
1258
  var filterOptions = filterableColumns.reduce(function(acc, col) {
1009
1259
  acc[col.dataKey] = Array.from(new Set(data.map(function(item) {
1010
1260
  return item[col.dataKey];
@@ -1023,7 +1273,7 @@ var useFilter = function(param) {
1023
1273
  setFilters(newFilters);
1024
1274
  };
1025
1275
  var clearFilter = function() {
1026
- if (!isEqual2(filters, initFilter)) {
1276
+ if (!isEqual3(filters, initFilter)) {
1027
1277
  setFilters(initFilter);
1028
1278
  }
1029
1279
  };
@@ -1050,8 +1300,8 @@ var useFilter = function(param) {
1050
1300
  };
1051
1301
  };
1052
1302
  var useSort = function() {
1053
- var _useState2 = _sliced_to_array(useState2(null), 2), sortColumn = _useState2[0], setSortColumn = _useState2[1];
1054
- var _useState21 = _sliced_to_array(useState2(null), 2), sortOrder = _useState21[0], setSortOrder = _useState21[1];
1303
+ var _useState3 = _sliced_to_array(useState3(null), 2), sortColumn = _useState3[0], setSortColumn = _useState3[1];
1304
+ var _useState31 = _sliced_to_array(useState3(null), 2), sortOrder = _useState31[0], setSortOrder = _useState31[1];
1055
1305
  var handleSort = function(columnIndex) {
1056
1306
  var newSortOrder = "asc";
1057
1307
  if (sortColumn === columnIndex && sortOrder === "asc") {
@@ -1076,7 +1326,7 @@ var useSort = function() {
1076
1326
  };
1077
1327
  };
1078
1328
  var useSearch = function() {
1079
- var _useState2 = _sliced_to_array(useState2(""), 2), searchQuery = _useState2[0], setSearchQuery = _useState2[1];
1329
+ var _useState3 = _sliced_to_array(useState3(""), 2), searchQuery = _useState3[0], setSearchQuery = _useState3[1];
1080
1330
  var _useTransition = _sliced_to_array(useTransition(), 2), isPending = _useTransition[0], startTransition = _useTransition[1];
1081
1331
  var deferredSearchQuery = useDeferredValue(searchQuery);
1082
1332
  var handleSearch = function(e) {
@@ -1100,130 +1350,9 @@ var useSearch = function() {
1100
1350
  deferredSearchQuery: deferredSearchQuery
1101
1351
  };
1102
1352
  };
1103
- // src/helpers/firebase.ts
1104
- import moment from "moment";
1105
- import { initializeApp } from "firebase/app";
1106
- import { getStorage } from "firebase/storage";
1107
- import { getAuth, GoogleAuthProvider, signInWithPopup } from "firebase/auth";
1108
- import { initializeAppCheck, ReCaptchaEnterpriseProvider } from "firebase/app-check";
1109
- import { addDoc, collection, deleteDoc, doc, getDoc, getDocs, query, setDoc, Timestamp, where, getFirestore, onSnapshot, orderBy } from "firebase/firestore";
1110
- import { useCallback } from "react";
1111
- var initApp = function() {
1112
- var isNodeEnv2 = typeof process !== "undefined" && process.env;
1113
- var firebaseConfig = {
1114
- apiKey: isNodeEnv2 ? process.env.NEXT_PUBLIC_API_KEY : import.meta.env.VITE_API_KEY,
1115
- authDomain: isNodeEnv2 ? process.env.NEXT_PUBLIC_AUTH_DOMAIN : import.meta.env.VITE_AUTH_DOMAIN,
1116
- projectId: isNodeEnv2 ? process.env.NEXT_PUBLIC_PROJECT_ID : import.meta.env.VITE_PROJECT_ID,
1117
- storageBucket: isNodeEnv2 ? process.env.NEXT_PUBLIC_STORAGE_BUCKET : import.meta.env.VITE_STORAGE_BUCKET,
1118
- messagingSenderId: isNodeEnv2 ? process.env.NEXT_PUBLIC_MESSAGING_SENDER_ID : import.meta.env.VITE_MESSAGING_SENDER_ID,
1119
- appId: isNodeEnv2 ? process.env.NEXT_PUBLIC_APP_ID : import.meta.env.VITE_APP_ID
1120
- };
1121
- try {
1122
- var app2 = initializeApp(firebaseConfig);
1123
- var auth2 = getAuth(app2);
1124
- auth2.settings.appVerificationDisabledForTesting = false;
1125
- var db2 = getFirestore(app2);
1126
- var storage2 = getStorage(app2);
1127
- var googleLoginProvider2 = new GoogleAuthProvider();
1128
- var recaptchaSiteKey = isNodeEnv2 ? process.env.NEXT_PUBLIC_RECAPTCHA_SITE_KEY : import.meta.env.VITE_RECAPTCHA_SITE_KEY;
1129
- var result = {
1130
- db: db2,
1131
- auth: auth2,
1132
- storage: storage2,
1133
- app: app2,
1134
- googleLoginProvider: googleLoginProvider2
1135
- };
1136
- if (recaptchaSiteKey) {
1137
- result.appCheck = initializeAppCheck(app2, {
1138
- provider: new ReCaptchaEnterpriseProvider(recaptchaSiteKey),
1139
- isTokenAutoRefreshEnabled: true
1140
- });
1141
- }
1142
- return result;
1143
- } catch (error) {
1144
- console.error("Failed to initialize Firebase app:", error);
1145
- return {};
1146
- }
1147
- };
1148
- var _initApp = initApp(), db = _initApp.db, auth = _initApp.auth, storage = _initApp.storage, app = _initApp.app, appCheck = _initApp.appCheck, googleLoginProvider = _initApp.googleLoginProvider;
1149
- var collections = {
1150
- clients: collection(db, "nx-clients"),
1151
- sites: collection(db, "nx-sites"),
1152
- cars: collection(db, "units"),
1153
- users: collection(db, "nx-users"),
1154
- lastLocations: collection(db, "last_locations"),
1155
- ermEvents: collection(db, "erm_events_general"),
1156
- erm2Events: collection(db, "erm2_events_general"),
1157
- ruptelaEvents: collection(db, "ruptela_events_general"),
1158
- polygons: collection(db, "nx-polygons"),
1159
- polygonEvents: collection(db, "polygon_events"),
1160
- polygonCars: collection(db, "polygon_cars"),
1161
- canbus: collection(db, "erm_canbus_parameters"),
1162
- states: collection(db, "erm_states"),
1163
- app_pro_commands_queue: collection(db, "app_pro_commands_queue"),
1164
- trips: collection(db, "erm2_trip"),
1165
- tripsDetails: collection(db, "erm2_trip_details"),
1166
- audit: collection(db, "nx-audit"),
1167
- nx_settings: collection(db, "nx-settings"),
1168
- settings: collection(db, "settings"),
1169
- translations: collection(db, "nx-translations"),
1170
- nx_cars: collection(db, "nx-cars"),
1171
- boards: collection(db, "boards"),
1172
- protection_types: collection(db, "protectionTypes"),
1173
- board_types: collection(db, "boardTypes"),
1174
- charge_capacities: collection(db, "nx-charge-capacities")
1175
- };
1176
- var fire_base_TIME_TEMP = Timestamp.now;
1177
- // src/helpers/global.ts
1178
- import { CountryOptions } from "akeyless-types-commons";
1179
- import axios from "axios";
1180
- // src/helpers/phoneNumber.ts
1181
- import { parsePhoneNumberFromString } from "libphonenumber-js";
1182
- // src/helpers/global.ts
1183
- import { isEqual as isEqual3 } from "lodash";
1184
- var renderOnce = function() {
1185
- return true;
1186
- };
1187
- var getLocationUrl = function(lng, lat) {
1188
- return "https://www.google.com/maps?q=".concat(lat, ",").concat(lng);
1189
- };
1190
- var isNodeEnv = typeof process !== "undefined" && process.env;
1191
- var _ref = {
1192
- mode: isNodeEnv ? process.env.NEXT_PUBLIC_MODE : import.meta.env.VITE_MODE,
1193
- isLocal: (isNodeEnv ? process.env.NEXT_PUBLIC_IS_LOCAL : import.meta.env.VITE_is_local) === "true"
1194
- }, mode = _ref.mode, isLocal = _ref.isLocal;
1195
- // src/helpers/time_helpers.ts
1196
- import { Timestamp as Timestamp2 } from "firebase/firestore";
1197
- import moment2 from "moment-timezone";
1198
- function timestamp_to_string(firebaseTimestamp, options) {
1199
- var date;
1200
- if (_instanceof(firebaseTimestamp, Timestamp2)) {
1201
- date = firebaseTimestamp.toDate();
1202
- } else if (_instanceof(firebaseTimestamp, Date)) {
1203
- date = firebaseTimestamp;
1204
- } else if (typeof firebaseTimestamp === "string") {
1205
- date = moment2.utc(firebaseTimestamp, (options === null || options === void 0 ? void 0 : options.fromFormat) || "DD/MM/YYYY HH:mm:ss").toDate();
1206
- if (isNaN(date.getTime())) {
1207
- throw new Error("Invalid date string format");
1208
- }
1209
- } else {
1210
- throw new Error("Invalid input: firebaseTimestamp must be a Timestamp, Date, or valid date string.");
1211
- }
1212
- if (options === null || options === void 0 ? void 0 : options.tz) {
1213
- var result = moment2(date).tz(options === null || options === void 0 ? void 0 : options.tz).format((options === null || options === void 0 ? void 0 : options.format) || "DD/MM/YYYY HH:mm:ss");
1214
- return result;
1215
- }
1216
- return moment2.utc(date).format((options === null || options === void 0 ? void 0 : options.format) || "DD/MM/YYYY HH:mm:ss");
1217
- }
1218
- // src/helpers/api.ts
1219
- import axios2 from "axios";
1220
- var baseDomain = mode === "qa" ? "https://nx-api.xyz/api" : "https://nx-api.info/api";
1221
- var devicesDomain = isLocal ? "http://localhost:9001/api/devices" : baseDomain + "/devices";
1222
- var biDomain = isLocal ? "http://localhost:9002/api/bi" : baseDomain + "/bi";
1223
- var callCenterDomain = isLocal ? "http://localhost:9003/api/call-center" : baseDomain + "/call-center";
1224
1353
  // src/components/ui/badge.tsx
1225
1354
  import { cva } from "class-variance-authority";
1226
- import { jsx as jsx7 } from "react/jsx-runtime";
1355
+ import { jsx as jsx8 } from "react/jsx-runtime";
1227
1356
  var badgeVariants = cva("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
1228
1357
  variants: {
1229
1358
  variant: {
@@ -1242,7 +1371,7 @@ function Badge(_param) {
1242
1371
  "className",
1243
1372
  "variant"
1244
1373
  ]);
1245
- return /* @__PURE__ */ jsx7("div", _object_spread({
1374
+ return /* @__PURE__ */ jsx8("div", _object_spread({
1246
1375
  className: cn(badgeVariants({
1247
1376
  variant: variant
1248
1377
  }), className)
@@ -1252,7 +1381,7 @@ function Badge(_param) {
1252
1381
  import { Slot } from "@radix-ui/react-slot";
1253
1382
  import { cva as cva2 } from "class-variance-authority";
1254
1383
  import * as React3 from "react";
1255
- import { jsx as jsx8 } from "react/jsx-runtime";
1384
+ import { jsx as jsx9 } from "react/jsx-runtime";
1256
1385
  var buttonVariants = cva2("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", {
1257
1386
  variants: {
1258
1387
  variant: {
@@ -1283,7 +1412,7 @@ var Button = React3.forwardRef(function(_param, ref) {
1283
1412
  "asChild"
1284
1413
  ]);
1285
1414
  var Comp = asChild ? Slot : "button";
1286
- return /* @__PURE__ */ jsx8(Comp, _object_spread({
1415
+ return /* @__PURE__ */ jsx9(Comp, _object_spread({
1287
1416
  ref: ref,
1288
1417
  "data-slot": "button",
1289
1418
  className: cn(buttonVariants({
@@ -1296,13 +1425,13 @@ var Button = React3.forwardRef(function(_param, ref) {
1296
1425
  Button.displayName = "Button";
1297
1426
  // src/components/ui/input.tsx
1298
1427
  import * as React4 from "react";
1299
- import { jsx as jsx9 } from "react/jsx-runtime";
1428
+ import { jsx as jsx10 } from "react/jsx-runtime";
1300
1429
  var Input = React4.forwardRef(function(_param, ref) {
1301
1430
  var className = _param.className, type = _param.type, props = _object_without_properties(_param, [
1302
1431
  "className",
1303
1432
  "type"
1304
1433
  ]);
1305
- return /* @__PURE__ */ jsx9("input", _object_spread({
1434
+ return /* @__PURE__ */ jsx10("input", _object_spread({
1306
1435
  type: type,
1307
1436
  className: cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
1308
1437
  ref: ref
@@ -1312,7 +1441,7 @@ Input.displayName = "Input";
1312
1441
  // src/components/ui/progress.tsx
1313
1442
  import * as React5 from "react";
1314
1443
  import * as ProgressPrimitive from "@radix-ui/react-progress";
1315
- import { jsx as jsx10 } from "react/jsx-runtime";
1444
+ import { jsx as jsx11 } from "react/jsx-runtime";
1316
1445
  var ProgressComponent = React5.forwardRef(function(_param, ref) {
1317
1446
  var className = _param.className, value = _param.value, containerClassName = _param.containerClassName, indicatorClassName = _param.indicatorClassName, showValueClassName = _param.showValueClassName, _param_showValue = _param.showValue, showValue = _param_showValue === void 0 ? false : _param_showValue, props = _object_without_properties(_param, [
1318
1447
  "className",
@@ -1322,18 +1451,18 @@ var ProgressComponent = React5.forwardRef(function(_param, ref) {
1322
1451
  "showValueClassName",
1323
1452
  "showValue"
1324
1453
  ]);
1325
- return /* @__PURE__ */ jsx10("div", {
1454
+ return /* @__PURE__ */ jsx11("div", {
1326
1455
  className: cn("relative w-full", containerClassName),
1327
- children: /* @__PURE__ */ jsx10(ProgressPrimitive.Root, _object_spread_props(_object_spread({
1456
+ children: /* @__PURE__ */ jsx11(ProgressPrimitive.Root, _object_spread_props(_object_spread({
1328
1457
  ref: ref,
1329
1458
  className: cn("w-full h-5 bg-[#e5e7eb] relative overflow-hidden rounded-full", className)
1330
1459
  }, props), {
1331
- children: /* @__PURE__ */ jsx10(ProgressPrimitive.Indicator, {
1460
+ children: /* @__PURE__ */ jsx11(ProgressPrimitive.Indicator, {
1332
1461
  className: cn("h-full w-full flex-1 bg-[green] transition-all rounded-full", indicatorClassName),
1333
1462
  style: {
1334
1463
  transform: "translateX(-".concat(100 - (value || 0), "%)")
1335
1464
  },
1336
- children: showValue && /* @__PURE__ */ jsx10("div", {
1465
+ children: showValue && /* @__PURE__ */ jsx11("div", {
1337
1466
  className: cn("absolute right-1 top-[-2px] font-medium text-white", showValueClassName),
1338
1467
  children: "".concat(value || 0, "%")
1339
1468
  })
@@ -1356,13 +1485,13 @@ import * as React7 from "react";
1356
1485
  import * as React6 from "react";
1357
1486
  import * as DialogPrimitive from "@radix-ui/react-dialog";
1358
1487
  import { X } from "lucide-react";
1359
- import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
1488
+ import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
1360
1489
  var DialogPortal = DialogPrimitive.Portal;
1361
1490
  var DialogOverlay = React6.forwardRef(function(_param, ref) {
1362
1491
  var className = _param.className, props = _object_without_properties(_param, [
1363
1492
  "className"
1364
1493
  ]);
1365
- return /* @__PURE__ */ jsx11(DialogPrimitive.Overlay, _object_spread({
1494
+ return /* @__PURE__ */ jsx12(DialogPrimitive.Overlay, _object_spread({
1366
1495
  ref: ref,
1367
1496
  className: cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className)
1368
1497
  }, props));
@@ -1373,22 +1502,22 @@ var DialogContent = React6.forwardRef(function(_param, ref) {
1373
1502
  "className",
1374
1503
  "children"
1375
1504
  ]);
1376
- return /* @__PURE__ */ jsxs6(DialogPortal, {
1505
+ return /* @__PURE__ */ jsxs7(DialogPortal, {
1377
1506
  children: [
1378
- /* @__PURE__ */ jsx11(DialogOverlay, {}),
1379
- /* @__PURE__ */ jsxs6(DialogPrimitive.Content, _object_spread_props(_object_spread({
1507
+ /* @__PURE__ */ jsx12(DialogOverlay, {}),
1508
+ /* @__PURE__ */ jsxs7(DialogPrimitive.Content, _object_spread_props(_object_spread({
1380
1509
  ref: ref,
1381
1510
  className: cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", className)
1382
1511
  }, props), {
1383
1512
  children: [
1384
1513
  children,
1385
- /* @__PURE__ */ jsxs6(DialogPrimitive.Close, {
1514
+ /* @__PURE__ */ jsxs7(DialogPrimitive.Close, {
1386
1515
  className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",
1387
1516
  children: [
1388
- /* @__PURE__ */ jsx11(X, {
1517
+ /* @__PURE__ */ jsx12(X, {
1389
1518
  className: "h-4 w-4"
1390
1519
  }),
1391
- /* @__PURE__ */ jsx11("span", {
1520
+ /* @__PURE__ */ jsx12("span", {
1392
1521
  className: "sr-only",
1393
1522
  children: "Close"
1394
1523
  })
@@ -1404,7 +1533,7 @@ var DialogHeader = function(_param) {
1404
1533
  var className = _param.className, props = _object_without_properties(_param, [
1405
1534
  "className"
1406
1535
  ]);
1407
- return /* @__PURE__ */ jsx11("div", _object_spread({
1536
+ return /* @__PURE__ */ jsx12("div", _object_spread({
1408
1537
  className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className)
1409
1538
  }, props));
1410
1539
  };
@@ -1413,7 +1542,7 @@ var DialogFooter = function(_param) {
1413
1542
  var className = _param.className, props = _object_without_properties(_param, [
1414
1543
  "className"
1415
1544
  ]);
1416
- return /* @__PURE__ */ jsx11("div", _object_spread({
1545
+ return /* @__PURE__ */ jsx12("div", _object_spread({
1417
1546
  className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)
1418
1547
  }, props));
1419
1548
  };
@@ -1422,7 +1551,7 @@ var DialogTitle = React6.forwardRef(function(_param, ref) {
1422
1551
  var className = _param.className, props = _object_without_properties(_param, [
1423
1552
  "className"
1424
1553
  ]);
1425
- return /* @__PURE__ */ jsx11(DialogPrimitive.Title, _object_spread({
1554
+ return /* @__PURE__ */ jsx12(DialogPrimitive.Title, _object_spread({
1426
1555
  ref: ref,
1427
1556
  className: cn("text-lg font-semibold leading-none tracking-tight", className)
1428
1557
  }, props));
@@ -1432,19 +1561,19 @@ var DialogDescription = React6.forwardRef(function(_param, ref) {
1432
1561
  var className = _param.className, props = _object_without_properties(_param, [
1433
1562
  "className"
1434
1563
  ]);
1435
- return /* @__PURE__ */ jsx11(DialogPrimitive.Description, _object_spread({
1564
+ return /* @__PURE__ */ jsx12(DialogPrimitive.Description, _object_spread({
1436
1565
  ref: ref,
1437
1566
  className: cn("text-sm text-muted-foreground", className)
1438
1567
  }, props));
1439
1568
  });
1440
1569
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
1441
1570
  // src/components/ui/command.tsx
1442
- import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
1571
+ import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
1443
1572
  var Command = React7.forwardRef(function(_param, ref) {
1444
1573
  var className = _param.className, props = _object_without_properties(_param, [
1445
1574
  "className"
1446
1575
  ]);
1447
- return /* @__PURE__ */ jsx12(CommandPrimitive, _object_spread({
1576
+ return /* @__PURE__ */ jsx13(CommandPrimitive, _object_spread({
1448
1577
  ref: ref,
1449
1578
  className: cn("flex h-full w-full flex-col overflow-hidden rounded-lg bg-popover text-popover-foreground", className)
1450
1579
  }, props));
@@ -1455,16 +1584,16 @@ var CommandInput = React7.forwardRef(function(_param, ref) {
1455
1584
  "className",
1456
1585
  "withSearchIcon"
1457
1586
  ]);
1458
- return /* @__PURE__ */ jsxs7("div", {
1587
+ return /* @__PURE__ */ jsxs8("div", {
1459
1588
  className: "flex items-center border-b border-input px-3",
1460
1589
  "cmdk-input-wrapper": "",
1461
1590
  children: [
1462
- withSearchIcon && /* @__PURE__ */ jsx12(Search2, {
1591
+ withSearchIcon && /* @__PURE__ */ jsx13(Search2, {
1463
1592
  size: 20,
1464
1593
  strokeWidth: 2,
1465
1594
  className: "me-3 text-muted-foreground/80"
1466
1595
  }),
1467
- /* @__PURE__ */ jsx12(CommandPrimitive.Input, _object_spread({
1596
+ /* @__PURE__ */ jsx13(CommandPrimitive.Input, _object_spread({
1468
1597
  ref: ref,
1469
1598
  className: cn("flex h-10 w-full rounded-lg bg-transparent py-2 text-sm outline-none placeholder:text-muted-foreground/70 disabled:cursor-not-allowed disabled:opacity-50", className)
1470
1599
  }, props))
@@ -1476,14 +1605,14 @@ var CommandList = React7.forwardRef(function(_param, ref) {
1476
1605
  var className = _param.className, props = _object_without_properties(_param, [
1477
1606
  "className"
1478
1607
  ]);
1479
- return /* @__PURE__ */ jsx12(CommandPrimitive.List, _object_spread({
1608
+ return /* @__PURE__ */ jsx13(CommandPrimitive.List, _object_spread({
1480
1609
  ref: ref,
1481
1610
  className: cn("max-h-80 overflow-y-auto overflow-x-hidden", className)
1482
1611
  }, props));
1483
1612
  });
1484
1613
  CommandList.displayName = CommandPrimitive.List.displayName;
1485
1614
  var CommandEmpty = React7.forwardRef(function(props, ref) {
1486
- return /* @__PURE__ */ jsx12(CommandPrimitive.Empty, _object_spread({
1615
+ return /* @__PURE__ */ jsx13(CommandPrimitive.Empty, _object_spread({
1487
1616
  ref: ref,
1488
1617
  className: "py-6 text-center text-sm"
1489
1618
  }, props));
@@ -1493,7 +1622,7 @@ var CommandGroup = React7.forwardRef(function(_param, ref) {
1493
1622
  var className = _param.className, props = _object_without_properties(_param, [
1494
1623
  "className"
1495
1624
  ]);
1496
- return /* @__PURE__ */ jsx12(CommandPrimitive.Group, _object_spread({
1625
+ return /* @__PURE__ */ jsx13(CommandPrimitive.Group, _object_spread({
1497
1626
  ref: ref,
1498
1627
  className: cn("overflow-hidden p-2 text-foreground [&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:py-2 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", className)
1499
1628
  }, props));
@@ -1503,7 +1632,7 @@ var CommandSeparator = React7.forwardRef(function(_param, ref) {
1503
1632
  var className = _param.className, props = _object_without_properties(_param, [
1504
1633
  "className"
1505
1634
  ]);
1506
- return /* @__PURE__ */ jsx12(CommandPrimitive.Separator, _object_spread({
1635
+ return /* @__PURE__ */ jsx13(CommandPrimitive.Separator, _object_spread({
1507
1636
  ref: ref,
1508
1637
  className: cn("-mx-1 h-px bg-border", className)
1509
1638
  }, props));
@@ -1513,7 +1642,7 @@ var CommandItem = React7.forwardRef(function(_param, ref) {
1513
1642
  var className = _param.className, props = _object_without_properties(_param, [
1514
1643
  "className"
1515
1644
  ]);
1516
- return /* @__PURE__ */ jsx12(CommandPrimitive.Item, _object_spread({
1645
+ return /* @__PURE__ */ jsx13(CommandPrimitive.Item, _object_spread({
1517
1646
  ref: ref,
1518
1647
  className: cn("relative flex cursor-default select-none items-center gap-3 rounded-md px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className)
1519
1648
  }, props));
@@ -1523,7 +1652,7 @@ var CommandShortcut = function(_param) {
1523
1652
  var className = _param.className, props = _object_without_properties(_param, [
1524
1653
  "className"
1525
1654
  ]);
1526
- return /* @__PURE__ */ jsx12("kbd", _object_spread({
1655
+ return /* @__PURE__ */ jsx13("kbd", _object_spread({
1527
1656
  className: cn("-me-1 ms-auto inline-flex h-5 max-h-full items-center rounded border border-border bg-background px-1 font-[inherit] text-[0.625rem] font-medium text-muted-foreground/70", className)
1528
1657
  }, props));
1529
1658
  };
@@ -3361,7 +3490,7 @@ var flip3 = function(options, deps) {
3361
3490
  });
3362
3491
  };
3363
3492
  // src/components/ui/multiselect.tsx
3364
- import { Fragment as Fragment2, jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
3493
+ import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
3365
3494
  var Portal2 = function(param) {
3366
3495
  var children = param.children;
3367
3496
  return ReactDOM2.createPortal(children, document.body);
@@ -3446,7 +3575,7 @@ var CommandEmpty2 = forwardRef6(function(_param, forwardedRef) {
3446
3575
  return state.filtered.count === 0;
3447
3576
  });
3448
3577
  if (!render) return null;
3449
- return /* @__PURE__ */ jsx13("div", _object_spread({
3578
+ return /* @__PURE__ */ jsx14("div", _object_spread({
3450
3579
  ref: forwardedRef,
3451
3580
  className: cn("px-2 py-4 text-center text-sm", className),
3452
3581
  "cmdk-empty": "",
@@ -3725,7 +3854,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
3725
3854
  })) {
3726
3855
  return void 0;
3727
3856
  }
3728
- var Item = /* @__PURE__ */ jsx13(CommandItem, {
3857
+ var Item = /* @__PURE__ */ jsx14(CommandItem, {
3729
3858
  value: inputValue,
3730
3859
  className: "cursor-pointer",
3731
3860
  onMouseDown: function(e) {
@@ -3760,14 +3889,14 @@ var MultipleSelector = forwardRef6(function(param, ref) {
3760
3889
  var EmptyItem = useCallback3(function() {
3761
3890
  if (!emptyIndicator) return void 0;
3762
3891
  if (onSearch && !createNewOptionLabel && Object.keys(options).length === 0) {
3763
- return /* @__PURE__ */ jsx13(CommandItem, {
3892
+ return /* @__PURE__ */ jsx14(CommandItem, {
3764
3893
  className: "",
3765
3894
  value: "-",
3766
3895
  disabled: true,
3767
3896
  children: emptyIndicator
3768
3897
  });
3769
3898
  }
3770
- return /* @__PURE__ */ jsx13(CommandEmpty2, {
3899
+ return /* @__PURE__ */ jsx14(CommandEmpty2, {
3771
3900
  className: emptyIndicatorClassName,
3772
3901
  children: emptyIndicator
3773
3902
  });
@@ -3798,7 +3927,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
3798
3927
  createNewOptionLabel,
3799
3928
  commandProps === null || commandProps === void 0 ? void 0 : commandProps.filter
3800
3929
  ]);
3801
- return /* @__PURE__ */ jsxs8(Command, _object_spread_props(_object_spread({}, commandProps), {
3930
+ return /* @__PURE__ */ jsxs9(Command, _object_spread_props(_object_spread({}, commandProps), {
3802
3931
  onKeyDown: function(e) {
3803
3932
  var _commandProps_onKeyDown;
3804
3933
  handleKeyDown(e);
@@ -3808,7 +3937,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
3808
3937
  shouldFilter: (commandProps === null || commandProps === void 0 ? void 0 : commandProps.shouldFilter) !== void 0 ? commandProps.shouldFilter : !onSearch,
3809
3938
  filter: commandFilter(),
3810
3939
  children: [
3811
- /* @__PURE__ */ jsx13("div", {
3940
+ /* @__PURE__ */ jsx14("div", {
3812
3941
  ref: setContainerRef,
3813
3942
  className: cn("relative min-h-[38px] py-2 rounded-lg border border-input text-sm transition-shadow focus-within:border-ring focus-within:outline-none focus-within:ring-[3px] focus-within:ring-ring/20 has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50", {
3814
3943
  "p-1": selected.length !== 0,
@@ -3819,11 +3948,11 @@ var MultipleSelector = forwardRef6(function(param, ref) {
3819
3948
  if (disabled) return;
3820
3949
  (_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
3821
3950
  },
3822
- children: /* @__PURE__ */ jsxs8("div", {
3951
+ children: /* @__PURE__ */ jsxs9("div", {
3823
3952
  className: "flex flex-wrap gap-1",
3824
3953
  children: [
3825
3954
  selected.map(function(option) {
3826
- return /* @__PURE__ */ jsxs8("div", {
3955
+ return /* @__PURE__ */ jsxs9("div", {
3827
3956
  className: cn("animate-fadeIn relative inline-flex h-7 cursor-default items-center rounded-md border border-solid bg-background pe-7 pl-2 ps-2 text-xs font-medium text-secondary-foreground transition-all hover:bg-background disabled:cursor-not-allowed disabled:opacity-50 data-[fixed]:pe-2 px-1", badgeClassName),
3828
3957
  "data-fixed": option.fixed,
3829
3958
  "data-disabled": disabled || void 0,
@@ -3831,7 +3960,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
3831
3960
  option.label,
3832
3961
  !unremovableOptions.find(function(v) {
3833
3962
  return isEqual4(v.value, option.value);
3834
- }) && /* @__PURE__ */ jsx13("button", {
3963
+ }) && /* @__PURE__ */ jsx14("button", {
3835
3964
  className: "absolute -inset-y-px -end-px flex size-7 items-center justify-center rounded-e-lg border border-transparent p-0 text-muted-foreground/80 outline-0 transition-colors hover:text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring/70",
3836
3965
  onKeyDown: function(e) {
3837
3966
  if (e.key === "Enter") {
@@ -3846,7 +3975,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
3846
3975
  return handleUnselect(option);
3847
3976
  },
3848
3977
  "aria-label": "Remove",
3849
- children: /* @__PURE__ */ jsx13(X2, {
3978
+ children: /* @__PURE__ */ jsx14(X2, {
3850
3979
  size: 14,
3851
3980
  strokeWidth: 2,
3852
3981
  "aria-hidden": "true"
@@ -3855,7 +3984,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
3855
3984
  ]
3856
3985
  }, option.value);
3857
3986
  }),
3858
- /* @__PURE__ */ jsx13(CommandPrimitive2.Input, _object_spread_props(_object_spread({}, inputProps), {
3987
+ /* @__PURE__ */ jsx14(CommandPrimitive2.Input, _object_spread_props(_object_spread({}, inputProps), {
3859
3988
  ref: inputRef,
3860
3989
  value: inputValue,
3861
3990
  disabled: disabled,
@@ -3886,7 +4015,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
3886
4015
  "ml-1": selected.length !== 0
3887
4016
  }, inputProps === null || inputProps === void 0 ? void 0 : inputProps.className)
3888
4017
  })),
3889
- /* @__PURE__ */ jsx13("button", {
4018
+ /* @__PURE__ */ jsx14("button", {
3890
4019
  type: "button",
3891
4020
  onClick: function() {
3892
4021
  setSelected(selected.filter(function(s) {
@@ -3900,7 +4029,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
3900
4029
  return s.fixed;
3901
4030
  }).length === selected.length) && "hidden"),
3902
4031
  "aria-label": "Clear all",
3903
- children: /* @__PURE__ */ jsx13(X2, {
4032
+ children: /* @__PURE__ */ jsx14(X2, {
3904
4033
  size: 16,
3905
4034
  strokeWidth: 2,
3906
4035
  "aria-hidden": "true"
@@ -3909,8 +4038,8 @@ var MultipleSelector = forwardRef6(function(param, ref) {
3909
4038
  ]
3910
4039
  })
3911
4040
  }),
3912
- open && /* @__PURE__ */ jsx13(Portal2, {
3913
- children: /* @__PURE__ */ jsx13("div", {
4041
+ open && /* @__PURE__ */ jsx14(Portal2, {
4042
+ children: /* @__PURE__ */ jsx14("div", {
3914
4043
  ref: combinedFloatingRef,
3915
4044
  style: {
3916
4045
  position: strategy,
@@ -3920,7 +4049,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
3920
4049
  },
3921
4050
  className: cn("z-[9999] overflow-hidden rounded-lg border border-input", dropdownContainerClassName),
3922
4051
  "data-state": open ? "open" : "closed",
3923
- children: /* @__PURE__ */ jsx13(CommandList, {
4052
+ children: /* @__PURE__ */ jsx14(CommandList, {
3924
4053
  className: "bg-popover text-popover-foreground shadow-lg shadow-black/5 outline-none",
3925
4054
  onMouseLeave: function() {
3926
4055
  setOnScrollbar(false);
@@ -3932,23 +4061,23 @@ var MultipleSelector = forwardRef6(function(param, ref) {
3932
4061
  var _inputRef_current;
3933
4062
  (_inputRef_current = inputRef.current) === null || _inputRef_current === void 0 ? void 0 : _inputRef_current.focus();
3934
4063
  },
3935
- children: isLoading ? /* @__PURE__ */ jsx13(Fragment2, {
4064
+ children: isLoading ? /* @__PURE__ */ jsx14(Fragment2, {
3936
4065
  children: loadingIndicator
3937
- }) : /* @__PURE__ */ jsxs8(Fragment2, {
4066
+ }) : /* @__PURE__ */ jsxs9(Fragment2, {
3938
4067
  children: [
3939
4068
  EmptyItem(),
3940
4069
  CreatableItem(),
3941
- !selectFirstItem && /* @__PURE__ */ jsx13(CommandItem, {
4070
+ !selectFirstItem && /* @__PURE__ */ jsx14(CommandItem, {
3942
4071
  value: "-",
3943
4072
  className: "hidden"
3944
4073
  }),
3945
4074
  Object.entries(selectables).map(function(param) {
3946
4075
  var _param = _sliced_to_array(param, 2), key = _param[0], dropdowns = _param[1];
3947
- return /* @__PURE__ */ jsx13(CommandGroup, {
4076
+ return /* @__PURE__ */ jsx14(CommandGroup, {
3948
4077
  heading: key,
3949
4078
  className: cn("h-full overflow-auto", dropdownClassName),
3950
4079
  children: dropdowns.map(function(option) {
3951
- return /* @__PURE__ */ jsx13(CommandItem, {
4080
+ return /* @__PURE__ */ jsx14(CommandItem, {
3952
4081
  value: option.value,
3953
4082
  disabled: option.disable,
3954
4083
  onMouseDown: function(e) {
@@ -3979,7 +4108,7 @@ var MultipleSelector = forwardRef6(function(param, ref) {
3979
4108
  })
3980
4109
  })
3981
4110
  }),
3982
- /* @__PURE__ */ jsx13("input", {
4111
+ /* @__PURE__ */ jsx14("input", {
3983
4112
  value: JSON.stringify(selected),
3984
4113
  type: "hidden",
3985
4114
  name: name
@@ -3991,16 +4120,16 @@ MultipleSelector.displayName = "MultipleSelector";
3991
4120
  var multiselect_default = MultipleSelector;
3992
4121
  // src/components/ui/popover.tsx
3993
4122
  import * as PopoverPrimitive from "@radix-ui/react-popover";
3994
- import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
4123
+ import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
3995
4124
  function Popover(_param) {
3996
4125
  var props = _extends({}, _object_destructuring_empty(_param));
3997
- return /* @__PURE__ */ jsx14(PopoverPrimitive.Root, _object_spread({
4126
+ return /* @__PURE__ */ jsx15(PopoverPrimitive.Root, _object_spread({
3998
4127
  "data-slot": "popover"
3999
4128
  }, props));
4000
4129
  }
4001
4130
  function PopoverTrigger(_param) {
4002
4131
  var props = _extends({}, _object_destructuring_empty(_param));
4003
- return /* @__PURE__ */ jsx14(PopoverPrimitive.Trigger, _object_spread({
4132
+ return /* @__PURE__ */ jsx15(PopoverPrimitive.Trigger, _object_spread({
4004
4133
  "data-slot": "popover-trigger"
4005
4134
  }, props));
4006
4135
  }
@@ -4011,8 +4140,8 @@ function PopoverContent(_param) {
4011
4140
  "sideOffset",
4012
4141
  "showArrow"
4013
4142
  ]);
4014
- return /* @__PURE__ */ jsx14(PopoverPrimitive.Portal, {
4015
- children: /* @__PURE__ */ jsxs9(PopoverPrimitive.Content, _object_spread_props(_object_spread({
4143
+ return /* @__PURE__ */ jsx15(PopoverPrimitive.Portal, {
4144
+ children: /* @__PURE__ */ jsxs10(PopoverPrimitive.Content, _object_spread_props(_object_spread({
4016
4145
  "data-slot": "popover-content",
4017
4146
  align: align,
4018
4147
  sideOffset: sideOffset,
@@ -4020,7 +4149,7 @@ function PopoverContent(_param) {
4020
4149
  }, props), {
4021
4150
  children: [
4022
4151
  props.children,
4023
- showArrow && /* @__PURE__ */ jsx14(PopoverPrimitive.Arrow, {
4152
+ showArrow && /* @__PURE__ */ jsx15(PopoverPrimitive.Arrow, {
4024
4153
  className: "fill-popover -my-px drop-shadow-[0_1px_0_hsl(var(--border))]"
4025
4154
  })
4026
4155
  ]
@@ -4029,15 +4158,15 @@ function PopoverContent(_param) {
4029
4158
  }
4030
4159
  // src/components/ui/SearchSelect.tsx
4031
4160
  import { CheckIcon, ChevronDownIcon } from "lucide-react";
4032
- import { useCallback as useCallback4, useEffect as useEffect5, useId, useMemo as useMemo5, useState as useState4 } from "react";
4033
- import { jsx as jsx15, jsxs as jsxs10 } from "react/jsx-runtime";
4161
+ import { useCallback as useCallback4, useEffect as useEffect5, useId, useMemo as useMemo5, useState as useState5 } from "react";
4162
+ import { jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
4034
4163
  function SearchSelect(param) {
4035
4164
  var options = param.options, name = param.name, _param_selectPlaceholder = param.selectPlaceholder, selectPlaceholder = _param_selectPlaceholder === void 0 ? "Select" : _param_selectPlaceholder, defaultValue = param.defaultValue, _param_searchPlaceholder = param.searchPlaceholder, searchPlaceholder = _param_searchPlaceholder === void 0 ? "Search" : _param_searchPlaceholder, dropdownClassName = param.dropdownClassName, dropdownOptionClassName = param.dropdownOptionClassName, notFoundLabel = param.notFoundLabel, notFoundLabelClassName = param.notFoundLabelClassName, elementClassName = param.elementClassName, searchClassName = param.searchClassName, buttonClassName = param.buttonClassName, buttonFocusClassName = param.buttonFocusClassName, value = param.value, disabled = param.disabled, onChange = param.onChange, direction = param.direction, createNewOptionLabel = param.createNewOptionLabel, createNewOptionContainerClassName = param.createNewOptionContainerClassName;
4036
4165
  var id = useId();
4037
- var _useState4 = _sliced_to_array(useState4(false), 2), open = _useState4[0], setOpen = _useState4[1];
4038
- var _useState41 = _sliced_to_array(useState4(value || defaultValue || ""), 2), selectedValue = _useState41[0], setSelectedValue = _useState41[1];
4039
- var _useState42 = _sliced_to_array(useState4(""), 2), searchQuery = _useState42[0], setSearchQuery = _useState42[1];
4040
- var _useState43 = _sliced_to_array(useState4([]), 2), newOptions = _useState43[0], setNewOptions = _useState43[1];
4166
+ var _useState5 = _sliced_to_array(useState5(false), 2), open = _useState5[0], setOpen = _useState5[1];
4167
+ var _useState51 = _sliced_to_array(useState5(value || defaultValue || ""), 2), selectedValue = _useState51[0], setSelectedValue = _useState51[1];
4168
+ var _useState52 = _sliced_to_array(useState5(""), 2), searchQuery = _useState52[0], setSearchQuery = _useState52[1];
4169
+ var _useState53 = _sliced_to_array(useState5([]), 2), newOptions = _useState53[0], setNewOptions = _useState53[1];
4041
4170
  useEffect5(function() {
4042
4171
  setSelectedValue(value);
4043
4172
  }, [
@@ -4088,22 +4217,22 @@ function SearchSelect(param) {
4088
4217
  }, [
4089
4218
  searchQuery
4090
4219
  ]);
4091
- return /* @__PURE__ */ jsxs10("div", {
4220
+ return /* @__PURE__ */ jsxs11("div", {
4092
4221
  style: {
4093
4222
  direction: direction
4094
4223
  },
4095
4224
  className: cn("w-full", elementClassName),
4096
4225
  children: [
4097
- /* @__PURE__ */ jsxs10(Popover, {
4226
+ /* @__PURE__ */ jsxs11(Popover, {
4098
4227
  open: open,
4099
4228
  onOpenChange: function(isOpen) {
4100
4229
  setOpen(isOpen);
4101
4230
  if (!isOpen) setSearchQuery("");
4102
4231
  },
4103
4232
  children: [
4104
- /* @__PURE__ */ jsx15(PopoverTrigger, {
4233
+ /* @__PURE__ */ jsx16(PopoverTrigger, {
4105
4234
  asChild: true,
4106
- children: /* @__PURE__ */ jsxs10(Button, {
4235
+ children: /* @__PURE__ */ jsxs11(Button, {
4107
4236
  id: id,
4108
4237
  variant: "outline",
4109
4238
  role: "combobox",
@@ -4111,11 +4240,11 @@ function SearchSelect(param) {
4111
4240
  disabled: disabled,
4112
4241
  className: cn("border-input w-full justify-between px-3 font-normal outline-offset-0 outline-none focus-visible:outline-[3px]", buttonClassName, open && buttonFocusClassName),
4113
4242
  children: [
4114
- /* @__PURE__ */ jsx15("span", {
4243
+ /* @__PURE__ */ jsx16("span", {
4115
4244
  className: cn("truncate", !selectedValue && "text-muted-foreground"),
4116
4245
  children: selectLabel
4117
4246
  }),
4118
- /* @__PURE__ */ jsx15(ChevronDownIcon, {
4247
+ /* @__PURE__ */ jsx16(ChevronDownIcon, {
4119
4248
  size: 16,
4120
4249
  className: "text-muted-foreground/80 shrink-0",
4121
4250
  "aria-hidden": "true"
@@ -4123,12 +4252,12 @@ function SearchSelect(param) {
4123
4252
  ]
4124
4253
  })
4125
4254
  }),
4126
- /* @__PURE__ */ jsx15(PopoverContent, {
4255
+ /* @__PURE__ */ jsx16(PopoverContent, {
4127
4256
  className: cn("border-input w-full min-w-[var(--radix-popper-anchor-width)] p-0 bg-[#fff]"),
4128
4257
  align: "start",
4129
- children: /* @__PURE__ */ jsxs10(Command, {
4258
+ children: /* @__PURE__ */ jsxs11(Command, {
4130
4259
  children: [
4131
- /* @__PURE__ */ jsx15(CommandInput, {
4260
+ /* @__PURE__ */ jsx16(CommandInput, {
4132
4261
  style: {
4133
4262
  direction: direction
4134
4263
  },
@@ -4144,24 +4273,24 @@ function SearchSelect(param) {
4144
4273
  }
4145
4274
  }
4146
4275
  }),
4147
- /* @__PURE__ */ jsx15(CommandList, {
4148
- children: filteredOptions.length === 0 && searchQuery !== "" ? createNewOptionLabel ? /* @__PURE__ */ jsx15(CommandEmpty, {
4276
+ /* @__PURE__ */ jsx16(CommandList, {
4277
+ children: filteredOptions.length === 0 && searchQuery !== "" ? createNewOptionLabel ? /* @__PURE__ */ jsx16(CommandEmpty, {
4149
4278
  style: {
4150
4279
  direction: direction
4151
4280
  },
4152
4281
  onClick: addNewOption,
4153
4282
  className: cn("hover:bg-[#cccbcb] cursor-pointer w-full", createNewOptionContainerClassName),
4154
- children: /* @__PURE__ */ jsx15("div", {
4283
+ children: /* @__PURE__ */ jsx16("div", {
4155
4284
  className: cn("w-full h-10 flex items-center px-2", notFoundLabelClassName),
4156
4285
  children: "".concat(createNewOptionLabel, " : ").concat(searchQuery)
4157
4286
  })
4158
- }) : /* @__PURE__ */ jsx15(CommandEmpty, {
4287
+ }) : /* @__PURE__ */ jsx16(CommandEmpty, {
4159
4288
  className: cn("w-full py-2 text-center", notFoundLabelClassName),
4160
4289
  children: notFoundLabel
4161
- }) : /* @__PURE__ */ jsx15(CommandGroup, {
4290
+ }) : /* @__PURE__ */ jsx16(CommandGroup, {
4162
4291
  className: cn("max-h-52 overflow-y-auto", dropdownClassName),
4163
4292
  children: filteredOptions.map(function(option) {
4164
- return /* @__PURE__ */ jsxs10(CommandItem, {
4293
+ return /* @__PURE__ */ jsxs11(CommandItem, {
4165
4294
  className: cn("hover:bg-[#cccbcb] cursor-pointer", dropdownOptionClassName, selectedValue === option.value && "bg-[#cccbcb]"),
4166
4295
  value: JSON.stringify(option),
4167
4296
  onSelect: function(currentValue) {
@@ -4173,7 +4302,7 @@ function SearchSelect(param) {
4173
4302
  },
4174
4303
  children: [
4175
4304
  option.label,
4176
- selectedValue === option.value && /* @__PURE__ */ jsx15(CheckIcon, {
4305
+ selectedValue === option.value && /* @__PURE__ */ jsx16(CheckIcon, {
4177
4306
  size: 16,
4178
4307
  className: "ml-auto"
4179
4308
  })
@@ -4187,7 +4316,7 @@ function SearchSelect(param) {
4187
4316
  })
4188
4317
  ]
4189
4318
  }),
4190
- /* @__PURE__ */ jsx15("input", {
4319
+ /* @__PURE__ */ jsx16("input", {
4191
4320
  name: name,
4192
4321
  type: "hidden",
4193
4322
  value: selectedValue
@@ -4196,7 +4325,7 @@ function SearchSelect(param) {
4196
4325
  });
4197
4326
  }
4198
4327
  // src/components/table/components.tsx
4199
- import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs11 } from "react/jsx-runtime";
4328
+ import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
4200
4329
  var getFixedNumber = function() {
4201
4330
  var number = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, fix = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 4;
4202
4331
  var sum_value = number % 1 === 0 ? number : number.toFixed(fix).replace(/\.?0+$/, "");
@@ -4206,14 +4335,14 @@ var TableRow2 = function(param) {
4206
4335
  var item = param.item, index2 = param.index;
4207
4336
  var _useTableContext = useTableContext(), rowStyles = _useTableContext.rowStyles, rowClassName = _useTableContext.rowClassName, keysToRender = _useTableContext.keysToRender, onRowClick = _useTableContext.onRowClick, zebraStriping = _useTableContext.zebraStriping;
4208
4337
  var zebraClassName = zebraStriping ? index2 % 2 === 0 ? zebraStriping.evenRowClassName || "" : zebraStriping.oddRowClassName || "bg-gray-300" : "";
4209
- return /* @__PURE__ */ jsx16("tr", {
4338
+ return /* @__PURE__ */ jsx17("tr", {
4210
4339
  className: cn("hover:bg-[#808080] hover:text-[#fff]", zebraClassName, rowClassName || ""),
4211
4340
  onClick: function() {
4212
4341
  return onRowClick && onRowClick(item);
4213
4342
  },
4214
4343
  style: rowStyles,
4215
4344
  children: keysToRender.map(function(key, index3) {
4216
- return /* @__PURE__ */ jsx16(TableCell, {
4345
+ return /* @__PURE__ */ jsx17(TableCell, {
4217
4346
  value: item[key]
4218
4347
  }, index3);
4219
4348
  })
@@ -4222,7 +4351,7 @@ var TableRow2 = function(param) {
4222
4351
  var TableCell = function(param) {
4223
4352
  var value = param.value;
4224
4353
  var _useTableContext = useTableContext(), cellStyle = _useTableContext.cellStyle, cellClassName = _useTableContext.cellClassName;
4225
- return /* @__PURE__ */ jsx16("td", {
4354
+ return /* @__PURE__ */ jsx17("td", {
4226
4355
  title: [
4227
4356
  "string",
4228
4357
  "number",
@@ -4238,55 +4367,55 @@ var Filter = memo(function(param) {
4238
4367
  var _filters_filterableColumn_dataKey, _filters_filterableColumn_dataKey1, _filterOptions_filterableColumn_dataKey;
4239
4368
  var _useTableContext = useTableContext(), direction = _useTableContext.direction, headers = _useTableContext.headers, filters = _useTableContext.filters, filterOptions = _useTableContext.filterOptions, filterPopupsDisplay = _useTableContext.filterPopupsDisplay, handleFilterChange = _useTableContext.handleFilterChange, handleFilterClick = _useTableContext.handleFilterClick, closeFilterWindow = _useTableContext.closeFilterWindow, filterLabel = _useTableContext.filterLabel;
4240
4369
  var displayRight = direction === "rtl" && index2 === headers.length - 1 || direction === "ltr" && index2 !== headers.length - 1;
4241
- return /* @__PURE__ */ jsxs11("div", {
4370
+ return /* @__PURE__ */ jsxs12("div", {
4242
4371
  className: "absolute top-1 right-1 ",
4243
4372
  children: [
4244
- /* @__PURE__ */ jsx16("button", {
4373
+ /* @__PURE__ */ jsx17("button", {
4245
4374
  title: filterLabel + " " + filterableColumn.header,
4246
4375
  className: "text-[12px]",
4247
4376
  onClick: function() {
4248
4377
  return handleFilterClick(filterableColumn.dataKey);
4249
4378
  },
4250
- children: filterPopupsDisplay === filterableColumn.dataKey ? /* @__PURE__ */ jsx16(Fragment3, {
4251
- children: ((_filters_filterableColumn_dataKey = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey === void 0 ? void 0 : _filters_filterableColumn_dataKey.length) > 0 ? /* @__PURE__ */ jsx16(Fragment3, {
4379
+ children: filterPopupsDisplay === filterableColumn.dataKey ? /* @__PURE__ */ jsx17(Fragment3, {
4380
+ children: ((_filters_filterableColumn_dataKey = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey === void 0 ? void 0 : _filters_filterableColumn_dataKey.length) > 0 ? /* @__PURE__ */ jsx17(Fragment3, {
4252
4381
  children: slashFilterSvg(true)
4253
- }) : /* @__PURE__ */ jsx16(Fragment3, {
4382
+ }) : /* @__PURE__ */ jsx17(Fragment3, {
4254
4383
  children: emptyFilterSvg(true)
4255
4384
  })
4256
- }) : /* @__PURE__ */ jsx16(Fragment3, {
4257
- children: ((_filters_filterableColumn_dataKey1 = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey1 === void 0 ? void 0 : _filters_filterableColumn_dataKey1.length) > 0 ? /* @__PURE__ */ jsx16(Fragment3, {
4385
+ }) : /* @__PURE__ */ jsx17(Fragment3, {
4386
+ children: ((_filters_filterableColumn_dataKey1 = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey1 === void 0 ? void 0 : _filters_filterableColumn_dataKey1.length) > 0 ? /* @__PURE__ */ jsx17(Fragment3, {
4258
4387
  children: slashFilterSvg()
4259
- }) : /* @__PURE__ */ jsx16(Fragment3, {
4388
+ }) : /* @__PURE__ */ jsx17(Fragment3, {
4260
4389
  children: emptyFilterSvg()
4261
4390
  })
4262
4391
  })
4263
4392
  }),
4264
- /* @__PURE__ */ jsx16("div", {
4393
+ /* @__PURE__ */ jsx17("div", {
4265
4394
  className: "relative",
4266
- children: filterPopupsDisplay === filterableColumn.dataKey && /* @__PURE__ */ jsxs11("div", {
4395
+ children: filterPopupsDisplay === filterableColumn.dataKey && /* @__PURE__ */ jsxs12("div", {
4267
4396
  className: "absolute top-[-20px] z-20 ".concat(displayRight ? " left-[100%]" : "right-[100%]", " w-44 h-52 text-black bg-white p-1 flex flex-col items-center gap-2 shadow"),
4268
4397
  children: [
4269
- /* @__PURE__ */ jsxs11("div", {
4398
+ /* @__PURE__ */ jsxs12("div", {
4270
4399
  className: "flex justify-between items-center border-black border-b-[1px] w-[90%]",
4271
4400
  children: [
4272
- /* @__PURE__ */ jsx16("div", {
4401
+ /* @__PURE__ */ jsx17("div", {
4273
4402
  className: "text-start",
4274
4403
  children: filterLabel + " " + filterableColumn.header
4275
4404
  }),
4276
- /* @__PURE__ */ jsx16("button", {
4405
+ /* @__PURE__ */ jsx17("button", {
4277
4406
  onClick: closeFilterWindow,
4278
- children: /* @__PURE__ */ jsx16(RedXSvg2, {})
4407
+ children: /* @__PURE__ */ jsx17(RedXSvg2, {})
4279
4408
  })
4280
4409
  ]
4281
4410
  }),
4282
- /* @__PURE__ */ jsx16("div", {
4411
+ /* @__PURE__ */ jsx17("div", {
4283
4412
  className: "overflow-auto h-[80%] flex flex-col gap-1 w-full cursor-pointer ",
4284
4413
  children: (_filterOptions_filterableColumn_dataKey = filterOptions[filterableColumn.dataKey]) === null || _filterOptions_filterableColumn_dataKey === void 0 ? void 0 : _filterOptions_filterableColumn_dataKey.map(function(option, i) {
4285
4414
  var _filters_filterableColumn_dataKey;
4286
- return /* @__PURE__ */ jsxs11("div", {
4415
+ return /* @__PURE__ */ jsxs12("div", {
4287
4416
  className: "flex items-center px-2 justify-start hover:bg-[#547f22] hover:text-white",
4288
4417
  children: [
4289
- /* @__PURE__ */ jsx16("input", {
4418
+ /* @__PURE__ */ jsx17("input", {
4290
4419
  type: "checkbox",
4291
4420
  className: "cursor-pointer",
4292
4421
  checked: (_filters_filterableColumn_dataKey = filters[filterableColumn.dataKey]) === null || _filters_filterableColumn_dataKey === void 0 ? void 0 : _filters_filterableColumn_dataKey.includes(option),
@@ -4294,7 +4423,7 @@ var Filter = memo(function(param) {
4294
4423
  return handleFilterChange(filterableColumn.dataKey, option);
4295
4424
  }
4296
4425
  }),
4297
- /* @__PURE__ */ jsx16("button", {
4426
+ /* @__PURE__ */ jsx17("button", {
4298
4427
  className: "flex-1 text-start px-2",
4299
4428
  onClick: function() {
4300
4429
  return handleFilterChange(filterableColumn.dataKey, option);
@@ -4318,32 +4447,32 @@ var TableHead = memo(function() {
4318
4447
  }, [
4319
4448
  sortKeys
4320
4449
  ]);
4321
- return /* @__PURE__ */ jsx16("thead", {
4450
+ return /* @__PURE__ */ jsx17("thead", {
4322
4451
  className: cn("bg-[#282828] text-white sticky top-0", headerClassName),
4323
- children: /* @__PURE__ */ jsx16("tr", {
4452
+ children: /* @__PURE__ */ jsx17("tr", {
4324
4453
  style: headerStyle,
4325
4454
  children: headers.map(function(header, index2) {
4326
4455
  var filterableColumn = filterableColumns.find(function(col) {
4327
4456
  return col.header === header;
4328
4457
  });
4329
- return /* @__PURE__ */ jsxs11("th", {
4458
+ return /* @__PURE__ */ jsxs12("th", {
4330
4459
  title: sortDisplay ? "".concat(sortLabel, " ").concat(header) : header,
4331
4460
  style: headerCellStyle,
4332
4461
  className: cn("border-black border-[1px] max-w-[130px] px-2 text-center relative", headerCellClassName),
4333
4462
  children: [
4334
- /* @__PURE__ */ jsx16("div", {
4463
+ /* @__PURE__ */ jsx17("div", {
4335
4464
  className: "px-2 ".concat(sortDisplay ? "cursor-pointer" : ""),
4336
4465
  onClick: function() {
4337
4466
  return sortDisplay && handleSort(index2);
4338
4467
  },
4339
4468
  children: header
4340
4469
  }),
4341
- sortDisplay && sortColumn === index2 && (sortOrder === "desc" ? /* @__PURE__ */ jsx16(Fragment3, {
4470
+ sortDisplay && sortColumn === index2 && (sortOrder === "desc" ? /* @__PURE__ */ jsx17(Fragment3, {
4342
4471
  children: sortSvg()
4343
- }) : /* @__PURE__ */ jsx16(Fragment3, {
4472
+ }) : /* @__PURE__ */ jsx17(Fragment3, {
4344
4473
  children: sortSvg(true)
4345
4474
  })),
4346
- filterableColumn && /* @__PURE__ */ jsx16(Filter, {
4475
+ filterableColumn && /* @__PURE__ */ jsx17(Filter, {
4347
4476
  filterableColumn: filterableColumn,
4348
4477
  index: index2
4349
4478
  })
@@ -4355,10 +4484,10 @@ var TableHead = memo(function() {
4355
4484
  }, renderOnce);
4356
4485
  var TableBody = memo(function() {
4357
4486
  var dataToRender = useTableContext().dataToRender;
4358
- return /* @__PURE__ */ jsx16("tbody", {
4487
+ return /* @__PURE__ */ jsx17("tbody", {
4359
4488
  className: "divide-y divide-gray-600",
4360
4489
  children: dataToRender.renderedData.map(function(item, index2) {
4361
- return /* @__PURE__ */ jsx16(TableRow2, {
4490
+ return /* @__PURE__ */ jsx17(TableRow2, {
4362
4491
  item: item,
4363
4492
  index: index2
4364
4493
  }, index2);
@@ -4367,19 +4496,19 @@ var TableBody = memo(function() {
4367
4496
  }, renderOnce);
4368
4497
  var MaxRowsLabel = memo(function() {
4369
4498
  var _useTableContext = useTableContext(), data = _useTableContext.data, dataToRender = _useTableContext.dataToRender, maxRowsLabel1 = _useTableContext.maxRowsLabel1, maxRowsLabel2 = _useTableContext.maxRowsLabel2, maxRows = _useTableContext.maxRows, maxRowsContainerClassName = _useTableContext.maxRowsContainerClassName;
4370
- return /* @__PURE__ */ jsxs11("div", {
4499
+ return /* @__PURE__ */ jsxs12("div", {
4371
4500
  className: cn("flex justify-start items-center text-lg gap-1", maxRowsContainerClassName || ""),
4372
4501
  children: [
4373
- /* @__PURE__ */ jsx16("div", {
4502
+ /* @__PURE__ */ jsx17("div", {
4374
4503
  children: maxRowsLabel1
4375
4504
  }),
4376
- /* @__PURE__ */ jsx16("div", {
4505
+ /* @__PURE__ */ jsx17("div", {
4377
4506
  children: maxRows > dataToRender.renderedData.length ? dataToRender.renderedData.length : maxRows
4378
4507
  }),
4379
- /* @__PURE__ */ jsx16("div", {
4508
+ /* @__PURE__ */ jsx17("div", {
4380
4509
  children: maxRowsLabel2
4381
4510
  }),
4382
- /* @__PURE__ */ jsx16("div", {
4511
+ /* @__PURE__ */ jsx17("div", {
4383
4512
  children: dataToRender.filtered.length
4384
4513
  })
4385
4514
  ]
@@ -4458,7 +4587,7 @@ var ExportToExcel = memo(function() {
4458
4587
  return _ref.apply(this, arguments);
4459
4588
  };
4460
4589
  }();
4461
- return /* @__PURE__ */ jsx16("button", {
4590
+ return /* @__PURE__ */ jsx17("button", {
4462
4591
  onClick: onExportExcelClick,
4463
4592
  title: exportExcelTitle,
4464
4593
  className: cn("px-2 py-[2px] bg-[#547f22] text-white rounded-lg text-[16px]", exportToExcelClassName),
@@ -4467,7 +4596,7 @@ var ExportToExcel = memo(function() {
4467
4596
  }, renderOnce);
4468
4597
  var Search = memo(function() {
4469
4598
  var _useTableContext = useTableContext(), searchQuery = _useTableContext.searchQuery, handleSearch = _useTableContext.handleSearch, searchPlaceHolder = _useTableContext.searchPlaceHolder, searchInputClassName = _useTableContext.searchInputClassName, searchInputStyle = _useTableContext.searchInputStyle;
4470
- return /* @__PURE__ */ jsx16("input", {
4599
+ return /* @__PURE__ */ jsx17("input", {
4471
4600
  className: cn("w-40 border-black border-[1px] text-lg px-2 ", searchInputClassName),
4472
4601
  type: "text",
4473
4602
  placeholder: searchPlaceHolder,
@@ -4478,17 +4607,17 @@ var Search = memo(function() {
4478
4607
  }, renderOnce);
4479
4608
  var Summary = memo(function() {
4480
4609
  var _useTableContext = useTableContext(), summaryContainerStyle = _useTableContext.summaryContainerStyle, summaryLabelStyle = _useTableContext.summaryLabelStyle, summaryLabel = _useTableContext.summaryLabel, summaryRowStyle = _useTableContext.summaryRowStyle, sumColumns = _useTableContext.sumColumns, dataToRender = _useTableContext.dataToRender, direction = _useTableContext.direction;
4481
- return /* @__PURE__ */ jsxs11("div", {
4610
+ return /* @__PURE__ */ jsxs12("div", {
4482
4611
  style: _object_spread_props(_object_spread({}, summaryContainerStyle), {
4483
4612
  direction: direction
4484
4613
  }),
4485
4614
  className: "w-full h-8 flex justify-between items-center px-3 text-[18px] font-bold",
4486
4615
  children: [
4487
- /* @__PURE__ */ jsx16("div", {
4616
+ /* @__PURE__ */ jsx17("div", {
4488
4617
  style: summaryLabelStyle,
4489
4618
  children: summaryLabel
4490
4619
  }),
4491
- /* @__PURE__ */ jsx16("div", {
4620
+ /* @__PURE__ */ jsx17("div", {
4492
4621
  style: summaryRowStyle,
4493
4622
  className: "flex gap-3",
4494
4623
  children: sumColumns.map(function(val) {
@@ -4496,16 +4625,16 @@ var Summary = memo(function() {
4496
4625
  return acc + Number(v[val.dataKey]) || 0;
4497
4626
  }, 0);
4498
4627
  var sum_value = getFixedNumber(sum_res);
4499
- return /* @__PURE__ */ jsxs11("div", {
4628
+ return /* @__PURE__ */ jsxs12("div", {
4500
4629
  className: "flex gap-1 justify-start",
4501
4630
  children: [
4502
- /* @__PURE__ */ jsx16("div", {
4631
+ /* @__PURE__ */ jsx17("div", {
4503
4632
  children: val.label
4504
4633
  }),
4505
- /* @__PURE__ */ jsx16("span", {
4634
+ /* @__PURE__ */ jsx17("span", {
4506
4635
  children: ":"
4507
4636
  }),
4508
- /* @__PURE__ */ jsx16("div", {
4637
+ /* @__PURE__ */ jsx17("div", {
4509
4638
  children: val.ui ? val.ui(sum_value) : sum_value
4510
4639
  })
4511
4640
  ]
@@ -4522,7 +4651,7 @@ var TimesUI = function(param) {
4522
4651
  fromFormat: fromFormat,
4523
4652
  tz: tz
4524
4653
  });
4525
- return /* @__PURE__ */ jsx16("div", {
4654
+ return /* @__PURE__ */ jsx17("div", {
4526
4655
  style: {
4527
4656
  direction: "ltr"
4528
4657
  },
@@ -4538,22 +4667,22 @@ var TableButton = function(param) {
4538
4667
  edit: "fa-light fa-pen-to-square text-xl",
4539
4668
  delete: "fa-light fa-trash text-xl"
4540
4669
  };
4541
- return /* @__PURE__ */ jsx16(Fragment3, {
4542
- children: type === "custom" ? /* @__PURE__ */ jsx16("button", {
4670
+ return /* @__PURE__ */ jsx17(Fragment3, {
4671
+ children: type === "custom" ? /* @__PURE__ */ jsx17("button", {
4543
4672
  className: className,
4544
4673
  title: title,
4545
4674
  onClick: onClick,
4546
4675
  children: children
4547
- }) : type === "add" ? /* @__PURE__ */ jsx16(Button, {
4676
+ }) : type === "add" ? /* @__PURE__ */ jsx17(Button, {
4548
4677
  title: title,
4549
4678
  onClick: onClick,
4550
- children: /* @__PURE__ */ jsx16("i", {
4679
+ children: /* @__PURE__ */ jsx17("i", {
4551
4680
  className: cn("fa-regular fa-plus text-2xl", className)
4552
4681
  })
4553
- }) : /* @__PURE__ */ jsx16("button", {
4682
+ }) : /* @__PURE__ */ jsx17("button", {
4554
4683
  title: title,
4555
4684
  onClick: onClick,
4556
- children: /* @__PURE__ */ jsx16("i", {
4685
+ children: /* @__PURE__ */ jsx17("i", {
4557
4686
  className: cn(icon[type], className)
4558
4687
  })
4559
4688
  })
@@ -4582,14 +4711,14 @@ var DurationUI = function(param) {
4582
4711
  }, [
4583
4712
  duration
4584
4713
  ]), daysStr = _useMemo6.daysStr, hoursStr = _useMemo6.hoursStr, minutesStr = _useMemo6.minutesStr, secondsStr = _useMemo6.secondsStr;
4585
- return /* @__PURE__ */ jsxs11("div", {
4714
+ return /* @__PURE__ */ jsxs12("div", {
4586
4715
  title: "".concat(daysStr, " ").concat(daysLabel, " ").concat(hoursStr, " ").concat(hoursLabel, " ").concat(minutesStr, " ").concat(minutesLabel, " ").concat(secondsStr, " ").concat(secondsLabel).trim(),
4587
4716
  style: {
4588
4717
  direction: "ltr"
4589
4718
  },
4590
4719
  className: cn("flex gap-1 ".concat(direction === "rtl" ? "justify-end" : "justify-start"), className),
4591
4720
  children: [
4592
- daysStr !== "00" && /* @__PURE__ */ jsxs11("span", {
4721
+ daysStr !== "00" && /* @__PURE__ */ jsxs12("span", {
4593
4722
  style: {
4594
4723
  display: "inline-block"
4595
4724
  },
@@ -4599,7 +4728,7 @@ var DurationUI = function(param) {
4599
4728
  daysLabel
4600
4729
  ]
4601
4730
  }),
4602
- hoursStr !== "00" && /* @__PURE__ */ jsxs11("span", {
4731
+ hoursStr !== "00" && /* @__PURE__ */ jsxs12("span", {
4603
4732
  style: {
4604
4733
  display: "inline-block"
4605
4734
  },
@@ -4609,7 +4738,7 @@ var DurationUI = function(param) {
4609
4738
  hoursLabel
4610
4739
  ]
4611
4740
  }),
4612
- minutesStr !== "00" && /* @__PURE__ */ jsxs11("span", {
4741
+ minutesStr !== "00" && /* @__PURE__ */ jsxs12("span", {
4613
4742
  style: {
4614
4743
  display: "inline-block"
4615
4744
  },
@@ -4619,7 +4748,7 @@ var DurationUI = function(param) {
4619
4748
  minutesLabel
4620
4749
  ]
4621
4750
  }),
4622
- secondsStr !== "00" && /* @__PURE__ */ jsxs11("span", {
4751
+ secondsStr !== "00" && /* @__PURE__ */ jsxs12("span", {
4623
4752
  style: {
4624
4753
  display: "inline-block"
4625
4754
  },
@@ -4634,7 +4763,7 @@ var DurationUI = function(param) {
4634
4763
  };
4635
4764
  var PhoneUI = function(param) {
4636
4765
  var phone = param.phone, direction = param.direction, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
4637
- return /* @__PURE__ */ jsx16("div", {
4766
+ return /* @__PURE__ */ jsx17("div", {
4638
4767
  style: {
4639
4768
  direction: "ltr"
4640
4769
  },
@@ -4645,9 +4774,9 @@ var PhoneUI = function(param) {
4645
4774
  };
4646
4775
  var BooleanUi = function(param) {
4647
4776
  var value = param.value, size3 = param.size, className = param.className, falseUi = param.falseUi, trueUi = param.trueUi;
4648
- return value ? trueUi !== null && trueUi !== void 0 ? trueUi : /* @__PURE__ */ jsx16("i", {
4777
+ return value ? trueUi !== null && trueUi !== void 0 ? trueUi : /* @__PURE__ */ jsx17("i", {
4649
4778
  className: cn("fa-light fa-check ".concat(size3 === "small" ? "text-lg" : "text-2xl"), className)
4650
- }) : falseUi !== null && falseUi !== void 0 ? falseUi : /* @__PURE__ */ jsx16("i", {
4779
+ }) : falseUi !== null && falseUi !== void 0 ? falseUi : /* @__PURE__ */ jsx17("i", {
4651
4780
  className: cn("fa-light fa-xmark ".concat(size3 === "small" ? "text-lg" : "text-2xl"), className)
4652
4781
  });
4653
4782
  };
@@ -4657,7 +4786,7 @@ var GeoUi = function(param) {
4657
4786
  var lat = value.lat || value.latitude;
4658
4787
  var googleMapsLink = getLocationUrl(lang, lat);
4659
4788
  var langLatUi = linkUi || " ".concat(lang, " ").concat(lat);
4660
- return /* @__PURE__ */ jsx16("a", {
4789
+ return /* @__PURE__ */ jsx17("a", {
4661
4790
  href: googleMapsLink,
4662
4791
  target: "_blank",
4663
4792
  className: cn("_ellipsis text-blue-500 hover:text-blue-700 underline", className),
@@ -4667,7 +4796,7 @@ var GeoUi = function(param) {
4667
4796
  };
4668
4797
  var NumberUI = function(param) {
4669
4798
  var number = param.number, direction = param.direction, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className;
4670
- return /* @__PURE__ */ jsx16("div", {
4799
+ return /* @__PURE__ */ jsx17("div", {
4671
4800
  style: {
4672
4801
  direction: "ltr"
4673
4802
  },
@@ -4677,15 +4806,15 @@ var NumberUI = function(param) {
4677
4806
  });
4678
4807
  };
4679
4808
  // src/components/forms/ModularForm/ModularForm.tsx
4680
- import { cloneElement, useState as useState7 } from "react";
4809
+ import { cloneElement, useState as useState8 } from "react";
4681
4810
  // src/components/forms/ModularForm/formElements.tsx
4682
- import { useCallback as useCallback5, useMemo as useMemo8, useState as useState6 } from "react";
4811
+ import { useCallback as useCallback5, useMemo as useMemo8, useState as useState7 } from "react";
4683
4812
  // src/components/forms/ModularForm/InternationalPhonePicker.tsx
4684
4813
  import { ChevronDown, Phone } from "lucide-react";
4685
- import { forwardRef as forwardRef7, useEffect as useEffect6, useMemo as useMemo7, useRef as useRef4, useState as useState5 } from "react";
4814
+ import { forwardRef as forwardRef7, useEffect as useEffect6, useMemo as useMemo7, useRef as useRef4, useState as useState6 } from "react";
4686
4815
  import * as RPNInput from "react-phone-number-input";
4687
4816
  import flags from "react-phone-number-input/flags";
4688
- import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
4817
+ import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
4689
4818
  function InternationalPhonePicker(param) {
4690
4819
  var setPhoneValue = param.setPhoneValue, _param_phoneValue = param.phoneValue, phoneValue = _param_phoneValue === void 0 ? "" : _param_phoneValue, _param_placeholder = param.placeholder, placeholder = _param_placeholder === void 0 ? "" : _param_placeholder, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_defaultCountry = param.defaultCountry, defaultCountry = _param_defaultCountry === void 0 ? "IL" : _param_defaultCountry, _param_flagContainerClassName = param.flagContainerClassName, flagContainerClassName = _param_flagContainerClassName === void 0 ? "" : _param_flagContainerClassName, _param_inputClassName = param.inputClassName, inputClassName = _param_inputClassName === void 0 ? "" : _param_inputClassName, defaultValue = param.defaultValue, name = param.name, style = param.style, onEnter = param.onEnter, labelContent = param.labelContent, labelClassName = param.labelClassName, required = param.required, direction = param.direction;
4691
4820
  var handleKeyDown = function(e) {
@@ -4695,7 +4824,7 @@ function InternationalPhonePicker(param) {
4695
4824
  }
4696
4825
  }
4697
4826
  };
4698
- var _useState5 = _sliced_to_array(useState5(""), 2), tempPhoneValue = _useState5[0], setTempPhoneValue = _useState5[1];
4827
+ var _useState6 = _sliced_to_array(useState6(""), 2), tempPhoneValue = _useState6[0], setTempPhoneValue = _useState6[1];
4699
4828
  useEffect6(function() {
4700
4829
  if (defaultValue) {
4701
4830
  if (setPhoneValue) {
@@ -4708,19 +4837,19 @@ function InternationalPhonePicker(param) {
4708
4837
  defaultValue,
4709
4838
  setPhoneValue
4710
4839
  ]);
4711
- return /* @__PURE__ */ jsxs12("div", {
4840
+ return /* @__PURE__ */ jsxs13("div", {
4712
4841
  style: {
4713
4842
  direction: direction
4714
4843
  },
4715
4844
  className: cn("space-y-2", "".concat(labelContent ? "flex gap-1 items-center" : ""), containerClassName),
4716
4845
  children: [
4717
- labelContent && /* @__PURE__ */ jsx17(ElementLabel, {
4846
+ labelContent && /* @__PURE__ */ jsx18(ElementLabel, {
4718
4847
  labelContent: labelContent,
4719
4848
  labelClassName: labelClassName,
4720
4849
  name: name,
4721
4850
  required: required
4722
4851
  }),
4723
- /* @__PURE__ */ jsx17(RPNInput.default, {
4852
+ /* @__PURE__ */ jsx18(RPNInput.default, {
4724
4853
  style: {
4725
4854
  direction: "ltr"
4726
4855
  },
@@ -4753,7 +4882,7 @@ function InternationalPhonePicker(param) {
4753
4882
  setTempPhoneValue(newValue !== null && newValue !== void 0 ? newValue : "");
4754
4883
  }
4755
4884
  }),
4756
- /* @__PURE__ */ jsx17("input", {
4885
+ /* @__PURE__ */ jsx18("input", {
4757
4886
  type: "hidden",
4758
4887
  name: name,
4759
4888
  value: tempPhoneValue
@@ -4774,7 +4903,7 @@ var PhoneInput = forwardRef7(function(_param, ref) {
4774
4903
  inputRef.current.focus();
4775
4904
  }
4776
4905
  }, []);
4777
- return /* @__PURE__ */ jsx17(Input, _object_spread({
4906
+ return /* @__PURE__ */ jsx18(Input, _object_spread({
4778
4907
  className: cn("-ms-px rounded-s-none shadow-none focus-visible:z-10 h-full", className),
4779
4908
  onKeyDown: onKeyDown,
4780
4909
  defaultValue: defaultValue,
@@ -4798,21 +4927,21 @@ var CountrySelect = function(param) {
4798
4927
  var originalClassName = useMemo7(function() {
4799
4928
  return "relative inline-flex items-center self-stretch rounded-s-lg border border-input bg-background py-2 pe-2 ps-3 text-muted-foreground transition-shadow focus-within:z-10 focus-within:border-ring focus-within:outline-none focus-within:ring-[3px] focus-within:ring-ring/20 hover:bg-accent hover:text-foreground has-[:disabled]:pointer-events-none has-[:disabled]:opacity-50";
4800
4929
  }, []);
4801
- return /* @__PURE__ */ jsxs12("div", {
4930
+ return /* @__PURE__ */ jsxs13("div", {
4802
4931
  className: cn(originalClassName, className),
4803
4932
  children: [
4804
- /* @__PURE__ */ jsxs12("div", {
4933
+ /* @__PURE__ */ jsxs13("div", {
4805
4934
  className: "inline-flex items-center gap-1",
4806
4935
  "aria-hidden": "true",
4807
4936
  children: [
4808
- /* @__PURE__ */ jsx17(FlagComponent, {
4937
+ /* @__PURE__ */ jsx18(FlagComponent, {
4809
4938
  country: value,
4810
4939
  countryName: value,
4811
4940
  "aria-hidden": "true"
4812
4941
  }),
4813
- /* @__PURE__ */ jsx17("span", {
4942
+ /* @__PURE__ */ jsx18("span", {
4814
4943
  className: "text-muted-foreground/80",
4815
- children: /* @__PURE__ */ jsx17(ChevronDown, {
4944
+ children: /* @__PURE__ */ jsx18(ChevronDown, {
4816
4945
  size: 16,
4817
4946
  strokeWidth: 2,
4818
4947
  "aria-hidden": "true"
@@ -4820,7 +4949,7 @@ var CountrySelect = function(param) {
4820
4949
  })
4821
4950
  ]
4822
4951
  }),
4823
- /* @__PURE__ */ jsx17("select", {
4952
+ /* @__PURE__ */ jsx18("select", {
4824
4953
  disabled: disabled,
4825
4954
  value: value,
4826
4955
  onChange: handleSelect,
@@ -4830,7 +4959,7 @@ var CountrySelect = function(param) {
4830
4959
  return x.value;
4831
4960
  }).map(function(option, i) {
4832
4961
  var _option_value;
4833
- return /* @__PURE__ */ jsxs12("option", {
4962
+ return /* @__PURE__ */ jsxs13("option", {
4834
4963
  className: "text-black",
4835
4964
  value: option.value,
4836
4965
  children: [
@@ -4847,18 +4976,18 @@ var CountrySelect = function(param) {
4847
4976
  var FlagComponent = function(param) {
4848
4977
  var country = param.country, countryName = param.countryName;
4849
4978
  var Flag = flags[country];
4850
- return /* @__PURE__ */ jsx17("span", {
4979
+ return /* @__PURE__ */ jsx18("span", {
4851
4980
  className: "w-5 overflow-hidden rounded-sm",
4852
- children: Flag ? /* @__PURE__ */ jsx17(Flag, {
4981
+ children: Flag ? /* @__PURE__ */ jsx18(Flag, {
4853
4982
  title: countryName
4854
- }) : /* @__PURE__ */ jsx17(Phone, {
4983
+ }) : /* @__PURE__ */ jsx18(Phone, {
4855
4984
  size: 16,
4856
4985
  "aria-hidden": "true"
4857
4986
  })
4858
4987
  });
4859
4988
  };
4860
4989
  // src/components/forms/ModularForm/formElements.tsx
4861
- import { jsx as jsx18, jsxs as jsxs13 } from "react/jsx-runtime";
4990
+ import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
4862
4991
  var useSortValues = function(options, sortDirection, sortAsNumber) {
4863
4992
  var sortOptions = useMemo8(function() {
4864
4993
  var sorted = sortAsNumber ? options.sort(function(a, b) {
@@ -4889,17 +5018,17 @@ var InputContainer = function(param) {
4889
5018
  }, [
4890
5019
  handleChangeFunction
4891
5020
  ]);
4892
- return /* @__PURE__ */ jsxs13("div", {
5021
+ return /* @__PURE__ */ jsxs14("div", {
4893
5022
  className: cn("center", containerClassName),
4894
5023
  children: [
4895
- labelContent && /* @__PURE__ */ jsx18(ElementLabel, {
5024
+ labelContent && /* @__PURE__ */ jsx19(ElementLabel, {
4896
5025
  direction: direction,
4897
5026
  labelContent: labelContent,
4898
5027
  labelClassName: labelClassName,
4899
5028
  name: name,
4900
5029
  required: required
4901
5030
  }),
4902
- /* @__PURE__ */ jsx18("input", _object_spread_props(_object_spread(_object_spread_props(_object_spread({}, props), {
5031
+ /* @__PURE__ */ jsx19("input", _object_spread_props(_object_spread(_object_spread_props(_object_spread({}, props), {
4903
5032
  minLength: minLength,
4904
5033
  placeholder: placeholder,
4905
5034
  className: cn("w-[70%] bg-inherit border-b-[1px] border-black px-2", elementClassName),
@@ -4921,44 +5050,44 @@ var SelectContainer = function(param) {
4921
5050
  var _param_name = param.name, name = _param_name === void 0 ? "" : _param_name, _param_labelContent = param.labelContent, labelContent = _param_labelContent === void 0 ? "" : _param_labelContent, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_labelClassName = param.labelClassName, labelClassName = _param_labelClassName === void 0 ? "" : _param_labelClassName, _param_defaultValue = param.defaultValue, defaultValue = _param_defaultValue === void 0 ? "" : _param_defaultValue, _param_elementClassName = param.elementClassName, elementClassName = _param_elementClassName === void 0 ? "" : _param_elementClassName, _param_optionClassName = param.optionClassName, optionClassName = _param_optionClassName === void 0 ? "" : _param_optionClassName, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, _param_optionsContainerClassName = param.optionsContainerClassName, optionsContainerClassName = _param_optionsContainerClassName === void 0 ? "" : _param_optionsContainerClassName, _param_sortDirection = param.sortDirection, sortDirection = _param_sortDirection === void 0 ? "abc" : _param_sortDirection, sortAsNumber = param.sortAsNumber, direction = param.direction, onChange = param.onChange;
4922
5051
  var _sortOptions_, _options_find;
4923
5052
  var sortOptions = useSortValues(options, sortDirection, sortAsNumber);
4924
- var _useState6 = _sliced_to_array(useState6(false), 2), isOpen = _useState6[0], setIsOpen = _useState6[1];
4925
- var _useState61 = _sliced_to_array(useState6(defaultValue || ((_sortOptions_ = sortOptions[0]) === null || _sortOptions_ === void 0 ? void 0 : _sortOptions_.value) || ""), 2), selectedValue = _useState61[0], setSelectedValue = _useState61[1];
5053
+ var _useState7 = _sliced_to_array(useState7(false), 2), isOpen = _useState7[0], setIsOpen = _useState7[1];
5054
+ var _useState71 = _sliced_to_array(useState7(defaultValue || ((_sortOptions_ = sortOptions[0]) === null || _sortOptions_ === void 0 ? void 0 : _sortOptions_.value) || ""), 2), selectedValue = _useState71[0], setSelectedValue = _useState71[1];
4926
5055
  var handleOptionClick = function(value) {
4927
5056
  setSelectedValue(value);
4928
5057
  onChange === null || onChange === void 0 ? void 0 : onChange(value);
4929
5058
  setIsOpen(false);
4930
5059
  };
4931
- return /* @__PURE__ */ jsxs13("div", {
5060
+ return /* @__PURE__ */ jsxs14("div", {
4932
5061
  className: cn("center", containerClassName),
4933
5062
  children: [
4934
- labelContent && /* @__PURE__ */ jsx18(ElementLabel, {
5063
+ labelContent && /* @__PURE__ */ jsx19(ElementLabel, {
4935
5064
  direction: direction,
4936
5065
  labelContent: labelContent,
4937
5066
  labelClassName: labelClassName,
4938
5067
  name: name,
4939
5068
  required: required
4940
5069
  }),
4941
- /* @__PURE__ */ jsxs13("div", {
5070
+ /* @__PURE__ */ jsxs14("div", {
4942
5071
  className: cn("w-[70%] relative", elementClassName),
4943
5072
  onClick: function() {
4944
5073
  return setIsOpen(!isOpen);
4945
5074
  },
4946
5075
  children: [
4947
- /* @__PURE__ */ jsx18("div", {
5076
+ /* @__PURE__ */ jsx19("div", {
4948
5077
  className: "border-b-[1px] border-black max-h-6 cursor-pointer",
4949
5078
  children: ((_options_find = options.find(function(opt) {
4950
5079
  return opt.value === selectedValue;
4951
5080
  })) === null || _options_find === void 0 ? void 0 : _options_find.label) || selectedValue
4952
5081
  }),
4953
- isOpen ? /* @__PURE__ */ jsx18("i", {
5082
+ isOpen ? /* @__PURE__ */ jsx19("i", {
4954
5083
  className: "fa-light fa-chevron-up absolute top-[1px] left-1 cursor-pointer"
4955
- }) : /* @__PURE__ */ jsx18("i", {
5084
+ }) : /* @__PURE__ */ jsx19("i", {
4956
5085
  className: "fa-light fa-chevron-down absolute top-[1px] left-1 cursor-pointer"
4957
5086
  }),
4958
- isOpen && /* @__PURE__ */ jsx18("div", {
5087
+ isOpen && /* @__PURE__ */ jsx19("div", {
4959
5088
  className: cn("absolute w-full bg-white border border-gray-300 max-h-32 overflow-y-auto z-10", optionsContainerClassName),
4960
5089
  children: sortOptions.map(function(option) {
4961
- return /* @__PURE__ */ jsx18("div", {
5090
+ return /* @__PURE__ */ jsx19("div", {
4962
5091
  className: "p-2 cursor-pointer hover:bg-gray-200 ".concat(optionClassName),
4963
5092
  onClick: function() {
4964
5093
  return handleOptionClick(option.value);
@@ -4967,7 +5096,7 @@ var SelectContainer = function(param) {
4967
5096
  }, option.value);
4968
5097
  })
4969
5098
  }),
4970
- /* @__PURE__ */ jsx18("input", {
5099
+ /* @__PURE__ */ jsx19("input", {
4971
5100
  value: selectedValue,
4972
5101
  type: "hidden",
4973
5102
  name: name,
@@ -4981,17 +5110,17 @@ var SelectContainer = function(param) {
4981
5110
  function MultiSelect(param) {
4982
5111
  var onChange = param.onChange, selectedOptions = param.selectedOptions, emptyOptionsElement = param.emptyOptionsElement, unremovableOptions = param.unremovableOptions, _param_options = param.options, options = _param_options === void 0 ? [] : _param_options, _param_styles = param.styles, styles = _param_styles === void 0 ? {} : _param_styles, _param_name = param.name, name = _param_name === void 0 ? "multipleSelect" : _param_name, _param_placeholder = param.placeholder, placeholder = _param_placeholder === void 0 ? "Select items" : _param_placeholder, labelContent = param.labelContent, required = param.required, labelClassName = param.labelClassName, groupBy = param.groupBy, onSearch = param.onSearch, onSearchSync = param.onSearchSync, triggerSearchOnFocus = param.triggerSearchOnFocus, _param_sortDirection = param.sortDirection, sortDirection = _param_sortDirection === void 0 ? "abc" : _param_sortDirection, sortAsNumber = param.sortAsNumber, direction = param.direction, createNewOptionLabel = param.createNewOptionLabel, searchInputProps = param.searchInputProps;
4983
5112
  var sortOptions = useSortValues(options, sortDirection, sortAsNumber);
4984
- return /* @__PURE__ */ jsxs13("div", {
5113
+ return /* @__PURE__ */ jsxs14("div", {
4985
5114
  className: cn("".concat(labelContent ? "flex gap-1 items-center" : ""), styles.containerClassName),
4986
5115
  children: [
4987
- labelContent && /* @__PURE__ */ jsx18(ElementLabel, {
5116
+ labelContent && /* @__PURE__ */ jsx19(ElementLabel, {
4988
5117
  direction: direction,
4989
5118
  labelContent: labelContent,
4990
5119
  labelClassName: labelClassName,
4991
5120
  name: name,
4992
5121
  required: required
4993
5122
  }),
4994
- /* @__PURE__ */ jsx18(multiselect_default, {
5123
+ /* @__PURE__ */ jsx19(multiselect_default, {
4995
5124
  commandProps: {
4996
5125
  label: placeholder
4997
5126
  },
@@ -5012,7 +5141,7 @@ function MultiSelect(param) {
5012
5141
  className: styles.className,
5013
5142
  dropdownClassName: styles.dropdownClassName,
5014
5143
  dropdownOptionClassName: styles.dropdownOptionClassName,
5015
- emptyIndicator: emptyOptionsElement || /* @__PURE__ */ jsx18("p", {
5144
+ emptyIndicator: emptyOptionsElement || /* @__PURE__ */ jsx19("p", {
5016
5145
  className: "text-center text-sm",
5017
5146
  children: "all options selected."
5018
5147
  }),
@@ -5026,17 +5155,17 @@ function MultiSelect(param) {
5026
5155
  var SelectWithSearch = function(param) {
5027
5156
  var options = param.options, labelClassName = param.labelClassName, labelContent = param.labelContent, name = param.name, onChange = param.onChange, value = param.value, placeholder = param.placeholder, required = param.required, defaultValue = param.defaultValue, notFoundLabel = param.notFoundLabel, searchPlaceholder = param.searchPlaceholder, containerClassName = param.containerClassName, dropdownClassName = param.dropdownClassName, dropdownOptionClassName = param.dropdownOptionClassName, elementClassName = param.elementClassName, notFoundLabelClassName = param.notFoundLabelClassName, searchClassName = param.searchClassName, buttonClassName = param.buttonClassName, buttonFocusClassName = param.buttonFocusClassName, _param_sortDirection = param.sortDirection, sortDirection = _param_sortDirection === void 0 ? "abc" : _param_sortDirection, sortAsNumber = param.sortAsNumber, disabled = param.disabled, direction = param.direction, createNewOptionLabel = param.createNewOptionLabel, createNewOptionContainerClassName = param.createNewOptionContainerClassName;
5028
5157
  var sortOptions = useSortValues(options, sortDirection, sortAsNumber);
5029
- return /* @__PURE__ */ jsxs13("div", {
5158
+ return /* @__PURE__ */ jsxs14("div", {
5030
5159
  className: cn("flex justify-between items-center w-full", containerClassName),
5031
5160
  children: [
5032
- labelContent && /* @__PURE__ */ jsx18(ElementLabel, {
5161
+ labelContent && /* @__PURE__ */ jsx19(ElementLabel, {
5033
5162
  direction: direction,
5034
5163
  labelContent: labelContent,
5035
5164
  labelClassName: labelClassName,
5036
5165
  name: name,
5037
5166
  required: required
5038
5167
  }),
5039
- /* @__PURE__ */ jsx18(SearchSelect, {
5168
+ /* @__PURE__ */ jsx19(SearchSelect, {
5040
5169
  direction: direction,
5041
5170
  createNewOptionLabel: createNewOptionLabel,
5042
5171
  createNewOptionContainerClassName: createNewOptionContainerClassName,
@@ -5062,10 +5191,10 @@ var SelectWithSearch = function(param) {
5062
5191
  };
5063
5192
  var TextAreaContainer = function(param) {
5064
5193
  var _param_name = param.name, name = _param_name === void 0 ? "" : _param_name, _param_labelContent = param.labelContent, labelContent = _param_labelContent === void 0 ? "" : _param_labelContent, _param_defaultValue = param.defaultValue, defaultValue = _param_defaultValue === void 0 ? "" : _param_defaultValue, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_labelClassName = param.labelClassName, labelClassName = _param_labelClassName === void 0 ? "" : _param_labelClassName, _param_elementClassName = param.elementClassName, elementClassName = _param_elementClassName === void 0 ? "" : _param_elementClassName, _param_required = param.required, required = _param_required === void 0 ? false : _param_required, placeholder = param.placeholder, props = param.props, minLength = param.minLength, onKeyDown = param.onKeyDown, onChange = param.onChange, direction = param.direction;
5065
- return /* @__PURE__ */ jsxs13("div", {
5194
+ return /* @__PURE__ */ jsxs14("div", {
5066
5195
  className: cn("flex flex-col gap-2 items-center", containerClassName),
5067
5196
  children: [
5068
- labelContent && /* @__PURE__ */ jsx18(ElementLabel, {
5197
+ labelContent && /* @__PURE__ */ jsx19(ElementLabel, {
5069
5198
  direction: direction,
5070
5199
  labelContent: labelContent,
5071
5200
  labelClassName: "w-fit text-xl px-2 border-b-2 border-[#000] text-center ".concat(labelClassName),
@@ -5073,7 +5202,7 @@ var TextAreaContainer = function(param) {
5073
5202
  required: required,
5074
5203
  withDots: false
5075
5204
  }),
5076
- /* @__PURE__ */ jsx18("textarea", _object_spread_props(_object_spread({}, props), {
5205
+ /* @__PURE__ */ jsx19("textarea", _object_spread_props(_object_spread({}, props), {
5077
5206
  onChange: onChange,
5078
5207
  minLength: minLength,
5079
5208
  placeholder: placeholder,
@@ -5088,28 +5217,28 @@ var TextAreaContainer = function(param) {
5088
5217
  };
5089
5218
  var ElementLabel = function(param) {
5090
5219
  var labelContent = param.labelContent, labelClassName = param.labelClassName, name = param.name, required = param.required, _param_withDots = param.withDots, withDots = _param_withDots === void 0 ? true : _param_withDots, direction = param.direction;
5091
- return /* @__PURE__ */ jsxs13("label", {
5220
+ return /* @__PURE__ */ jsxs14("label", {
5092
5221
  style: {
5093
5222
  direction: direction
5094
5223
  },
5095
5224
  className: cn("text-start w-[30%] flex gap-0.5", labelClassName),
5096
5225
  htmlFor: name,
5097
5226
  children: [
5098
- /* @__PURE__ */ jsx18("div", {
5227
+ /* @__PURE__ */ jsx19("div", {
5099
5228
  children: labelContent
5100
5229
  }),
5101
- required && /* @__PURE__ */ jsx18("div", {
5230
+ required && /* @__PURE__ */ jsx19("div", {
5102
5231
  className: "text-red-500",
5103
5232
  children: "*"
5104
5233
  }),
5105
- withDots && /* @__PURE__ */ jsx18("div", {
5234
+ withDots && /* @__PURE__ */ jsx19("div", {
5106
5235
  children: ":"
5107
5236
  })
5108
5237
  ]
5109
5238
  });
5110
5239
  };
5111
5240
  // src/components/forms/ModularForm/ModularForm.tsx
5112
- import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
5241
+ import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
5113
5242
  var ModularForm = function(param) {
5114
5243
  var _param_submitFunction = param.submitFunction, submitFunction = _param_submitFunction === void 0 ? /*#__PURE__*/ function() {
5115
5244
  var _ref = _async_to_generator(function(form) {
@@ -5123,8 +5252,8 @@ var ModularForm = function(param) {
5123
5252
  return _ref.apply(this, arguments);
5124
5253
  };
5125
5254
  }() : _param_submitFunction, _param_elements = param.elements, elements = _param_elements === void 0 ? [] : _param_elements, headerContent = param.headerContent, buttonContent = param.buttonContent, _param_formClassName = param.formClassName, formClassName = _param_formClassName === void 0 ? "" : _param_formClassName, _param_headerClassName = param.headerClassName, headerClassName = _param_headerClassName === void 0 ? "" : _param_headerClassName, _param_direction = param.direction, direction = _param_direction === void 0 ? "rtl" : _param_direction, _param_buttonClassName = param.buttonClassName, buttonClassName = _param_buttonClassName === void 0 ? "" : _param_buttonClassName, submitRef = param.submitRef, _param_footerClassName = param.footerClassName, footerClassName = _param_footerClassName === void 0 ? "" : _param_footerClassName, _param_errorClassName = param.errorClassName, errorClassName = _param_errorClassName === void 0 ? "" : _param_errorClassName;
5126
- var _useState7 = _sliced_to_array(useState7(""), 2), errorMsg = _useState7[0], setErrorMsg = _useState7[1];
5127
- var _useState71 = _sliced_to_array(useState7(false), 2), isLoading = _useState71[0], setIsLoading = _useState71[1];
5255
+ var _useState8 = _sliced_to_array(useState8(""), 2), errorMsg = _useState8[0], setErrorMsg = _useState8[1];
5256
+ var _useState81 = _sliced_to_array(useState8(false), 2), isLoading = _useState81[0], setIsLoading = _useState81[1];
5128
5257
  var onSubmit = /*#__PURE__*/ function() {
5129
5258
  var _ref = _async_to_generator(function(e) {
5130
5259
  var form, err;
@@ -5186,41 +5315,41 @@ var ModularForm = function(param) {
5186
5315
  return _ref.apply(this, arguments);
5187
5316
  };
5188
5317
  }();
5189
- return /* @__PURE__ */ jsxs14("form", {
5318
+ return /* @__PURE__ */ jsxs15("form", {
5190
5319
  onSubmit: onSubmit,
5191
5320
  style: {
5192
5321
  direction: direction
5193
5322
  },
5194
5323
  className: cn("w-[350px] px-5 py-5 flex flex-col gap-5", formClassName),
5195
5324
  children: [
5196
- headerContent && /* @__PURE__ */ jsx19("div", {
5325
+ headerContent && /* @__PURE__ */ jsx20("div", {
5197
5326
  className: cn("border-b-2 border-[#547f22] pb-2 text-start font-bold text-[20px]", headerClassName),
5198
5327
  children: headerContent
5199
5328
  }),
5200
5329
  elements.map(function(element, index2) {
5201
5330
  switch(element.type){
5202
5331
  case "input":
5203
- return /* @__PURE__ */ jsx19(InputContainer, _object_spread_props(_object_spread({}, element), {
5332
+ return /* @__PURE__ */ jsx20(InputContainer, _object_spread_props(_object_spread({}, element), {
5204
5333
  direction: direction
5205
5334
  }), index2);
5206
5335
  case "textarea":
5207
- return /* @__PURE__ */ jsx19(TextAreaContainer, _object_spread_props(_object_spread({}, element), {
5336
+ return /* @__PURE__ */ jsx20(TextAreaContainer, _object_spread_props(_object_spread({}, element), {
5208
5337
  direction: direction
5209
5338
  }), index2);
5210
5339
  case "select":
5211
- return /* @__PURE__ */ jsx19(SelectContainer, _object_spread_props(_object_spread({}, element), {
5340
+ return /* @__PURE__ */ jsx20(SelectContainer, _object_spread_props(_object_spread({}, element), {
5212
5341
  direction: direction
5213
5342
  }), index2);
5214
5343
  case "multiSelect":
5215
- return /* @__PURE__ */ jsx19(MultiSelect, _object_spread_props(_object_spread({}, element), {
5344
+ return /* @__PURE__ */ jsx20(MultiSelect, _object_spread_props(_object_spread({}, element), {
5216
5345
  direction: direction
5217
5346
  }), index2);
5218
5347
  case "selectWithSearch":
5219
- return /* @__PURE__ */ jsx19(SelectWithSearch, _object_spread_props(_object_spread({}, element), {
5348
+ return /* @__PURE__ */ jsx20(SelectWithSearch, _object_spread_props(_object_spread({}, element), {
5220
5349
  direction: direction
5221
5350
  }), index2);
5222
5351
  case "internationalPhoneInput":
5223
- return /* @__PURE__ */ jsx19(InternationalPhonePicker, _object_spread_props(_object_spread({}, element), {
5352
+ return /* @__PURE__ */ jsx20(InternationalPhonePicker, _object_spread_props(_object_spread({}, element), {
5224
5353
  direction: direction
5225
5354
  }), index2);
5226
5355
  case "custom":
@@ -5232,20 +5361,20 @@ var ModularForm = function(param) {
5232
5361
  return null;
5233
5362
  }
5234
5363
  }),
5235
- /* @__PURE__ */ jsxs14("div", {
5364
+ /* @__PURE__ */ jsxs15("div", {
5236
5365
  className: cn("flex justify-between w-full", footerClassName),
5237
5366
  children: [
5238
- /* @__PURE__ */ jsx19("div", {
5367
+ /* @__PURE__ */ jsx20("div", {
5239
5368
  title: errorMsg,
5240
5369
  className: cn("text-[#f22] text-[18px] max-w-[80%] ellipsis", errorClassName),
5241
5370
  children: errorMsg
5242
5371
  }),
5243
- /* @__PURE__ */ jsx19("button", {
5372
+ /* @__PURE__ */ jsx20("button", {
5244
5373
  ref: submitRef,
5245
5374
  disabled: isLoading,
5246
5375
  className: cn("bg-[#547f22] px-3 py-1 rounded-lg text-white min-w-20", buttonClassName),
5247
5376
  type: "submit",
5248
- children: isLoading ? /* @__PURE__ */ jsx19(Loader, {
5377
+ children: isLoading ? /* @__PURE__ */ jsx20(Loader, {
5249
5378
  size: 25,
5250
5379
  color: "#fff"
5251
5380
  }) : buttonContent
@@ -5257,32 +5386,32 @@ var ModularForm = function(param) {
5257
5386
  };
5258
5387
  var ModularForm_default = ModularForm;
5259
5388
  // src/components/forms/index.tsx
5260
- import { useState as useState8 } from "react";
5389
+ import { useState as useState9 } from "react";
5261
5390
  import moment3 from "moment";
5262
- import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
5391
+ import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
5263
5392
  var ConfirmForm = function(param) {
5264
5393
  var onV = param.onV, onX = param.onX, _param_headline = param.headline, headline = _param_headline === void 0 ? "" : _param_headline, _param_direction = param.direction, direction = _param_direction === void 0 ? "rtl" : _param_direction, _param_containerClassName = param.containerClassName, containerClassName = _param_containerClassName === void 0 ? "" : _param_containerClassName, _param_buttonsContainerClassName = param.buttonsContainerClassName, buttonsContainerClassName = _param_buttonsContainerClassName === void 0 ? "" : _param_buttonsContainerClassName, _param_headlineClassName = param.headlineClassName, headlineClassName = _param_headlineClassName === void 0 ? "" : _param_headlineClassName;
5265
- return /* @__PURE__ */ jsxs15("div", {
5394
+ return /* @__PURE__ */ jsxs16("div", {
5266
5395
  style: {
5267
5396
  direction: direction,
5268
5397
  padding: "30px"
5269
5398
  },
5270
5399
  className: cn("w-full h-full flex flex-col gap-3", containerClassName),
5271
5400
  children: [
5272
- /* @__PURE__ */ jsx20("div", {
5401
+ /* @__PURE__ */ jsx21("div", {
5273
5402
  className: cn("text-lg font-bold", headlineClassName),
5274
5403
  children: headline
5275
5404
  }),
5276
- /* @__PURE__ */ jsxs15("div", {
5405
+ /* @__PURE__ */ jsxs16("div", {
5277
5406
  className: cn("flex justify-center items-center gap-2 w-full", buttonsContainerClassName),
5278
5407
  children: [
5279
- /* @__PURE__ */ jsx20("button", {
5408
+ /* @__PURE__ */ jsx21("button", {
5280
5409
  onClick: onX,
5281
- children: /* @__PURE__ */ jsx20(RedXSvg, {})
5410
+ children: /* @__PURE__ */ jsx21(RedXSvg, {})
5282
5411
  }),
5283
- /* @__PURE__ */ jsx20("button", {
5412
+ /* @__PURE__ */ jsx21("button", {
5284
5413
  onClick: onV,
5285
- children: /* @__PURE__ */ jsx20(GreenVSvg, {})
5414
+ children: /* @__PURE__ */ jsx21(GreenVSvg, {})
5286
5415
  })
5287
5416
  ]
5288
5417
  })
@@ -5302,7 +5431,7 @@ var DatePicker = function(param) {
5302
5431
  return _ref.apply(this, arguments);
5303
5432
  };
5304
5433
  }() : _param_submit, _param_formClassName = param.formClassName, formClassName = _param_formClassName === void 0 ? "" : _param_formClassName, _param_labelsClassName = param.labelsClassName, labelsClassName = _param_labelsClassName === void 0 ? "" : _param_labelsClassName, _param_inputsClassName = param.inputsClassName, inputsClassName = _param_inputsClassName === void 0 ? "" : _param_inputsClassName, _param_buttonClassName = param.buttonClassName, buttonClassName = _param_buttonClassName === void 0 ? "" : _param_buttonClassName, _param_buttonStyle = param.buttonStyle, buttonStyle = _param_buttonStyle === void 0 ? {} : _param_buttonStyle, defaultFrom = param.defaultFrom, defaultTo = param.defaultTo, _param_direction = param.direction, direction = _param_direction === void 0 ? "rtl" : _param_direction, _param_fromText = param.fromText, fromText = _param_fromText === void 0 ? "From date" : _param_fromText, _param_toText = param.toText, toText = _param_toText === void 0 ? "To date" : _param_toText, _param_buttonText = param.buttonText, buttonText = _param_buttonText === void 0 ? "Search" : _param_buttonText;
5305
- var _useState8 = _sliced_to_array(useState8(false), 2), isLoading = _useState8[0], setIsLoading = _useState8[1];
5434
+ var _useState9 = _sliced_to_array(useState9(false), 2), isLoading = _useState9[0], setIsLoading = _useState9[1];
5306
5435
  var onSubmit = /*#__PURE__*/ function() {
5307
5436
  var _ref = _async_to_generator(function(e) {
5308
5437
  return _ts_generator(this, function(_state) {
@@ -5327,19 +5456,19 @@ var DatePicker = function(param) {
5327
5456
  return _ref.apply(this, arguments);
5328
5457
  };
5329
5458
  }();
5330
- return /* @__PURE__ */ jsxs15("form", {
5459
+ return /* @__PURE__ */ jsxs16("form", {
5331
5460
  style: {
5332
5461
  direction: direction
5333
5462
  },
5334
5463
  onSubmit: onSubmit,
5335
5464
  className: cn("w-full h-10 flex justify-start gap-3 items-center ", formClassName),
5336
5465
  children: [
5337
- /* @__PURE__ */ jsxs15("label", {
5466
+ /* @__PURE__ */ jsxs16("label", {
5338
5467
  className: cn("center text-[14px] relative gap-2", labelsClassName),
5339
5468
  htmlFor: "from",
5340
5469
  children: [
5341
5470
  fromText,
5342
- /* @__PURE__ */ jsx20("input", {
5471
+ /* @__PURE__ */ jsx21("input", {
5343
5472
  className: "w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end ".concat(inputsClassName),
5344
5473
  type: "date",
5345
5474
  name: "from",
@@ -5347,12 +5476,12 @@ var DatePicker = function(param) {
5347
5476
  })
5348
5477
  ]
5349
5478
  }),
5350
- /* @__PURE__ */ jsxs15("label", {
5479
+ /* @__PURE__ */ jsxs16("label", {
5351
5480
  className: cn("center text-[14px] relative gap-2 ", labelsClassName),
5352
5481
  htmlFor: "to",
5353
5482
  children: [
5354
5483
  toText,
5355
- /* @__PURE__ */ jsx20("input", {
5484
+ /* @__PURE__ */ jsx21("input", {
5356
5485
  className: "w-[125px] text-[14px] py-[2px] px-1 rounded-[2px] border-black border-[1px] text-end ".concat(inputsClassName),
5357
5486
  type: "date",
5358
5487
  name: "to",
@@ -5360,12 +5489,12 @@ var DatePicker = function(param) {
5360
5489
  })
5361
5490
  ]
5362
5491
  }),
5363
- /* @__PURE__ */ jsx20("button", {
5492
+ /* @__PURE__ */ jsx21("button", {
5364
5493
  disabled: isLoading,
5365
5494
  style: buttonStyle,
5366
5495
  className: cn("bg-[#699a2c] text-[#fff] font-[500] w-[75px] h-[27px]", buttonClassName),
5367
5496
  type: "submit",
5368
- children: isLoading ? /* @__PURE__ */ jsx20(Loader, {
5497
+ children: isLoading ? /* @__PURE__ */ jsx21(Loader, {
5369
5498
  className: "pt-[2px]",
5370
5499
  size: 20,
5371
5500
  color: "#fff"
@@ -5377,7 +5506,7 @@ var DatePicker = function(param) {
5377
5506
  // src/components/CodeInput.tsx
5378
5507
  import { OTPInput } from "input-otp";
5379
5508
  import { useEffect as useEffect7, useRef as useRef5 } from "react";
5380
- import { jsx as jsx21 } from "react/jsx-runtime";
5509
+ import { jsx as jsx22 } from "react/jsx-runtime";
5381
5510
  function CodeInput(param) {
5382
5511
  var codeValue = param.codeValue, setCodeValue = param.setCodeValue, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className, _param_slotContainerClassName = param.slotContainerClassName, slotContainerClassName = _param_slotContainerClassName === void 0 ? "" : _param_slotContainerClassName;
5383
5512
  var firstInputRef = useRef5(null);
@@ -5386,9 +5515,9 @@ function CodeInput(param) {
5386
5515
  firstInputRef.current.focus();
5387
5516
  }
5388
5517
  }, []);
5389
- return /* @__PURE__ */ jsx21("div", {
5518
+ return /* @__PURE__ */ jsx22("div", {
5390
5519
  className: cn("space-y-2 flex justify-center items-center", className),
5391
- children: /* @__PURE__ */ jsx21(OTPInput, {
5520
+ children: /* @__PURE__ */ jsx22(OTPInput, {
5392
5521
  ref: firstInputRef,
5393
5522
  value: codeValue,
5394
5523
  onChange: function(newVal) {
@@ -5398,10 +5527,10 @@ function CodeInput(param) {
5398
5527
  maxLength: 6,
5399
5528
  render: function(param) {
5400
5529
  var slots = param.slots;
5401
- return /* @__PURE__ */ jsx21("div", {
5530
+ return /* @__PURE__ */ jsx22("div", {
5402
5531
  className: cn("flex gap-5", slotContainerClassName),
5403
5532
  children: slots.map(function(slot, idx) {
5404
- return /* @__PURE__ */ jsx21(Slot2, _object_spread({}, slot), idx);
5533
+ return /* @__PURE__ */ jsx22(Slot2, _object_spread({}, slot), idx);
5405
5534
  })
5406
5535
  });
5407
5536
  }
@@ -5409,14 +5538,14 @@ function CodeInput(param) {
5409
5538
  });
5410
5539
  }
5411
5540
  function Slot2(props) {
5412
- return /* @__PURE__ */ jsx21("div", {
5541
+ return /* @__PURE__ */ jsx22("div", {
5413
5542
  className: cn("flex size-9 items-center justify-center rounded-lg border border-input bg-background font-medium text-foreground shadow-sm shadow-black/5 transition-shadow", {
5414
5543
  "z-10 border border-ring ring-[3px] ring-ring/20": props.isActive
5415
5544
  }),
5416
- children: props.char !== null && /* @__PURE__ */ jsx21("div", {
5545
+ children: props.char !== null && /* @__PURE__ */ jsx22("div", {
5417
5546
  children: props.char
5418
5547
  })
5419
5548
  });
5420
5549
  }
5421
- export { Badge, BooleanUi, Button, Checkbox, CodeInput, ConfirmForm, DatePicker, DurationUI, ElementLabel, ErrorBoundary, ExportToExcel, Filter, GeoUi, Input, InputContainer, InternationalPhonePicker, Loader, MaxRowsLabel, ModularForm_default as ModularForm, MultiSelect, NumberUI, PhoneUI, ProgressComponent, Search, SelectContainer, SelectWithSearch, Summary, Table, TableBody, TableButton, TableCell, TableContext, TableHead, TableProvider, TableRow2 as TableRow, TextAreaContainer, TimesUI, Version, badgeVariants, buttonVariants, getFixedNumber, useDebounce, useSortValues };
5550
+ export { Badge, BooleanUi, Button, Checkbox, CodeInput, ConfirmForm, DatePicker, DurationUI, ElementLabel, ErrorBoundary, ExportToExcel, Filter, GeoUi, Input, InputContainer, InternationalPhonePicker, Loader, LoginWithGoogleButton, MaxRowsLabel, ModularForm_default as ModularForm, MultiSelect, NumberUI, PhoneUI, ProgressComponent, Search, SelectContainer, SelectWithSearch, Summary, Table, TableBody, TableButton, TableCell, TableContext, TableHead, TableProvider, TableRow2 as TableRow, TextAreaContainer, TimesUI, Version, badgeVariants, buttonVariants, getFixedNumber, useDebounce, useSortValues };
5422
5551
  //# sourceMappingURL=index.mjs.map