@remoteoss/remote-flows 0.4.1 → 0.4.2-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/{chunk-IKJFPDZL.js → chunk-2YGGLGBG.js} +2 -2
  2. package/dist/chunk-5I2GCSAL.js +2 -0
  3. package/dist/{chunk-GATKVXGB.js.map → chunk-5I2GCSAL.js.map} +1 -1
  4. package/dist/chunk-5RPT35EL.js +2 -0
  5. package/dist/{chunk-CM7ZXKYC.js.map → chunk-5RPT35EL.js.map} +1 -1
  6. package/dist/chunk-6WFPF53B.js +2 -0
  7. package/dist/{chunk-TQNMLD3A.js.map → chunk-6WFPF53B.js.map} +1 -1
  8. package/dist/chunk-7522S3KZ.js +2 -0
  9. package/dist/{chunk-V4X62BBS.js.map → chunk-7522S3KZ.js.map} +1 -1
  10. package/dist/{chunk-QJWVOD4K.js → chunk-BFZQYTQN.js} +2 -2
  11. package/dist/{chunk-ZHGFPGWR.js → chunk-CIIUTHY7.js} +2 -2
  12. package/dist/{chunk-CCJOYSVQ.js → chunk-DIF7GZA2.js} +2 -2
  13. package/dist/{chunk-CK2Y7YLV.js → chunk-EGJR5MXK.js} +2 -2
  14. package/dist/{chunk-5KX664N7.js → chunk-GTXQK2J6.js} +2 -2
  15. package/dist/chunk-HUEFMP54.js +2 -0
  16. package/dist/{chunk-SG67NZYI.js.map → chunk-HUEFMP54.js.map} +1 -1
  17. package/dist/{chunk-M6ZWJ7KV.js → chunk-LOBYJTDX.js} +2 -2
  18. package/dist/chunk-MPMOHDZP.js +2 -0
  19. package/dist/chunk-MPMOHDZP.js.map +1 -0
  20. package/dist/{chunk-RNR4JEHX.js → chunk-PRFH5KY7.js} +2 -2
  21. package/dist/{chunk-6ACGE24H.js → chunk-PWWX66GV.js} +2 -2
  22. package/dist/{chunk-BLVS2A23.js → chunk-RBC6WNYP.js} +2 -2
  23. package/dist/{chunk-G7ELSCK7.js → chunk-S4WAMYEE.js} +2 -2
  24. package/dist/chunk-STEO7MS2.js +2 -0
  25. package/dist/chunk-STEO7MS2.js.map +1 -0
  26. package/dist/chunk-SYYKU72Z.js +2 -0
  27. package/dist/chunk-SYYKU72Z.js.map +1 -0
  28. package/dist/{chunk-2XVOKTPC.js → chunk-VCYSWPLV.js} +2 -2
  29. package/dist/{chunk-HHMKYM4S.js → chunk-VFR5R7GS.js} +2 -2
  30. package/dist/{chunk-PJ6EQF5M.js → chunk-XTC73RFN.js} +2 -2
  31. package/dist/{chunk-KT6EAWZO.js → chunk-YD3IHRVA.js} +2 -2
  32. package/dist/{chunk-BIXYNFMY.js → chunk-YDW7CPPR.js} +2 -2
  33. package/dist/chunk-ZKALTI3E.js +2 -0
  34. package/dist/{chunk-OZCFRM4R.js.map → chunk-ZKALTI3E.js.map} +1 -1
  35. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
  36. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  37. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  38. package/dist/flows/ContractAmendment/index.js +1 -1
  39. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  40. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  41. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  42. package/dist/flows/CostCalculator/hooks.js +1 -1
  43. package/dist/flows/CostCalculator/index.js +1 -1
  44. package/dist/flows/CostCalculator/utils.js +1 -1
  45. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  46. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  47. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  48. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  49. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  50. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  51. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  52. package/dist/flows/Onboarding/hooks.js +1 -1
  53. package/dist/flows/Onboarding/index.js +1 -1
  54. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  55. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  56. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  57. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  58. package/dist/flows/Termination/TerminationFlow.js +1 -1
  59. package/dist/flows/Termination/TerminationForm.js +1 -1
  60. package/dist/flows/Termination/index.js +1 -1
  61. package/dist/index.js +1 -1
  62. package/dist/index.js.map +1 -1
  63. package/package.json +1 -1
  64. package/dist/chunk-52J6QK2N.js +0 -2
  65. package/dist/chunk-52J6QK2N.js.map +0 -1
  66. package/dist/chunk-CM7ZXKYC.js +0 -2
  67. package/dist/chunk-GATKVXGB.js +0 -2
  68. package/dist/chunk-GVDARE4K.js +0 -2
  69. package/dist/chunk-GVDARE4K.js.map +0 -1
  70. package/dist/chunk-OZCFRM4R.js +0 -2
  71. package/dist/chunk-SG67NZYI.js +0 -2
  72. package/dist/chunk-TQNMLD3A.js +0 -2
  73. package/dist/chunk-V4X62BBS.js +0 -2
  74. package/dist/chunk-Y6K2UK3D.js +0 -2
  75. package/dist/chunk-Y6K2UK3D.js.map +0 -1
  76. /package/dist/{chunk-IKJFPDZL.js.map → chunk-2YGGLGBG.js.map} +0 -0
  77. /package/dist/{chunk-QJWVOD4K.js.map → chunk-BFZQYTQN.js.map} +0 -0
  78. /package/dist/{chunk-ZHGFPGWR.js.map → chunk-CIIUTHY7.js.map} +0 -0
  79. /package/dist/{chunk-CCJOYSVQ.js.map → chunk-DIF7GZA2.js.map} +0 -0
  80. /package/dist/{chunk-CK2Y7YLV.js.map → chunk-EGJR5MXK.js.map} +0 -0
  81. /package/dist/{chunk-5KX664N7.js.map → chunk-GTXQK2J6.js.map} +0 -0
  82. /package/dist/{chunk-M6ZWJ7KV.js.map → chunk-LOBYJTDX.js.map} +0 -0
  83. /package/dist/{chunk-RNR4JEHX.js.map → chunk-PRFH5KY7.js.map} +0 -0
  84. /package/dist/{chunk-6ACGE24H.js.map → chunk-PWWX66GV.js.map} +0 -0
  85. /package/dist/{chunk-BLVS2A23.js.map → chunk-RBC6WNYP.js.map} +0 -0
  86. /package/dist/{chunk-G7ELSCK7.js.map → chunk-S4WAMYEE.js.map} +0 -0
  87. /package/dist/{chunk-2XVOKTPC.js.map → chunk-VCYSWPLV.js.map} +0 -0
  88. /package/dist/{chunk-HHMKYM4S.js.map → chunk-VFR5R7GS.js.map} +0 -0
  89. /package/dist/{chunk-PJ6EQF5M.js.map → chunk-XTC73RFN.js.map} +0 -0
  90. /package/dist/{chunk-KT6EAWZO.js.map → chunk-YD3IHRVA.js.map} +0 -0
  91. /package/dist/{chunk-BIXYNFMY.js.map → chunk-YDW7CPPR.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../node_modules/lodash/isObject.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_root.js","../node_modules/lodash/now.js","../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/toNumber.js","../node_modules/lodash/debounce.js","../src/components/form/fields/CurrencyConversionField.tsx","../src/common/hooks.ts"],"sourcesContent":["/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","import { ReactNode, useState, useCallback, useEffect, useRef } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { TextField } from '@/src/components/form/fields/TextField';\nimport { useConvertCurrency } from '@/src/flows/Onboarding/api';\nimport { JSFField } from '@/src/types/remoteFlows';\nimport { useFormFields } from '@/src/context';\nimport { useDebounce } from '@/src/common/hooks';\n\ntype DescriptionWithConversionProps = {\n description: ReactNode;\n showConversion: boolean;\n targetCurrency: string;\n className: string;\n onClick: (evt: React.MouseEvent<HTMLButtonElement>) => void;\n};\n\nconst DescriptionWithConversion = ({\n description,\n showConversion,\n targetCurrency,\n className,\n onClick,\n}: DescriptionWithConversionProps) => {\n const { components } = useFormFields();\n const label = showConversion\n ? `Hide ${targetCurrency} conversion`\n : `Show ${targetCurrency} conversion`;\n\n const CustomButton = components?.button;\n return (\n <span className={className}>\n {description}{' '}\n {CustomButton ? (\n <CustomButton\n className={`${className.replace('-description', '-button')}`}\n data-type=\"inline\"\n onClick={onClick}\n >\n {label}\n </CustomButton>\n ) : (\n <button\n className={`${className.replace('-description', '-button')}`}\n onClick={onClick}\n >\n {label}\n </button>\n )}\n </span>\n );\n};\n\nexport type CurrencyConversionFieldProps = JSFField & {\n sourceCurrency: string;\n targetCurrency: string;\n conversionFieldName: string;\n conversionProperties?: {\n label?: string;\n description?: string;\n };\n useProxy?: boolean;\n classNamePrefix: string;\n};\n\nexport const CurrencyConversionField = ({\n sourceCurrency,\n targetCurrency,\n conversionFieldName,\n conversionProperties,\n classNamePrefix,\n description,\n ...props\n}: CurrencyConversionFieldProps) => {\n const [showConversion, setShowConversion] = useState(false);\n const { setValue, watch } = useFormContext();\n const fieldValue = watch(props.name);\n const isFirstRender = useRef(true);\n\n const canShowConversion =\n sourceCurrency && targetCurrency && sourceCurrency !== targetCurrency;\n\n const { mutateAsync: convertCurrency } = useConvertCurrency();\n\n useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n\n // when source currency changes, reset the conversion field\n setValue(conversionFieldName, '');\n }, [sourceCurrency, conversionFieldName, setValue]);\n\n const convertCurrencyCallback = useCallback(\n async (\n value: string,\n fromCurrency: string,\n toCurrency: string,\n targetField: string,\n ) => {\n if (!value) return;\n\n try {\n const response = await convertCurrency({\n source_currency: fromCurrency,\n target_currency: toCurrency,\n amount: Number(value),\n });\n if (response.data?.data?.conversion_data?.target_amount) {\n const amount = response.data.data.conversion_data.target_amount;\n if (amount) {\n setValue(targetField, amount?.toString());\n }\n }\n } catch (error) {\n console.error('Error converting currency:', error);\n }\n },\n [convertCurrency, setValue],\n );\n\n const debouncedConvertCurrency = useDebounce(\n (value: string) =>\n convertCurrencyCallback(\n value,\n sourceCurrency,\n targetCurrency,\n conversionFieldName,\n ),\n 500,\n );\n const debouncedConvertCurrencyReverse = useDebounce(\n (value: string) =>\n convertCurrencyCallback(\n value,\n targetCurrency,\n sourceCurrency,\n props.name,\n ),\n 500,\n );\n\n const handleMainFieldChange = (evt: React.ChangeEvent<HTMLInputElement>) => {\n if (showConversion) {\n debouncedConvertCurrency(evt.target.value);\n }\n };\n\n const handleConversionFieldChange = (\n evt: React.ChangeEvent<HTMLInputElement>,\n ) => {\n debouncedConvertCurrencyReverse(evt.target.value);\n };\n\n const toggleConversion = (evt: React.MouseEvent<HTMLButtonElement>) => {\n evt.preventDefault();\n setShowConversion((prev) => !prev);\n\n if (!showConversion && fieldValue) {\n debouncedConvertCurrency(fieldValue);\n }\n };\n\n const extraDescription = canShowConversion ? (\n <DescriptionWithConversion\n targetCurrency={targetCurrency}\n description={description}\n showConversion={showConversion}\n className={`${classNamePrefix}-description`}\n onClick={toggleConversion}\n />\n ) : (\n description\n );\n\n return (\n <>\n <TextField\n {...props}\n additionalProps={{ currency: sourceCurrency }}\n description={extraDescription}\n type=\"text\"\n inputMode=\"decimal\"\n pattern=\"^[0-9.]*$\"\n maxLength={15}\n onChange={handleMainFieldChange}\n />\n {showConversion && (\n <TextField\n additionalProps={{ currency: targetCurrency }}\n name={conversionFieldName}\n label={conversionProperties?.label || 'Conversion'}\n description={conversionProperties?.description}\n type=\"text\"\n inputMode=\"decimal\"\n pattern=\"^[0-9.]*$\"\n maxLength={15}\n onChange={handleConversionFieldChange}\n />\n )}\n </>\n );\n};\n","import { useCallback, useEffect, useRef } from 'react';\nimport debounce from 'lodash/debounce';\n\nexport function useDebounce(\n callback: (value: string) => Promise<void>,\n delay: number,\n) {\n const callbackRef = useRef(callback);\n\n useEffect(() => {\n callbackRef.current = callback;\n }, [callback]);\n\n const debouncedFn = useRef(\n debounce((value: string) => {\n callbackRef.current(value);\n }, delay),\n ).current;\n\n return useCallback(\n (value: string) => {\n debouncedFn(value);\n },\n [debouncedFn],\n );\n}\n"],"mappings":"+KAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cAyBA,SAASC,GAASC,EAAO,CACvB,IAAIC,EAAO,OAAOD,EAClB,OAAOA,GAAS,OAASC,GAAQ,UAAYA,GAAQ,WACvD,CAHSC,EAAAH,GAAA,YAKTD,EAAO,QAAUC,KC9BjB,IAAAI,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cACA,IAAIC,GAAa,OAAO,QAAU,UAAY,QAAU,OAAO,SAAW,QAAU,OAEpFD,EAAO,QAAUC,KCHjB,IAAAC,EAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,GAAa,IAGbC,GAAW,OAAO,MAAQ,UAAY,MAAQ,KAAK,SAAW,QAAU,KAGxEC,GAAOF,IAAcC,IAAY,SAAS,aAAa,EAAE,EAE7DF,EAAO,QAAUG,KCRjB,IAAAC,EAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,GAAO,IAkBPC,GAAMC,EAAA,UAAW,CACnB,OAAOF,GAAK,KAAK,IAAI,CACvB,EAFU,OAIVD,EAAO,QAAUE,KCtBjB,IAAAE,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cACA,IAAIC,GAAe,KAUnB,SAASC,GAAgBC,EAAQ,CAG/B,QAFIC,EAAQD,EAAO,OAEZC,KAAWH,GAAa,KAAKE,EAAO,OAAOC,CAAK,CAAC,GAAG,CAC3D,OAAOA,CACT,CALSC,EAAAH,GAAA,mBAOTF,EAAO,QAAUE,KClBj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AAGY,CAAe,eAC7B,QAAS6B,EACX,EAEA1C,EAGF,OACEH,GAAAF,GAAA,CACE,UAAAC,EAACiD,EAAA,CACE,GAAG/B,EACJ,gBAAiB,CAAE,SAAUJ,CAAe,EAC5C,YAAakC,EACb,KAAK,OACL,UAAU,UACV,QAAQ,YACR,UAAW,GACX,SAAUL,EACZ,EACCtC,GACCL,EAACiD,EAAA,CACC,gBAAiB,CAAE,SAAU3C,CAAe,EAC5C,KAAMS,EACN,MAAOC,GAAsB,OAAS,aACtC,YAAaA,GAAsB,YACnC,KAAK,OACL,UAAU,UACV,QAAQ,YACR,UAAW,GACX,SAAU6B,EACZ,GAEJ,CAEJ,EA1IuC","names":["require_isObject","__commonJSMin","exports","module","isObject","value","type","__name","require_freeGlobal","__commonJSMin","exports","module","freeGlobal","require_root","__commonJSMin","exports","module","freeGlobal","freeSelf","root","require_now","__commonJSMin","exports","module","root","now","__name","require_trimmedEndIndex","__commonJSMin","exports","module","reWhitespace","trimmedEndIndex","string","index","__name","require_baseTrim","__commonJSMin","exports","module","trimmedEndIndex","reTrimStart","baseTrim","string","__name","require_Symbol","__commonJSMin","exports","module","root","Symbol","require_getRawTag","__commonJSMin","exports","module","Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","getRawTag","value","isOwn","tag","unmasked","result","__name","require_objectToString","__commonJSMin","exports","module","objectProto","nativeObjectToString","objectToString","value","__name","require_baseGetTag","__commonJSMin","exports","module","Symbol","getRawTag","objectToString","nullTag","undefinedTag","symToStringTag","baseGetTag","value","__name","require_isObjectLike","__commonJSMin","exports","module","isObjectLike","value","__name","require_isSymbol","__commonJSMin","exports","module","baseGetTag","isObjectLike","symbolTag","isSymbol","value","__name","require_toNumber","__commonJSMin","exports","module","baseTrim","isObject","isSymbol","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","value","other","isBinary","__name","require_debounce","__commonJSMin","exports","module","isObject","now","toNumber","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","__name","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","useState","useCallback","useEffect","useRef","useFormContext","import_debounce","useCallback","useEffect","useRef","useDebounce","callback","delay","callbackRef","useRef","useEffect","debouncedFn","debounce","value","useCallback","__name","Fragment","jsx","jsxs","DescriptionWithConversion","__name","description","showConversion","targetCurrency","className","onClick","components","useFormFields","label","CustomButton","CurrencyConversionField","sourceCurrency","conversionFieldName","conversionProperties","classNamePrefix","props","setShowConversion","useState","setValue","watch","useFormContext","fieldValue","isFirstRender","useRef","canShowConversion","convertCurrency","useConvertCurrency","useEffect","convertCurrencyCallback","useCallback","value","fromCurrency","toCurrency","targetField","response","amount","error","debouncedConvertCurrency","useDebounce","debouncedConvertCurrencyReverse","handleMainFieldChange","evt","handleConversionFieldChange","toggleConversion","prev","extraDescription","TextField"]}
1
+ {"version":3,"sources":["../node_modules/lodash/isObject.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_root.js","../node_modules/lodash/now.js","../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/toNumber.js","../node_modules/lodash/debounce.js","../src/components/form/fields/CurrencyConversionField.tsx","../src/common/hooks.ts"],"sourcesContent":["/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","import { ReactNode, useState, useCallback, useEffect, useRef } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { TextField } from '@/src/components/form/fields/TextField';\nimport { useConvertCurrency } from '@/src/flows/Onboarding/api';\nimport { JSFField } from '@/src/types/remoteFlows';\nimport { useFormFields } from '@/src/context';\nimport { useDebounce } from '@/src/common/hooks';\n\ntype DescriptionWithConversionProps = {\n description: ReactNode;\n showConversion: boolean;\n targetCurrency: string;\n className: string;\n onClick: (evt: React.MouseEvent<HTMLButtonElement>) => void;\n};\n\nconst DescriptionWithConversion = ({\n description,\n showConversion,\n targetCurrency,\n className,\n onClick,\n}: DescriptionWithConversionProps) => {\n const { components } = useFormFields();\n const label = showConversion\n ? `Hide ${targetCurrency} conversion`\n : `Show ${targetCurrency} conversion`;\n\n const CustomButton = components?.button;\n return (\n <span className={className}>\n {description}{' '}\n {CustomButton ? (\n <CustomButton\n className={`${className.replace('-description', '-button')}`}\n data-type=\"inline\"\n onClick={onClick}\n >\n {label}\n </CustomButton>\n ) : (\n <button\n className={`${className.replace('-description', '-button')}`}\n onClick={onClick}\n >\n {label}\n </button>\n )}\n </span>\n );\n};\n\nexport type CurrencyConversionFieldProps = JSFField & {\n sourceCurrency: string;\n targetCurrency: string;\n conversionFieldName: string;\n conversionProperties?: {\n label?: string;\n description?: string;\n };\n useProxy?: boolean;\n classNamePrefix: string;\n};\n\nexport const CurrencyConversionField = ({\n sourceCurrency,\n targetCurrency,\n conversionFieldName,\n conversionProperties,\n classNamePrefix,\n description,\n ...props\n}: CurrencyConversionFieldProps) => {\n const [showConversion, setShowConversion] = useState(false);\n const { setValue, watch } = useFormContext();\n const fieldValue = watch(props.name);\n const isFirstRender = useRef(true);\n\n const canShowConversion =\n sourceCurrency && targetCurrency && sourceCurrency !== targetCurrency;\n\n const { mutateAsync: convertCurrency } = useConvertCurrency();\n\n useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n\n // when source currency changes, reset the conversion field\n setValue(conversionFieldName, '');\n }, [sourceCurrency, conversionFieldName, setValue]);\n\n const convertCurrencyCallback = useCallback(\n async (\n value: string,\n fromCurrency: string,\n toCurrency: string,\n targetField: string,\n ) => {\n if (!value) return;\n\n try {\n const response = await convertCurrency({\n source_currency: fromCurrency,\n target_currency: toCurrency,\n amount: Number(value),\n });\n if (response.data?.data?.conversion_data?.target_amount) {\n const amount = response.data.data.conversion_data.target_amount;\n if (amount) {\n setValue(targetField, amount?.toString());\n }\n }\n } catch (error) {\n console.error('Error converting currency:', error);\n }\n },\n [convertCurrency, setValue],\n );\n\n const debouncedConvertCurrency = useDebounce(\n (value: string) =>\n convertCurrencyCallback(\n value,\n sourceCurrency,\n targetCurrency,\n conversionFieldName,\n ),\n 500,\n );\n const debouncedConvertCurrencyReverse = useDebounce(\n (value: string) =>\n convertCurrencyCallback(\n value,\n targetCurrency,\n sourceCurrency,\n props.name,\n ),\n 500,\n );\n\n const handleMainFieldChange = (evt: React.ChangeEvent<HTMLInputElement>) => {\n if (showConversion) {\n debouncedConvertCurrency(evt.target.value);\n }\n };\n\n const handleConversionFieldChange = (\n evt: React.ChangeEvent<HTMLInputElement>,\n ) => {\n debouncedConvertCurrencyReverse(evt.target.value);\n };\n\n const toggleConversion = (evt: React.MouseEvent<HTMLButtonElement>) => {\n evt.preventDefault();\n setShowConversion((prev) => !prev);\n\n if (!showConversion && fieldValue) {\n debouncedConvertCurrency(fieldValue);\n }\n };\n\n const extraDescription = canShowConversion ? (\n <DescriptionWithConversion\n targetCurrency={targetCurrency}\n description={description}\n showConversion={showConversion}\n className={`${classNamePrefix}-description`}\n onClick={toggleConversion}\n />\n ) : (\n description\n );\n\n return (\n <>\n <TextField\n {...props}\n additionalProps={{ currency: sourceCurrency }}\n description={extraDescription}\n type=\"text\"\n inputMode=\"decimal\"\n pattern=\"^[0-9.]*$\"\n maxLength={15}\n onChange={handleMainFieldChange}\n />\n {showConversion && (\n <TextField\n additionalProps={{ currency: targetCurrency }}\n name={conversionFieldName}\n label={conversionProperties?.label || 'Conversion'}\n description={conversionProperties?.description}\n type=\"text\"\n inputMode=\"decimal\"\n pattern=\"^[0-9.]*$\"\n maxLength={15}\n onChange={handleConversionFieldChange}\n />\n )}\n </>\n );\n};\n","import { useCallback, useEffect, useRef } from 'react';\nimport debounce from 'lodash/debounce';\n\nexport function useDebounce(\n callback: (value: string) => Promise<void>,\n delay: number,\n) {\n const callbackRef = useRef(callback);\n\n useEffect(() => {\n callbackRef.current = callback;\n }, [callback]);\n\n const debouncedFn = useRef(\n debounce((value: string) => {\n callbackRef.current(value);\n }, delay),\n ).current;\n\n return useCallback(\n (value: string) => {\n debouncedFn(value);\n },\n [debouncedFn],\n );\n}\n"],"mappings":"uNAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cAyBA,SAASC,GAASC,EAAO,CACvB,IAAIC,EAAO,OAAOD,EAClB,OAAOA,GAAS,OAASC,GAAQ,UAAYA,GAAQ,WACvD,CAHSC,EAAAH,GAAA,YAKTD,EAAO,QAAUC,KC9BjB,IAAAI,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cACA,IAAIC,GAAa,OAAO,QAAU,UAAY,QAAU,OAAO,SAAW,QAAU,OAEpFD,EAAO,QAAUC,KCHjB,IAAAC,EAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,GAAa,IAGbC,GAAW,OAAO,MAAQ,UAAY,MAAQ,KAAK,SAAW,QAAU,KAGxEC,GAAOF,IAAcC,IAAY,SAAS,aAAa,EAAE,EAE7DF,EAAO,QAAUG,KCRjB,IAAAC,EAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,GAAO,IAkBPC,GAAMC,EAAA,UAAW,CACnB,OAAOF,GAAK,KAAK,IAAI,CACvB,EAFU,OAIVD,EAAO,QAAUE,KCtBjB,IAAAE,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cACA,IAAIC,GAAe,KAUnB,SAASC,GAAgBC,EAAQ,CAG/B,QAFIC,EA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AEvC,EAPyB,oBASnBwB,EAAmBrB,EACvB3B,EAACE,GAAA,CACC,eAAgBI,EAChB,YAAaF,EACb,eAAgBC,EAChB,UAAW,GAAGY,CAAe,eAC7B,QAAS6B,EACX,EAEA1C,EAGF,OACEH,GAAAF,GAAA,CACE,UAAAC,EAACiD,EAAA,CACE,GAAG/B,EACJ,gBAAiB,CAAE,SAAUJ,CAAe,EAC5C,YAAakC,EACb,KAAK,OACL,UAAU,UACV,QAAQ,YACR,UAAW,GACX,SAAUL,EACZ,EACCtC,GACCL,EAACiD,EAAA,CACC,gBAAiB,CAAE,SAAU3C,CAAe,EAC5C,KAAMS,EACN,MAAOC,GAAsB,OAAS,aACtC,YAAaA,GAAsB,YACnC,KAAK,OACL,UAAU,UACV,QAAQ,YACR,UAAW,GACX,SAAU6B,EACZ,GAEJ,CAEJ,EA1IuC","names":["require_isObject","__commonJSMin","exports","module","isObject","value","type","__name","require_freeGlobal","__commonJSMin","exports","module","freeGlobal","require_root","__commonJSMin","exports","module","freeGlobal","freeSelf","root","require_now","__commonJSMin","exports","module","root","now","__name","require_trimmedEndIndex","__commonJSMin","exports","module","reWhitespace","trimmedEndIndex","string","index","__name","require_baseTrim","__commonJSMin","exports","module","trimmedEndIndex","reTrimStart","baseTrim","string","__name","require_Symbol","__commonJSMin","exports","module","root","Symbol","require_getRawTag","__commonJSMin","exports","module","Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","getRawTag","value","isOwn","tag","unmasked","result","__name","require_objectToString","__commonJSMin","exports","module","objectProto","nativeObjectToString","objectToString","value","__name","require_baseGetTag","__commonJSMin","exports","module","Symbol","getRawTag","objectToString","nullTag","undefinedTag","symToStringTag","baseGetTag","value","__name","require_isObjectLike","__commonJSMin","exports","module","isObjectLike","value","__name","require_isSymbol","__commonJSMin","exports","module","baseGetTag","isObjectLike","symbolTag","isSymbol","value","__name","require_toNumber","__commonJSMin","exports","module","baseTrim","isObject","isSymbol","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","value","other","isBinary","__name","require_debounce","__commonJSMin","exports","module","isObject","now","toNumber","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","__name","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","useState","useCallback","useEffect","useRef","import_debounce","useCallback","useEffect","useRef","useDebounce","callback","delay","callbackRef","useRef","useEffect","debouncedFn","debounce","value","useCallback","__name","Fragment","jsx","jsxs","DescriptionWithConversion","__name","description","showConversion","targetCurrency","className","onClick","components","useFormFields","label","CustomButton","CurrencyConversionField","sourceCurrency","conversionFieldName","conversionProperties","classNamePrefix","props","setShowConversion","useState","setValue","watch","useFormContext","fieldValue","isFirstRender","useRef","canShowConversion","convertCurrency","useConvertCurrency","useEffect","convertCurrencyCallback","useCallback","value","fromCurrency","toCurrency","targetField","response","amount","error","debouncedConvertCurrency","useDebounce","debouncedConvertCurrencyReverse","handleMainFieldChange","evt","handleConversionFieldChange","toggleConversion","prev","extraDescription","TextField"]}
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-SG67NZYI.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentConfirmationForm};
1
+ import{a}from"../../chunk-HUEFMP54.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentConfirmationForm};
2
2
  //# sourceMappingURL=ContractAmendmentConfirmationForm.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-KT6EAWZO.js";import"../../chunk-YECC5GAT.js";import"../../chunk-SX5W3CBP.js";import"../../chunk-VTNGEN34.js";import"../../chunk-QW4JPW6J.js";import"../../chunk-Z4FTX74F.js";import"../../chunk-276MJCIE.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-HS3TP43Z.js";import"../../chunk-SG67NZYI.js";import"../../chunk-GATKVXGB.js";import"../../chunk-Y6K2UK3D.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-52J6QK2N.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentFlow};
1
+ import{a}from"../../chunk-YD3IHRVA.js";import"../../chunk-YECC5GAT.js";import"../../chunk-SX5W3CBP.js";import"../../chunk-VTNGEN34.js";import"../../chunk-QW4JPW6J.js";import"../../chunk-Z4FTX74F.js";import"../../chunk-276MJCIE.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-HS3TP43Z.js";import"../../chunk-HUEFMP54.js";import"../../chunk-5I2GCSAL.js";import"../../chunk-SYYKU72Z.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentFlow};
2
2
  //# sourceMappingURL=ContractAmendmentFlow.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-GATKVXGB.js";import"../../chunk-Y6K2UK3D.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-52J6QK2N.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentForm};
1
+ import{a}from"../../chunk-5I2GCSAL.js";import"../../chunk-SYYKU72Z.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentForm};
2
2
  //# sourceMappingURL=ContractAmendmentForm.js.map
@@ -1,2 +1,2 @@
1
- import"../../chunk-A7ZJQCNU.js";import{a as e}from"../../chunk-KT6EAWZO.js";import{a as c}from"../../chunk-YECC5GAT.js";import{a as d}from"../../chunk-SX5W3CBP.js";import"../../chunk-VTNGEN34.js";import"../../chunk-QW4JPW6J.js";import"../../chunk-Z4FTX74F.js";import"../../chunk-276MJCIE.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-HS3TP43Z.js";import{a}from"../../chunk-SG67NZYI.js";import{a as b}from"../../chunk-GATKVXGB.js";import"../../chunk-Y6K2UK3D.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-52J6QK2N.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentConfirmationForm,e as ContractAmendmentFlow,b as ContractAmendmentForm,c as ContractAmendmentSubmit,d as useContractAmendment};
1
+ import"../../chunk-A7ZJQCNU.js";import{a as e}from"../../chunk-YD3IHRVA.js";import{a as c}from"../../chunk-YECC5GAT.js";import{a as d}from"../../chunk-SX5W3CBP.js";import"../../chunk-VTNGEN34.js";import"../../chunk-QW4JPW6J.js";import"../../chunk-Z4FTX74F.js";import"../../chunk-276MJCIE.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-HS3TP43Z.js";import{a}from"../../chunk-HUEFMP54.js";import{a as b}from"../../chunk-5I2GCSAL.js";import"../../chunk-SYYKU72Z.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentConfirmationForm,e as ContractAmendmentFlow,b as ContractAmendmentForm,c as ContractAmendmentSubmit,d as useContractAmendment};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-TQNMLD3A.js";import"../../chunk-KSHK3ZPX.js";import"../../chunk-M6ZWJ7KV.js";import"../../chunk-G7ELSCK7.js";import"../../chunk-UPRUP24B.js";import"../../chunk-OZCFRM4R.js";import"../../chunk-X36OBDKD.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-MC6FNME3.js";import"../../chunk-PWUYHFON.js";import"../../chunk-276MJCIE.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-52J6QK2N.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as CostCalculatorFlow};
1
+ import{a}from"../../chunk-6WFPF53B.js";import"../../chunk-KSHK3ZPX.js";import"../../chunk-LOBYJTDX.js";import"../../chunk-S4WAMYEE.js";import"../../chunk-UPRUP24B.js";import"../../chunk-ZKALTI3E.js";import"../../chunk-X36OBDKD.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-MC6FNME3.js";import"../../chunk-PWUYHFON.js";import"../../chunk-276MJCIE.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as CostCalculatorFlow};
2
2
  //# sourceMappingURL=CostCalculatorFlow.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-HHMKYM4S.js";import"../../chunk-KSHK3ZPX.js";import"../../chunk-Y6K2UK3D.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-52J6QK2N.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as CostCalculatorForm};
1
+ import{a}from"../../chunk-VFR5R7GS.js";import"../../chunk-KSHK3ZPX.js";import"../../chunk-SYYKU72Z.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as CostCalculatorForm};
2
2
  //# sourceMappingURL=CostCalculatorForm.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../../chunk-G7ELSCK7.js";import"../../../chunk-OZCFRM4R.js";import"../../../chunk-X36OBDKD.js";import"../../../chunk-WVJDCDGZ.js";import"../../../chunk-PWUYHFON.js";import"../../../chunk-276MJCIE.js";import"../../../chunk-52J6QK2N.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-GVDARE4K.js";import"../../../chunk-CNYSTJVL.js";import"../../../chunk-TC3SWPEN.js";import"../../../chunk-P37U34EQ.js";export{a as SalaryField};
1
+ import{a}from"../../../chunk-S4WAMYEE.js";import"../../../chunk-ZKALTI3E.js";import"../../../chunk-X36OBDKD.js";import"../../../chunk-WVJDCDGZ.js";import"../../../chunk-PWUYHFON.js";import"../../../chunk-276MJCIE.js";import"../../../chunk-MPMOHDZP.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-STEO7MS2.js";import"../../../chunk-CNYSTJVL.js";import"../../../chunk-TC3SWPEN.js";import"../../../chunk-P37U34EQ.js";export{a as SalaryField};
2
2
  //# sourceMappingURL=SalaryField.js.map
@@ -1,2 +1,2 @@
1
- import{c as a,d as b}from"../../chunk-M6ZWJ7KV.js";import"../../chunk-G7ELSCK7.js";import"../../chunk-UPRUP24B.js";import"../../chunk-OZCFRM4R.js";import"../../chunk-X36OBDKD.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-MC6FNME3.js";import"../../chunk-PWUYHFON.js";import"../../chunk-276MJCIE.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-52J6QK2N.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as defaultEstimationOptions,b as useCostCalculator};
1
+ import{c as a,d as b}from"../../chunk-LOBYJTDX.js";import"../../chunk-S4WAMYEE.js";import"../../chunk-UPRUP24B.js";import"../../chunk-ZKALTI3E.js";import"../../chunk-X36OBDKD.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-MC6FNME3.js";import"../../chunk-PWUYHFON.js";import"../../chunk-276MJCIE.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as defaultEstimationOptions,b as useCostCalculator};
2
2
  //# sourceMappingURL=hooks.js.map
@@ -1,2 +1,2 @@
1
- import"../../chunk-YJXRJTOH.js";import{a as j}from"../../chunk-L6CLZL2D.js";import"../../chunk-CVXZNBHC.js";import"../../chunk-3TAUIOLW.js";import"../../chunk-ZOTFG7GS.js";import"../../chunk-MIALHORP.js";import"../../chunk-NTJN7NCK.js";import"../../chunk-2IOIRPXX.js";import"../../chunk-BHXNRWYC.js";import{a as e}from"../../chunk-HHMKYM4S.js";import{a as g}from"../../chunk-LU6YNL6P.js";import{a as f}from"../../chunk-HRIDANZ6.js";import{a as i}from"../../chunk-KKM4IXYC.js";import{a as h}from"../../chunk-DYB3RWP7.js";import{a as d}from"../../chunk-TQNMLD3A.js";import"../../chunk-KSHK3ZPX.js";import{b as a,d as c}from"../../chunk-M6ZWJ7KV.js";import"../../chunk-G7ELSCK7.js";import"../../chunk-UPRUP24B.js";import"../../chunk-OZCFRM4R.js";import"../../chunk-X36OBDKD.js";import"../../chunk-WVJDCDGZ.js";import{d as b}from"../../chunk-MC6FNME3.js";import"../../chunk-PWUYHFON.js";import"../../chunk-276MJCIE.js";import"../../chunk-Y6K2UK3D.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-52J6QK2N.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{i as CostCalculatorDisclaimer,d as CostCalculatorFlow,e as CostCalculatorForm,g as CostCalculatorResetButton,j as CostCalculatorResults,f as CostCalculatorSubmitButton,a as buildCostCalculatorEstimationPayload,h as disclaimerData,c as useCostCalculator,b as useCostCalculatorEstimationPdf};
1
+ import"../../chunk-YJXRJTOH.js";import{a as j}from"../../chunk-L6CLZL2D.js";import"../../chunk-CVXZNBHC.js";import"../../chunk-3TAUIOLW.js";import"../../chunk-ZOTFG7GS.js";import"../../chunk-MIALHORP.js";import"../../chunk-NTJN7NCK.js";import"../../chunk-2IOIRPXX.js";import"../../chunk-BHXNRWYC.js";import{a as e}from"../../chunk-VFR5R7GS.js";import{a as g}from"../../chunk-LU6YNL6P.js";import{a as f}from"../../chunk-HRIDANZ6.js";import{a as i}from"../../chunk-KKM4IXYC.js";import{a as h}from"../../chunk-DYB3RWP7.js";import{a as d}from"../../chunk-6WFPF53B.js";import"../../chunk-KSHK3ZPX.js";import{b as a,d as c}from"../../chunk-LOBYJTDX.js";import"../../chunk-S4WAMYEE.js";import"../../chunk-UPRUP24B.js";import"../../chunk-ZKALTI3E.js";import"../../chunk-X36OBDKD.js";import"../../chunk-WVJDCDGZ.js";import{d as b}from"../../chunk-MC6FNME3.js";import"../../chunk-PWUYHFON.js";import"../../chunk-276MJCIE.js";import"../../chunk-SYYKU72Z.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{i as CostCalculatorDisclaimer,d as CostCalculatorFlow,e as CostCalculatorForm,g as CostCalculatorResetButton,j as CostCalculatorResults,f as CostCalculatorSubmitButton,a as buildCostCalculatorEstimationPayload,h as disclaimerData,c as useCostCalculator,b as useCostCalculatorEstimationPdf};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{a,b}from"../../chunk-M6ZWJ7KV.js";import"../../chunk-G7ELSCK7.js";import"../../chunk-UPRUP24B.js";import"../../chunk-OZCFRM4R.js";import"../../chunk-X36OBDKD.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-MC6FNME3.js";import"../../chunk-PWUYHFON.js";import"../../chunk-276MJCIE.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-52J6QK2N.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{b as buildPayload,a as buildValidationSchema};
1
+ import{a,b}from"../../chunk-LOBYJTDX.js";import"../../chunk-S4WAMYEE.js";import"../../chunk-UPRUP24B.js";import"../../chunk-ZKALTI3E.js";import"../../chunk-X36OBDKD.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-MC6FNME3.js";import"../../chunk-PWUYHFON.js";import"../../chunk-276MJCIE.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{b as buildPayload,a as buildValidationSchema};
2
2
  //# sourceMappingURL=utils.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-QJWVOD4K.js";import"../../chunk-7TOZZQQJ.js";import"../../chunk-2XVOKTPC.js";import"../../chunk-5KX664N7.js";import"../../chunk-BIXYNFMY.js";import"../../chunk-6ACGE24H.js";import"../../chunk-DBRBPYIF.js";import"../../chunk-CM7ZXKYC.js";import"../../chunk-5NCRPBBP.js";import"../../chunk-R4PWQPR6.js";import"../../chunk-KFVOK5X5.js";import"../../chunk-PGWKJ6FK.js";import"../../chunk-CCJOYSVQ.js";import"../../chunk-IKJFPDZL.js";import"../../chunk-XIPPSRO6.js";import"../../chunk-OZCFRM4R.js";import"../../chunk-X36OBDKD.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-PWUYHFON.js";import"../../chunk-QW4JPW6J.js";import"../../chunk-276MJCIE.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-Y6K2UK3D.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-52J6QK2N.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as OnboardingFlow};
1
+ import{a}from"../../chunk-BFZQYTQN.js";import"../../chunk-7TOZZQQJ.js";import"../../chunk-VCYSWPLV.js";import"../../chunk-GTXQK2J6.js";import"../../chunk-YDW7CPPR.js";import"../../chunk-PWWX66GV.js";import"../../chunk-DBRBPYIF.js";import"../../chunk-5RPT35EL.js";import"../../chunk-5NCRPBBP.js";import"../../chunk-R4PWQPR6.js";import"../../chunk-KFVOK5X5.js";import"../../chunk-PGWKJ6FK.js";import"../../chunk-DIF7GZA2.js";import"../../chunk-2YGGLGBG.js";import"../../chunk-XIPPSRO6.js";import"../../chunk-ZKALTI3E.js";import"../../chunk-X36OBDKD.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-PWUYHFON.js";import"../../chunk-QW4JPW6J.js";import"../../chunk-276MJCIE.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-SYYKU72Z.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as OnboardingFlow};
2
2
  //# sourceMappingURL=OnboardingFlow.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../../chunk-IKJFPDZL.js";import"../../../chunk-OZCFRM4R.js";import"../../../chunk-X36OBDKD.js";import"../../../chunk-WVJDCDGZ.js";import"../../../chunk-PWUYHFON.js";import"../../../chunk-276MJCIE.js";import"../../../chunk-52J6QK2N.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-GVDARE4K.js";import"../../../chunk-CNYSTJVL.js";import"../../../chunk-TC3SWPEN.js";import"../../../chunk-P37U34EQ.js";export{a as AnnualGrossSalary};
1
+ import{a}from"../../../chunk-2YGGLGBG.js";import"../../../chunk-ZKALTI3E.js";import"../../../chunk-X36OBDKD.js";import"../../../chunk-WVJDCDGZ.js";import"../../../chunk-PWUYHFON.js";import"../../../chunk-276MJCIE.js";import"../../../chunk-MPMOHDZP.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-STEO7MS2.js";import"../../../chunk-CNYSTJVL.js";import"../../../chunk-TC3SWPEN.js";import"../../../chunk-P37U34EQ.js";export{a as AnnualGrossSalary};
2
2
  //# sourceMappingURL=AnnualGrossSalary.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../../chunk-5KX664N7.js";import"../../../chunk-CM7ZXKYC.js";import"../../../chunk-PGWKJ6FK.js";import"../../../chunk-QW4JPW6J.js";import"../../../chunk-Y6K2UK3D.js";import"../../../chunk-OYI5OCMY.js";import"../../../chunk-CFIJKJXD.js";import"../../../chunk-52J6QK2N.js";import"../../../chunk-WZSGDTVV.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-GVDARE4K.js";import"../../../chunk-CNYSTJVL.js";import"../../../chunk-TC3SWPEN.js";import"../../../chunk-P37U34EQ.js";export{a as BasicInformationStep};
1
+ import{a}from"../../../chunk-GTXQK2J6.js";import"../../../chunk-5RPT35EL.js";import"../../../chunk-PGWKJ6FK.js";import"../../../chunk-QW4JPW6J.js";import"../../../chunk-SYYKU72Z.js";import"../../../chunk-OYI5OCMY.js";import"../../../chunk-CFIJKJXD.js";import"../../../chunk-MPMOHDZP.js";import"../../../chunk-WZSGDTVV.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-STEO7MS2.js";import"../../../chunk-CNYSTJVL.js";import"../../../chunk-TC3SWPEN.js";import"../../../chunk-P37U34EQ.js";export{a as BasicInformationStep};
2
2
  //# sourceMappingURL=BasicInformationStep.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../../chunk-BIXYNFMY.js";import"../../../chunk-CM7ZXKYC.js";import"../../../chunk-PGWKJ6FK.js";import"../../../chunk-QW4JPW6J.js";import"../../../chunk-Y6K2UK3D.js";import"../../../chunk-OYI5OCMY.js";import"../../../chunk-CFIJKJXD.js";import"../../../chunk-52J6QK2N.js";import"../../../chunk-WZSGDTVV.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-GVDARE4K.js";import"../../../chunk-CNYSTJVL.js";import"../../../chunk-TC3SWPEN.js";import"../../../chunk-P37U34EQ.js";export{a as BenefitsStep};
1
+ import{a}from"../../../chunk-YDW7CPPR.js";import"../../../chunk-5RPT35EL.js";import"../../../chunk-PGWKJ6FK.js";import"../../../chunk-QW4JPW6J.js";import"../../../chunk-SYYKU72Z.js";import"../../../chunk-OYI5OCMY.js";import"../../../chunk-CFIJKJXD.js";import"../../../chunk-MPMOHDZP.js";import"../../../chunk-WZSGDTVV.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-STEO7MS2.js";import"../../../chunk-CNYSTJVL.js";import"../../../chunk-TC3SWPEN.js";import"../../../chunk-P37U34EQ.js";export{a as BenefitsStep};
2
2
  //# sourceMappingURL=BenefitsStep.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../../chunk-6ACGE24H.js";import"../../../chunk-CM7ZXKYC.js";import"../../../chunk-PGWKJ6FK.js";import"../../../chunk-QW4JPW6J.js";import"../../../chunk-Y6K2UK3D.js";import"../../../chunk-OYI5OCMY.js";import"../../../chunk-CFIJKJXD.js";import"../../../chunk-52J6QK2N.js";import"../../../chunk-WZSGDTVV.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-GVDARE4K.js";import"../../../chunk-CNYSTJVL.js";import"../../../chunk-TC3SWPEN.js";import"../../../chunk-P37U34EQ.js";export{a as ContractDetailsStep};
1
+ import{a}from"../../../chunk-PWWX66GV.js";import"../../../chunk-5RPT35EL.js";import"../../../chunk-PGWKJ6FK.js";import"../../../chunk-QW4JPW6J.js";import"../../../chunk-SYYKU72Z.js";import"../../../chunk-OYI5OCMY.js";import"../../../chunk-CFIJKJXD.js";import"../../../chunk-MPMOHDZP.js";import"../../../chunk-WZSGDTVV.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-STEO7MS2.js";import"../../../chunk-CNYSTJVL.js";import"../../../chunk-TC3SWPEN.js";import"../../../chunk-P37U34EQ.js";export{a as ContractDetailsStep};
2
2
  //# sourceMappingURL=ContractDetailsStep.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../../chunk-CM7ZXKYC.js";import"../../../chunk-PGWKJ6FK.js";import"../../../chunk-QW4JPW6J.js";import"../../../chunk-Y6K2UK3D.js";import"../../../chunk-OYI5OCMY.js";import"../../../chunk-CFIJKJXD.js";import"../../../chunk-52J6QK2N.js";import"../../../chunk-WZSGDTVV.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-GVDARE4K.js";import"../../../chunk-CNYSTJVL.js";import"../../../chunk-TC3SWPEN.js";import"../../../chunk-P37U34EQ.js";export{a as OnboardingForm};
1
+ import{a}from"../../../chunk-5RPT35EL.js";import"../../../chunk-PGWKJ6FK.js";import"../../../chunk-QW4JPW6J.js";import"../../../chunk-SYYKU72Z.js";import"../../../chunk-OYI5OCMY.js";import"../../../chunk-CFIJKJXD.js";import"../../../chunk-MPMOHDZP.js";import"../../../chunk-WZSGDTVV.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-STEO7MS2.js";import"../../../chunk-CNYSTJVL.js";import"../../../chunk-TC3SWPEN.js";import"../../../chunk-P37U34EQ.js";export{a as OnboardingForm};
2
2
  //# sourceMappingURL=OnboardingForm.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../../chunk-2XVOKTPC.js";import"../../../chunk-CM7ZXKYC.js";import"../../../chunk-PGWKJ6FK.js";import"../../../chunk-QW4JPW6J.js";import"../../../chunk-Y6K2UK3D.js";import"../../../chunk-OYI5OCMY.js";import"../../../chunk-CFIJKJXD.js";import"../../../chunk-52J6QK2N.js";import"../../../chunk-WZSGDTVV.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-GVDARE4K.js";import"../../../chunk-CNYSTJVL.js";import"../../../chunk-TC3SWPEN.js";import"../../../chunk-P37U34EQ.js";export{a as SelectCountryStep};
1
+ import{a}from"../../../chunk-VCYSWPLV.js";import"../../../chunk-5RPT35EL.js";import"../../../chunk-PGWKJ6FK.js";import"../../../chunk-QW4JPW6J.js";import"../../../chunk-SYYKU72Z.js";import"../../../chunk-OYI5OCMY.js";import"../../../chunk-CFIJKJXD.js";import"../../../chunk-MPMOHDZP.js";import"../../../chunk-WZSGDTVV.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-STEO7MS2.js";import"../../../chunk-CNYSTJVL.js";import"../../../chunk-TC3SWPEN.js";import"../../../chunk-P37U34EQ.js";export{a as SelectCountryStep};
2
2
  //# sourceMappingURL=SelectCountryStep.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-CCJOYSVQ.js";import"../../chunk-IKJFPDZL.js";import"../../chunk-XIPPSRO6.js";import"../../chunk-OZCFRM4R.js";import"../../chunk-X36OBDKD.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-PWUYHFON.js";import"../../chunk-QW4JPW6J.js";import"../../chunk-276MJCIE.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-52J6QK2N.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as useOnboarding};
1
+ import{a}from"../../chunk-DIF7GZA2.js";import"../../chunk-2YGGLGBG.js";import"../../chunk-XIPPSRO6.js";import"../../chunk-ZKALTI3E.js";import"../../chunk-X36OBDKD.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-PWUYHFON.js";import"../../chunk-QW4JPW6J.js";import"../../chunk-276MJCIE.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as useOnboarding};
2
2
  //# sourceMappingURL=hooks.js.map
@@ -1,2 +1,2 @@
1
- import"../../chunk-GULCZWSK.js";import{a}from"../../chunk-QJWVOD4K.js";import"../../chunk-7TOZZQQJ.js";import"../../chunk-2XVOKTPC.js";import"../../chunk-5KX664N7.js";import"../../chunk-BIXYNFMY.js";import"../../chunk-6ACGE24H.js";import"../../chunk-DBRBPYIF.js";import"../../chunk-CM7ZXKYC.js";import"../../chunk-5NCRPBBP.js";import"../../chunk-R4PWQPR6.js";import"../../chunk-KFVOK5X5.js";import"../../chunk-PGWKJ6FK.js";import"../../chunk-CCJOYSVQ.js";import"../../chunk-IKJFPDZL.js";import"../../chunk-XIPPSRO6.js";import"../../chunk-OZCFRM4R.js";import"../../chunk-X36OBDKD.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-PWUYHFON.js";import"../../chunk-QW4JPW6J.js";import"../../chunk-276MJCIE.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-Y6K2UK3D.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-52J6QK2N.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as OnboardingFlow};
1
+ import"../../chunk-GULCZWSK.js";import{a}from"../../chunk-BFZQYTQN.js";import"../../chunk-7TOZZQQJ.js";import"../../chunk-VCYSWPLV.js";import"../../chunk-GTXQK2J6.js";import"../../chunk-YDW7CPPR.js";import"../../chunk-PWWX66GV.js";import"../../chunk-DBRBPYIF.js";import"../../chunk-5RPT35EL.js";import"../../chunk-5NCRPBBP.js";import"../../chunk-R4PWQPR6.js";import"../../chunk-KFVOK5X5.js";import"../../chunk-PGWKJ6FK.js";import"../../chunk-DIF7GZA2.js";import"../../chunk-2YGGLGBG.js";import"../../chunk-XIPPSRO6.js";import"../../chunk-ZKALTI3E.js";import"../../chunk-X36OBDKD.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-PWUYHFON.js";import"../../chunk-QW4JPW6J.js";import"../../chunk-276MJCIE.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-SYYKU72Z.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as OnboardingFlow};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-BLVS2A23.js";import"../../chunk-V4X62BBS.js";import"../../chunk-MRYRNB7Y.js";import"../../chunk-Y6K2UK3D.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-52J6QK2N.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as AdditionalDetailsForm};
1
+ import{a}from"../../chunk-RBC6WNYP.js";import"../../chunk-7522S3KZ.js";import"../../chunk-MRYRNB7Y.js";import"../../chunk-SYYKU72Z.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as AdditionalDetailsForm};
2
2
  //# sourceMappingURL=AdditionalDetailsForm.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-CK2Y7YLV.js";import"../../chunk-V4X62BBS.js";import"../../chunk-MRYRNB7Y.js";import"../../chunk-Y6K2UK3D.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-52J6QK2N.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as EmployeeCommunicationForm};
1
+ import{a}from"../../chunk-EGJR5MXK.js";import"../../chunk-7522S3KZ.js";import"../../chunk-MRYRNB7Y.js";import"../../chunk-SYYKU72Z.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as EmployeeCommunicationForm};
2
2
  //# sourceMappingURL=EmployeeComunicationForm.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-ZHGFPGWR.js";import"../../chunk-V4X62BBS.js";import"../../chunk-MRYRNB7Y.js";import"../../chunk-Y6K2UK3D.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-52J6QK2N.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as PaidTimeOffForm};
1
+ import{a}from"../../chunk-CIIUTHY7.js";import"../../chunk-7522S3KZ.js";import"../../chunk-MRYRNB7Y.js";import"../../chunk-SYYKU72Z.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as PaidTimeOffForm};
2
2
  //# sourceMappingURL=PaidTimeOffForm.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-PJ6EQF5M.js";import"../../chunk-V4X62BBS.js";import"../../chunk-MRYRNB7Y.js";import"../../chunk-Y6K2UK3D.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-52J6QK2N.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as TerminationDetailsForm};
1
+ import{a}from"../../chunk-XTC73RFN.js";import"../../chunk-7522S3KZ.js";import"../../chunk-MRYRNB7Y.js";import"../../chunk-SYYKU72Z.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as TerminationDetailsForm};
2
2
  //# sourceMappingURL=TerminationDetailsForm.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-RNR4JEHX.js";import"../../chunk-JW2HLB6X.js";import"../../chunk-SYEPIESJ.js";import"../../chunk-6O3WKNSB.js";import"../../chunk-HSW5HMHH.js";import"../../chunk-VX2UC3HG.js";import"../../chunk-XSHHMBMT.js";import"../../chunk-XFD3ULUF.js";import"../../chunk-JODJFARP.js";import"../../chunk-WWANHPT7.js";import"../../chunk-W5DG5WWJ.js";import"../../chunk-S4XU4SE7.js";import"../../chunk-BLVS2A23.js";import"../../chunk-CK2Y7YLV.js";import"../../chunk-ZHGFPGWR.js";import"../../chunk-ABFF6YSW.js";import"../../chunk-PJ6EQF5M.js";import"../../chunk-V4X62BBS.js";import"../../chunk-MRYRNB7Y.js";import"../../chunk-PWUYHFON.js";import"../../chunk-VTNGEN34.js";import"../../chunk-QW4JPW6J.js";import"../../chunk-276MJCIE.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-Y6K2UK3D.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-52J6QK2N.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as TerminationFlow};
1
+ import{a}from"../../chunk-PRFH5KY7.js";import"../../chunk-JW2HLB6X.js";import"../../chunk-SYEPIESJ.js";import"../../chunk-6O3WKNSB.js";import"../../chunk-HSW5HMHH.js";import"../../chunk-VX2UC3HG.js";import"../../chunk-XSHHMBMT.js";import"../../chunk-XFD3ULUF.js";import"../../chunk-JODJFARP.js";import"../../chunk-WWANHPT7.js";import"../../chunk-W5DG5WWJ.js";import"../../chunk-S4XU4SE7.js";import"../../chunk-RBC6WNYP.js";import"../../chunk-EGJR5MXK.js";import"../../chunk-CIIUTHY7.js";import"../../chunk-ABFF6YSW.js";import"../../chunk-XTC73RFN.js";import"../../chunk-7522S3KZ.js";import"../../chunk-MRYRNB7Y.js";import"../../chunk-PWUYHFON.js";import"../../chunk-VTNGEN34.js";import"../../chunk-QW4JPW6J.js";import"../../chunk-276MJCIE.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-SYYKU72Z.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as TerminationFlow};
2
2
  //# sourceMappingURL=TerminationFlow.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-V4X62BBS.js";import"../../chunk-MRYRNB7Y.js";import"../../chunk-Y6K2UK3D.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-52J6QK2N.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as TerminationForm};
1
+ import{a}from"../../chunk-7522S3KZ.js";import"../../chunk-MRYRNB7Y.js";import"../../chunk-SYYKU72Z.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as TerminationForm};
2
2
  //# sourceMappingURL=TerminationForm.js.map
@@ -1,2 +1,2 @@
1
- import"../../chunk-M22FKNEY.js";import{a}from"../../chunk-RNR4JEHX.js";import"../../chunk-JW2HLB6X.js";import"../../chunk-SYEPIESJ.js";import"../../chunk-6O3WKNSB.js";import"../../chunk-HSW5HMHH.js";import"../../chunk-VX2UC3HG.js";import"../../chunk-XSHHMBMT.js";import"../../chunk-XFD3ULUF.js";import"../../chunk-JODJFARP.js";import"../../chunk-WWANHPT7.js";import"../../chunk-W5DG5WWJ.js";import"../../chunk-S4XU4SE7.js";import"../../chunk-BLVS2A23.js";import"../../chunk-CK2Y7YLV.js";import"../../chunk-ZHGFPGWR.js";import"../../chunk-ABFF6YSW.js";import"../../chunk-PJ6EQF5M.js";import"../../chunk-V4X62BBS.js";import"../../chunk-MRYRNB7Y.js";import"../../chunk-PWUYHFON.js";import"../../chunk-VTNGEN34.js";import"../../chunk-QW4JPW6J.js";import"../../chunk-276MJCIE.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-Y6K2UK3D.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-52J6QK2N.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-GVDARE4K.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as TerminationFlow};
1
+ import"../../chunk-M22FKNEY.js";import{a}from"../../chunk-PRFH5KY7.js";import"../../chunk-JW2HLB6X.js";import"../../chunk-SYEPIESJ.js";import"../../chunk-6O3WKNSB.js";import"../../chunk-HSW5HMHH.js";import"../../chunk-VX2UC3HG.js";import"../../chunk-XSHHMBMT.js";import"../../chunk-XFD3ULUF.js";import"../../chunk-JODJFARP.js";import"../../chunk-WWANHPT7.js";import"../../chunk-W5DG5WWJ.js";import"../../chunk-S4XU4SE7.js";import"../../chunk-RBC6WNYP.js";import"../../chunk-EGJR5MXK.js";import"../../chunk-CIIUTHY7.js";import"../../chunk-ABFF6YSW.js";import"../../chunk-XTC73RFN.js";import"../../chunk-7522S3KZ.js";import"../../chunk-MRYRNB7Y.js";import"../../chunk-PWUYHFON.js";import"../../chunk-VTNGEN34.js";import"../../chunk-QW4JPW6J.js";import"../../chunk-276MJCIE.js";import"../../chunk-PJBAQZ6G.js";import"../../chunk-SYYKU72Z.js";import"../../chunk-OYI5OCMY.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-MPMOHDZP.js";import"../../chunk-WZSGDTVV.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-STEO7MS2.js";import"../../chunk-CNYSTJVL.js";import"../../chunk-TC3SWPEN.js";import"../../chunk-P37U34EQ.js";export{a as TerminationFlow};
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import"./chunk-M22FKNEY.js";import{a as or}from"./chunk-RNR4JEHX.js";import"./chunk-JW2HLB6X.js";import"./chunk-SYEPIESJ.js";import"./chunk-6O3WKNSB.js";import"./chunk-HSW5HMHH.js";import"./chunk-VX2UC3HG.js";import"./chunk-XSHHMBMT.js";import"./chunk-XFD3ULUF.js";import"./chunk-JODJFARP.js";import"./chunk-WWANHPT7.js";import"./chunk-W5DG5WWJ.js";import"./chunk-S4XU4SE7.js";import"./chunk-BLVS2A23.js";import"./chunk-CK2Y7YLV.js";import"./chunk-ZHGFPGWR.js";import"./chunk-ABFF6YSW.js";import"./chunk-PJ6EQF5M.js";import"./chunk-V4X62BBS.js";import"./chunk-MRYRNB7Y.js";import"./chunk-GULCZWSK.js";import{a as ir}from"./chunk-QJWVOD4K.js";import"./chunk-7TOZZQQJ.js";import"./chunk-2XVOKTPC.js";import"./chunk-5KX664N7.js";import"./chunk-BIXYNFMY.js";import"./chunk-6ACGE24H.js";import"./chunk-DBRBPYIF.js";import"./chunk-CM7ZXKYC.js";import"./chunk-5NCRPBBP.js";import"./chunk-R4PWQPR6.js";import"./chunk-KFVOK5X5.js";import"./chunk-PGWKJ6FK.js";import"./chunk-CCJOYSVQ.js";import"./chunk-IKJFPDZL.js";import"./chunk-XIPPSRO6.js";import"./chunk-YJXRJTOH.js";import{a as S}from"./chunk-L6CLZL2D.js";import"./chunk-CVXZNBHC.js";import"./chunk-3TAUIOLW.js";import"./chunk-ZOTFG7GS.js";import"./chunk-MIALHORP.js";import"./chunk-NTJN7NCK.js";import"./chunk-2IOIRPXX.js";import"./chunk-BHXNRWYC.js";import{a as T}from"./chunk-HHMKYM4S.js";import{a as _}from"./chunk-LU6YNL6P.js";import{a as z}from"./chunk-HRIDANZ6.js";import"./chunk-A7ZJQCNU.js";import{a as E}from"./chunk-KKM4IXYC.js";import{a as B}from"./chunk-DYB3RWP7.js";import{a as R}from"./chunk-TQNMLD3A.js";import"./chunk-KSHK3ZPX.js";import{b as k,d as F}from"./chunk-M6ZWJ7KV.js";import"./chunk-G7ELSCK7.js";import"./chunk-UPRUP24B.js";import"./chunk-OZCFRM4R.js";import"./chunk-X36OBDKD.js";import"./chunk-WVJDCDGZ.js";import{d as C}from"./chunk-MC6FNME3.js";import"./chunk-PWUYHFON.js";import{a as tr}from"./chunk-KT6EAWZO.js";import{a as J}from"./chunk-YECC5GAT.js";import{a as er}from"./chunk-SX5W3CBP.js";import{a as rr,b as ar}from"./chunk-VTNGEN34.js";import"./chunk-QW4JPW6J.js";import"./chunk-Z4FTX74F.js";import{a as g}from"./chunk-276MJCIE.js";import"./chunk-PJBAQZ6G.js";import"./chunk-HS3TP43Z.js";import{a as Z}from"./chunk-SG67NZYI.js";import{a as H}from"./chunk-GATKVXGB.js";import"./chunk-Y6K2UK3D.js";import"./chunk-OYI5OCMY.js";import"./chunk-CFIJKJXD.js";import"./chunk-52J6QK2N.js";import"./chunk-WZSGDTVV.js";import{a as v,c as u}from"./chunk-3ZWDIEEM.js";import"./chunk-GVDARE4K.js";import"./chunk-CNYSTJVL.js";import"./chunk-TVZAFTPT.js";import{c as P,d as h}from"./chunk-TC3SWPEN.js";import{a as e}from"./chunk-P37U34EQ.js";import{QueryClient as q,QueryClientProvider as Q}from"@tanstack/react-query";function l(r){let a=document.documentElement;Object.keys(r).forEach(t=>{let o=r[t];o&&a.style.setProperty(t,o)})}e(l,"setCssProperties");function N(r){let a={};return Object.keys(r).forEach(t=>{a[`--${t}`]=r[t]}),a}e(N,"mapThemeColors");function O(r){return{"--spacing":r}}e(O,"mapThemeSpacing");function j(r){return{"--radius":r}}e(j,"mapThemeBorderRadius");function D(r){return{"--fontSizeBase":r.fontSizeBase}}e(D,"mapThemeFont");function m(r){r?.colors&&l(N(r.colors)),r?.spacing&&l(O(r.spacing)),r?.borderRadius&&l(j(r.borderRadius)),r?.font&&l(D(r.font))}e(m,"applyTheme");import{createContext as I,useEffect as A,useMemo as K}from"react";import{jsx as U}from"react/jsx-runtime";var V=I({theme:{}});function w(r){A(()=>{r.theme&&Object.keys(r.theme).length>0&&m(r.theme)},[r.theme]);let a=K(()=>({theme:r.theme}),[r.theme]);return U(V.Provider,{value:a,children:r.children})}e(w,"ThemeProvider");var f={partners:"https://gateway.partners.remote-sandbox.com",production:"https://gateway.remote.com",sandbox:"https://gateway.remote-sandbox.com",staging:"https://gateway.niceremote.com"};import{createClient as W}from"@hey-api/client-fetch";import{useQuery as M}from"@tanstack/react-query";import{useRef as x}from"react";function L(r){try{return new URL(r),!0}catch{return!1}}e(L,"isValidUrl");var b=e(({auth:r,options:a})=>{let t=x(null),{refetch:o}=M({queryKey:["auth"],queryFn:r,enabled:!1}),c=a?.environment?f[a?.environment]:"https://gateway.remote.com",s=g.getConfig(),p="0.4.1";a?.environment&&a?.environment!=="production"&&h(p);let d=!!a?.proxy&&L(a.proxy.url);return a?.proxy&&!d&&console.error("Invalid proxy URL provided. Using default base URL."),x(W({...s,headers:{...s.headers,...d?a?.proxy?.headers:{},"X-Client-Name":"remote-flows-sdk","X-Client-Version":p},baseUrl:d?a.proxy?.url:c,auth:e(async()=>{function y(i){return!i||Date.now()+6e4>i}if(e(y,"hasTokenExpired"),!t.current||y(t.current.expiresAt)){let{data:i}=await o();i&&(t.current={accessToken:i.accessToken,expiresAt:Date.now()+i.expiresIn*1e3})}return t.current?.accessToken},"auth")}))},"useAuth");import{jsx as n}from"react/jsx-runtime";var X=new q;function Y({children:r,auth:a,proxy:t,environment:o}){let c=b({auth:a,options:{proxy:t,environment:o}});return n(u.Provider,{value:{client:c.current},children:r})}e(Y,"RemoteFlowContextWrapper");function $({children:r,components:a}){return n(v.Provider,{value:a?{components:a}:{components:{}},children:r})}e($,"FormFieldsProvider");function G({auth:r,children:a,components:t,theme:o,proxy:c,environment:s}){return n(Q,{client:X,children:n($,{components:t,children:n(Y,{auth:r,proxy:c,environment:s,children:n(w,{theme:o,children:a})})})})}e(G,"RemoteFlows");export{Z as ContractAmendmentConfirmationForm,tr as ContractAmendmentFlow,H as ContractAmendmentForm,J as ContractAmendmentSubmit,E as CostCalculatorDisclaimer,R as CostCalculatorFlow,T as CostCalculatorForm,_ as CostCalculatorResetButton,S as CostCalculatorResults,z as CostCalculatorSubmitButton,ir as OnboardingFlow,G as RemoteFlows,or as TerminationFlow,k as buildCostCalculatorEstimationPayload,B as disclaimerData,P as transformYupErrorsIntoObject,er as useContractAmendment,F as useCostCalculator,C as useCostCalculatorEstimationPdf,rr as useEmploymentQuery,ar as useTimeOffQuery};
1
+ import"./chunk-M22FKNEY.js";import{a as or}from"./chunk-PRFH5KY7.js";import"./chunk-JW2HLB6X.js";import"./chunk-SYEPIESJ.js";import"./chunk-6O3WKNSB.js";import"./chunk-HSW5HMHH.js";import"./chunk-VX2UC3HG.js";import"./chunk-XSHHMBMT.js";import"./chunk-XFD3ULUF.js";import"./chunk-JODJFARP.js";import"./chunk-WWANHPT7.js";import"./chunk-W5DG5WWJ.js";import"./chunk-S4XU4SE7.js";import"./chunk-RBC6WNYP.js";import"./chunk-EGJR5MXK.js";import"./chunk-CIIUTHY7.js";import"./chunk-ABFF6YSW.js";import"./chunk-XTC73RFN.js";import"./chunk-7522S3KZ.js";import"./chunk-MRYRNB7Y.js";import"./chunk-GULCZWSK.js";import{a as ir}from"./chunk-BFZQYTQN.js";import"./chunk-7TOZZQQJ.js";import"./chunk-VCYSWPLV.js";import"./chunk-GTXQK2J6.js";import"./chunk-YDW7CPPR.js";import"./chunk-PWWX66GV.js";import"./chunk-DBRBPYIF.js";import"./chunk-5RPT35EL.js";import"./chunk-5NCRPBBP.js";import"./chunk-R4PWQPR6.js";import"./chunk-KFVOK5X5.js";import"./chunk-PGWKJ6FK.js";import"./chunk-DIF7GZA2.js";import"./chunk-2YGGLGBG.js";import"./chunk-XIPPSRO6.js";import"./chunk-YJXRJTOH.js";import{a as S}from"./chunk-L6CLZL2D.js";import"./chunk-CVXZNBHC.js";import"./chunk-3TAUIOLW.js";import"./chunk-ZOTFG7GS.js";import"./chunk-MIALHORP.js";import"./chunk-NTJN7NCK.js";import"./chunk-2IOIRPXX.js";import"./chunk-BHXNRWYC.js";import{a as T}from"./chunk-VFR5R7GS.js";import{a as _}from"./chunk-LU6YNL6P.js";import{a as z}from"./chunk-HRIDANZ6.js";import"./chunk-A7ZJQCNU.js";import{a as E}from"./chunk-KKM4IXYC.js";import{a as B}from"./chunk-DYB3RWP7.js";import{a as R}from"./chunk-6WFPF53B.js";import"./chunk-KSHK3ZPX.js";import{b as k,d as F}from"./chunk-LOBYJTDX.js";import"./chunk-S4WAMYEE.js";import"./chunk-UPRUP24B.js";import"./chunk-ZKALTI3E.js";import"./chunk-X36OBDKD.js";import"./chunk-WVJDCDGZ.js";import{d as C}from"./chunk-MC6FNME3.js";import"./chunk-PWUYHFON.js";import{a as tr}from"./chunk-YD3IHRVA.js";import{a as J}from"./chunk-YECC5GAT.js";import{a as er}from"./chunk-SX5W3CBP.js";import{a as rr,b as ar}from"./chunk-VTNGEN34.js";import"./chunk-QW4JPW6J.js";import"./chunk-Z4FTX74F.js";import{a as g}from"./chunk-276MJCIE.js";import"./chunk-PJBAQZ6G.js";import"./chunk-HS3TP43Z.js";import{a as Z}from"./chunk-HUEFMP54.js";import{a as H}from"./chunk-5I2GCSAL.js";import"./chunk-SYYKU72Z.js";import"./chunk-OYI5OCMY.js";import"./chunk-CFIJKJXD.js";import"./chunk-MPMOHDZP.js";import"./chunk-WZSGDTVV.js";import{a as v,c as u}from"./chunk-3ZWDIEEM.js";import"./chunk-STEO7MS2.js";import"./chunk-CNYSTJVL.js";import"./chunk-TVZAFTPT.js";import{c as P,d as h}from"./chunk-TC3SWPEN.js";import{a as e}from"./chunk-P37U34EQ.js";import{QueryClient as q,QueryClientProvider as Q}from"@tanstack/react-query";function l(r){let a=document.documentElement;Object.keys(r).forEach(t=>{let o=r[t];o&&a.style.setProperty(t,o)})}e(l,"setCssProperties");function N(r){let a={};return Object.keys(r).forEach(t=>{a[`--${t}`]=r[t]}),a}e(N,"mapThemeColors");function O(r){return{"--spacing":r}}e(O,"mapThemeSpacing");function j(r){return{"--radius":r}}e(j,"mapThemeBorderRadius");function D(r){return{"--fontSizeBase":r.fontSizeBase}}e(D,"mapThemeFont");function m(r){r?.colors&&l(N(r.colors)),r?.spacing&&l(O(r.spacing)),r?.borderRadius&&l(j(r.borderRadius)),r?.font&&l(D(r.font))}e(m,"applyTheme");import{createContext as I,useEffect as A,useMemo as K}from"react";import{jsx as U}from"react/jsx-runtime";var V=I({theme:{}});function w(r){A(()=>{r.theme&&Object.keys(r.theme).length>0&&m(r.theme)},[r.theme]);let a=K(()=>({theme:r.theme}),[r.theme]);return U(V.Provider,{value:a,children:r.children})}e(w,"ThemeProvider");var f={partners:"https://gateway.partners.remote-sandbox.com",production:"https://gateway.remote.com",sandbox:"https://gateway.remote-sandbox.com",staging:"https://gateway.niceremote.com"};import{createClient as W}from"@hey-api/client-fetch";import{useQuery as M}from"@tanstack/react-query";import{useRef as x}from"react";function L(r){try{return new URL(r),!0}catch{return!1}}e(L,"isValidUrl");var b=e(({auth:r,options:a})=>{let t=x(null),{refetch:o}=M({queryKey:["auth"],queryFn:r,enabled:!1}),c=a?.environment?f[a?.environment]:"https://gateway.remote.com",s=g.getConfig(),p="0.4.2-alpha.0";a?.environment&&a?.environment!=="production"&&h(p);let d=!!a?.proxy&&L(a.proxy.url);return a?.proxy&&!d&&console.error("Invalid proxy URL provided. Using default base URL."),x(W({...s,headers:{...s.headers,...d?a?.proxy?.headers:{},"X-Client-Name":"remote-flows-sdk","X-Client-Version":p},baseUrl:d?a.proxy?.url:c,auth:e(async()=>{function y(i){return!i||Date.now()+6e4>i}if(e(y,"hasTokenExpired"),!t.current||y(t.current.expiresAt)){let{data:i}=await o();i&&(t.current={accessToken:i.accessToken,expiresAt:Date.now()+i.expiresIn*1e3})}return t.current?.accessToken},"auth")}))},"useAuth");import{jsx as n}from"react/jsx-runtime";var X=new q;function Y({children:r,auth:a,proxy:t,environment:o}){let c=b({auth:a,options:{proxy:t,environment:o}});return n(u.Provider,{value:{client:c.current},children:r})}e(Y,"RemoteFlowContextWrapper");function $({children:r,components:a}){return n(v.Provider,{value:a?{components:a}:{components:{}},children:r})}e($,"FormFieldsProvider");function G({auth:r,children:a,components:t,theme:o,proxy:c,environment:s}){return n(Q,{client:X,children:n($,{components:t,children:n(Y,{auth:r,proxy:c,environment:s,children:n(w,{theme:o,children:a})})})})}e(G,"RemoteFlows");export{Z as ContractAmendmentConfirmationForm,tr as ContractAmendmentFlow,H as ContractAmendmentForm,J as ContractAmendmentSubmit,E as CostCalculatorDisclaimer,R as CostCalculatorFlow,T as CostCalculatorForm,_ as CostCalculatorResetButton,S as CostCalculatorResults,z as CostCalculatorSubmitButton,ir as OnboardingFlow,G as RemoteFlows,or as TerminationFlow,k as buildCostCalculatorEstimationPayload,B as disclaimerData,P as transformYupErrorsIntoObject,er as useContractAmendment,F as useCostCalculator,C as useCostCalculatorEstimationPdf,rr as useEmploymentQuery,ar as useTimeOffQuery};
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/RemoteFlowsProvider.tsx","../src/lib/applyTheme.ts","../src/theme.tsx","../src/environments.ts","../src/useAuth.ts"],"sourcesContent":["import { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport type { PropsWithChildren } from 'react';\nimport React from 'react';\n\nimport { ThemeProvider } from '@/src/theme';\nimport { FormFieldsContext, RemoteFlowContext } from './context';\nimport { Components, RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { useAuth } from './useAuth';\n\nconst queryClient = new QueryClient();\n\ntype RemoteFlowContextWrapperProps = {\n auth: RemoteFlowsSDKProps['auth'];\n children: React.ReactNode;\n environment?: RemoteFlowsSDKProps['environment'];\n proxy?: RemoteFlowsSDKProps['proxy'];\n};\n\nfunction RemoteFlowContextWrapper({\n children,\n auth,\n proxy,\n environment,\n}: RemoteFlowContextWrapperProps) {\n const remoteApiClient = useAuth({\n auth,\n options: {\n proxy,\n environment,\n },\n });\n return (\n <RemoteFlowContext.Provider value={{ client: remoteApiClient.current }}>\n {children}\n </RemoteFlowContext.Provider>\n );\n}\n\nexport function FormFieldsProvider({\n children,\n components,\n}: PropsWithChildren<{\n components?: Components;\n}>) {\n return (\n <FormFieldsContext.Provider\n value={components ? { components } : { components: {} }}\n >\n {children}\n </FormFieldsContext.Provider>\n );\n}\n\nexport function RemoteFlows({\n auth,\n children,\n components,\n theme,\n proxy,\n environment,\n}: PropsWithChildren<RemoteFlowsSDKProps>) {\n return (\n <QueryClientProvider client={queryClient}>\n <FormFieldsProvider components={components}>\n <RemoteFlowContextWrapper\n auth={auth}\n proxy={proxy}\n environment={environment}\n >\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </RemoteFlowContextWrapper>\n </FormFieldsProvider>\n </QueryClientProvider>\n );\n}\n","import {\n CssThemeBorder,\n CssThemeColors,\n CssThemeFont,\n CssThemeSpacing,\n ThemeColors,\n ThemeFont,\n ThemeProviderProps,\n} from '@/src/types/theme';\n\nfunction setCssProperties(variables: Record<string, string>) {\n const root = document.documentElement;\n Object.keys(variables).forEach((v) => {\n const propertyVal = variables[v];\n if (propertyVal) {\n root.style.setProperty(v, propertyVal);\n }\n });\n}\n\nfunction mapThemeColors(colors: ThemeColors): CssThemeColors {\n const result: CssThemeColors = {};\n Object.keys(colors).forEach((key) => {\n result[`--${key}` as keyof CssThemeColors] =\n colors[key as keyof ThemeColors];\n });\n return result;\n}\n\nfunction mapThemeSpacing(spacing: string): CssThemeSpacing {\n return {\n '--spacing': spacing,\n };\n}\n\nfunction mapThemeBorderRadius(borderRadius: string): CssThemeBorder {\n return {\n '--radius': borderRadius,\n };\n}\n\nfunction mapThemeFont(font: ThemeFont): CssThemeFont {\n return {\n '--fontSizeBase': font.fontSizeBase,\n };\n}\n\nexport function applyTheme(theme: ThemeProviderProps['theme']) {\n if (theme?.colors) {\n setCssProperties(mapThemeColors(theme.colors));\n }\n\n if (theme?.spacing) {\n setCssProperties(mapThemeSpacing(theme.spacing));\n }\n\n if (theme?.borderRadius) {\n setCssProperties(mapThemeBorderRadius(theme.borderRadius));\n }\n\n if (theme?.font) {\n setCssProperties(mapThemeFont(theme.font));\n }\n}\n","import { applyTheme } from '@/src/lib/applyTheme';\nimport { createContext, useEffect, useMemo } from 'react';\nimport { ThemeProviderProps } from './types/theme';\n\nconst ThemeContext = createContext<Omit<ThemeProviderProps, 'children'>>({\n theme: {},\n});\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n useEffect(() => {\n if (props.theme && Object.keys(props.theme).length > 0) {\n applyTheme(props.theme);\n }\n }, [props.theme]);\n\n const value = useMemo(() => {\n return { theme: props.theme };\n }, [props.theme]);\n\n return (\n <ThemeContext.Provider value={value}>\n {props.children}\n </ThemeContext.Provider>\n );\n}\n","export const ENVIRONMENTS = {\n partners: 'https://gateway.partners.remote-sandbox.com',\n production: 'https://gateway.remote.com',\n sandbox: 'https://gateway.remote-sandbox.com',\n staging: 'https://gateway.niceremote.com',\n};\n","import { client } from '@/src/client/client.gen';\nimport { ENVIRONMENTS } from '@/src/environments';\nimport { createClient } from '@hey-api/client-fetch';\nimport { useQuery } from '@tanstack/react-query';\nimport { useRef } from 'react';\nimport { RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { debug } from './lib/utils';\n\ntype AuthResponse = {\n accessToken: string;\n expiresIn: number;\n};\n\ntype Options = Partial<{\n environment: keyof typeof ENVIRONMENTS;\n proxy: RemoteFlowsSDKProps['proxy'];\n}>;\n\nfunction isValidUrl(url: string) {\n try {\n new URL(url);\n return true;\n } catch {\n return false;\n }\n}\n\nexport const useAuth = ({\n auth,\n options,\n}: {\n auth: () => Promise<AuthResponse>;\n options?: Options;\n}) => {\n const session = useRef<{ accessToken: string; expiresAt: number } | null>(\n null,\n );\n const { refetch } = useQuery({\n queryKey: ['auth'],\n queryFn: auth,\n enabled: false,\n });\n\n const baseUrl = options?.environment\n ? ENVIRONMENTS[options?.environment]\n : process.env.REMOTE_GATEWAY_URL;\n\n const clientConfig = client.getConfig();\n const npmPackageVersion = process.env.VERSION || 'unknown';\n\n if (options?.environment && options?.environment !== 'production') {\n debug(npmPackageVersion);\n }\n\n const isValidProxy = !!options?.proxy && isValidUrl(options.proxy.url);\n\n if (options?.proxy && !isValidProxy) {\n console.error('Invalid proxy URL provided. Using default base URL.');\n }\n\n return useRef(\n createClient({\n ...clientConfig,\n headers: {\n ...clientConfig.headers,\n ...(isValidProxy ? options?.proxy?.headers : {}),\n 'X-Client-Name': 'remote-flows-sdk',\n 'X-Client-Version': npmPackageVersion,\n },\n baseUrl: isValidProxy ? options.proxy?.url : baseUrl,\n auth: async () => {\n function hasTokenExpired(expiresAt: number | undefined) {\n return !expiresAt || Date.now() + 60000 > expiresAt;\n }\n if (!session.current || hasTokenExpired(session.current.expiresAt)) {\n const { data } = await refetch();\n if (data) {\n session.current = {\n accessToken: data.accessToken,\n expiresAt: Date.now() + data.expiresIn * 1000,\n };\n }\n }\n return session.current?.accessToken;\n },\n }),\n );\n};\n"],"mappings":"kjFAAA,OAAS,eAAAA,EAAa,uBAAAC,MAA2B,wBCUjD,SAASC,EAAiBC,EAAmC,CAC3D,IAAMC,EAAO,SAAS,gBACtB,OAAO,KAAKD,CAAS,EAAE,QAASE,GAAM,CACpC,IAAMC,EAAcH,EAAUE,CAAC,EAC3BC,GACFF,EAAK,MAAM,YAAYC,EAAGC,CAAW,CAEzC,CAAC,CACH,CARSC,EAAAL,EAAA,oBAUT,SAASM,EAAeC,EAAqC,CAC3D,IAAMC,EAAyB,CAAC,EAChC,cAAO,KAAKD,CAAM,EAAE,QAASE,GAAQ,CACnCD,EAAO,KAAKC,CAAG,EAA0B,EACvCF,EAAOE,CAAwB,CACnC,CAAC,EACMD,CACT,CAPSH,EAAAC,EAAA,kBAST,SAASI,EAAgBC,EAAkC,CACzD,MAAO,CACL,YAAaA,CACf,CACF,CAJSN,EAAAK,EAAA,mBAMT,SAASE,EAAqBC,EAAsC,CAClE,MAAO,CACL,WAAYA,CACd,CACF,CAJSR,EAAAO,EAAA,wBAMT,SAASE,EAAaC,EAA+B,CACnD,MAAO,CACL,iBAAkBA,EAAK,YACzB,CACF,CAJSV,EAAAS,EAAA,gBAMF,SAASE,EAAWC,EAAoC,CACzDA,GAAO,QACTjB,EAAiBM,EAAeW,EAAM,MAAM,CAAC,EAG3CA,GAAO,SACTjB,EAAiBU,EAAgBO,EAAM,OAAO,CAA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CAAE,WAAAA,CAAW,EAAI,CAAE,WAAY,CAAC,CAAE,EAErD,SAAAT,EACH,CAEJ,CAbgBO,EAAAC,EAAA,sBAeT,SAASG,EAAY,CAC1B,KAAAV,EACA,SAAAD,EACA,WAAAS,EACA,MAAAG,EACA,MAAAV,EACA,YAAAC,CACF,EAA2C,CACzC,OACEP,EAACiB,EAAA,CAAoB,OAAQhB,EAC3B,SAAAD,EAACY,EAAA,CAAmB,WAAYC,EAC9B,SAAAb,EAACG,EAAA,CACC,KAAME,EACN,MAAOC,EACP,YAAaC,EAEb,SAAAP,EAACkB,EAAA,CAAc,MAAOF,EAAQ,SAAAZ,EAAS,EACzC,EACF,EACF,CAEJ,CArBgBO,EAAAI,EAAA","names":["QueryClient","QueryClientProvider","setCssProperties","variables","root","v","propertyVal","__name","mapThemeColors","colors","result","key","mapThemeSpacing","spacing","mapThemeBorderRadius","borderRadius","mapThemeFont","font","applyTheme","theme","createContext","useEffect","useMemo","jsx","ThemeContext","createContext","ThemeProvider","props","useEffect","applyTheme","value","useMemo","__name","ENVIRONMENTS","createClient","useQuery","useRef","isValidUrl","url","__name","useAuth","auth","options","session","useRef","refetch","useQuery","baseUrl","ENVIRONMENTS","clientConfig","client","npmPackageVersion","debug","isValidProxy","createClient","hasTokenExpired","expiresAt","data","jsx","queryClient","QueryClient","RemoteFlowContextWrapper","children","auth","proxy","environment","remoteApiClient","useAuth","RemoteFlowContext","__name","FormFieldsProvider","components","FormFieldsContext","RemoteFlows","theme","QueryClientProvider","ThemeProvider"]}
1
+ {"version":3,"sources":["../src/RemoteFlowsProvider.tsx","../src/lib/applyTheme.ts","../src/theme.tsx","../src/environments.ts","../src/useAuth.ts"],"sourcesContent":["import { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport type { PropsWithChildren } from 'react';\nimport React from 'react';\n\nimport { ThemeProvider } from '@/src/theme';\nimport { FormFieldsContext, RemoteFlowContext } from './context';\nimport { Components, RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { useAuth } from './useAuth';\n\nconst queryClient = new QueryClient();\n\ntype RemoteFlowContextWrapperProps = {\n auth: RemoteFlowsSDKProps['auth'];\n children: React.ReactNode;\n environment?: RemoteFlowsSDKProps['environment'];\n proxy?: RemoteFlowsSDKProps['proxy'];\n};\n\nfunction RemoteFlowContextWrapper({\n children,\n auth,\n proxy,\n environment,\n}: RemoteFlowContextWrapperProps) {\n const remoteApiClient = useAuth({\n auth,\n options: {\n proxy,\n environment,\n },\n });\n return (\n <RemoteFlowContext.Provider value={{ client: remoteApiClient.current }}>\n {children}\n </RemoteFlowContext.Provider>\n );\n}\n\nexport function FormFieldsProvider({\n children,\n components,\n}: PropsWithChildren<{\n components?: Components;\n}>) {\n return (\n <FormFieldsContext.Provider\n value={components ? { components } : { components: {} }}\n >\n {children}\n </FormFieldsContext.Provider>\n );\n}\n\nexport function RemoteFlows({\n auth,\n children,\n components,\n theme,\n proxy,\n environment,\n}: PropsWithChildren<RemoteFlowsSDKProps>) {\n return (\n <QueryClientProvider client={queryClient}>\n <FormFieldsProvider components={components}>\n <RemoteFlowContextWrapper\n auth={auth}\n proxy={proxy}\n environment={environment}\n >\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </RemoteFlowContextWrapper>\n </FormFieldsProvider>\n </QueryClientProvider>\n );\n}\n","import {\n CssThemeBorder,\n CssThemeColors,\n CssThemeFont,\n CssThemeSpacing,\n ThemeColors,\n ThemeFont,\n ThemeProviderProps,\n} from '@/src/types/theme';\n\nfunction setCssProperties(variables: Record<string, string>) {\n const root = document.documentElement;\n Object.keys(variables).forEach((v) => {\n const propertyVal = variables[v];\n if (propertyVal) {\n root.style.setProperty(v, propertyVal);\n }\n });\n}\n\nfunction mapThemeColors(colors: ThemeColors): CssThemeColors {\n const result: CssThemeColors = {};\n Object.keys(colors).forEach((key) => {\n result[`--${key}` as keyof CssThemeColors] =\n colors[key as keyof ThemeColors];\n });\n return result;\n}\n\nfunction mapThemeSpacing(spacing: string): CssThemeSpacing {\n return {\n '--spacing': spacing,\n };\n}\n\nfunction mapThemeBorderRadius(borderRadius: string): CssThemeBorder {\n return {\n '--radius': borderRadius,\n };\n}\n\nfunction mapThemeFont(font: ThemeFont): CssThemeFont {\n return {\n '--fontSizeBase': font.fontSizeBase,\n };\n}\n\nexport function applyTheme(theme: ThemeProviderProps['theme']) {\n if (theme?.colors) {\n setCssProperties(mapThemeColors(theme.colors));\n }\n\n if (theme?.spacing) {\n setCssProperties(mapThemeSpacing(theme.spacing));\n }\n\n if (theme?.borderRadius) {\n setCssProperties(mapThemeBorderRadius(theme.borderRadius));\n }\n\n if (theme?.font) {\n setCssProperties(mapThemeFont(theme.font));\n }\n}\n","import { applyTheme } from '@/src/lib/applyTheme';\nimport { createContext, useEffect, useMemo } from 'react';\nimport { ThemeProviderProps } from './types/theme';\n\nconst ThemeContext = createContext<Omit<ThemeProviderProps, 'children'>>({\n theme: {},\n});\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n useEffect(() => {\n if (props.theme && Object.keys(props.theme).length > 0) {\n applyTheme(props.theme);\n }\n }, [props.theme]);\n\n const value = useMemo(() => {\n return { theme: props.theme };\n }, [props.theme]);\n\n return (\n <ThemeContext.Provider value={value}>\n {props.children}\n </ThemeContext.Provider>\n );\n}\n","export const ENVIRONMENTS = {\n partners: 'https://gateway.partners.remote-sandbox.com',\n production: 'https://gateway.remote.com',\n sandbox: 'https://gateway.remote-sandbox.com',\n staging: 'https://gateway.niceremote.com',\n};\n","import { client } from '@/src/client/client.gen';\nimport { ENVIRONMENTS } from '@/src/environments';\nimport { createClient } from '@hey-api/client-fetch';\nimport { useQuery } from '@tanstack/react-query';\nimport { useRef } from 'react';\nimport { RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { debug } from './lib/utils';\n\ntype AuthResponse = {\n accessToken: string;\n expiresIn: number;\n};\n\ntype Options = Partial<{\n environment: keyof typeof ENVIRONMENTS;\n proxy: RemoteFlowsSDKProps['proxy'];\n}>;\n\nfunction isValidUrl(url: string) {\n try {\n new URL(url);\n return true;\n } catch {\n return false;\n }\n}\n\nexport const useAuth = ({\n auth,\n options,\n}: {\n auth: () => Promise<AuthResponse>;\n options?: Options;\n}) => {\n const session = useRef<{ accessToken: string; expiresAt: number } | null>(\n null,\n );\n const { refetch } = useQuery({\n queryKey: ['auth'],\n queryFn: auth,\n enabled: false,\n });\n\n const baseUrl = options?.environment\n ? ENVIRONMENTS[options?.environment]\n : process.env.REMOTE_GATEWAY_URL;\n\n const clientConfig = client.getConfig();\n const npmPackageVersion = process.env.VERSION || 'unknown';\n\n if (options?.environment && options?.environment !== 'production') {\n debug(npmPackageVersion);\n }\n\n const isValidProxy = !!options?.proxy && isValidUrl(options.proxy.url);\n\n if (options?.proxy && !isValidProxy) {\n console.error('Invalid proxy URL provided. Using default base URL.');\n }\n\n return useRef(\n createClient({\n ...clientConfig,\n headers: {\n ...clientConfig.headers,\n ...(isValidProxy ? options?.proxy?.headers : {}),\n 'X-Client-Name': 'remote-flows-sdk',\n 'X-Client-Version': npmPackageVersion,\n },\n baseUrl: isValidProxy ? options.proxy?.url : baseUrl,\n auth: async () => {\n function hasTokenExpired(expiresAt: number | undefined) {\n return !expiresAt || Date.now() + 60000 > expiresAt;\n }\n if (!session.current || hasTokenExpired(session.current.expiresAt)) {\n const { data } = await refetch();\n if (data) {\n session.current = {\n accessToken: data.accessToken,\n expiresAt: Date.now() + data.expiresIn * 1000,\n };\n }\n }\n return session.current?.accessToken;\n },\n }),\n );\n};\n"],"mappings":"kjFAAA,OAAS,eAAAA,EAAa,uBAAAC,MAA2B,wBCUjD,SAASC,EAAiBC,EAAmC,CAC3D,IAAMC,EAAO,SAAS,gBACtB,OAAO,KAAKD,CAAS,EAAE,QAASE,GAAM,CACpC,IAAMC,EAAcH,EAAUE,CAAC,EAC3BC,GACFF,EAAK,MAAM,YAAYC,EAAGC,CAAW,CAEzC,CAAC,CACH,CARSC,EAAAL,EAAA,oBAUT,SAASM,EAAeC,EAAqC,CAC3D,IAAMC,EA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AAK,UAAY,GAC3C,EAEJ,CACA,OAAOd,EAAQ,SAAS,WAC1B,EAdM,OAeR,CAAC,CACH,CACF,EA5DuB,WJKnB,cAAAe,MAAA,oBAvBJ,IAAMC,EAAc,IAAIC,EASxB,SAASC,EAAyB,CAChC,SAAAC,EACA,KAAAC,EACA,MAAAC,EACA,YAAAC,CACF,EAAkC,CAChC,IAAMC,EAAkBC,EAAQ,CAC9B,KAAAJ,EACA,QAAS,CACP,MAAAC,EACA,YAAAC,CACF,CACF,CAAC,EACD,OACEP,EAACU,EAAkB,SAAlB,CAA2B,MAAO,CAAE,OAAQF,EAAgB,OAAQ,EAClE,SAAAJ,EACH,CAEJ,CAlBSO,EAAAR,EAAA,4BAoBF,SAASS,EAAmB,CACjC,SAAAR,EACA,WAAAS,CACF,EAEI,CACF,OACEb,EAACc,EAAkB,SAAlB,CACC,MAAOD,EAAa,CAAE,WAAAA,CAAW,EAAI,CAAE,WAAY,CAAC,CAAE,EAErD,SAAAT,EACH,CAEJ,CAbgBO,EAAAC,EAAA,sBAeT,SAASG,EAAY,CAC1B,KAAAV,EACA,SAAAD,EACA,WAAAS,EACA,MAAAG,EACA,MAAAV,EACA,YAAAC,CACF,EAA2C,CACzC,OACEP,EAACiB,EAAA,CAAoB,OAAQhB,EAC3B,SAAAD,EAACY,EAAA,CAAmB,WAAYC,EAC9B,SAAAb,EAACG,EAAA,CACC,KAAME,EACN,MAAOC,EACP,YAAaC,EAEb,SAAAP,EAACkB,EAAA,CAAc,MAAOF,EAAQ,SAAAZ,EAAS,EACzC,EACF,EACF,CAEJ,CArBgBO,EAAAI,EAAA","names":["QueryClient","QueryClientProvider","setCssProperties","variables","root","v","propertyVal","__name","mapThemeColors","colors","result","key","mapThemeSpacing","spacing","mapThemeBorderRadius","borderRadius","mapThemeFont","font","applyTheme","theme","createContext","useEffect","useMemo","jsx","ThemeContext","createContext","ThemeProvider","props","useEffect","applyTheme","value","useMemo","__name","ENVIRONMENTS","createClient","useQuery","useRef","isValidUrl","url","__name","useAuth","auth","options","session","useRef","refetch","useQuery","baseUrl","ENVIRONMENTS","clientConfig","client","npmPackageVersion","debug","isValidProxy","createClient","hasTokenExpired","expiresAt","data","jsx","queryClient","QueryClient","RemoteFlowContextWrapper","children","auth","proxy","environment","remoteApiClient","useAuth","RemoteFlowContext","__name","FormFieldsProvider","components","FormFieldsContext","RemoteFlows","theme","QueryClientProvider","ThemeProvider"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remoteoss/remote-flows",
3
- "version": "0.4.1",
3
+ "version": "0.4.2-alpha.0",
4
4
  "scripts": {
5
5
  "build": "NODE_ENV=production tsup",
6
6
  "ci": "npm run build && npm run check-format && npm run check-exports && npm run lint && npm run test",
@@ -1,2 +0,0 @@
1
- import{b as u}from"./chunk-3ZWDIEEM.js";import{b as F,c as f,d as x,e as _,f as g,g as b}from"./chunk-GVDARE4K.js";import{a as c}from"./chunk-TC3SWPEN.js";import{a as i}from"./chunk-P37U34EQ.js";import{useFormContext as N}from"react-hook-form";import{jsx as y}from"react/jsx-runtime";function C({className:o,type:r,...t}){return y("input",{type:r,"data-slot":"input",className:c("shadow-xs border-input file:text-foreground placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-xl border bg-transparent px-4 py-7 text-sm transition-[color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-focused","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",o),...t})}i(C,"Input");import{jsx as e,jsxs as D}from"react/jsx-runtime";function q({name:o,description:r,label:t,type:v,onChange:s,component:R,includeErrorMessage:T=!0,additionalProps:w={},maxLength:l,...h}){let{components:I}=u(),{control:P}=N();return e(F,{control:P,name:o,render:({field:n,fieldState:m})=>{let d=R||I?.text;if(d){let a={name:o,description:r,label:t,type:v,onChange:s,metadata:w,maxLength:l,...h};return e(d,{field:{...n,onChange:i(p=>{n.onChange(p),s?.(p)},"onChange")},fieldState:m,fieldData:a})}return D(f,{"data-field":o,className:`RemoteFlows__TextField__Item__${o}`,children:[t&&e(x,{className:"RemoteFlows__TextField__Label",children:t}),e(_,{children:e(C,{...n,value:n.value??"",onChange:a=>{n.onChange(a),s?.(a)},className:"RemoteFlows__TextField__Input",placeholder:t,maxLength:l})}),r&&e(g,{className:"RemoteFlows__TextField__Description",children:r}),T&&m.error&&e(b,{className:"RemoteFlows__TextField__Error"})]})}})}i(q,"TextField");export{q as a};
2
- //# sourceMappingURL=chunk-52J6QK2N.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/form/fields/TextField.tsx","../src/components/ui/input.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport * as React from 'react';\n\nimport { useFormFields } from '@/src/context';\nimport { Components, JSFField } from '@/src/types/remoteFlows';\nimport { useFormContext } from 'react-hook-form';\nimport {\n FormControl,\n FormDescription,\n FormField,\n FormItem,\n FormLabel,\n FormMessage,\n} from '../../ui/form';\nimport { Input } from '../../ui/input';\n\nexport type TextFieldProps = React.ComponentProps<'input'> & {\n name: string;\n} & Partial<\n JSFField & {\n onChange?: (value: any) => void;\n component?: Components['text'];\n includeErrorMessage?: boolean;\n additionalProps?: Record<string, unknown>;\n }\n >;\n\nexport function TextField({\n name,\n description,\n label,\n type,\n onChange,\n component,\n includeErrorMessage = true,\n additionalProps = {},\n maxLength,\n ...rest\n}: TextFieldProps) {\n const { components } = useFormFields();\n const { control } = useFormContext();\n\n return (\n <FormField\n control={control}\n name={name}\n render={({ field, fieldState }) => {\n const CustomTextField = component || components?.text;\n if (CustomTextField) {\n const customTextFieldProps = {\n name,\n description,\n label,\n type,\n onChange,\n metadata: additionalProps,\n maxLength,\n ...rest,\n };\n return (\n <CustomTextField\n field={{\n ...field,\n onChange: (value: any) => {\n field.onChange(value);\n onChange?.(value);\n },\n }}\n fieldState={fieldState}\n fieldData={customTextFieldProps}\n />\n );\n }\n\n return (\n <FormItem\n data-field={name}\n className={`RemoteFlows__TextField__Item__${name}`}\n >\n {label && (\n <FormLabel className=\"RemoteFlows__TextField__Label\">\n {label}\n </FormLabel>\n )}\n <FormControl>\n <Input\n {...field}\n value={field.value ?? ''}\n onChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n field.onChange(event);\n onChange?.(event);\n }}\n className=\"RemoteFlows__TextField__Input\"\n placeholder={label}\n maxLength={maxLength}\n />\n </FormControl>\n {description && (\n <FormDescription className=\"RemoteFlows__TextField__Description\">\n {description}\n </FormDescription>\n )}\n {includeErrorMessage && fieldState.error && (\n <FormMessage className=\"RemoteFlows__TextField__Error\" />\n )}\n </FormItem>\n );\n }}\n />\n );\n}\n","import * as React from 'react';\n\nimport { cn } from '@/src/lib/utils';\n\nfunction Input({ className, type, ...props }: React.ComponentProps<'input'>) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n 'shadow-xs border-input file:text-foreground placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-xl border bg-transparent px-4 py-7 text-sm transition-[color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',\n 'focus-visible:border-focused',\n 'aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input };\n"],"mappings":"mMAKA,OAAS,kBAAAA,MAAsB,kBCC3B,cAAAC,MAAA,oBAFJ,SAASC,EAAM,CAAE,UAAAC,EAAW,KAAAC,EAAM,GAAGC,CAAM,EAAkC,CAC3E,OACEJ,EAAC,SACC,KAAMG,EACN,YAAU,QACV,UAAWE,EACT,6WACA,+BACA,yGACAH,CACF,EACC,GAAGE,EACN,CAEJ,CAdSE,EAAAL,EAAA,SDwDG,cAAAM,EAeF,QAAAC,MAfE,oBAjCL,SAASC,EAAU,CACxB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","jsx","Input","className","type","props","cn","__name","jsx","jsxs","TextField","name","description","label","type","onChange","component","includeErrorMessage","additionalProps","maxLength","rest","components","useFormFields","control","useFormContext","FormField","field","fieldState","CustomTextField","customTextFieldProps","__name","value","FormItem","FormLabel","FormControl","Input","event","FormDescription","FormMessage"]}
@@ -1,2 +0,0 @@
1
- import{b as y}from"./chunk-PGWKJ6FK.js";import{b as u}from"./chunk-QW4JPW6J.js";import{a as F}from"./chunk-Y6K2UK3D.js";import{b as f}from"./chunk-CFIJKJXD.js";import{a as p}from"./chunk-GVDARE4K.js";import{a as m}from"./chunk-P37U34EQ.js";import{useEffect as b}from"react";import{useForm as O}from"react-hook-form";import{jsx as d}from"react/jsx-runtime";function N({defaultValues:l,onSubmit:S,components:g}){let{formId:E,onboardingBag:o}=y(),w=f(o.handleValidation),r=O({resolver:w,defaultValues:l,shouldUnregister:!1,mode:"onBlur"});b(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),b(()=>{let t=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==l[i])&&o?.checkFieldUpdates(e)});return()=>t?.unsubscribe()},[]);let h=m(async(t,e)=>{let s=e?.nativeEvent;if(s?.isDraftSubmission){let{onSuccess:i,onError:c}=s.draftCallbacks;try{if(!await r.trigger())return;let n=await o.onSubmit(t);if(n?.data)i?.();else if(n?.error){let k=o.stepState.currentStep.name,B=o.meta?.fields?.[k],P=u(n?.fieldErrors||[],B);c?.({error:n.error,rawError:n.rawError,fieldErrors:P})}}catch(a){c?.({error:a,rawError:a,fieldErrors:[]})}}else S(t)},"handleSubmit");return d(p,{...r,children:d("form",{id:E,onSubmit:r.handleSubmit(h),className:"space-y-4 RemoteFlows__OnboardingForm",children:d(F,{components:g,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})})})}m(N,"OnboardingForm");export{N as a};
2
- //# sourceMappingURL=chunk-CM7ZXKYC.js.map
@@ -1,2 +0,0 @@
1
- import{a as p}from"./chunk-Y6K2UK3D.js";import{b as l}from"./chunk-CFIJKJXD.js";import{a as f}from"./chunk-GVDARE4K.js";import{c as u}from"./chunk-CNYSTJVL.js";import{b as F}from"./chunk-TVZAFTPT.js";import{a as r}from"./chunk-P37U34EQ.js";import{useEffect as P}from"react";import{useForm as R}from"react-hook-form";import{jsx as a}from"react/jsx-runtime";var w=["effective_date","reason_for_change","reason_for_change_description","additional_comments","additional_comments_toggle"];function x({onSubmit:_,onError:m,onSuccess:b}){let{formId:A,contractAmendment:{checkFieldUpdates:C,fields:s,onSubmit:h,stepState:S,initialValues:i,handleValidation:g}}=F(),y=l(g),e=R({resolver:y,defaultValues:S.values?.form||i,shouldUnregister:!0,mode:"onBlur"});P(()=>{let t=e?.watch(o=>{(Object.keys(e.formState.dirtyFields).length>0||e.formState.isDirty)&&C(o)});return()=>t?.unsubscribe()},[]);let V=r(async t=>{let o=!1;for(let[c,v]of Object.entries(t))if(!w.includes(c)&&i[c]!==v){o=!0;break}if(!o)return m?.({message:"no_changes_detected_contract_details"});let d=u(t,s,{isPartialValidation:!1});await _?.(d);let n=await h(t);n.error?m?.(n.error):await b?.(n.data)},"handleSubmit");return a(f,{...e,children:a("form",{id:A,"data-testid":"contract-amendment-form",onSubmit:e.handleSubmit(V),className:"space-y-4 RemoteFlows__ContractAmendmentForm",children:a(p,{fields:s})})})}r(x,"ContractAmendmentForm");export{x as a};
2
- //# sourceMappingURL=chunk-GATKVXGB.js.map