@freightos/fusion-location-input 2.1.4 → 2.1.5-34cffdb2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,26 +1,26 @@
1
- # Fusion Location Input #
2
- It is a React front-end shared component library.
3
- contains Fusion Location Input component that allows to enter Location(full address), City, Port.
4
-
5
- ### Owners ###
6
-
7
- * nowwar@freightos.com
8
-
9
- ### Technology Stack ###
10
-
11
- * ReactJS ( FrontEnd Library )
12
-
13
- ----
14
-
15
- ### Consume from your app/micro-front
16
-
17
- - Using npm or yarn to install the package `npm install --save @freightos/fusion-location-input`
18
- - Consume in your application by importing components from commodity ui library:
19
-
20
- ```
21
- import React from 'react';
22
- import ReactDOM from 'react-dom';
23
- import { LocationInput } from '@freightos/fusion-location-input';
24
-
25
- ReactDOM.render(<LocationInput />, document.getElementById('root'));
26
- ```
1
+ # Fusion Location Input #
2
+ It is a React front-end shared component library.
3
+ contains Fusion Location Input component that allows to enter Location(full address), City, Port.
4
+
5
+ ### Owners ###
6
+
7
+ * nowwar@freightos.com
8
+
9
+ ### Technology Stack ###
10
+
11
+ * ReactJS ( FrontEnd Library )
12
+
13
+ ----
14
+
15
+ ### Consume from your app/micro-front
16
+
17
+ - Using npm or yarn to install the package `npm install --save @freightos/fusion-location-input`
18
+ - Consume in your application by importing components from commodity ui library:
19
+
20
+ ```
21
+ import React from 'react';
22
+ import ReactDOM from 'react-dom';
23
+ import { LocationInput } from '@freightos/fusion-location-input';
24
+
25
+ ReactDOM.render(<LocationInput />, document.getElementById('root'));
26
+ ```
@@ -3,7 +3,7 @@
3
3
  "main.js": "/main.bundle.js",
4
4
  "main.js.map": "/main.bundle.js.map",
5
5
  "index.html": "/index.html",
6
- "precache-manifest.016e278e3cd14da77a40a8f2083709a5.js": "/precache-manifest.016e278e3cd14da77a40a8f2083709a5.js",
6
+ "precache-manifest.bd943a4da10dda31f79e54ea09f73afc.js": "/precache-manifest.bd943a4da10dda31f79e54ea09f73afc.js",
7
7
  "service-worker.js": "/service-worker.js"
8
8
  },
9
9
  "entrypoints": [
@@ -1 +1 @@
1
- {"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap","../external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","../external \"@freightos/design-system\"","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/regenerator/index.js","../external \"styled-components\"","../external \"@freightos/freightos-i18n\"","../external \"@freightos/http-client\"","../external \"lodash\"","../../../node_modules/regenerator-runtime/runtime.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/defineProperty.js","helpers/constant.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js","helpers/styled.js","common/helpers/constants.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","components/RecentSearches/constants.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread2.js","common/helpers/styled.js","common/components/Flex.js","helpers/apis.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createClass.js","common/helpers/Environment.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/classCallCheck.js","helpers/utils.js","common/httpClient/doRequest/index.js","components/RecentSearches/apis.js","components/RecentSearches/styled.js","components/RecentSearches/utils.js","components/RecentSearches/components/TruncatedLabel.jsx","components/RecentSearches/components/ItineraryDisplay.jsx","components/RecentSearches/components/ShipmentAndCommodityDisplay.jsx","components/RecentSearches/components/SearchCard.jsx","components/RecentSearches/index.jsx","components/RecentSearches/adapters.js","components/SelectorContent.js","components/DebounceSelect.js","components/MaxPortsPlaceholder.js","index.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE__0__","__WEBPACK_EXTERNAL_MODULE__1__","__WEBPACK_EXTERNAL_MODULE__3__","__WEBPACK_EXTERNAL_MODULE__4__","__WEBPACK_EXTERNAL_MODULE__5__","__WEBPACK_EXTERNAL_MODULE__6__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","runtime","Op","hasOwn","$Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","obj","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","context","Context","_invoke","state","method","arg","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","done","makeInvokeMethod","fn","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","resolve","reject","invoke","result","__await","then","unwrapped","error","undefined","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","displayName","isGeneratorFunction","genFun","ctor","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","_arrayLikeToArray","arr","len","arr2","Array","_unsupportedIterableToArray","minLen","toString","from","test","_slicedToArray","isArray","_arr","_n","_d","_e","_s","_i","_objectWithoutProperties","source","excluded","target","sourceKeys","indexOf","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","arguments","apply","_defineProperty","LOCATION_MODES","LOCATION_MODES_MAP","_LOCATION_MODES_MAP","label","icon","groupedBy","SelectModes","LocationTypes","_taggedTemplateLiteral","strings","raw","freeze","defineProperties","DropdownGlobalStyle","createGlobalStyle","_templateObject","DebounceSelector","styled","Select","_templateObject2","tokens","fdsBorderRadiusXl","fdsColorPrimaryBlue","fdsColorPrimaryBlue10","fdsComponentSpacingXxs","fdsSizeMd","_ref","size","concat","fdsComponentSpacingSm","fdsComponentSpacingXs","fdsColorPrimaryGray80","_ref2","$hasError","fdsColorSemanticRed","fdsColorSemanticRed10","SelectedOptionLabel","span","_templateObject3","fdsFontSizeSm","SelectOptionLabel","div","_templateObject4","StyledMenu","Menu","_templateObject5","fdsBodyTextColorDisabled","NoMatchingResults","_templateObject6","fdsSizeSm","fdsHeadingsFontFamily","FlexSpacings","Icon","_templateObject7","XXLARGE","fdsComponentSpacingXxl","XLARGE","fdsComponentSpacingXl","LARGE","fdsComponentSpacingLg","MEDIUM","fdsComponentSpacingMd","SMALL","XSMALL","XXSMALL","NONE","FlexDirections","_toConsumableArray","SEARCH_FIELDS","TEMPERATURE_SYSTEM","TEMPERATURE_RANGE","TEMPERATURE_RANGES_DATA","_TEMPERATURE_RANGES_D","_TEMPERATURE_RANGE$FR","_TEMPERATURE_RANGE$CO","_TEMPERATURE_RANGE$ER","_TEMPERATURE_RANGE$CR","SEARCH_PLATFORMS","SHIPMENT_OPTIONS","VOLUME_OPTIONS","WEIGHT_OPTIONS","PACKAGE_TYPE","ownKeys","enumerableOnly","symbols","filter","sym","getOwnPropertyDescriptor","getOwnPropertyDescriptors","StyledFlex","$direction","$wrap","_ref3","$alignItems","_ref4","$justifyContent","_ref5","$fullWidth","css","_ref6","$spacing","Flex","_ref$direction","direction","_ref$alignItems","alignItems","_ref$spacing","spacing","justifyContent","fullWidth","rest","_excluded","React","createElement","assign","children","getLocations","_regeneratorRuntime","_callee","locationModes","query","customer","sources","response","_context","reduce","acc","_objectSpread","toUpperCase","code","searchTerm","httpClient","post","limit","data","t0","console","results","_x","_x2","_x3","_defineProperties","props","descriptor","Environment","instance","Constructor","_classCallCheck","protoProps","staticProps","process","REACT_APP_CUSTOM_ENV","getGatewayApiPrefix","isTalaia","domain","isProduction","stableStringify","allKeys","JSON","stringify","k","v","uniqSortedKeys","Set","sort","normalizeLocationForKey","displayLabel","selectedValue","formattedNameOrAddress","countryCode","stateOrProvince","city","latitude","longitude","postalOrZipCode","sourceType","locationType","country","countryName","stableKeyFromLocation","parsed","parse","decodeHtmlEntities","_unused","getLocationInputValue","locations","formatLocation","location","_LOCATION_MODES_MAP$l","Fragment","getLocationInputOption","map","extractFulfillmentCenters","locationsResults","updatedLocationsResults","fulfillmentCenters","option","_objectSpread2","_updatedLocationsResu","address","fetchLocations","activeLocationMode","supportedLocationModes","modes","_LOCATION_MODES_MAP$k","options","onChangeLocation","_callee3","changedLocations","onChange","locationsDetails","_context3","all","_callee2","json","_context2","_x4","Boolean","isLocationAddress","replace","doRequest","_ref$url","url","_ref$data","_ref$options","params","URLSearchParams","headers","saveLastUsedSearch","searchId","id","STitle","fdsColorPrimaryGray60","fdsSizeXs","fdsFontWeightRegular","SCard","UnitIcon","STruncatedLabel","$isLocationLabel","$isPort","SLocationFlag","Avatar","fdsColorPrimaryGray20","STinyWrapper","SListWrapper","formatNumber","toLocaleString","maximumFractionDigits","useGrouping","groupAndOrderLocationsByCountries","groupedByCountry","a","b","localeCompare","TruncatedLabel","_ref$text","text","testId","_ref$isPort","isPort","_ref$isLocationLabel","isLocationLabel","_ref$children","labelRef","useRef","_useState2","useState","isTruncated","setIsTruncated","useEffect","current","element","truncated","scrollWidth","clientWidth","checkTruncation","labelElement","ref","data-test-id","Tooltip","title","ItineraryDisplay","search","index","dataTestId","isMultiOrigin","origin","isMultiDestination","destination","groupedOrigin","groupedDestination","labelOrigin","join","style","marginRight","color","fdsColorPrimaryGray90","flex","labelDestination","ShipmentAndCommodityDisplay","_search$commodity_tem","_search$commodity_tem2","_search$commodity_tem3","platformType","platform_type","icons","shipmentType","shipment_details","unitsPackages","packageType","boxPackages","uniqueIcons","packageItem","_packageItem$type","_packageItem$type$val","includes","chooseIconsType","_useMemo","useMemo","units","volume","weight","weightUnit","volumeUnit","_search$shipment_deta","calculatedUnits","calculatedTEU","pkg","Number","dimensionSelected","parseInt","dimensions","volumeCalculationFactor","formattedVolume","curr","parseFloat","width","height","formattedWeight","uldPackages","_search$shipment_deta2","_search$shipment_deta3","_search$shipment_deta4","_search$shipment_deta5","_search$shipment_deta6","shipmentTotalsBasedOnPackages","isTemperature","commodity","is_temperature","temperatureRange","commodity_temperature","tempRange","temperatureSystem","iconIndex","whiteSpace","SearchCard","setIsOpen","onRecentSearchSelect","handleClick","padding","onClick","RecentSearches","recentSearches","initialValues","firstSixSearches","is_saved","aDate","Date","saved_update_date","getTime","aMaxDate","Math","max","last_time_used_date","orderRecentSearches","TranslatableText","stringId","SelectorContent","isLoading","searchKey","Spin","trim","TRANSLATION_MODULES","SearchAndBook","DebounceSelect","fetchOptions","renderedOptions","_ref$recentSearches","hasError","_ref$debounceTimeout","debounceTimeout","defaultLocation","setOptions","_useState4","setIsLoading","_useState6","setSearchKey","fetchRef","_useState8","isOpen","_useState0","maxTagCount","setMaxTagCount","timeoutRef","prevOptions","clearTimeout","setTimeout","document","activeElement","blur","body","click","active","querySelector","classList","remove","debounceFetcher","loadOptions","optionValue","fetchId","returnOptions","newOptions","Notification","danger","message","description","debounce","_options","match","targetGroup","formattedMatch","find","group","_LOCATION_MODES_MAP$d","toLowerCase","flat","isLocal","loadDefaultLocation","onSearch","loading","filterOption","notFoundContent","allowClear","labelInValue","optionLabelProp","showSearch","onDropdownVisibleChange","open","MaxPortsPlaceholder","omittedPorts","selectedItems","omittedPort","_JSON$parse","LocationInput","_ref$dataTestId","_ref$isOriginLocation","isOriginLocation","_ref$maxPorts","maxPorts","selectedLocation","setSelectedLocation","setActiveLocationMode","selectionMode","setSelectionMode","placeholder","fontSize","fdsFontSizeBase","optionGroups","some","_group$options","_group$options2","locationOptionIcon","OptGroup","fontFamily","Option","paddingLeft","Chip","iconType","renderLocationOptions","selectedPorts","_selectedPorts$","typePort","Message","handleLocationChange","maxTagPlaceholder"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,SAAUA,QAAQ,4BAA6BA,QAAQ,qBAAsBA,QAAQ,6BAA8BA,QAAQ,0BAA2BA,QAAQ,WACtK,oBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,sBAAuB,CAAC,QAAS,2BAA4B,oBAAqB,4BAA6B,yBAA0B,UAAWJ,GACjI,kBAAZC,QACdA,QAA6B,oBAAID,EAAQG,QAAQ,SAAUA,QAAQ,4BAA6BA,QAAQ,qBAAsBA,QAAQ,6BAA8BA,QAAQ,0BAA2BA,QAAQ,WAE/MJ,EAA0B,oBAAIC,E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alModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"@freightos/design-system\"), require(\"styled-components\"), require(\"@freightos/freightos-i18n\"), require(\"@freightos/http-client\"), require(\"lodash\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"FusionLocationInput\", [\"react\", \"@freightos/design-system\", \"styled-components\", \"@freightos/freightos-i18n\", \"@freightos/http-client\", \"lodash\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FusionLocationInput\"] = factory(require(\"react\"), require(\"@freightos/design-system\"), require(\"styled-components\"), require(\"@freightos/freightos-i18n\"), require(\"@freightos/http-client\"), require(\"lodash\"));\n\telse\n\t\troot[\"FusionLocationInput\"] = factory(root[\"React\"], root[\"@freightos/design-system\"], root[\"styled-components\"], root[\"@freightos/freightos-i18n\"], root[\"@freightos/http-client\"], root[\"lodash\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__4__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__6__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"http://ship.freightos.local:8800/FusionLocationInput/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","module.exports = __WEBPACK_EXTERNAL_MODULE__1__;","module.exports = require(\"regenerator-runtime\");\n","module.exports = __WEBPACK_EXTERNAL_MODULE__3__;","module.exports = __WEBPACK_EXTERNAL_MODULE__4__;","module.exports = __WEBPACK_EXTERNAL_MODULE__5__;","module.exports = __WEBPACK_EXTERNAL_MODULE__6__;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithHoles from \"./arrayWithHoles\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray\";\nimport nonIterableRest from \"./nonIterableRest\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","/**\r\n * Default location mode used when no specific mode is selected.\r\n * @type {string}\r\n */\r\nexport const DEFAULT_LOCATION_MODE = '';\r\n\r\nexport const LOCATION_MODES = {\r\n\tAIRPORT: 'airport',\r\n\tSEAPORT: 'seaport',\r\n\tFULFILLMENT_CENTER: 'fulfillment_center',\r\n\tADDRESS_BOOK: 'address_book',\r\n\tLAST_MILE_ADDRESS: 'last_mile_address',\r\n\tADDRESS: 'address',\r\n};\r\n\r\nexport const LOCATION_MODES_MAP = {\r\n\t[LOCATION_MODES.AIRPORT]: { label: 'Airports', key: LOCATION_MODES.AIRPORT, icon: 'mode-air' },\r\n\t[LOCATION_MODES.SEAPORT]: { label: 'Ports', key: LOCATION_MODES.SEAPORT, icon: 'mode-ship' },\r\n\t[LOCATION_MODES.FULFILLMENT_CENTER]: {\r\n\t\tlabel: 'Fulfillment centers',\r\n\t\tkey: LOCATION_MODES.FULFILLMENT_CENTER,\r\n\t\ticon: 'fulfillment-center',\r\n\t},\r\n\t[LOCATION_MODES.ADDRESS_BOOK]: { key: LOCATION_MODES.ADDRESS_BOOK, groupedBy: 'address' },\r\n\t[LOCATION_MODES.LAST_MILE_ADDRESS]: { key: LOCATION_MODES.LAST_MILE_ADDRESS, groupedBy: 'address' },\r\n\t[LOCATION_MODES.ADDRESS]: { label: 'Address', key: LOCATION_MODES.ADDRESS, icon: 'location' },\r\n};\r\n\r\n/**\r\n * Enumeration of selection modes for location input.\r\n * @enum {string}\r\n */\r\nexport const SelectModes = {\r\n\tSINGLE: 'single',\r\n\tMULTIPLE: 'multiple',\r\n};\r\n\r\n/**\r\n * Enumeration of location types for origin and destination.\r\n * @enum {string}\r\n */\r\nexport const LocationTypes = {\r\n\tORIGIN: 'origin',\r\n\tDESTINATION: 'destination',\r\n};\r\n\r\nexport const MAX_TAG_COUNT = 3;\r\nexport const MAX_TAG_COUNT_MULTIPLE = 2;\r\n","export default function _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}","import { Icon, Menu, Select, tokens } from '@freightos/design-system';\r\nimport styled, { createGlobalStyle } from 'styled-components';\r\n\r\nexport const DropdownGlobalStyle = createGlobalStyle`\r\n .ant-select-dropdown {\r\n .ant-select-dropdown-menu {\r\n max-height: 400px;\r\n padding: 0 !important;\r\n margin-top: 0 !important;\r\n }\r\n }\r\n`;\r\n\r\nexport const DebounceSelector = styled(Select)`\r\n\t.ant-select-selection__rendered {\r\n\t\tmin-width: 100% !important;\r\n\t}\r\n\r\n\tli.ant-select-selection__choice {\r\n\t\tborder-radius: ${tokens.fdsBorderRadiusXl};\r\n\t\tborder: none;\r\n\t\tborder-color: ${tokens.fdsColorPrimaryBlue};\r\n\t\tcolor: ${tokens.fdsColorPrimaryBlue};\r\n\t\tbackground-color: ${tokens.fdsColorPrimaryBlue10};\r\n\t\tline-height: 10px !important;\r\n\t\tmargin-right: ${tokens.fdsComponentSpacingXxs};\r\n\t\twidth: fit-content;\r\n\t\tmax-width: 90px;\r\n\t\theight: ${tokens.fdsSizeMd} !important;\r\n\t\t${({size}) => size === 'large' ? `\r\n\t\t\tmargin-top: ${tokens.fdsComponentSpacingSm} !important;\r\n\t\t` : `\r\n\t\t\tmargin-top: 5px !important;\r\n\t\t`}\r\n\r\n\t\t.ant-select-selection__choice__remove {\r\n\t\t\tcolor: ${tokens.fdsColorPrimaryBlue};\r\n\t\t\tmargin-top: ${tokens.fdsComponentSpacingXs} !important;\r\n\t\t}\r\n\r\n\t\t.ant-select-selection__choice__content {\r\n\t\t\tline-height: ${tokens.fdsSizeMd} !important;\r\n\t\t\theight: ${tokens.fdsSizeMd} !important;\r\n\t\t}\r\n\t}\r\n\r\n\tli.ant-select-selection__choice__disabled {\r\n\t\tborder: none;\r\n\t\tbackground-color: transparent;\r\n\t\tpadding: 0;\r\n\t\tpadding-left: 0;\r\n\t\twidth: fit-content;\r\n\t}\r\n\r\n\t.ant-select-dropdown .ant-select-not-found {\r\n\t\tcursor: pointer !important;\r\n\t}\r\n\r\n\t.ant-select-selection-selected-value {\r\n\t\tmax-width: 280px !important;\r\n\t}\r\n\r\n\tli.ant-select-search.ant-select-search--inline {\r\n\t\tmargin-left: -1px !important;\r\n\t}\r\n\t.ant-select-search__field {\r\n\t\tcolor: ${tokens.fdsColorPrimaryGray80} !important;\r\n\t}\r\n\t${({ $hasError }) => $hasError && `\r\n\t\t.ant-select-selection {\r\n\t\t\tcolor: ${tokens.fdsColorSemanticRed};\r\n \t\tborder: 1px solid ${tokens.fdsColorSemanticRed};\r\n \t\tbackground-color: ${tokens.fdsColorSemanticRed10};\r\n\t\t}\r\n\r\n\t\t.ant-select-selection__placeholder, .ant-select-arrow {\r\n\t\t\tcolor: ${tokens.fdsColorSemanticRed};\r\n\t\t}\r\n\t`}\r\n`;\r\n\r\nexport const SelectedOptionLabel = styled.span`\r\n\tfont-size: ${tokens.fdsFontSizeSm} !important;\r\n`;\r\n\r\nexport const SelectOptionLabel = styled.div`\r\n\tfont-size: ${tokens.fdsFontSizeSm} !important;\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\tdisplay: -webkit-box;\r\n\t-webkit-line-clamp: 2;\r\n\t-webkit-box-orient: vertical;\r\n`;\r\n\r\nexport const StyledMenu = styled(Menu)`\r\n\tcursor: pointer !important;\r\n\r\n\t.ant-menu-item-group-title {\r\n\t\tpadding: 0;\r\n\t\tcolor: ${tokens.fdsBodyTextColorDisabled};\r\n\t}\r\n\r\n\t.ant-menu-item {\r\n\t\tpadding: 0;\r\n\t\twhite-space: normal;\r\n\t\tline-height: normal;\r\n\r\n\t\t&:hover {\r\n\t\t\tbackground-color: #f5f5f5;\r\n\t\t}\r\n\t}\r\n`;\r\n\r\nexport const NoMatchingResults = styled.div`\r\n\tfont-size: ${tokens.fdsFontSizeSm};\r\n\tline-height: ${tokens.fdsSizeSm};\r\n\tfont-family: ${tokens.fdsHeadingsFontFamily};\r\n`;\r\n\r\nexport const UnitIcon = styled(Icon)`\r\n\tmargin-right: 0 !important;\r\n\tvertical-align: bottom;\r\n`;\r\n","import { tokens } from '@freightos/design-system';\r\n\r\nexport const FlexSpacings = {\r\n\tXXLARGE: tokens.fdsComponentSpacingXxl,\r\n\tXLARGE: tokens.fdsComponentSpacingXl,\r\n\tLARGE: tokens.fdsComponentSpacingLg,\r\n\tMEDIUM: tokens.fdsComponentSpacingMd,\r\n\tSMALL: tokens.fdsComponentSpacingSm,\r\n\tXSMALL: tokens.fdsComponentSpacingXs,\r\n\tXXSMALL: tokens.fdsComponentSpacingXxs,\r\n\tNONE: 0,\r\n};\r\n\r\nexport const FlexDirections = {\r\n\tVERTICAL: 'vertical',\r\n\tHORIZONTAL: 'horizontal',\r\n};\r\n","import arrayWithoutHoles from \"./arrayWithoutHoles\";\nimport iterableToArray from \"./iterableToArray\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray\";\nimport nonIterableSpread from \"./nonIterableSpread\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export const SEARCH_FIELDS = {\r\n\tORIGIN: 'origin',\r\n\tDESTINATION: 'destination',\r\n\tTOTALS_SHIPMENT: 'totalShipment',\r\n\tUNITS_SHIPMENT: 'unitsShipment',\r\n\tCONTAINER_SHIPMENT: 'containerShipment',\r\n\tCOMMODITY: 'commodity',\r\n\tSHIPMENT_TYPE: 'shipmentType',\r\n\tUNITS: 'units',\r\n\tVOLUME: 'volume',\r\n\tVOLUME_UNIT: 'volumeUnit',\r\n\tWEIGHT: 'weight',\r\n\tWEIGHT_UNIT: 'weightUnit',\r\n\tTURNABLE: 'turnable',\r\n\tSTACKABLE: 'stackable',\r\n\tDEFINE_EACH_UNIT_DIMENSIONS: 'defineEachUnitDimensions',\r\n\tDEFINE_EACH_UNIT_WEIGHT: 'defineEachUnitWeight',\r\n\tUNIT_DIMENSIONS: 'unitDimensions',\r\n\tUNIT_WEIGHTS: 'unitWeights',\r\n\tLENGTH: 'length',\r\n\tHEIGHT: 'height',\r\n\tWIDTH: 'width',\r\n\tTYPE: 'type',\r\n\tDIMENSION_UNIT: 'dimensionUnit',\r\n\tBOX_PACKAGES: 'boxPackages',\r\n\tULD_PACKAGES: 'uldPackages',\r\n\tPACKAGE_TYPE: 'packageType',\r\n\tTOTAL_WEIGHT: 'totalWeight',\r\n\tCONTAINER_PACKAGES: 'containerPackages',\r\n\tDIMENSIONS: 'dimensions',\r\n\tFULLFILLMENT_DETAILS: 'fullfillmentDetails',\r\n\tIS_FULLFILLMENT: 'isFullfillment',\r\n\tCOMMODITY_TEMPERATURE: 'commodityTemperature',\r\n\tBATTERY_HS_CODE: 'batteryHsCode',\r\n\tSUPPORTED_FREIGHT_TYPES: 'supportedFreightTypes',\r\n}\r\n\r\nexport const TEMPERATURE_SYSTEM = {\r\n\tCELSIUS: 'celsius',\r\n\tFAHRENHEIT: 'fahrenheit',\r\n}\r\n\r\nexport const TEMPERATURE_RANGE = {\r\n\tFRO: 'FRO',\r\n\tCOL: 'COL',\r\n\tERT: 'ERT',\r\n\tCRT: 'CRT',\r\n}\r\n\r\nexport const TEMPERATURE_RANGES_DATA = {\r\n\t[TEMPERATURE_RANGE.FRO]: {\r\n\t\t[TEMPERATURE_SYSTEM.CELSIUS]: '-10ºC or below',\r\n\t\t[TEMPERATURE_SYSTEM.FAHRENHEIT]: '14ºF or below',\r\n\t},\r\n\t[TEMPERATURE_RANGE.COL]: {\r\n\t\t[TEMPERATURE_SYSTEM.CELSIUS]: 'From +2ºC To +8ºC',\r\n\t\t[TEMPERATURE_SYSTEM.FAHRENHEIT]: 'From 35.6ºF To 46.4ºF',\r\n\t},\r\n\t[TEMPERATURE_RANGE.ERT]: {\r\n\t\t[TEMPERATURE_SYSTEM.CELSIUS]: 'From +2ºC To +25ºC',\r\n\t\t[TEMPERATURE_SYSTEM.FAHRENHEIT]: 'From 35.6ºF To 77ºF',\r\n\t},\r\n\t[TEMPERATURE_RANGE.CRT]: {\r\n\t\t[TEMPERATURE_SYSTEM.CELSIUS]: 'From +15ºC To +25ºC',\r\n\t\t[TEMPERATURE_SYSTEM.FAHRENHEIT]: 'From 59ºF To 77ºF',\r\n\t},\r\n\r\n};\r\n\r\nexport const SEARCH_PLATFORMS = {\r\n\tBOOKING: 'booking',\r\n\tQUOTATION: 'quotation',\r\n\tBI: 'bi',\r\n}\r\n\r\nexport const RS_PLATFORM_TYPES = {\t\r\n\tBOOK: 'BOOK',\r\n\tQUOTE: 'QUOTE',\r\n\tBI: 'BI',\r\n}\r\n\r\nexport const CONTAINER_TYPE_20_FOOT_FACTOR = 20;\r\n\r\nexport const SHIPMENT_OPTIONS = {\r\n\tUNITS: 'units',\r\n\tTOTALS: 'totals',\r\n\tCONTAINER: 'container'\r\n}\r\n\r\nexport const CUBIC_FOOT_TO_CUBIC_INCH_CONVERSION_FACTOR = 1728;\r\n\r\nexport const CUBIC_METER_TO_CUBIC_CM_CONVERSION_FACTOR = 1000000;\r\n\r\nexport const VOLUME_OPTIONS = {\r\n\tCBM: 'CBM',\r\n\tCFT: 'CFT',\t\r\n}\r\n\r\nexport const WEIGHT_OPTIONS = {\r\n\tKG: 'kg',\r\n\tLB: 'lb',\r\n}\r\n\r\nexport const DIMENSION_OPTIONS = {\r\n\tCM: 'cm',\r\n\tIN: 'in',\r\n}\r\n\r\nexport const PACKAGE_TYPE = {\r\n\tBOX: 'box',\r\n\tULD: 'uld',\r\n}\r\n\r\nexport const RECENT_SEARCHES_LIMIT = 6;\r\n","import defineProperty from \"./defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}","import styled, { css } from 'styled-components';\r\n\r\nimport { FlexDirections } from './constants';\r\n\r\nexport const StyledFlex = styled.div`\r\n\tdisplay: flex;\r\n\tflex-direction: ${({ $direction }) => ($direction === FlexDirections.VERTICAL ? 'column' : 'row')};\r\n\tflex-wrap: ${({ $wrap }) => ($wrap ? 'wrap' : 'nowrap')};\r\n\talign-items: ${({ $alignItems }) => $alignItems};\r\n\tjustify-content: ${({ $justifyContent }) => $justifyContent};\r\n\tbox-sizing: border-box;\r\n\r\n\t${({ $fullWidth }) =>\r\n\t\t$fullWidth &&\r\n\t\tcss`\r\n\t\t\twidth: 100%;\r\n\t\t`}\r\n\t${({ $direction, $spacing }) =>\r\n\t\t$direction === FlexDirections.VERTICAL\r\n\t\t\t? css`\r\n\t\t\t\t\t> *:not(:first-child) {\r\n\t\t\t\t\t\tmargin-top: ${$spacing};\r\n\t\t\t\t\t}\r\n\t\t\t `\r\n\t\t\t: css`\r\n\t\t\t\t\t> *:not(:first-child) {\r\n\t\t\t\t\t\tmargin-left: ${$spacing};\r\n\t\t\t\t\t}\r\n\t\t\t `};\r\n`;","import React from 'react';\r\n\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { FlexDirections, FlexSpacings } from '../helpers/constants';\r\nimport { StyledFlex } from '../helpers/styled';\r\n\r\nconst Flex = ({\r\n\tdirection = FlexDirections.HORIZONTAL,\r\n\talignItems = 'start',\r\n\tspacing = FlexSpacings.NONE,\r\n\twrap,\r\n\tjustifyContent,\r\n\tfullWidth,\r\n\t...rest\r\n}) => (\r\n\t<StyledFlex\r\n\t\t{...rest}\r\n\t\t$direction={direction}\r\n\t\t$alignItems={alignItems}\r\n\t\t$spacing={spacing}\r\n\t\t$wrap={wrap}\r\n\t\t$justifyContent={justifyContent}\r\n\t\t$fullWidth={fullWidth}\r\n\t>\r\n\t\t{rest.children}\r\n\t</StyledFlex>\r\n);\r\n\r\nFlex.propTypes = {\r\n\tdirection: PropTypes.oneOf([FlexDirections.HORIZONTAL, FlexDirections.VERTICAL]),\r\n\tspacing: PropTypes.oneOf(Object.keys(FlexSpacings)),\r\n\tchildren: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\r\n\talignItems: PropTypes.string,\r\n\tjustifyContent: PropTypes.string,\r\n\tfullWidth: PropTypes.bool,\r\n\twrap: PropTypes.bool,\r\n};\r\n\r\nexport default Flex;\r\n","import httpClient from '@freightos/http-client';\r\n\r\nimport { LOCATION_MODES_MAP } from './constant';\r\n\r\n/**\r\n * Fetches locations based on the provided location modes and query.\r\n *\r\n * @param {Array<string>} locationModes - Array of location modes to search for.\r\n * @param {string} query - The search query.\r\n * @returns {Promise<Object>} A promise resolving to an object containing location results.\r\n */\r\nexport const getLocations = async (locationModes, query, customer) => {\r\n\ttry {\r\n\t\tconst sources = locationModes.reduce(\r\n\t\t\t(acc, mode) => ({\r\n\t\t\t\t...acc,\r\n\t\t\t\t[LOCATION_MODES_MAP[mode].key]: {\r\n\t\t\t\t\ttype: mode.toUpperCase(),\r\n\t\t\t\t\t...(customer?.code ? { searchTerm: customer.name } : {}),\r\n\t\t\t\t\t...(LOCATION_MODES_MAP[mode].groupedBy ? { groupedBy: LOCATION_MODES_MAP[mode].groupedBy } : {}),\r\n\t\t\t\t},\r\n\t\t\t}),\r\n\t\t\t{}\r\n\t\t);\r\n\t\tconst response = await httpClient.post('/geocoder/api/v3/geocoder/locations', {\r\n\t\t\tquery,\r\n\t\t\tlimit: 5,\r\n\t\t\tsources,\r\n\t\t});\r\n\t\treturn response.data;\r\n\t} catch (error) {\r\n\t\tconsole.error('Error fetching locations:', error);\r\n\t\treturn { results: {} };\r\n\t}\r\n};\r\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","export default class Environment {\r\n\tstatic isProduction() {\r\n\t\treturn process.env.REACT_APP_CUSTOM_ENV === 'prod';\r\n\t}\r\n\r\n\tstatic isTest() {\r\n\t\treturn process.env.REACT_APP_CUSTOM_ENV === 'test';\r\n\t}\r\n\r\n\tstatic isLocal() {\r\n\t\treturn process.env.REACT_APP_CUSTOM_ENV === 'dev';\r\n\t}\r\n}\r\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import React from 'react';\r\n\r\nimport { Avatar, Chip, Icon, Message, Option, Select, tokens } from '@freightos/design-system';\r\nimport { TranslatableText } from '@freightos/freightos-i18n';\r\n\r\nimport Flex from 'common/components/Flex';\r\nimport { FlexSpacings } from '../common/helpers/constants';\r\nimport { getLocations } from './apis';\r\nimport { DEFAULT_LOCATION_MODE, LOCATION_MODES, LOCATION_MODES_MAP, SelectModes } from './constant';\r\nimport { SelectOptionLabel, SelectedOptionLabel } from './styled';\r\n\r\nimport Environment from '../common/helpers/Environment';\r\n\r\n/**\r\n * Get the gateway API prefix based on the environment.\r\n *\r\n * @returns {string} The gateway API prefix.\r\n */\r\nexport const getGatewayApiPrefix = (isTalaia) => {\r\n\tconst domain = Environment.isProduction()\r\n\t\t? 'freightos.com'\r\n\t\t: 'test-freightos.com';\r\n\treturn `https://platform.${domain}/gateway/${isTalaia ? 'webcargo-talaia' : 'webcargo-alpha'}`;\r\n};\r\n\r\n// Deterministic JSON stringify\r\nconst stableStringify = (obj) => {\r\n const allKeys = [];\r\n JSON.stringify(obj, (k, v) => (allKeys.push(k), v));\r\n const uniqSortedKeys = Array.from(new Set(allKeys)).sort();\r\n return JSON.stringify(obj, uniqSortedKeys);\r\n};\r\n\r\nconst normalizeLocationForKey = (loc) => {\r\n const {\r\n displayLabel,\r\n selectedValue,\r\n formattedNameOrAddress,\r\n code,\r\n countryCode,\r\n stateOrProvince,\r\n city,\r\n latitude,\r\n longitude,\r\n postalOrZipCode,\r\n sourceType,\r\n locationType,\r\n type,\r\n\tcountryName,\r\n } = loc || {};\r\n\r\n return {\r\n displayLabel,\r\n selectedValue: selectedValue || code,\r\n formattedNameOrAddress,\r\n code: code || selectedValue,\r\n country: countryCode,\r\n\tcountryName,\r\n stateOrProvince: stateOrProvince ?? null,\r\n city: city ?? null,\r\n latitude: latitude ?? null,\r\n longitude: longitude ?? null,\r\n postalOrZipCode: postalOrZipCode ?? null,\r\n sourceType: sourceType ?? null,\r\n locationType: locationType ?? null,\r\n type: type ?? sourceType,\r\n };\r\n};\r\n\r\nconst stableKeyFromLocation = (loc) => {\r\n try {\r\n const parsed = typeof loc?.key === 'string'\r\n ? JSON.parse(decodeHtmlEntities(loc.key))\r\n : loc;\r\n return stableStringify(normalizeLocationForKey(parsed));\r\n } catch {\r\n return stableStringify(normalizeLocationForKey(loc));\r\n }\r\n};\r\n\r\n/**\r\n * Get location input option.\r\n *\r\n * @param {Object} location - The location object to get the option for.\r\n * @returns {Object} The location input option.\r\n */\r\nexport const getLocationInputOption = (location) => {\r\n\tif(location) {\r\n \t\tconst displayLabel = location.label || location.selectedValue;\r\n \t\tconst key = stableKeyFromLocation(location);\r\n\r\n \t\tconst label = displayLabel\r\n \t\t ? (\r\n \t\t <>\r\n \t\t <Icon type={location.sourceType ? LOCATION_MODES_MAP[location.sourceType]?.icon : 'location'} size='tiny' />\r\n \t\t &nbsp;\r\n \t\t <SelectedOptionLabel>{displayLabel}</SelectedOptionLabel>\r\n \t\t </>\r\n \t\t )\r\n \t\t : undefined;\r\n\r\n \t\treturn { key, label };\r\n\t} \r\n\treturn undefined;\r\n};\r\n\r\n/**\r\n * Formats location(s) into option(s) with key and label for the location input.\r\n *\r\n * @param {Object|Array} locations - Single location object or array of location objects.\r\n * @returns {Object|Array} Formatted option(s) with key and label.\r\n * - For single location: Returns {key: string, label: ReactElement}.\r\n * - For multiple locations: Returns array of {key: string, label: ReactElement}.\r\n */\r\nexport const getLocationInputValue = locations => {\r\n\tconst formatLocation = loc => getLocationInputOption(loc);\r\n\treturn Array.isArray(locations) ? locations.map(formatLocation) : formatLocation(locations);\r\n};\r\n\r\n/**\r\n * Renders location options (ports and addresses) in a select dropdown with icons and grouping.\r\n *\r\n * @param {Array} locationOptions - Array of location option groups to render.\r\n * @param {string} dataTestId - Test ID prefix for components.\r\n * @returns {Array<ReactElement>} Array of Select.OptGroup components containing the location options.\r\n *\r\n * @example\r\n * Location options format:\r\n * [\r\n * {\r\n * label: \"seaport\",\r\n * options: [{\r\n * label: \"Port Name\",\r\n * key: \"{...port data...}\"\r\n * }]\r\n * }\r\n * ]\r\n */\r\nexport const renderLocationOptions = (optionGroups, dataTestId) => {\r\n\r\n\tif (!(optionGroups || []).some(group => group?.options?.length > 0) )\r\n\t\treturn;\r\n\r\n\treturn optionGroups.map(group => {\r\n\t\tconst location = Object.values(LOCATION_MODES_MAP).find(mode => mode.label === group.label);\r\n\t\tconst locationOptionIcon = location?.icon;\r\n\r\n\t\treturn (\r\n\t\t\t<Select.OptGroup\r\n\t\t\t\tlabel={\r\n\t\t\t\t\t<span style={{fontFamily: 'Open Sans'}}>\r\n\t\t\t\t\t\t<Icon size='tiny' type={locationOptionIcon} />\r\n\t\t\t\t\t\t&nbsp;\r\n\t\t\t\t\t\t&nbsp;\r\n\t\t\t\t\t\t{group.label}\r\n\t\t\t\t\t</span>\r\n\t\t\t\t}\r\n\t\t\t\tkey={group.label}\r\n\t\t\t\tdata-test-id={`${dataTestId}-group-${group.label}`}\r\n\t\t\t>\r\n\t\t\t\t{group.options?.map(option => {\r\n\t\t\t\t\tconst { countryCode, selectedValue, displayLabel, type } = option;\r\n\r\n\t\t\t\t\treturn (\r\n\t\t\t\t\t\t<Option\r\n\t\t\t\t\t\t\tvalue={stableKeyFromLocation(option)}\r\n\t\t\t\t\t\t\ttitle={selectedValue}\r\n\t\t\t\t\t\t\tdata-test-id={`${dataTestId}-${group.label}-${selectedValue}`}\r\n\t\t\t\t\t\t\tstyle={{ paddingLeft: '8px' }}\r\n\t\t\t\t\t\t\tlabel={<>\r\n\t\t\t\t\t\t\t\t\t<Icon type={locationOptionIcon} size='tiny' />\r\n\t\t\t\t\t\t\t\t\t&nbsp;\r\n\t\t\t\t\t\t\t\t\t<SelectedOptionLabel>{selectedValue}</SelectedOptionLabel>\r\n\t\t\t\t\t\t\t\t</>\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tkey={option.code}\r\n\t\t\t\t\t\t>\r\n\t\t\t\t\t\t\t<Flex fullWidth justifyContent='space-between'>\r\n\t\t\t\t\t\t\t\t<Flex spacing={FlexSpacings.XSMALL}>\r\n\t\t\t\t\t\t\t\t\t<span>\r\n\t\t\t\t\t\t\t\t\t\t<Avatar\r\n\t\t\t\t\t\t\t\t\t\t\ttype='flag'\r\n\t\t\t\t\t\t\t\t\t\t\tcountry={countryCode}\r\n\t\t\t\t\t\t\t\t\t\t\tsize='small'\r\n\t\t\t\t\t\t\t\t\t\t\tstyle={{\r\n\t\t\t\t\t\t\t\t\t\t\t\twidth: tokens.fdsSizeSm,\r\n\t\t\t\t\t\t\t\t\t\t\t\theight: tokens.fdsSizeSm,\r\n\t\t\t\t\t\t\t\t\t\t\t}}\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t\t<SelectOptionLabel>{displayLabel}</SelectOptionLabel>\r\n\t\t\t\t\t\t\t\t</Flex>\r\n\t\t\t\t\t\t\t\t{type === LOCATION_MODES.FULFILLMENT_CENTER && <Icon type='amazon' size='small' />}\r\n\t\t\t\t\t\t\t\t{type === LOCATION_MODES.ADDRESS_BOOK && <Chip type='neutral' iconType='address-book' />}\r\n\t\t\t\t\t\t\t</Flex>\r\n\t\t\t\t\t\t</Option>\r\n\t\t\t\t\t);\r\n\t\t\t\t})}\r\n\t\t\t</Select.OptGroup>\r\n\t\t);\r\n\t});\r\n};\r\n\r\n/**\r\n * Extracts fulfillment centers from addresses and adds them as a separate key in results\r\n * @param {Object} locationsResults - The locations results object\r\n * @param {string} addressKey - The key for addresses (default: 'address')\r\n * @returns {Object} Updated locations results with fulfillment centers separated\r\n */\r\nconst extractFulfillmentCenters = locationsResults => {\r\n\tlet updatedLocationsResults = { ...locationsResults };\r\n\t// Extract fulfillment centers from addresses\r\n\tconst fulfillmentCenters = locationsResults[LOCATION_MODES.ADDRESS].filter(\r\n\t\toption => option.sourceType === LOCATION_MODES.FULFILLMENT_CENTER\r\n\t);\r\n\t// Add fulfillment centers as a separate key in results\r\n\tif (fulfillmentCenters.length > 0) {\r\n\t\t// Create new object with specific order\r\n\t\tconst { address, ...otherTypes } = updatedLocationsResults;\r\n\t\tupdatedLocationsResults = {\r\n\t\t\t...otherTypes,\r\n\t\t\t[LOCATION_MODES.FULFILLMENT_CENTER]: fulfillmentCenters,\r\n\t\t\taddress: address.filter(option => option.type !== LOCATION_MODES.FULFILLMENT_CENTER),\r\n\t\t};\r\n\t}\r\n\r\n\treturn updatedLocationsResults;\r\n};\r\n\r\n/**\r\n * Fetches location data for the active location mode or supported modes.\r\n *\r\n * @param {string} activeLocationMode - The active location mode.\r\n * @param {Array} supportedLocationModes - Array of supported location modes.\r\n * @returns {Function} A function that takes a query string and returns a promise resolving to an array of formatted location objects.\r\n */\r\nexport const fetchLocations = (activeLocationMode, supportedLocationModes, customer) => async query => {\r\n\tif (!query) {\r\n\t\treturn [];\r\n\t}\r\n\r\n\tconst modes = activeLocationMode !== DEFAULT_LOCATION_MODE ? [activeLocationMode] : supportedLocationModes;\r\n\tconst locations = await getLocations(modes, query, customer);\r\n\r\n\tlet locationsResults = locations.results;\r\n\r\n\tif (locationsResults[LOCATION_MODES.ADDRESS]) {\r\n\t\tlocationsResults = extractFulfillmentCenters(locationsResults);\r\n\t}\t\r\n\r\n\treturn Object.keys(locationsResults).map(key => {\r\n\t\treturn {\r\n\t\t\tlabel: LOCATION_MODES_MAP[key]?.label || key,\r\n\t\t\toptions: locationsResults[key].map(option => ({\r\n\t\t\t\t...option,\r\n\t\t\t\ttype: option.sourceType,\r\n\t\t\t})),\r\n\t\t};\r\n\t});\r\n};\r\n\r\n/**\r\n * Processes location input changes by retrieving geocoder details for addresses\r\n * or transforming port locations into a standardized format.\r\n *\r\n * For addresses (with placeId), fetches full geocoder details.\r\n * For ports, transforms them into geocoder address schema.\r\n * Filters out any failed location processing.\r\n *\r\n * @param {Object|Array} changedLocations - The new location value(s) to process.\r\n * @param {Function} onChange - Callback to handle the processed location(s).\r\n */\r\nexport const onChangeLocation = async (changedLocations, onChange) => {\r\n\tconst locations = Array.isArray(changedLocations) ? changedLocations : [changedLocations];\r\n\r\n\tconst locationsDetails = await Promise.all(\r\n\t\tlocations.map(async location => {\r\n\t\t\ttry {\r\n\t\t\t\tconst raw = location?.key;\r\n\t\t\t\tconst json = decodeHtmlEntities(raw);\r\n\t\t\t\tconst parsed = JSON.parse(json);\r\n\t\t\t\treturn { key: json, ...parsed };\r\n\t\t\t} catch (err) {\r\n\t\t\t\t// Useful in case one of the addresses has encountered a failure while retrieving its details\r\n\t\t\t\t// It won't cause all the addresses to stop working properly\r\n\t\t\t\treturn undefined;\r\n\t\t\t}\r\n\t\t})\r\n\t);\r\n\r\n\tonChange(locationsDetails.filter(Boolean));\r\n};\r\n\r\n/**\r\n * Handles changes to the location input value.\r\n *\r\n * @param {Object|Array} location - The new location value(s) selected.\r\n * @param {string} selectionMode - The current selection mode ('single' or 'multiple').\r\n * @param {number} maxPorts - Maximum number of ports that can be selected in multiple mode.\r\n * @param {Function} setSelectedLocation - State setter for the selected location.\r\n * @param {Function} onChange - Callback to handle processed location changes.\r\n *\r\n * For multiple selection mode:\r\n * - Validates that selected ports don't exceed maxPorts limit.\r\n * - Shows error message if limit is exceeded.\r\n * - Updates state and triggers onChange with valid selections.\r\n *\r\n * For single selection mode:\r\n * - Updates selected location state directly.\r\n * - Triggers onChange with the new location if one is selected.\r\n */\r\nexport const handleLocationChange = (location, selectionMode, maxPorts, setSelectedLocation, onChange) => {\r\n\tif (selectionMode === SelectModes.MULTIPLE) {\r\n\t\tconst selectedPorts = Array.isArray(location) ? location : [];\r\n\t\tif (selectedPorts.length <= maxPorts) {\r\n\t\t\tsetSelectedLocation(selectedPorts);\r\n\t\t\tonChangeLocation(selectedPorts, onChange);\r\n\t\t} else {\r\n\t\t\tconst typePort = JSON.parse(selectedPorts[0]?.key)?.sourceType === LOCATION_MODES.AIRPORT ? (maxPorts > 1 ? 'airports' : 'airport') : (maxPorts > 1 ? 'ports' : 'port');\r\n\t\t\tMessage.danger(\r\n\t\t\t\t<>\r\n\t\t\t\t\t<TranslatableText stringId={'You cannot enter more than'}/>\r\n\t\t\t\t\t{' '} {maxPorts} {' '}\r\n\t\t\t\t\t<TranslatableText stringId={typePort} />\r\n\t\t\t\t</>\r\n\t\t\t);\r\n\t\t}\r\n\t} else {\r\n\t\tsetSelectedLocation(location);\r\n\t\tonChangeLocation(location, onChange);\r\n\t}\r\n};\r\n\r\n/**\r\n * Check if the location is an address\r\n * @param location - The location to check\r\n * @returns Whether the location is an address\r\n */\r\nexport const isLocationAddress = locationType =>\r\n\tlocationType &&\r\n\t(locationType === LOCATION_MODES.ADDRESS ||\r\n\t\tlocationType === LOCATION_MODES.LAST_MILE_ADDRESS ||\r\n\t\tlocationType === LOCATION_MODES.ADDRESS_BOOK ||\r\n\t\tlocationType === LOCATION_MODES.FULFILLMENT_CENTER);\r\n\r\nconst decodeHtmlEntities = (s) =>\r\n typeof s === 'string'\r\n ? s.replace(/&quot;/g, '\"').replace(/&#34;/g, '\"').replace(/&amp;/g, '&')\r\n : s;\r\n","import httpClient from '@freightos/http-client'\r\n\r\nexport const doRequest = async ({\r\n\tmethod,\r\n\turl = '',\r\n\tdata = {},\r\n\toptions = {},\r\n}) => {\r\n\r\n\tconst params = (() => {\r\n\t\tif (method === 'get') {\r\n\r\n\t\t\tconst newUrl = (() => {\r\n\t\t\t\tif (!Object.keys(data).length) {\r\n\t\t\t\t\treturn url\r\n\t\t\t\t}\r\n\t\t\t\treturn `${url}?${new URLSearchParams(data).toString()}`\r\n\t\t\t})();\r\n\r\n\t\t\treturn [newUrl, options]\r\n\t\t}\r\n\t\tif (method === 'post') {\r\n\t\t\tconst headers = {\r\n\t\t\t\t...options?.headers,\r\n\t\t\t\t'accept': 'application/json',\r\n\t\t\t\t'content-type': `multipart/form-data`\r\n\t\t\t}\r\n\t\t\treturn [url, data, { ...options, headers }]\r\n\t\t}\r\n\r\n\t\treturn [url, data, options]\r\n\t})()\r\n\r\n\treturn await httpClient[method](...params)\r\n}","import { getGatewayApiPrefix } from \"../../helpers/utils\";\r\nimport { doRequest } from \"../../common/httpClient/doRequest/index\";\r\n\r\nexport const saveLastUsedSearch = async ( searchId ) => {\r\n\tawait doRequest({\r\n\t\tmethod: 'put',\r\n\t\turl: `${getGatewayApiPrefix(false)}/backend/api.php`,\r\n\t\toptions: {\r\n\t\t\theaders: {\r\n\t\t\t\t'namespace': 'airops/user_searches',\r\n\t\t\t\t'route': ' user_search_used',\r\n\t\t\t}\r\n\t\t},\r\n\t\tdata: {\r\n\t\t\tid: searchId,\r\n\t\t},\r\n\t});\r\n};\r\n","import { Avatar, Icon, tokens } from '@freightos/design-system';\r\n\r\nimport styled from 'styled-components';\r\n\r\nimport Flex from '../../common/components/Flex';\r\n\r\nexport const STitle = styled.div`\r\n\tcolor: ${tokens.fdsColorPrimaryGray60};\r\n\tfont-size: ${tokens.fdsSizeXs};\r\n\tfont-weight: ${tokens.fdsFontWeightRegular};\r\n\tmargin-bottom: ${tokens.fdsComponentSpacingSm};\r\n\ti {\r\n\t\tmargin-right: ${tokens.fdsComponentSpacingSm};\r\n\t}\r\n\r\n`;\r\n\r\nexport const SCard = styled(Flex)`\r\n\tpadding-left: 0 !important;\r\n`;\r\n\r\nexport const UnitIcon = styled(Icon)`\r\n\tmargin-right: 0 !important;\r\n\tvertical-align: bottom;\r\n`;\r\n\r\nexport const STruncatedLabel = styled.span`\r\n\twhite-space: nowrap;\r\n\tmin-width: 0;\r\n\tcolor: ${tokens.fdsColorPrimaryGray80};\r\n\toverflow: hidden;\r\n\ttext-overflow: ellipsis;\r\n\t${({$isLocationLabel}) => !$isLocationLabel && `\r\n\t\tfont-size: 10px; //TODO: FSN-145\r\n\t\tline-height: 15px;\r\n\t`}\r\n\t${({$isPort}) => {\r\n\t\tif ($isPort === undefined)\r\n\t\t\treturn;\r\n\r\n\t\treturn `min-width: ${$isPort ? '65px' : '55px'};`\r\n\t}};\r\n`;\r\n\r\nexport const SLocationFlag = styled(Avatar)`\r\n\tborder: 1px solid ${tokens.fdsColorPrimaryGray20};\r\n\twidth: ${tokens.fdsSizeSm};\r\n\theight: ${tokens.fdsSizeSm};\r\n`;\r\n\r\nexport const STinyWrapper = styled(Flex)`\r\n\toverflow: hidden !important;\r\n\tfont-size: 10px; //TODO: FSN-145\r\n\tline-height: 15px;\r\n\tflex: 1;\r\n\tmin-width: 0;\r\n`;\r\n\r\nexport const SListWrapper = styled(Flex)`\r\n\t:last-child {\r\n\t\tpadding-bottom: 0 !important;\r\n\t}\r\n`;\r\n\r\n","import { \r\n\tCONTAINER_TYPE_20_FOOT_FACTOR, \r\n\tCUBIC_FOOT_TO_CUBIC_INCH_CONVERSION_FACTOR, \r\n\tCUBIC_METER_TO_CUBIC_CM_CONVERSION_FACTOR, \r\n\tPACKAGE_TYPE, \r\n\tSEARCH_FIELDS,\r\n\tSEARCH_PLATFORMS,\r\n\tSHIPMENT_OPTIONS,\r\n\tVOLUME_OPTIONS, \r\n\tWEIGHT_OPTIONS\r\n} from \"./constants\";\r\n\r\n/**\r\n * Formats a number using thousand separators (e.g., 1000 becomes \"1,000\").\r\n * Limits fraction digits to 3.\r\n */\r\nexport const formatNumber = (value) => {\r\n\tif(!value) return '0';\r\n\r\n\treturn value.toLocaleString(\"en-US\", {\r\n\t\tmaximumFractionDigits: 3,\r\n\t\tuseGrouping: true\r\n\t});\r\n};\r\n\r\n/**\r\n * Orders locations by countries and also groups them by country\r\n * @param locations - Array of location objects\r\n * @param countryOrder - Array of country codes in desired order\r\n * @returns Object with countries as keys and their locations as values, ordered by countryOrder\r\n */\r\nexport const groupAndOrderLocationsByCountries = (\r\n\tlocations\r\n) => {\r\n\t// Group locations by country\r\n\tconst groupedByCountry = locations.reduce((acc, location) => {\r\n\t\tconst countryCode = location.country;\r\n\t\tif (!acc[countryCode]) {\r\n\t\t\tacc[countryCode] = [];\r\n\t\t}\r\n\t\tacc[countryCode].push(location);\r\n\t\treturn acc;\r\n\t}, {});\r\n\r\n\t// Sort locations within each country group\r\n\tObject.keys(groupedByCountry).forEach(countryCode => {\r\n\t\tgroupedByCountry[countryCode].sort((a, b) => a.value.localeCompare(b.value));\r\n\t});\r\n\treturn groupedByCountry;\r\n};\r\n\r\n/**\r\n * Extracts unique icons from box packages array\r\n * @param boxPackages - Array of box package objects\r\n * @returns Array of unique icon names\r\n */\r\nexport const getUniqueBoxPackageIcons = (boxPackages) =>\r\n\tboxPackages.reduce((uniqueIcons, packageItem) => {\r\n\t\tconst icon = packageItem.type?.value?.icon;\r\n\t\t\r\n\t\t// Add icon to array only if it's not already present\r\n\t\tif (!uniqueIcons.includes(icon)) {\r\n\t\t\tuniqueIcons.push(icon);\r\n\t\t}\r\n\t\t\r\n\t\treturn uniqueIcons;\r\n\t}, []);\r\n\r\nexport const chooseIconsType = (search) => {\r\n\tconst shipmentType = search.shipment_details.type;\r\n\tif(shipmentType === SHIPMENT_OPTIONS.TOTALS) {\r\n\t\treturn ['box-total'];\r\n\t}\r\n\r\n\tif(shipmentType === SHIPMENT_OPTIONS.UNITS) {\r\n\t\tconst unitsPackages = search.shipment_details[SEARCH_FIELDS.UNITS_SHIPMENT];\r\n\t\tif(unitsPackages?.packageType === PACKAGE_TYPE.BOX) {\r\n\t\t\tconst uniqueIcons = getUniqueBoxPackageIcons(unitsPackages.boxPackages);\r\n\t\t\treturn uniqueIcons;\r\n\t\t}\r\n\t\tif(unitsPackages?.packageType === PACKAGE_TYPE.ULD) {\r\n\t\t\treturn ['uld'];\r\n\t\t}\r\n\t\treturn ['box'];\r\n\t}\r\n\r\n\tif(shipmentType === SHIPMENT_OPTIONS.CONTAINER) {\r\n\t\treturn ['container'];\r\n\t}\r\n\r\n\treturn ['box'];\r\n}\r\n\r\n/**\r\n * Calculates total units, volume and weight based on package type in IRecentSearch\r\n * @param search - Recent search object containing shipment details\r\n * @returns Object with calculated totals for units, volume, and weight\r\n */\r\nexport const shipmentTotalsBasedOnPackages = (search) => {\r\n\tconst shipmentType = search.shipment_details.type;\r\n\tconst platformType = search.platform_type;\r\n\r\n\tif(platformType === SEARCH_PLATFORMS.QUOTATION) {\r\n\t\treturn { units: 0, volume: 0, weight: 0, weightUnit: WEIGHT_OPTIONS.KG, volumeUnit: VOLUME_OPTIONS.CBM };\r\n\t}\r\n\tswitch (shipmentType) {\r\n\t\tcase SHIPMENT_OPTIONS.CONTAINER: {\r\n\t\t\tlet calculatedUnits = 0;\r\n\t\t\tlet calculatedTEU = 0;\r\n\t\t\t// eslint-disable-next-line no-unused-expressions\r\n\t\t\tsearch.shipment_details[SEARCH_FIELDS.CONTAINER_PACKAGES]?.forEach((pkg) => {\r\n\t\t\t\tconst units = Number(pkg.units) || 0;\r\n\t\t\t\tif (units > 0) {\r\n\t\t\t\t\tcalculatedUnits += units;\r\n\t\t\t\t\tconst dimensionSelected = parseInt(pkg.dimensions.value, 10);\r\n\t\t\t\t\tcalculatedTEU += units * (dimensionSelected / CONTAINER_TYPE_20_FOOT_FACTOR);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn {\r\n\t\t\t\tunits: calculatedUnits, \r\n\t\t\t\tvolume: calculatedTEU, \r\n\t\t\t\tweight: null,\r\n\t\t\t\tweightUnit: null,\r\n\t\t\t\tvolumeUnit: 'TEU',\r\n\t\t\t};\r\n\t\t}\r\n\t\tcase SHIPMENT_OPTIONS.UNITS: {\r\n\t\t\tconst unitsPackages = search.shipment_details[SEARCH_FIELDS.UNITS_SHIPMENT];\r\n\t\t\tconst volumeCalculationFactor = unitsPackages?.volumeUnit === VOLUME_OPTIONS.CFT \r\n\t\t\t\t? CUBIC_FOOT_TO_CUBIC_INCH_CONVERSION_FACTOR : CUBIC_METER_TO_CUBIC_CM_CONVERSION_FACTOR;\r\n\t\t\tif (unitsPackages?.packageType === PACKAGE_TYPE.BOX) {\r\n\t\t\t\tconst formattedVolume = formatNumber(unitsPackages?.boxPackages.reduce((acc, curr) => {\r\n\t\t\t\t\tconst volume = parseFloat(curr.width || '0') * parseFloat(curr.height || '0') * parseFloat(curr.length || '0') * parseFloat(curr.units || '0') / volumeCalculationFactor;\r\n\t\t\t\t\treturn acc + volume;\r\n\t\t\t\t}, 0));\r\n\t\t\t\tconst formattedWeight = formatNumber(unitsPackages.boxPackages.reduce((acc, curr) => acc + parseFloat(curr.weight || '0'), 0));\r\n\r\n\t\t\t\treturn {\r\n\t\t\t\t\tunits: unitsPackages.boxPackages.reduce((acc, curr) => acc + parseFloat(curr.units || '0'), 0),\r\n\t\t\t\t\tvolume: formattedVolume, \r\n\t\t\t\t\tweight: formattedWeight,\r\n\t\t\t\t\tweightUnit: unitsPackages.weightUnit,\r\n\t\t\t\t\tvolumeUnit: unitsPackages.volumeUnit,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\tif (unitsPackages?.packageType === PACKAGE_TYPE.ULD) {\r\n\t\t\t\tconst formattedVolume = formatNumber(unitsPackages.uldPackages.reduce((acc, curr) => acc + parseFloat(curr.volume || '0'), 0));\r\n\t\t\t\tconst formattedWeight = formatNumber(unitsPackages.uldPackages.reduce((acc, curr) => acc + parseFloat(curr.weight || '0'), 0));\r\n\t\t\t\treturn {\r\n\t\t\t\t\tunits: unitsPackages.uldPackages.length, \r\n\t\t\t\t\tvolume: formattedVolume, \r\n\t\t\t\t\tweight: formattedWeight,\r\n\t\t\t\t\tweightUnit: unitsPackages.weightUnit,\r\n\t\t\t\t\tvolumeUnit: unitsPackages.volumeUnit,\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\treturn { units: 0, volume: 0, weight: 0, weightUnit: WEIGHT_OPTIONS.KG, volumeUnit: VOLUME_OPTIONS.CBM };\r\n\t\t}\r\n\r\n\t\tcase SHIPMENT_OPTIONS.TOTALS: {\r\n\t\t\tconst formattedVolume = formatNumber(parseFloat(search.shipment_details[SEARCH_FIELDS.TOTALS_SHIPMENT]?.volume || '0'));\r\n\t\t\tconst formattedWeight = formatNumber(parseFloat(search.shipment_details[SEARCH_FIELDS.TOTALS_SHIPMENT]?.weight || '0'));\r\n\t\t\treturn {\r\n\t\t\t\tunits: search.shipment_details[SEARCH_FIELDS.TOTALS_SHIPMENT]?.units || 0, \r\n\t\t\t\tvolume: formattedVolume, \r\n\t\t\t\tweight: formattedWeight,\r\n\t\t\t\tweightUnit: search.shipment_details[SEARCH_FIELDS.TOTALS_SHIPMENT]?.weightUnit || WEIGHT_OPTIONS.KG,\r\n\t\t\t\tvolumeUnit: search.shipment_details[SEARCH_FIELDS.TOTALS_SHIPMENT]?.volumeUnit || VOLUME_OPTIONS.CBM,\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tdefault:\r\n\t\t\treturn { units: 0, volume: 0, weight: 0, weightUnit: WEIGHT_OPTIONS.KG, volumeUnit: VOLUME_OPTIONS.CBM };\r\n\t}\r\n};\r\n","import React, { useEffect, useRef, useState } from \"react\";\r\n\r\nimport { Tooltip } from \"@freightos/design-system\";\r\n\r\nimport { STruncatedLabel } from \"../styled\";\r\n\r\n/**\r\n * TruncatedLabel component that automatically detects text truncation\r\n * and shows a tooltip with full text when content is truncated with ellipsis\r\n */\r\nconst TruncatedLabel = ({ \r\n\ttext = '', \r\n\ttestId, \r\n\tisPort = undefined,\r\n\tisLocationLabel = false,\r\n\tchildren = null\r\n}) => {\r\n\tconst labelRef = useRef(null);\r\n\tconst [isTruncated, setIsTruncated] = useState(false);\r\n\r\n\t/**\r\n\t * Check if the label text is truncated by comparing scroll width vs client width\r\n\t */\r\n\tconst checkTruncation = () => {\r\n\t\tif (labelRef.current) {\r\n\t\t\tconst element = labelRef.current;\r\n\t\t\tconst truncated = element.scrollWidth > element.clientWidth;\r\n\t\t\tsetIsTruncated(truncated);\r\n\t\t}\r\n\t};\r\n\r\n\t// Check truncation on mount and when text changes\r\n\tuseEffect(() => {\r\n\t\tcheckTruncation();\r\n\t}, [text]);\r\n\r\n\tconst labelElement = (\r\n\t\t<STruncatedLabel \r\n\t\t\tref={labelRef}\r\n\t\t\tdata-test-id={testId}\r\n\t\t\t$isLocationLabel={isLocationLabel}\r\n\t\t\t$isPort={isPort}\r\n\t\t>\r\n\t\t\t{children || text}\r\n\t\t</STruncatedLabel>\r\n\t);\r\n\r\n\t// Only show tooltip if text is actually truncated\r\n\tif (isTruncated) {\r\n\t\treturn (\r\n\t\t\t<Tooltip title={text} data-test-id={`${testId}-tooltip`}>\r\n\t\t\t\t<STruncatedLabel \r\n\t\t\t\t\tref={labelRef}\r\n\t\t\t\t\tdata-test-id={testId}\r\n\t\t\t\t\t$isLocationLabel={isLocationLabel}\r\n\t\t\t\t\t$isPort={isPort}\r\n\t\t\t\t>\r\n\t\t\t\t\t{children || text}\r\n\t\t\t\t</STruncatedLabel>\r\n\t\t\t</Tooltip>\r\n\t\t);\r\n\t}\r\n\r\n\treturn labelElement;\r\n};\r\n\r\nexport default TruncatedLabel; ","import React from \"react\";\r\n\r\nimport { Icon, tokens } from \"@freightos/design-system\";\r\n\r\nimport Flex from \"../../../common/components/Flex\";\r\nimport { FlexSpacings } from \"../../../common/helpers/constants\";\r\nimport { SLocationFlag } from \"../styled\";\r\nimport { groupAndOrderLocationsByCountries } from \"../utils\";\r\n\r\nimport TruncatedLabel from \"./TruncatedLabel.jsx\";\r\nimport { LOCATION_MODES } from \"../../../helpers/constant\";\r\n\r\nconst ItineraryDisplay = ({search, index, dataTestId}) => {\r\n\tconst isMultiOrigin = search.origin.length > 1;\t\r\n\tconst isMultiDestination = search.destination.length > 1;\r\n\tconst groupedOrigin = isMultiOrigin \r\n\t\t? groupAndOrderLocationsByCountries(search.origin) \r\n\t\t: { [search.origin[0].country]: search.origin };\r\n\tconst groupedDestination = isMultiDestination \r\n\t\t? groupAndOrderLocationsByCountries(search.destination) \r\n\t\t: { [search.destination[0].country]: search.destination };\r\n\treturn (\r\n\t\t<Flex alignItems='center' spacing={FlexSpacings.XSMALL} fullWidth>\r\n\t\t\t{Object.keys(groupedOrigin).map(countryCode =>{ \r\n\t\t\t\tconst labelOrigin = groupedOrigin[countryCode].map(origin => origin.selectedValue).join(', ');\r\n\t\t\t\treturn (\r\n\t\t\t\t\t<TruncatedLabel\r\n\t\t\t\t\t\tkey={countryCode}\r\n\t\t\t\t\t\ttext={labelOrigin}\r\n\t\t\t\t\t\tisLocationLabel\r\n\t\t\t\t\t\ttestId={`${dataTestId}-origin-${index}`}\r\n\t\t\t\t\t\tisPort={groupedOrigin[countryCode][0].type === LOCATION_MODES.SEAPORT}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<SLocationFlag\r\n\t\t\t\t\t\t\ttype='flag'\r\n\t\t\t\t\t\t\tcountry={countryCode}\r\n\t\t\t\t\t\t\tsize='small'\r\n\t\t\t\t\t\t\tdata-test-id={`${dataTestId}-origin-flag-${index}`}\r\n\t\t\t\t\t\t\tstyle={{ marginRight: '4px' }}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t{labelOrigin}\r\n\t\t\t\t\t</TruncatedLabel>\r\n\t\t\t\t);\r\n\t\t\t})}\r\n\t\t\t<Icon type='arrow-forward' style={{ marginRight: 0, color: tokens.fdsColorPrimaryGray90, flex: 'none' }} />\r\n\t\t\t{Object.keys(groupedDestination).map(countryCode => {\r\n\t\t\t\tconst labelDestination = groupedDestination[countryCode].map(destination => destination.selectedValue).join(', ');\r\n\t\t\t\treturn (\r\n\t\t\t\t\t<TruncatedLabel \r\n\t\t\t\t\t\tkey={countryCode} \r\n\t\t\t\t\t\ttext={labelDestination} \r\n\t\t\t\t\t\tisLocationLabel \r\n\t\t\t\t\t\ttestId={`${dataTestId}-destination-${index}`}\r\n\t\t\t\t\t\tisPort={groupedDestination[countryCode][0].type === LOCATION_MODES.SEAPORT}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<SLocationFlag\r\n\t\t\t\t\t\t\ttype='flag'\r\n\t\t\t\t\t\t\tcountry={countryCode}\r\n\t\t\t\t\t\t\tsize='small'\r\n\t\t\t\t\t\t\tdata-test-id={`${dataTestId}-destination-flag-${index}`}\r\n\t\t\t\t\t\t\tstyle={{ marginRight: '4px' }}\r\n\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t{labelDestination}\r\n\t\t\t\t\t</TruncatedLabel>\r\n\t\t\t\t);\r\n\t\t\t})}\r\n\t\t</Flex>\r\n\t);\r\n};\r\n\r\nexport default ItineraryDisplay;","import React, { useMemo } from \"react\";\r\n\r\nimport { Icon } from \"@freightos/design-system\";\r\n\r\nimport Flex from \"../../../common/components/Flex\";\r\nimport { FlexSpacings } from \"../../../common/helpers/constants\";\r\nimport { SEARCH_PLATFORMS, TEMPERATURE_RANGES_DATA } from \"../constants\";\r\nimport { STinyWrapper, UnitIcon } from \"../styled\";\r\nimport { chooseIconsType, shipmentTotalsBasedOnPackages } from \"../utils\";\r\n\r\nimport TruncatedLabel from \"./TruncatedLabel.jsx\";\r\n\r\nconst ShipmentAndCommodityDisplay = ({search, index, dataTestId}) => {\r\n\tconst platformType = search.platform_type;\r\n\tconst icons = chooseIconsType(search);\r\n\tconst {units, volume, weight, weightUnit, volumeUnit} = useMemo(() => shipmentTotalsBasedOnPackages(search), [search]);\r\n\tconst isTemperature = search.commodity.length === 1 && search.commodity[0].is_temperature;\r\n\tconst temperatureRange = search.commodity_temperature?.tempRange && isTemperature \r\n\t\t? TEMPERATURE_RANGES_DATA[search.commodity_temperature?.tempRange][search.commodity_temperature?.temperatureSystem] \r\n\t\t: '';\r\n\r\n\treturn <Flex spacing={FlexSpacings.XSMALL} alignItems='center' fullWidth key={index}>\r\n\t\t{platformType === SEARCH_PLATFORMS.QUOTATION ? (\r\n\t\t\t<STinyWrapper alignItems='center' spacing={FlexSpacings.SMALL} style={{flex: 1}}>\r\n\t\t\t\t{icons.map((icon, iconIndex) => <UnitIcon type={icon} key={`${index}-${iconIndex}`} size='tiny' data-test-id={`${dataTestId}rs-package-icon-${index}-${iconIndex}`} />)}\r\n\t\t\t\t<TruncatedLabel\r\n\t\t\t\t\ttext={search.commodity.map(commodity => commodity.label).join(', ')}\r\n\t\t\t\t\ttestId={`${dataTestId}rs-commodity-${index}`}\r\n\t\t\t\t/>\r\n\t\t\t</STinyWrapper>\r\n\t\t) : (\r\n\t\t\t<STinyWrapper alignItems='center' spacing={FlexSpacings.SMALL}>\r\n\t\t\t\t<Flex\r\n\t\t\t\t\talignItems='center'\r\n\t\t\t\t\tspacing={FlexSpacings.XSMALL}\r\n\t\t\t\t\tdata-test-id={`rs-${index}-units`}\r\n\t\t\t\t\t\r\n\t\t\t\t>\r\n\t\t\t\t\t{units}&nbsp;{icons.map((icon, iconIndex) => <UnitIcon type={icon} key={`${index}-${iconIndex}`} size='tiny' data-test-id={`${dataTestId}rs-package-icon-${index}-${iconIndex}`}/>)}\r\n\t\t\t\t</Flex>\r\n\t\t\t\t<span data-test-id={`${dataTestId}rs-volume-${index}`}>\r\n\t\t\t\t\t{volume}&nbsp;{volumeUnit}\r\n\t\t\t\t</span>\r\n\t\t\t\t{weight && (\r\n\t\t\t\t\t<span data-test-id={`${dataTestId}rs-weight-${index}`}>\r\n\t\t\t\t\t\t{weight}&nbsp;{weightUnit}\r\n\t\t\t\t\t</span>\r\n\t\t\t\t)}\r\n\t\t\t\t<TruncatedLabel\r\n\t\t\t\t\ttext={search.commodity.map(commodity => commodity.label).join(', ')}\r\n\t\t\t\t\ttestId={`${dataTestId}rs-commodity-${index}`}\r\n\t\t\t\t/>\r\n\t\t\t\t{isTemperature && (\r\n\t\t\t\t\t<Flex\r\n\t\t\t\t\t\talignItems='center'\r\n\t\t\t\t\t\tspacing={FlexSpacings.XSMALL}\r\n\t\t\t\t\t\tdata-test-id={`${dataTestId}rs-temperature-${index}`}\r\n\t\t\t\t\t>\r\n\t\t\t\t\t\t<Icon type='temperature-low' size=\"tiny\" data-test-id={`${dataTestId}rs-temperature-icon-${index}`} />\r\n\t\t\t\t\t\t<span style={{whiteSpace: 'nowrap'}}>\r\n\t\t\t\t\t\t\t{temperatureRange}\r\n\t\t\t\t\t\t</span>\r\n\t\t\t\t\t</Flex>\r\n\t\t\t\t)}\r\n\t\t\t</STinyWrapper>\r\n\t\t)}\r\n\t</Flex>;\r\n};\r\n\r\nexport default ShipmentAndCommodityDisplay;","import React from \"react\";\r\n\r\nimport { tokens } from \"@freightos/design-system\";\r\n\r\nimport { useFormikContext } from \"formik\";\r\n\r\nimport { FlexDirections, FlexSpacings } from \"../../../common/helpers/constants\";\r\nimport { saveLastUsedSearch } from \"../apis\";\r\nimport { SCard } from \"../styled\";\r\n\r\nimport ItineraryDisplay from \"./ItineraryDisplay.jsx\";\r\nimport ShipmentAndCommodityDisplay from \"./ShipmentAndCommodityDisplay.jsx\";\r\n\r\nexport const SearchCard = (\r\n\t{ search, index, setIsOpen, dataTestId, onRecentSearchSelect }) => {\r\n\r\n\tconst handleClick = async () => {\r\n\t\tonRecentSearchSelect(search);\r\n\t\ttry {\r\n\t\t\tawait saveLastUsedSearch(search.id);\r\n\t\t} catch (error) {\r\n\t\t\tconsole.error(error);\r\n\t\t}\t\r\n\t\tsetIsOpen(false);\r\n\t};\r\n\r\n\treturn <SCard \r\n\t\tdirection={FlexDirections.VERTICAL} \r\n\t\tfullWidth \r\n\t\tspacing={FlexSpacings.XSMALL}\r\n\t\tkey={search.id}\r\n\t\tstyle={{\r\n\t\t\tpadding: tokens.fdsComponentSpacingSm,\r\n\t\t}}\r\n\t\tdata-test-id={`${dataTestId}rs-card-${index}`}\r\n\t\tonClick={() => {\r\n\t\t\thandleClick();\r\n\t\t}}>\r\n\t\t<ItineraryDisplay search={search} index={index} dataTestId={dataTestId} />\r\n\t\t<ShipmentAndCommodityDisplay search={search} index={index} dataTestId={dataTestId} />\r\n\t</SCard>;\t\r\n};","import React from 'react';\r\n\r\nimport { Icon, tokens } from '@freightos/design-system';\r\nimport { TranslatableText } from '@freightos/freightos-i18n';\r\n\r\nimport { FlexDirections } from '../../common/helpers/constants';\r\nimport { StyledMenu } from '../../helpers/styled';\r\n\r\nimport { orderRecentSearches } from './adapters';\r\nimport { SearchCard } from './components/SearchCard.jsx';\r\nimport { SListWrapper, STitle } from './styled';\r\n\r\nconst RecentSearches = ({ recentSearches, setIsOpen, dataTestId, onRecentSearchSelect, initialValues }) => {\r\n\tconst firstSixSearches = recentSearches ? orderRecentSearches(recentSearches) : [];\r\n\treturn (\r\n\t\t<StyledMenu>\r\n\t\t\t<STitle>\r\n\t\t\t\t<Icon data-test-id={`${dataTestId}rs-icon`} color={tokens.fdsColorPrimaryGray60} type='history' size='tiny' /><TranslatableText stringId='Recent searches' />\r\n\t\t\t</STitle>\r\n\t\t\t<SListWrapper direction={FlexDirections.VERTICAL} fullWidth>\r\n\t\t\t\t{firstSixSearches.map((search, index) => (\r\n\t\t\t\t\t<SearchCard \r\n\t\t\t\t\t\tonRecentSearchSelect={onRecentSearchSelect} \r\n\t\t\t\t\t\tinitialValues={initialValues} \r\n\t\t\t\t\t\tsearch={search} \r\n\t\t\t\t\t\tindex={index} \r\n\t\t\t\t\t\tkey={search.id}\r\n\t\t\t\t\t\tsetIsOpen={setIsOpen} dataTestId={dataTestId} />\r\n\t\t\t\t))}\r\n\t\t\t</SListWrapper>\r\n\t\t</StyledMenu>\r\n\t);\r\n};\r\n\r\nexport default RecentSearches;\r\n","import { RECENT_SEARCHES_LIMIT, RS_PLATFORM_TYPES, SEARCH_FIELDS, SEARCH_PLATFORMS } from \"./constants\";\r\n\r\nexport const formatPlatformType = (platformType) => {\r\n\tswitch (platformType) {\r\n\t\tcase SEARCH_PLATFORMS.BOOKING:\r\n\t\t\treturn RS_PLATFORM_TYPES.BOOK;\r\n\t\tcase SEARCH_PLATFORMS.QUOTATION:\r\n\t\t\treturn RS_PLATFORM_TYPES.QUOTE;\r\n\t\tcase SEARCH_PLATFORMS.BI:\r\n\t\t\treturn RS_PLATFORM_TYPES.BI;\r\n\t\tdefault:\r\n\t\t\treturn platformType;\r\n\t}\r\n};\r\n\r\nexport const formatPlatformTypeFromRecentSearch = (platformType) => {\r\n\tswitch (platformType) {\r\n\t\tcase RS_PLATFORM_TYPES.BOOK:\r\n\t\t\treturn SEARCH_PLATFORMS.BOOKING;\r\n\t\tcase RS_PLATFORM_TYPES.QUOTE:\r\n\t\t\treturn SEARCH_PLATFORMS.QUOTATION;\r\n\t\tcase RS_PLATFORM_TYPES.BI:\r\n\t\t\treturn SEARCH_PLATFORMS.BI;\r\n\t\tdefault:\r\n\t\t\treturn SEARCH_PLATFORMS.BOOKING;\r\n\t}\r\n};\r\n\r\nconst formatContainerShipment = (search) => ({\t\r\n\t[SEARCH_FIELDS.CONTAINER_PACKAGES]: search.shipment_details[SEARCH_FIELDS.CONTAINER_PACKAGES],\r\n});\r\n\r\nexport const orderRecentSearches = (recentSearches) => {\r\n\tconst sorted = [...recentSearches].sort((a, b) => {\r\n\t\t// First: items with is_saved = true, then the rest\r\n\t\tif (a.is_saved !== b.is_saved) {\r\n\t\t\treturn a.is_saved ? -1 : 1;\r\n\t\t}\r\n\t\t// Among saved: sort by saved_update_date (most recent first)\r\n\t\tif (a.is_saved && b.is_saved) {\r\n\t\t\tconst aDate = new Date(a.saved_update_date).getTime();\r\n\t\t\tconst bDate = new Date(b.saved_update_date).getTime();\r\n\t\t\treturn bDate - aDate;\r\n\t\t}\r\n\t\t// Among non-saved: sort by most recent date (last_time_used_date vs saved_update_date)\r\n\t\tconst aMaxDate = new Date(Math.max(\r\n\t\t\tnew Date(a.last_time_used_date).getTime(),\r\n\t\t\tnew Date(a.saved_update_date || 0).getTime()\r\n\t\t)).getTime();\r\n\t\tconst bMaxDate = new Date(Math.max(\r\n\t\t\tnew Date(b.last_time_used_date).getTime(),\r\n\t\t\tnew Date(b.saved_update_date || 0).getTime()\r\n\t\t)).getTime();\r\n\t\treturn bMaxDate - aMaxDate;\r\n\t});\r\n\treturn sorted.slice(0, RECENT_SEARCHES_LIMIT);\r\n};\r\n\r\n","import React from 'react';\r\n\r\nimport { Spin } from '@freightos/design-system';\r\nimport { TRANSLATION_MODULES, TranslatableText } from '@freightos/freightos-i18n';\r\n\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { NoMatchingResults } from '../helpers/styled';\r\n\r\nimport RecentSearches from './RecentSearches/index.jsx';\r\n\r\nconst SelectorContent = ({ \r\n\tisLoading, \r\n\trecentSearches, \r\n\tsearchKey, \r\n\tdataTestId, \r\n\tsetIsOpen, \r\n\tonRecentSearchSelect, \r\n\tinitialValues }) => {\r\n\t// Return null for initial state (no search, no recent searches)\r\n\tif (!searchKey && (!recentSearches || recentSearches.length === 0)) {\r\n\t\treturn null;\r\n\t}\r\n\r\n\tif (isLoading) {\r\n\t\treturn <Spin size='small' />;\r\n\t}\r\n\r\n\tif (recentSearches?.length > 0 && !searchKey.trim()) {\r\n\t\treturn (\r\n\t\t\t<RecentSearches\r\n\t\t\t\trecentSearches={recentSearches}\r\n\t\t\t\tdataTestId={dataTestId}\r\n\t\t\t\tsetIsOpen={setIsOpen}\r\n\t\t\t\tonRecentSearchSelect={onRecentSearchSelect}\r\n\t\t\t\tinitialValues={initialValues}\r\n\t\t\t/>\r\n\t\t);\r\n\t}\r\n\r\n\tif (searchKey.trim()) {\r\n\t\treturn (\r\n\t\t\t<NoMatchingResults>\r\n\t\t\t\t<TranslatableText stringId='No matching results' module={TRANSLATION_MODULES.SearchAndBook} />\r\n\t\t\t</NoMatchingResults>\r\n\t\t);\r\n\t}\r\n\r\n\treturn null;\r\n};\r\n\r\nSelectorContent.propTypes = {\r\n\tisLoading: PropTypes.bool,\r\n\trecentSearches: PropTypes.array,\r\n\tsearchKey: PropTypes.string,\r\n\tonSelect: PropTypes.func,\r\n\tdataTestId: PropTypes.string,\r\n\tsetIsOpen: PropTypes.func,\r\n};\r\n\r\nexport default SelectorContent;\r\n","import React, { useEffect, useMemo, useRef, useState } from 'react';\r\n\r\nimport { Notification } from '@freightos/design-system';\r\nimport { debounce } from 'lodash';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { DEFAULT_LOCATION_MODE, LOCATION_MODES_MAP, MAX_TAG_COUNT, MAX_TAG_COUNT_MULTIPLE, SelectModes } from '../helpers/constant';\r\nimport { DebounceSelector, DropdownGlobalStyle } from '../helpers/styled';\r\n\r\nimport SelectorContent from './SelectorContent';\r\nimport Environment from 'common/helpers/Environment';\r\n\r\nconst DebounceSelect = ({\r\n\tfetchOptions,\r\n\trenderedOptions,\r\n\trecentSearches = [],\r\n\thasError,\r\n\tmode,\r\n\tdataTestId,\r\n\tvalue,\r\n\tdebounceTimeout = 800,\r\n\tactiveLocationMode,\r\n\tdefaultLocation,\r\n\tonChange,\r\n\t...props\r\n}) => {\r\n\tconst [options, setOptions] = useState([]);\r\n\tconst [isLoading, setIsLoading] = useState(false);\r\n\tconst [searchKey, setSearchKey] = useState('');\r\n\tconst fetchRef = useRef(0);\r\n\tconst [isOpen, setIsOpen] = useState(false);\r\n\tconst [maxTagCount, setMaxTagCount] = useState(MAX_TAG_COUNT);\r\n\tconst timeoutRef = useRef();\r\n\r\n\tuseEffect(() => {\r\n\t\tif ((!value || value.length === 0) && !isOpen) {\r\n\t\t\tsetOptions([]);\r\n\t\t\tsetSearchKey('');\r\n\t\t}\r\n\t}, [value, isOpen]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (activeLocationMode !== DEFAULT_LOCATION_MODE) {\r\n\t\t\tsetOptions(prevOptions =>\r\n\t\t\t\tprevOptions.filter(option => option.label === LOCATION_MODES_MAP[activeLocationMode].label)\r\n\t\t\t);\r\n\t\t}\r\n\t\tsetIsOpen(false);\r\n\r\n\t\t// Clear any existing timeout\r\n\t\tif (timeoutRef.current) {\r\n\t\t\tclearTimeout(timeoutRef.current);\r\n\t\t}\r\n\r\n\t\ttimeoutRef.current = setTimeout(() => {\r\n\t\t\tdocument.activeElement.blur(); // remove focus from input\r\n\t\t\tdocument.body.click(); // simulate outside click\r\n\t\t\tconst active = document.querySelector('.ant-select-focused');\r\n\t\t\tif (active) {\r\n\t\t\t\tactive.classList.remove('ant-select-focused');\r\n\t\t\t}\r\n\t\t\tsetMaxTagCount(MAX_TAG_COUNT);\r\n\t\t}, 100);\r\n\r\n\t\t// Cleanup function\r\n\t\treturn () => {\r\n\t\t\tif (timeoutRef.current) {\r\n\t\t\t\tclearTimeout(timeoutRef.current);\r\n\t\t\t}\r\n\t\t};\r\n\t}, [activeLocationMode]);\r\n\r\n\tconst debounceFetcher = useMemo(() => {\r\n\t\tconst loadOptions = async optionValue => {\r\n\t\t\tsetSearchKey(optionValue);\r\n\t\t\tfetchRef.current += 1;\r\n\t\t\tconst fetchId = fetchRef.current;\r\n\r\n\t\t\tsetOptions([]);\r\n\t\t\tsetIsLoading(true);\r\n\r\n\t\t\tlet returnOptions = null;\r\n\r\n\t\t\ttry {\r\n\t\t\t\tconst newOptions = await fetchOptions(optionValue);\r\n\t\t\t\tif (fetchId === fetchRef.current) {\r\n\t\t\t\t\tsetOptions(newOptions);\r\n\t\t\t\t\treturnOptions = newOptions;\r\n\t\t\t\t}\r\n\t\t\t} catch (error) {\r\n\t\t\t\tconsole.error('Error fetching options:', error);\r\n\t\t\t\tif (fetchId === fetchRef.current) {\r\n\t\t\t\t\tNotification.danger({\r\n\t\t\t\t\t\tmessage: 'Search failed',\r\n\t\t\t\t\t\tdescription: 'Unable to fetch location results. Please try again later.',\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t} finally {\r\n\t\t\t\tif (fetchId === fetchRef.current) {\r\n\t\t\t\t\tsetIsLoading(false);\r\n\t\t\t\t\treturn returnOptions;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\treturn debounce(loadOptions, debounceTimeout);\r\n\t}, [fetchOptions, debounceTimeout]);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (!defaultLocation?.code) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst loadDefaultLocation = async () => {\r\n\t\t\ttry {\r\n\t\t\t\tsetOptions([]);\r\n\t\t\t\tsetIsLoading(true);\r\n\t\t\t\t\r\n\t\t\t\tconst options = await fetchOptions(defaultLocation.code);\r\n\t\t\t\tsetOptions(options);\r\n\t\t\t\t\r\n\t\t\t\tif (!options || options.length === 0) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tlet match = null;\r\n\t\t\t\t\r\n\t\t\t\tif (defaultLocation.type) {\r\n\t\t\t\t\tconst targetGroup = options.find(group => \r\n\t\t\t\t\t\tgroup.label.toLowerCase() === LOCATION_MODES_MAP[defaultLocation.type]?.label.toLowerCase()\r\n\t\t\t\t\t);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (targetGroup?.options) {\r\n\t\t\t\t\t\tmatch = targetGroup.options.find(option => \r\n\t\t\t\t\t\t\toption.code.toLowerCase() === defaultLocation.code.toLowerCase() || \r\n\t\t\t\t\t\t\toption.selectedValue.toLowerCase() === defaultLocation.code.toLowerCase()\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (!match) {\r\n\t\t\t\t\tmatch = options\r\n\t\t\t\t\t\t.map(group => group.options)\r\n\t\t\t\t\t\t.flat()\r\n\t\t\t\t\t\t.find(option => \r\n\t\t\t\t\t\t\toption.code.toLowerCase() === defaultLocation.code.toLowerCase() || \r\n\t\t\t\t\t\t\toption.selectedValue.toLowerCase() === defaultLocation.code.toLowerCase()\r\n\t\t\t\t\t\t);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (match && onChange) {\r\n\t\t\t\t\tconst formattedMatch = {\r\n\t\t\t\t\t\tkey: JSON.stringify(match),\r\n\t\t\t\t\t\tlabel: match.selectedValue || match.displayLabel || match.code\r\n\t\t\t\t\t};\r\n\t\t\t\t\tonChange([formattedMatch]);\r\n\t\t\t\t}\r\n\t\t\t} catch (error) {\r\n\t\t\t\tif (Environment.isLocal()) {\r\n\t\t\t\t\tconsole.error('Error loading default location:', error);\r\n\t\t\t\t}\r\n\t\t\t} finally {\r\n\t\t\t\tsetIsLoading(false);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tloadDefaultLocation();\r\n\t}, [defaultLocation?.code, defaultLocation?.type]);\r\n\r\n\tconst shouldShowDropdown = () => isLoading || searchKey.trim() || recentSearches?.length > 0;\r\n\r\n\treturn (\r\n\t\t<>\r\n\t\t\t<DropdownGlobalStyle />\r\n\t\t\t<DebounceSelector\r\n\t\t\t\tmaxTagCount={maxTagCount}\r\n\t\t\t\tonSearch={debounceFetcher}\r\n\t\t\t\t$hasError={hasError}\r\n\t\t\t\tloading={isLoading}\r\n\t\t\t\toptions={options}\r\n\t\t\t\tfilterOption={false}\r\n\t\t\t\tnotFoundContent={\r\n\t\t\t\t\t<SelectorContent\r\n\t\t\t\t\t\tisLoading={isLoading}\r\n\t\t\t\t\t\trecentSearches={recentSearches}\r\n\t\t\t\t\t\tsearchKey={searchKey}\r\n\t\t\t\t\t\tdataTestId={dataTestId}\r\n\t\t\t\t\t\tsetIsOpen={setIsOpen}\r\n\t\t\t\t\t\tonRecentSearchSelect={props.onRecentSearchSelect}\r\n\t\t\t\t\t\tinitialValues={props.initialValues}\r\n\t\t\t\t\t/>\r\n\t\t\t\t}\r\n\t\t\t\tmode={mode}\r\n\t\t\t\tdata-test-id={`${dataTestId}-selector`}\r\n\t\t\t\tallowClear={mode === SelectModes.SINGLE}\r\n\t\t\t\tlabelInValue\r\n\t\t\t\toptionLabelProp='label'\r\n\t\t\t\tshowSearch\r\n\t\t\t\tonDropdownVisibleChange={open => {\r\n\t\t\t\t\tif (open) {\r\n\t\t\t\t\t\tsetMaxTagCount(MAX_TAG_COUNT_MULTIPLE);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tsetMaxTagCount(MAX_TAG_COUNT);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsetOptions([]);\r\n\t\t\t\t\tsetSearchKey('');\r\n\t\t\t\t\tsetIsOpen(open);\r\n\t\t\t\t}}\r\n\t\t\t\topen={isOpen && shouldShowDropdown()}\r\n\t\t\t\tvalue={value}\r\n\t\t\t\tonChange={onChange}\r\n\t\t\t\t{...props}\r\n\t\t\t>\r\n\t\t\t\t{renderedOptions(options)}\r\n\t\t\t</DebounceSelector>\r\n\t\t</>\r\n\t);\r\n};\r\n\r\nDebounceSelect.propTypes = {\r\n\tfetchOptions: PropTypes.func.isRequired,\r\n\trenderedOptions: PropTypes.func.isRequired,\r\n\thasError: PropTypes.bool,\r\n\tmode: PropTypes.string.isRequired,\r\n\tdataTestId: PropTypes.string,\r\n\tdebounceTimeout: PropTypes.number,\r\n\tvalue: PropTypes.array,\r\n\tactiveLocationMode: PropTypes.string,\r\n\trecentSearches: PropTypes.array,\r\n\tmaxTagCount: PropTypes.number,\r\n\tdefaultLocation: PropTypes.shape({\r\n\t\tcode: PropTypes.string.isRequired,\r\n\t\ttype: PropTypes.string.isRequired,\r\n\t}),\r\n\tonChange: PropTypes.func,\r\n};\r\n\r\nexport default DebounceSelect;\r\n","import React from 'react';\r\n\r\nimport { Tooltip } from '@freightos/design-system';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { SelectedOptionLabel } from '../helpers/styled';\r\n\r\nconst MaxPortsPlaceholder = ({ omittedPorts, dataTestId }) => {\r\n\tconst selectedItems = omittedPorts.map(omittedPort => JSON.parse(omittedPort.key)?.selectedValue);\r\n\r\n\treturn (\r\n\t\t<Tooltip title={selectedItems.join(',')}>\r\n\t\t\t<SelectedOptionLabel data-test-id={`${dataTestId}-extra-ports`}>{`+${omittedPorts.length}`}</SelectedOptionLabel>\r\n\t\t</Tooltip>\r\n\t);\r\n};\r\n\r\nMaxPortsPlaceholder.propTypes = {\r\n\tomittedPorts: PropTypes.array,\r\n\tdataTestId: PropTypes.string,\r\n};\r\n\r\nexport default MaxPortsPlaceholder;\r\n","import React, { useEffect, useState } from 'react';\r\n\r\nimport { tokens } from '@freightos/design-system';\r\nimport { TranslatableText } from '@freightos/freightos-i18n';\r\n\r\nimport PropTypes from 'prop-types';\r\n\r\nimport DebounceSelect from './components/DebounceSelect';\r\nimport MaxPortsPlaceholder from './components/MaxPortsPlaceholder';\r\nimport {\r\n\tDEFAULT_LOCATION_MODE,\r\n\tLocationTypes,\r\n\tSelectModes,\r\n} from './helpers/constant';\r\nimport {\r\n\tfetchLocations,\r\n\tgetLocationInputValue,\r\n\thandleLocationChange,\r\n\tisLocationAddress,\r\n\trenderLocationOptions,\r\n} from './helpers/utils';\r\n\r\n/**\r\n * LocationInput component for selecting locations (ports, airports, addresses, etc.)\r\n * \r\n * @param {Object|Array} value - Current selected location(s)\r\n * @param {Function} onChange - Callback fired when location changes\r\n * @param {boolean} hasError - Whether the input has validation errors\r\n * @param {string} dataTestId - Test ID for the component\r\n * @param {boolean} isOriginLocation - Whether this is an origin location input\r\n * @param {number} maxPorts - Maximum number of ports that can be selected\r\n * @param {Array<string>} supportedLocationModes - Array of supported location modes\r\n * @param {Object} customer - Customer object for API requests\r\n * @param {Object} defaultLocation - Default location to load\r\n * @param {string} defaultLocation.code - Location code (e.g., 'BCN')\r\n * @param {string} defaultLocation.type - Location type ('airport', 'seaport', 'address', etc.)\r\n * \r\n * @example\r\n * // Basic usage\r\n * <LocationInput \r\n * onChange={handleLocationChange}\r\n * supportedLocationModes={['airport', 'seaport']}\r\n * />\r\n * \r\n * @example\r\n * // With default value - will automatically load and select Barcelona airport\r\n * <LocationInput \r\n * onChange={handleLocationChange}\r\n * supportedLocationModes={['airport', 'seaport']}\r\n * defaultLocation={{ code: 'BCN', type: 'airport' }}\r\n * />\r\n */\r\nconst LocationInput = ({\r\n\tvalue,\r\n\tonChange,\r\n\thasError,\r\n\tdataTestId = 'location-input',\r\n\tisOriginLocation = true,\r\n\tmaxPorts = 1,\r\n\tsupportedLocationModes,\r\n\tcustomer,\r\n\tdefaultLocation,\r\n\t...rest\r\n}) => {\r\n\tconst [selectedLocation, setSelectedLocation] = useState(value);\r\n\tconst [activeLocationMode, setActiveLocationMode] = useState(\r\n\t\tsupportedLocationModes.length === 1 ? supportedLocationModes[0] : DEFAULT_LOCATION_MODE\r\n\t);\r\n\r\n\tconst [selectionMode, setSelectionMode] = useState(\r\n\t\tisLocationAddress(activeLocationMode) || activeLocationMode === DEFAULT_LOCATION_MODE\r\n\t\t\t? SelectModes.SINGLE\r\n\t\t\t: SelectModes.MULTIPLE\r\n\t);\r\n\r\n\tuseEffect(() => {\r\n\t\tif (isLocationAddress(activeLocationMode)) {\r\n\t\t\tsetSelectionMode(SelectModes.SINGLE);\r\n\t\t} else {\r\n\t\t\tsetSelectionMode(SelectModes.MULTIPLE);\r\n\t\t}\r\n\t}, [activeLocationMode]);\r\n\r\n\tuseEffect(() => {\r\n\t\tsetSelectedLocation(value);\r\n\t\tif (Array.isArray(value) && value.length > 0) {\r\n\t\t\tsetActiveLocationMode(value[0].type);\r\n\t\t} else if (defaultLocation?.type) {\r\n\t\t\tsetActiveLocationMode(defaultLocation.type);\r\n\t\t} else {\r\n\t\t\tsetActiveLocationMode(DEFAULT_LOCATION_MODE);\r\n\t\t}\r\n\t}, [value, defaultLocation?.type]);\r\n\r\n\treturn (\r\n\t\t<DebounceSelect\r\n\t\t\tmode={selectionMode}\r\n\t\t\tdataTestId={dataTestId}\r\n\t\t\thasError={hasError}\r\n\t\t\tplaceholder={\r\n\t\t\t\t<TranslatableText\r\n\t\t\t\t\tstyle={{ fontSize: tokens.fdsFontSizeBase }}\r\n\t\t\t\t\tstringId={`Select ${isOriginLocation ? LocationTypes.ORIGIN : LocationTypes.DESTINATION}`}\r\n\t\t\t\t/>\r\n\t\t\t}\r\n\t\t\tvalue={getLocationInputValue(selectedLocation)}\r\n\t\t\tfetchOptions={fetchLocations(activeLocationMode, supportedLocationModes, customer)}\r\n\t\t\trenderedOptions={optionGroups => renderLocationOptions(optionGroups, dataTestId)}\r\n\t\t\tonChange={location => {\r\n\t\t\t\thandleLocationChange(location ?? [], selectionMode, maxPorts, setSelectedLocation, onChange);\r\n\t\t\t\tsetActiveLocationMode(DEFAULT_LOCATION_MODE);\r\n\t\t\t}}\r\n\t\t\tactiveLocationMode={activeLocationMode}\r\n\t\t\tmaxTagPlaceholder={omittedPorts => <MaxPortsPlaceholder omittedPorts={omittedPorts} dataTestId={dataTestId} />}\r\n\t\t\tdefaultLocation={defaultLocation}\r\n\t\t\t{...rest}\r\n\t\t/>\r\n\t);\r\n};\r\n\r\nLocationInput.propTypes = {\r\n\tvalue: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\r\n\tonChange: PropTypes.func.isRequired,\r\n\thasError: PropTypes.bool,\r\n\tdataTestId: PropTypes.string,\r\n\tisOriginLocation: PropTypes.bool,\r\n\tmaxPorts: PropTypes.number,\r\n\tsupportedLocationModes: PropTypes.arrayOf(PropTypes.string).isRequired,\r\n\tcustomer: PropTypes.object,\r\n\trecentSearches: PropTypes.array,\r\n\tonRecentSearchSelect: PropTypes.func,\r\n\tinitialValues: PropTypes.object,\r\n\tdefaultLocation: PropTypes.shape({\r\n\t\tcode: PropTypes.string.isRequired,\r\n\t\ttype: PropTypes.string.isRequired,\r\n\t}),\r\n};\r\n\r\nexport default LocationInput;\r\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["../webpack/universalModuleDefinition","../webpack/bootstrap","../external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","../external \"@freightos/design-system\"","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/regenerator/index.js","../external \"styled-components\"","../external \"@freightos/freightos-i18n\"","../external \"@freightos/http-client\"","../external \"lodash\"","../../../node_modules/regenerator-runtime/runtime.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/defineProperty.js","helpers/constant.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js","helpers/styled.js","common/helpers/constants.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","components/RecentSearches/constants.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread2.js","common/helpers/styled.js","common/components/Flex.js","helpers/apis.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createClass.js","common/helpers/Environment.js","../../../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/classCallCheck.js","helpers/utils.js","common/httpClient/doRequest/index.js","components/RecentSearches/apis.js","components/RecentSearches/styled.js","components/RecentSearches/utils.js","components/RecentSearches/components/TruncatedLabel.jsx","components/RecentSearches/components/ItineraryDisplay.jsx","components/RecentSearches/components/ShipmentAndCommodityDisplay.jsx","components/RecentSearches/components/SearchCard.jsx","components/RecentSearches/index.jsx","components/RecentSearches/adapters.js","components/SelectorContent.js","components/DebounceSelect.js","components/MaxPortsPlaceholder.js","index.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE__0__","__WEBPACK_EXTERNAL_MODULE__1__","__WEBPACK_EXTERNAL_MODULE__3__","__WEBPACK_EXTERNAL_MODULE__4__","__WEBPACK_EXTERNAL_MODULE__5__","__WEBPACK_EXTERNAL_MODULE__6__","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","runtime","Op","hasOwn","$Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","obj","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","context","Context","_invoke","state","method","arg","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","done","makeInvokeMethod","fn","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","resolve","reject","invoke","result","__await","then","unwrapped","error","undefined","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","displayName","isGeneratorFunction","genFun","ctor","constructor","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","_arrayLikeToArray","arr","len","arr2","Array","_unsupportedIterableToArray","minLen","toString","from","test","_slicedToArray","isArray","_arr","_n","_d","_e","_s","_i","_objectWithoutProperties","source","excluded","target","sourceKeys","indexOf","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","arguments","apply","_defineProperty","LOCATION_MODES","LOCATION_MODES_MAP","_LOCATION_MODES_MAP","label","icon","groupedBy","SelectModes","LocationTypes","_taggedTemplateLiteral","strings","raw","freeze","defineProperties","DropdownGlobalStyle","createGlobalStyle","_templateObject","DebounceSelector","styled","Select","_templateObject2","tokens","fdsBorderRadiusXl","fdsColorPrimaryBlue","fdsColorPrimaryBlue10","fdsComponentSpacingXxs","fdsSizeMd","_ref","size","concat","fdsComponentSpacingSm","fdsComponentSpacingXs","fdsColorPrimaryGray80","_ref2","$hasError","fdsColorSemanticRed","fdsColorSemanticRed10","SelectedOptionLabel","span","_templateObject3","fdsFontSizeSm","SelectOptionLabel","div","_templateObject4","StyledMenu","Menu","_templateObject5","fdsBodyTextColorDisabled","NoMatchingResults","_templateObject6","fdsSizeSm","fdsHeadingsFontFamily","FlexSpacings","Icon","_templateObject7","XXLARGE","fdsComponentSpacingXxl","XLARGE","fdsComponentSpacingXl","LARGE","fdsComponentSpacingLg","MEDIUM","fdsComponentSpacingMd","SMALL","XSMALL","XXSMALL","NONE","FlexDirections","_toConsumableArray","SEARCH_FIELDS","TEMPERATURE_SYSTEM","TEMPERATURE_RANGE","TEMPERATURE_RANGES_DATA","_TEMPERATURE_RANGES_D","_TEMPERATURE_RANGE$FR","_TEMPERATURE_RANGE$CO","_TEMPERATURE_RANGE$ER","_TEMPERATURE_RANGE$CR","SEARCH_PLATFORMS","SHIPMENT_OPTIONS","VOLUME_OPTIONS","WEIGHT_OPTIONS","PACKAGE_TYPE","ownKeys","enumerableOnly","symbols","filter","sym","getOwnPropertyDescriptor","getOwnPropertyDescriptors","StyledFlex","$direction","$wrap","_ref3","$alignItems","_ref4","$justifyContent","_ref5","$fullWidth","css","_ref6","$spacing","Flex","_ref$direction","direction","_ref$alignItems","alignItems","_ref$spacing","spacing","justifyContent","fullWidth","rest","_excluded","React","createElement","assign","children","getLocations","_regeneratorRuntime","_callee","locationModes","query","customer","sources","response","_context","reduce","acc","_objectSpread","toUpperCase","code","searchTerm","httpClient","post","limit","data","t0","console","results","_x","_x2","_x3","_defineProperties","props","descriptor","Environment","instance","Constructor","_classCallCheck","protoProps","staticProps","process","REACT_APP_CUSTOM_ENV","getGatewayApiPrefix","isTalaia","domain","isProduction","stableStringify","allKeys","JSON","stringify","k","v","uniqSortedKeys","Set","sort","normalizeLocationForKey","displayLabel","selectedValue","formattedNameOrAddress","countryCode","stateOrProvince","city","latitude","longitude","postalOrZipCode","sourceType","locationType","country","countryName","stableKeyFromLocation","parsed","parse","decodeHtmlEntities","_unused","getLocationInputValue","locations","formatLocation","location","_LOCATION_MODES_MAP$l","Fragment","getLocationInputOption","map","extractFulfillmentCenters","locationsResults","updatedLocationsResults","fulfillmentCenters","option","_objectSpread2","_updatedLocationsResu","address","fetchLocations","activeLocationMode","supportedLocationModes","modes","_LOCATION_MODES_MAP$k","options","onChangeLocation","_callee3","changedLocations","onChange","locationsDetails","_context3","all","_callee2","json","_context2","_x4","Boolean","isLocationAddress","replace","doRequest","_ref$url","url","_ref$data","_ref$options","params","URLSearchParams","headers","saveLastUsedSearch","searchId","id","STitle","fdsColorPrimaryGray60","fdsSizeXs","fdsFontWeightRegular","SCard","UnitIcon","STruncatedLabel","$isLocationLabel","$isPort","SLocationFlag","Avatar","fdsColorPrimaryGray20","STinyWrapper","SListWrapper","formatNumber","toLocaleString","maximumFractionDigits","useGrouping","groupAndOrderLocationsByCountries","groupedByCountry","a","b","localeCompare","TruncatedLabel","_ref$text","text","testId","_ref$isPort","isPort","_ref$isLocationLabel","isLocationLabel","_ref$children","labelRef","useRef","_useState2","useState","isTruncated","setIsTruncated","useEffect","current","element","truncated","scrollWidth","clientWidth","checkTruncation","labelElement","ref","data-test-id","Tooltip","title","ItineraryDisplay","search","index","dataTestId","isMultiOrigin","origin","isMultiDestination","destination","groupedOrigin","groupedDestination","labelOrigin","join","style","marginRight","color","fdsColorPrimaryGray90","flex","labelDestination","ShipmentAndCommodityDisplay","_search$commodity_tem","_search$commodity_tem2","_search$commodity_tem3","platformType","platform_type","icons","shipmentType","shipment_details","unitsPackages","packageType","boxPackages","uniqueIcons","packageItem","_packageItem$type","_packageItem$type$val","includes","chooseIconsType","_useMemo","useMemo","units","volume","weight","weightUnit","volumeUnit","_search$shipment_deta","calculatedUnits","calculatedTEU","pkg","Number","dimensionSelected","parseInt","dimensions","volumeCalculationFactor","formattedVolume","curr","parseFloat","width","height","formattedWeight","uldPackages","_search$shipment_deta2","_search$shipment_deta3","_search$shipment_deta4","_search$shipment_deta5","_search$shipment_deta6","shipmentTotalsBasedOnPackages","isTemperature","commodity","is_temperature","temperatureRange","commodity_temperature","tempRange","temperatureSystem","iconIndex","whiteSpace","SearchCard","setIsOpen","onRecentSearchSelect","handleClick","padding","onClick","RecentSearches","recentSearches","initialValues","firstSixSearches","is_saved","aDate","Date","saved_update_date","getTime","aMaxDate","Math","max","last_time_used_date","orderRecentSearches","TranslatableText","stringId","SelectorContent","isLoading","searchKey","Spin","trim","TRANSLATION_MODULES","SearchAndBook","DebounceSelect","fetchOptions","renderedOptions","_ref$recentSearches","hasError","_ref$debounceTimeout","debounceTimeout","defaultLocation","setOptions","_useState4","setIsLoading","_useState6","setSearchKey","fetchRef","_useState8","isOpen","_useState0","maxTagCount","setMaxTagCount","timeoutRef","prevOptions","clearTimeout","setTimeout","document","activeElement","blur","body","click","active","querySelector","classList","remove","debounceFetcher","loadOptions","optionValue","fetchId","returnOptions","newOptions","Notification","danger","message","description","debounce","_options","match","targetGroup","formattedMatch","find","group","_LOCATION_MODES_MAP$d","toLowerCase","flat","isLocal","loadDefaultLocation","onSearch","loading","filterOption","notFoundContent","allowClear","labelInValue","optionLabelProp","showSearch","onDropdownVisibleChange","open","MaxPortsPlaceholder","omittedPorts","selectedItems","omittedPort","_JSON$parse","LocationInput","_ref$dataTestId","_ref$isOriginLocation","isOriginLocation","_ref$maxPorts","maxPorts","selectedLocation","setSelectedLocation","setActiveLocationMode","selectionMode","setSelectionMode","placeholder","fontSize","fdsFontSizeBase","optionGroups","some","_group$options","_group$options2","locationOptionIcon","OptGroup","fontFamily","Option","paddingLeft","Chip","iconType","renderLocationOptions","selectedPorts","_selectedPorts$","typePort","Message","handleLocationChange","maxTagPlaceholder"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,kBAAZC,SAA0C,kBAAXC,OACxCA,OAAOD,QAAUD,EAAQG,QAAQ,SAAUA,QAAQ,4BAA6BA,QAAQ,qBAAsBA,QAAQ,6BAA8BA,QAAQ,0BAA2BA,QAAQ,WACtK,oBAAXC,QAAyBA,OAAOC,IAC9CD,OAAO,sBAAuB,CAAC,QAAS,2BA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AAAnC,GAAY,OAAIjV,IAAAC,cAAC+U,GAAmB,CAACC,aAAcA,EAAcrK,WAAYA,KAChG2G,gBAAiBA,GACbzR","file":"main.bundle.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"), require(\"@freightos/design-system\"), require(\"styled-components\"), require(\"@freightos/freightos-i18n\"), require(\"@freightos/http-client\"), require(\"lodash\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"FusionLocationInput\", [\"react\", \"@freightos/design-system\", \"styled-components\", \"@freightos/freightos-i18n\", \"@freightos/http-client\", \"lodash\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"FusionLocationInput\"] = factory(require(\"react\"), require(\"@freightos/design-system\"), require(\"styled-components\"), require(\"@freightos/freightos-i18n\"), require(\"@freightos/http-client\"), require(\"lodash\"));\n\telse\n\t\troot[\"FusionLocationInput\"] = factory(root[\"React\"], root[\"@freightos/design-system\"], root[\"styled-components\"], root[\"@freightos/freightos-i18n\"], root[\"@freightos/http-client\"], root[\"lodash\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE__0__, __WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__3__, __WEBPACK_EXTERNAL_MODULE__4__, __WEBPACK_EXTERNAL_MODULE__5__, __WEBPACK_EXTERNAL_MODULE__6__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"http://ship.freightos.local:8800/FusionLocationInput/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 7);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","module.exports = __WEBPACK_EXTERNAL_MODULE__1__;","module.exports = require(\"regenerator-runtime\");\n","module.exports = __WEBPACK_EXTERNAL_MODULE__3__;","module.exports = __WEBPACK_EXTERNAL_MODULE__4__;","module.exports = __WEBPACK_EXTERNAL_MODULE__5__;","module.exports = __WEBPACK_EXTERNAL_MODULE__6__;","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","import arrayWithHoles from \"./arrayWithHoles\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray\";\nimport nonIterableRest from \"./nonIterableRest\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","/**\n * Default location mode used when no specific mode is selected.\n * @type {string}\n */\nexport const DEFAULT_LOCATION_MODE = '';\n\nexport const LOCATION_MODES = {\n\tAIRPORT: 'airport',\n\tSEAPORT: 'seaport',\n\tFULFILLMENT_CENTER: 'fulfillment_center',\n\tADDRESS_BOOK: 'address_book',\n\tLAST_MILE_ADDRESS: 'last_mile_address',\n\tADDRESS: 'address',\n};\n\nexport const LOCATION_MODES_MAP = {\n\t[LOCATION_MODES.AIRPORT]: { label: 'Airports', key: LOCATION_MODES.AIRPORT, icon: 'mode-air' },\n\t[LOCATION_MODES.SEAPORT]: { label: 'Ports', key: LOCATION_MODES.SEAPORT, icon: 'mode-ship' },\n\t[LOCATION_MODES.FULFILLMENT_CENTER]: {\n\t\tlabel: 'Fulfillment centers',\n\t\tkey: LOCATION_MODES.FULFILLMENT_CENTER,\n\t\ticon: 'fulfillment-center',\n\t},\n\t[LOCATION_MODES.ADDRESS_BOOK]: { key: LOCATION_MODES.ADDRESS_BOOK, groupedBy: 'address' },\n\t[LOCATION_MODES.LAST_MILE_ADDRESS]: { key: LOCATION_MODES.LAST_MILE_ADDRESS, groupedBy: 'address' },\n\t[LOCATION_MODES.ADDRESS]: { label: 'Address', key: LOCATION_MODES.ADDRESS, icon: 'location' },\n};\n\n/**\n * Enumeration of selection modes for location input.\n * @enum {string}\n */\nexport const SelectModes = {\n\tSINGLE: 'single',\n\tMULTIPLE: 'multiple',\n};\n\n/**\n * Enumeration of location types for origin and destination.\n * @enum {string}\n */\nexport const LocationTypes = {\n\tORIGIN: 'origin',\n\tDESTINATION: 'destination',\n};\n\nexport const MAX_TAG_COUNT = 3;\nexport const MAX_TAG_COUNT_MULTIPLE = 2;\n","export default function _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}","import { Icon, Menu, Select, tokens } from '@freightos/design-system';\nimport styled, { createGlobalStyle } from 'styled-components';\n\nexport const DropdownGlobalStyle = createGlobalStyle`\n .ant-select-dropdown {\n .ant-select-dropdown-menu {\n max-height: 400px;\n padding: 0 !important;\n margin-top: 0 !important;\n }\n }\n`;\n\nexport const DebounceSelector = styled(Select)`\n\t.ant-select-selection__rendered {\n\t\tmin-width: 100% !important;\n\t}\n\n\tli.ant-select-selection__choice {\n\t\tborder-radius: ${tokens.fdsBorderRadiusXl};\n\t\tborder: none;\n\t\tborder-color: ${tokens.fdsColorPrimaryBlue};\n\t\tcolor: ${tokens.fdsColorPrimaryBlue};\n\t\tbackground-color: ${tokens.fdsColorPrimaryBlue10};\n\t\tline-height: 10px !important;\n\t\tmargin-right: ${tokens.fdsComponentSpacingXxs};\n\t\twidth: fit-content;\n\t\tmax-width: 90px;\n\t\theight: ${tokens.fdsSizeMd} !important;\n\t\t${({size}) => size === 'large' ? `\n\t\t\tmargin-top: ${tokens.fdsComponentSpacingSm} !important;\n\t\t` : `\n\t\t\tmargin-top: 5px !important;\n\t\t`}\n\n\t\t.ant-select-selection__choice__remove {\n\t\t\tcolor: ${tokens.fdsColorPrimaryBlue};\n\t\t\tmargin-top: ${tokens.fdsComponentSpacingXs} !important;\n\t\t}\n\n\t\t.ant-select-selection__choice__content {\n\t\t\tline-height: ${tokens.fdsSizeMd} !important;\n\t\t\theight: ${tokens.fdsSizeMd} !important;\n\t\t}\n\t}\n\n\tli.ant-select-selection__choice__disabled {\n\t\tborder: none;\n\t\tbackground-color: transparent;\n\t\tpadding: 0;\n\t\tpadding-left: 0;\n\t\twidth: fit-content;\n\t}\n\n\t.ant-select-dropdown .ant-select-not-found {\n\t\tcursor: pointer !important;\n\t}\n\n\t.ant-select-selection-selected-value {\n\t\tmax-width: 280px !important;\n\t}\n\n\tli.ant-select-search.ant-select-search--inline {\n\t\tmargin-left: -1px !important;\n\t}\n\t.ant-select-search__field {\n\t\tcolor: ${tokens.fdsColorPrimaryGray80} !important;\n\t}\n\t${({ $hasError }) => $hasError && `\n\t\t.ant-select-selection {\n\t\t\tcolor: ${tokens.fdsColorSemanticRed};\n \t\tborder: 1px solid ${tokens.fdsColorSemanticRed};\n \t\tbackground-color: ${tokens.fdsColorSemanticRed10};\n\t\t}\n\n\t\t.ant-select-selection__placeholder, .ant-select-arrow {\n\t\t\tcolor: ${tokens.fdsColorSemanticRed};\n\t\t}\n\t`}\n`;\n\nexport const SelectedOptionLabel = styled.span`\n\tfont-size: ${tokens.fdsFontSizeSm} !important;\n`;\n\nexport const SelectOptionLabel = styled.div`\n\tfont-size: ${tokens.fdsFontSizeSm} !important;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\tdisplay: -webkit-box;\n\t-webkit-line-clamp: 2;\n\t-webkit-box-orient: vertical;\n`;\n\nexport const StyledMenu = styled(Menu)`\n\tcursor: pointer !important;\n\n\t.ant-menu-item-group-title {\n\t\tpadding: 0;\n\t\tcolor: ${tokens.fdsBodyTextColorDisabled};\n\t}\n\n\t.ant-menu-item {\n\t\tpadding: 0;\n\t\twhite-space: normal;\n\t\tline-height: normal;\n\n\t\t&:hover {\n\t\t\tbackground-color: #f5f5f5;\n\t\t}\n\t}\n`;\n\nexport const NoMatchingResults = styled.div`\n\tfont-size: ${tokens.fdsFontSizeSm};\n\tline-height: ${tokens.fdsSizeSm};\n\tfont-family: ${tokens.fdsHeadingsFontFamily};\n`;\n\nexport const UnitIcon = styled(Icon)`\n\tmargin-right: 0 !important;\n\tvertical-align: bottom;\n`;\n","import { tokens } from '@freightos/design-system';\n\nexport const FlexSpacings = {\n\tXXLARGE: tokens.fdsComponentSpacingXxl,\n\tXLARGE: tokens.fdsComponentSpacingXl,\n\tLARGE: tokens.fdsComponentSpacingLg,\n\tMEDIUM: tokens.fdsComponentSpacingMd,\n\tSMALL: tokens.fdsComponentSpacingSm,\n\tXSMALL: tokens.fdsComponentSpacingXs,\n\tXXSMALL: tokens.fdsComponentSpacingXxs,\n\tNONE: 0,\n};\n\nexport const FlexDirections = {\n\tVERTICAL: 'vertical',\n\tHORIZONTAL: 'horizontal',\n};\n","import arrayWithoutHoles from \"./arrayWithoutHoles\";\nimport iterableToArray from \"./iterableToArray\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray\";\nimport nonIterableSpread from \"./nonIterableSpread\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import arrayLikeToArray from \"./arrayLikeToArray\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","export const SEARCH_FIELDS = {\n\tORIGIN: 'origin',\n\tDESTINATION: 'destination',\n\tTOTALS_SHIPMENT: 'totalShipment',\n\tUNITS_SHIPMENT: 'unitsShipment',\n\tCONTAINER_SHIPMENT: 'containerShipment',\n\tCOMMODITY: 'commodity',\n\tSHIPMENT_TYPE: 'shipmentType',\n\tUNITS: 'units',\n\tVOLUME: 'volume',\n\tVOLUME_UNIT: 'volumeUnit',\n\tWEIGHT: 'weight',\n\tWEIGHT_UNIT: 'weightUnit',\n\tTURNABLE: 'turnable',\n\tSTACKABLE: 'stackable',\n\tDEFINE_EACH_UNIT_DIMENSIONS: 'defineEachUnitDimensions',\n\tDEFINE_EACH_UNIT_WEIGHT: 'defineEachUnitWeight',\n\tUNIT_DIMENSIONS: 'unitDimensions',\n\tUNIT_WEIGHTS: 'unitWeights',\n\tLENGTH: 'length',\n\tHEIGHT: 'height',\n\tWIDTH: 'width',\n\tTYPE: 'type',\n\tDIMENSION_UNIT: 'dimensionUnit',\n\tBOX_PACKAGES: 'boxPackages',\n\tULD_PACKAGES: 'uldPackages',\n\tPACKAGE_TYPE: 'packageType',\n\tTOTAL_WEIGHT: 'totalWeight',\n\tCONTAINER_PACKAGES: 'containerPackages',\n\tDIMENSIONS: 'dimensions',\n\tFULLFILLMENT_DETAILS: 'fullfillmentDetails',\n\tIS_FULLFILLMENT: 'isFullfillment',\n\tCOMMODITY_TEMPERATURE: 'commodityTemperature',\n\tBATTERY_HS_CODE: 'batteryHsCode',\n\tSUPPORTED_FREIGHT_TYPES: 'supportedFreightTypes',\n}\n\nexport const TEMPERATURE_SYSTEM = {\n\tCELSIUS: 'celsius',\n\tFAHRENHEIT: 'fahrenheit',\n}\n\nexport const TEMPERATURE_RANGE = {\n\tFRO: 'FRO',\n\tCOL: 'COL',\n\tERT: 'ERT',\n\tCRT: 'CRT',\n}\n\nexport const TEMPERATURE_RANGES_DATA = {\n\t[TEMPERATURE_RANGE.FRO]: {\n\t\t[TEMPERATURE_SYSTEM.CELSIUS]: '-10ºC or below',\n\t\t[TEMPERATURE_SYSTEM.FAHRENHEIT]: '14ºF or below',\n\t},\n\t[TEMPERATURE_RANGE.COL]: {\n\t\t[TEMPERATURE_SYSTEM.CELSIUS]: 'From +2ºC To +8ºC',\n\t\t[TEMPERATURE_SYSTEM.FAHRENHEIT]: 'From 35.6ºF To 46.4ºF',\n\t},\n\t[TEMPERATURE_RANGE.ERT]: {\n\t\t[TEMPERATURE_SYSTEM.CELSIUS]: 'From +2ºC To +25ºC',\n\t\t[TEMPERATURE_SYSTEM.FAHRENHEIT]: 'From 35.6ºF To 77ºF',\n\t},\n\t[TEMPERATURE_RANGE.CRT]: {\n\t\t[TEMPERATURE_SYSTEM.CELSIUS]: 'From +15ºC To +25ºC',\n\t\t[TEMPERATURE_SYSTEM.FAHRENHEIT]: 'From 59ºF To 77ºF',\n\t},\n\n};\n\nexport const SEARCH_PLATFORMS = {\n\tBOOKING: 'booking',\n\tQUOTATION: 'quotation',\n\tBI: 'bi',\n}\n\nexport const RS_PLATFORM_TYPES = {\t\n\tBOOK: 'BOOK',\n\tQUOTE: 'QUOTE',\n\tBI: 'BI',\n}\n\nexport const CONTAINER_TYPE_20_FOOT_FACTOR = 20;\n\nexport const SHIPMENT_OPTIONS = {\n\tUNITS: 'units',\n\tTOTALS: 'totals',\n\tCONTAINER: 'container'\n}\n\nexport const CUBIC_FOOT_TO_CUBIC_INCH_CONVERSION_FACTOR = 1728;\n\nexport const CUBIC_METER_TO_CUBIC_CM_CONVERSION_FACTOR = 1000000;\n\nexport const VOLUME_OPTIONS = {\n\tCBM: 'CBM',\n\tCFT: 'CFT',\t\n}\n\nexport const WEIGHT_OPTIONS = {\n\tKG: 'kg',\n\tLB: 'lb',\n}\n\nexport const DIMENSION_OPTIONS = {\n\tCM: 'cm',\n\tIN: 'in',\n}\n\nexport const PACKAGE_TYPE = {\n\tBOX: 'box',\n\tULD: 'uld',\n}\n\nexport const RECENT_SEARCHES_LIMIT = 6;\n","import defineProperty from \"./defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nexport default function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}","import styled, { css } from 'styled-components';\n\nimport { FlexDirections } from './constants';\n\nexport const StyledFlex = styled.div`\n\tdisplay: flex;\n\tflex-direction: ${({ $direction }) => ($direction === FlexDirections.VERTICAL ? 'column' : 'row')};\n\tflex-wrap: ${({ $wrap }) => ($wrap ? 'wrap' : 'nowrap')};\n\talign-items: ${({ $alignItems }) => $alignItems};\n\tjustify-content: ${({ $justifyContent }) => $justifyContent};\n\tbox-sizing: border-box;\n\n\t${({ $fullWidth }) =>\n\t\t$fullWidth &&\n\t\tcss`\n\t\t\twidth: 100%;\n\t\t`}\n\t${({ $direction, $spacing }) =>\n\t\t$direction === FlexDirections.VERTICAL\n\t\t\t? css`\n\t\t\t\t\t> *:not(:first-child) {\n\t\t\t\t\t\tmargin-top: ${$spacing};\n\t\t\t\t\t}\n\t\t\t `\n\t\t\t: css`\n\t\t\t\t\t> *:not(:first-child) {\n\t\t\t\t\t\tmargin-left: ${$spacing};\n\t\t\t\t\t}\n\t\t\t `};\n`;","import React from 'react';\n\nimport PropTypes from 'prop-types';\n\nimport { FlexDirections, FlexSpacings } from '../helpers/constants';\nimport { StyledFlex } from '../helpers/styled';\n\nconst Flex = ({\n\tdirection = FlexDirections.HORIZONTAL,\n\talignItems = 'start',\n\tspacing = FlexSpacings.NONE,\n\twrap,\n\tjustifyContent,\n\tfullWidth,\n\t...rest\n}) => (\n\t<StyledFlex\n\t\t{...rest}\n\t\t$direction={direction}\n\t\t$alignItems={alignItems}\n\t\t$spacing={spacing}\n\t\t$wrap={wrap}\n\t\t$justifyContent={justifyContent}\n\t\t$fullWidth={fullWidth}\n\t>\n\t\t{rest.children}\n\t</StyledFlex>\n);\n\nFlex.propTypes = {\n\tdirection: PropTypes.oneOf([FlexDirections.HORIZONTAL, FlexDirections.VERTICAL]),\n\tspacing: PropTypes.oneOf(Object.keys(FlexSpacings)),\n\tchildren: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n\talignItems: PropTypes.string,\n\tjustifyContent: PropTypes.string,\n\tfullWidth: PropTypes.bool,\n\twrap: PropTypes.bool,\n};\n\nexport default Flex;\n","import httpClient from '@freightos/http-client';\n\nimport { LOCATION_MODES_MAP } from './constant';\n\n/**\n * Fetches locations based on the provided location modes and query.\n *\n * @param {Array<string>} locationModes - Array of location modes to search for.\n * @param {string} query - The search query.\n * @returns {Promise<Object>} A promise resolving to an object containing location results.\n */\nexport const getLocations = async (locationModes, query, customer) => {\n\ttry {\n\t\tconst sources = locationModes.reduce(\n\t\t\t(acc, mode) => ({\n\t\t\t\t...acc,\n\t\t\t\t[LOCATION_MODES_MAP[mode].key]: {\n\t\t\t\t\ttype: mode.toUpperCase(),\n\t\t\t\t\t...(customer?.code ? { searchTerm: customer.name } : {}),\n\t\t\t\t\t...(LOCATION_MODES_MAP[mode].groupedBy ? { groupedBy: LOCATION_MODES_MAP[mode].groupedBy } : {}),\n\t\t\t\t},\n\t\t\t}),\n\t\t\t{}\n\t\t);\n\t\tconst response = await httpClient.post('/geocoder/api/v3/geocoder/locations', {\n\t\t\tquery,\n\t\t\tlimit: 5,\n\t\t\tsources,\n\t\t});\n\t\treturn response.data;\n\t} catch (error) {\n\t\tconsole.error('Error fetching locations:', error);\n\t\treturn { results: {} };\n\t}\n};\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","export default class Environment {\n\tstatic isProduction() {\n\t\treturn process.env.REACT_APP_CUSTOM_ENV === 'prod';\n\t}\n\n\tstatic isTest() {\n\t\treturn process.env.REACT_APP_CUSTOM_ENV === 'test';\n\t}\n\n\tstatic isLocal() {\n\t\treturn process.env.REACT_APP_CUSTOM_ENV === 'dev';\n\t}\n}\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import React from 'react';\n\nimport { Avatar, Chip, Icon, Message, Option, Select, tokens } from '@freightos/design-system';\nimport { TranslatableText } from '@freightos/freightos-i18n';\n\nimport Flex from 'common/components/Flex';\nimport { FlexSpacings } from '../common/helpers/constants';\nimport { getLocations } from './apis';\nimport { DEFAULT_LOCATION_MODE, LOCATION_MODES, LOCATION_MODES_MAP, SelectModes } from './constant';\nimport { SelectOptionLabel, SelectedOptionLabel } from './styled';\n\nimport Environment from '../common/helpers/Environment';\n\n/**\n * Get the gateway API prefix based on the environment.\n *\n * @returns {string} The gateway API prefix.\n */\nexport const getGatewayApiPrefix = (isTalaia) => {\n\tconst domain = Environment.isProduction()\n\t\t? 'freightos.com'\n\t\t: 'test-freightos.com';\n\treturn `https://platform.${domain}/gateway/${isTalaia ? 'webcargo-talaia' : 'webcargo-alpha'}`;\n};\n\n// Deterministic JSON stringify\nconst stableStringify = (obj) => {\n const allKeys = [];\n JSON.stringify(obj, (k, v) => (allKeys.push(k), v));\n const uniqSortedKeys = Array.from(new Set(allKeys)).sort();\n return JSON.stringify(obj, uniqSortedKeys);\n};\n\nconst normalizeLocationForKey = (loc) => {\n const {\n displayLabel,\n selectedValue,\n formattedNameOrAddress,\n code,\n countryCode,\n stateOrProvince,\n city,\n latitude,\n longitude,\n postalOrZipCode,\n sourceType,\n locationType,\n type,\n\tcountryName,\n } = loc || {};\n\n return {\n displayLabel,\n selectedValue: selectedValue || code,\n formattedNameOrAddress,\n code: code || selectedValue,\n country: countryCode,\n\tcountryName,\n stateOrProvince: stateOrProvince ?? null,\n city: city ?? null,\n latitude: latitude ?? null,\n longitude: longitude ?? null,\n postalOrZipCode: postalOrZipCode ?? null,\n sourceType: sourceType ?? null,\n locationType: locationType ?? null,\n type: type ?? sourceType,\n };\n};\n\nconst stableKeyFromLocation = (loc) => {\n try {\n const parsed = typeof loc?.key === 'string'\n ? JSON.parse(decodeHtmlEntities(loc.key))\n : loc;\n return stableStringify(normalizeLocationForKey(parsed));\n } catch {\n return stableStringify(normalizeLocationForKey(loc));\n }\n};\n\n/**\n * Get location input option.\n *\n * @param {Object} location - The location object to get the option for.\n * @returns {Object} The location input option.\n */\nexport const getLocationInputOption = (location) => {\n\tif(location) {\n \t\tconst displayLabel = location.label || location.selectedValue;\n \t\tconst key = stableKeyFromLocation(location);\n\n \t\tconst label = displayLabel\n \t\t ? (\n \t\t <>\n \t\t <Icon type={location.sourceType ? LOCATION_MODES_MAP[location.sourceType]?.icon : 'location'} size='tiny' />\n \t\t &nbsp;\n \t\t <SelectedOptionLabel>{displayLabel}</SelectedOptionLabel>\n \t\t </>\n \t\t )\n \t\t : undefined;\n\n \t\treturn { key, label };\n\t} \n\treturn undefined;\n};\n\n/**\n * Formats location(s) into option(s) with key and label for the location input.\n *\n * @param {Object|Array} locations - Single location object or array of location objects.\n * @returns {Object|Array} Formatted option(s) with key and label.\n * - For single location: Returns {key: string, label: ReactElement}.\n * - For multiple locations: Returns array of {key: string, label: ReactElement}.\n */\nexport const getLocationInputValue = locations => {\n\tconst formatLocation = loc => getLocationInputOption(loc);\n\treturn Array.isArray(locations) ? locations.map(formatLocation) : formatLocation(locations);\n};\n\n/**\n * Renders location options (ports and addresses) in a select dropdown with icons and grouping.\n *\n * @param {Array} locationOptions - Array of location option groups to render.\n * @param {string} dataTestId - Test ID prefix for components.\n * @returns {Array<ReactElement>} Array of Select.OptGroup components containing the location options.\n *\n * @example\n * Location options format:\n * [\n * {\n * label: \"seaport\",\n * options: [{\n * label: \"Port Name\",\n * key: \"{...port data...}\"\n * }]\n * }\n * ]\n */\nexport const renderLocationOptions = (optionGroups, dataTestId) => {\n\n\tif (!(optionGroups || []).some(group => group?.options?.length > 0) )\n\t\treturn;\n\n\treturn optionGroups.map(group => {\n\t\tconst location = Object.values(LOCATION_MODES_MAP).find(mode => mode.label === group.label);\n\t\tconst locationOptionIcon = location?.icon;\n\n\t\treturn (\n\t\t\t<Select.OptGroup\n\t\t\t\tlabel={\n\t\t\t\t\t<span style={{fontFamily: 'Open Sans'}}>\n\t\t\t\t\t\t<Icon size='tiny' type={locationOptionIcon} />\n\t\t\t\t\t\t&nbsp;\n\t\t\t\t\t\t&nbsp;\n\t\t\t\t\t\t{group.label}\n\t\t\t\t\t</span>\n\t\t\t\t}\n\t\t\t\tkey={group.label}\n\t\t\t\tdata-test-id={`${dataTestId}-group-${group.label}`}\n\t\t\t>\n\t\t\t\t{group.options?.map(option => {\n\t\t\t\t\tconst { countryCode, selectedValue, displayLabel, type } = option;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Option\n\t\t\t\t\t\t\tvalue={stableKeyFromLocation(option)}\n\t\t\t\t\t\t\ttitle={selectedValue}\n\t\t\t\t\t\t\tdata-test-id={`${dataTestId}-${group.label}-${selectedValue}`}\n\t\t\t\t\t\t\tstyle={{ paddingLeft: '8px' }}\n\t\t\t\t\t\t\tlabel={<>\n\t\t\t\t\t\t\t\t\t<Icon type={locationOptionIcon} size='tiny' />\n\t\t\t\t\t\t\t\t\t&nbsp;\n\t\t\t\t\t\t\t\t\t<SelectedOptionLabel>{selectedValue}</SelectedOptionLabel>\n\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tkey={option.code}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Flex fullWidth justifyContent='space-between'>\n\t\t\t\t\t\t\t\t<Flex spacing={FlexSpacings.XSMALL}>\n\t\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t\t<Avatar\n\t\t\t\t\t\t\t\t\t\t\ttype='flag'\n\t\t\t\t\t\t\t\t\t\t\tcountry={countryCode}\n\t\t\t\t\t\t\t\t\t\t\tsize='small'\n\t\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\t\twidth: tokens.fdsSizeSm,\n\t\t\t\t\t\t\t\t\t\t\t\theight: tokens.fdsSizeSm,\n\t\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t<SelectOptionLabel>{displayLabel}</SelectOptionLabel>\n\t\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t\t\t{type === LOCATION_MODES.FULFILLMENT_CENTER && <Icon type='amazon' size='small' />}\n\t\t\t\t\t\t\t\t{type === LOCATION_MODES.ADDRESS_BOOK && <Chip type='neutral' iconType='address-book' />}\n\t\t\t\t\t\t\t</Flex>\n\t\t\t\t\t\t</Option>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</Select.OptGroup>\n\t\t);\n\t});\n};\n\n/**\n * Extracts fulfillment centers from addresses and adds them as a separate key in results\n * @param {Object} locationsResults - The locations results object\n * @param {string} addressKey - The key for addresses (default: 'address')\n * @returns {Object} Updated locations results with fulfillment centers separated\n */\nconst extractFulfillmentCenters = locationsResults => {\n\tlet updatedLocationsResults = { ...locationsResults };\n\t// Extract fulfillment centers from addresses\n\tconst fulfillmentCenters = locationsResults[LOCATION_MODES.ADDRESS].filter(\n\t\toption => option.sourceType === LOCATION_MODES.FULFILLMENT_CENTER\n\t);\n\t// Add fulfillment centers as a separate key in results\n\tif (fulfillmentCenters.length > 0) {\n\t\t// Create new object with specific order\n\t\tconst { address, ...otherTypes } = updatedLocationsResults;\n\t\tupdatedLocationsResults = {\n\t\t\t...otherTypes,\n\t\t\t[LOCATION_MODES.FULFILLMENT_CENTER]: fulfillmentCenters,\n\t\t\taddress: address.filter(option => option.type !== LOCATION_MODES.FULFILLMENT_CENTER),\n\t\t};\n\t}\n\n\treturn updatedLocationsResults;\n};\n\n/**\n * Fetches location data for the active location mode or supported modes.\n *\n * @param {string} activeLocationMode - The active location mode.\n * @param {Array} supportedLocationModes - Array of supported location modes.\n * @returns {Function} A function that takes a query string and returns a promise resolving to an array of formatted location objects.\n */\nexport const fetchLocations = (activeLocationMode, supportedLocationModes, customer) => async query => {\n\tif (!query) {\n\t\treturn [];\n\t}\n\n\tconst modes = activeLocationMode !== DEFAULT_LOCATION_MODE ? [activeLocationMode] : supportedLocationModes;\n\tconst locations = await getLocations(modes, query, customer);\n\n\tlet locationsResults = locations.results;\n\n\tif (locationsResults[LOCATION_MODES.ADDRESS]) {\n\t\tlocationsResults = extractFulfillmentCenters(locationsResults);\n\t}\t\n\n\treturn Object.keys(locationsResults).map(key => {\n\t\treturn {\n\t\t\tlabel: LOCATION_MODES_MAP[key]?.label || key,\n\t\t\toptions: locationsResults[key].map(option => ({\n\t\t\t\t...option,\n\t\t\t\ttype: option.sourceType,\n\t\t\t})),\n\t\t};\n\t});\n};\n\n/**\n * Processes location input changes by retrieving geocoder details for addresses\n * or transforming port locations into a standardized format.\n *\n * For addresses (with placeId), fetches full geocoder details.\n * For ports, transforms them into geocoder address schema.\n * Filters out any failed location processing.\n *\n * @param {Object|Array} changedLocations - The new location value(s) to process.\n * @param {Function} onChange - Callback to handle the processed location(s).\n */\nexport const onChangeLocation = async (changedLocations, onChange) => {\n\tconst locations = Array.isArray(changedLocations) ? changedLocations : [changedLocations];\n\n\tconst locationsDetails = await Promise.all(\n\t\tlocations.map(async location => {\n\t\t\ttry {\n\t\t\t\tconst raw = location?.key;\n\t\t\t\tconst json = decodeHtmlEntities(raw);\n\t\t\t\tconst parsed = JSON.parse(json);\n\t\t\t\treturn { key: json, ...parsed };\n\t\t\t} catch (err) {\n\t\t\t\t// Useful in case one of the addresses has encountered a failure while retrieving its details\n\t\t\t\t// It won't cause all the addresses to stop working properly\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t})\n\t);\n\n\tonChange(locationsDetails.filter(Boolean));\n};\n\n/**\n * Handles changes to the location input value.\n *\n * @param {Object|Array} location - The new location value(s) selected.\n * @param {string} selectionMode - The current selection mode ('single' or 'multiple').\n * @param {number} maxPorts - Maximum number of ports that can be selected in multiple mode.\n * @param {Function} setSelectedLocation - State setter for the selected location.\n * @param {Function} onChange - Callback to handle processed location changes.\n *\n * For multiple selection mode:\n * - Validates that selected ports don't exceed maxPorts limit.\n * - Shows error message if limit is exceeded.\n * - Updates state and triggers onChange with valid selections.\n *\n * For single selection mode:\n * - Updates selected location state directly.\n * - Triggers onChange with the new location if one is selected.\n */\nexport const handleLocationChange = (location, selectionMode, maxPorts, setSelectedLocation, onChange) => {\n\tif (selectionMode === SelectModes.MULTIPLE) {\n\t\tconst selectedPorts = Array.isArray(location) ? location : [];\n\t\tif (selectedPorts.length <= maxPorts) {\n\t\t\tsetSelectedLocation(selectedPorts);\n\t\t\tonChangeLocation(selectedPorts, onChange);\n\t\t} else {\n\t\t\tconst typePort = JSON.parse(selectedPorts[0]?.key)?.sourceType === LOCATION_MODES.AIRPORT ? (maxPorts > 1 ? 'airports' : 'airport') : (maxPorts > 1 ? 'ports' : 'port');\n\t\t\tMessage.danger(\n\t\t\t\t<>\n\t\t\t\t\t<TranslatableText stringId={'You cannot enter more than'}/>\n\t\t\t\t\t{' '} {maxPorts} {' '}\n\t\t\t\t\t<TranslatableText stringId={typePort} />\n\t\t\t\t</>\n\t\t\t);\n\t\t}\n\t} else {\n\t\tsetSelectedLocation(location);\n\t\tonChangeLocation(location, onChange);\n\t}\n};\n\n/**\n * Check if the location is an address\n * @param location - The location to check\n * @returns Whether the location is an address\n */\nexport const isLocationAddress = locationType =>\n\tlocationType &&\n\t(locationType === LOCATION_MODES.ADDRESS ||\n\t\tlocationType === LOCATION_MODES.LAST_MILE_ADDRESS ||\n\t\tlocationType === LOCATION_MODES.ADDRESS_BOOK ||\n\t\tlocationType === LOCATION_MODES.FULFILLMENT_CENTER);\n\nconst decodeHtmlEntities = (s) =>\n typeof s === 'string'\n ? s.replace(/&quot;/g, '\"').replace(/&#34;/g, '\"').replace(/&amp;/g, '&')\n : s;\n","import httpClient from '@freightos/http-client'\n\nexport const doRequest = async ({\n\tmethod,\n\turl = '',\n\tdata = {},\n\toptions = {},\n}) => {\n\n\tconst params = (() => {\n\t\tif (method === 'get') {\n\n\t\t\tconst newUrl = (() => {\n\t\t\t\tif (!Object.keys(data).length) {\n\t\t\t\t\treturn url\n\t\t\t\t}\n\t\t\t\treturn `${url}?${new URLSearchParams(data).toString()}`\n\t\t\t})();\n\n\t\t\treturn [newUrl, options]\n\t\t}\n\t\tif (method === 'post') {\n\t\t\tconst headers = {\n\t\t\t\t...options?.headers,\n\t\t\t\t'accept': 'application/json',\n\t\t\t\t'content-type': `multipart/form-data`\n\t\t\t}\n\t\t\treturn [url, data, { ...options, headers }]\n\t\t}\n\n\t\treturn [url, data, options]\n\t})()\n\n\treturn await httpClient[method](...params)\n}","import { getGatewayApiPrefix } from \"../../helpers/utils\";\nimport { doRequest } from \"../../common/httpClient/doRequest/index\";\n\nexport const saveLastUsedSearch = async ( searchId ) => {\n\tawait doRequest({\n\t\tmethod: 'put',\n\t\turl: `${getGatewayApiPrefix(false)}/backend/api.php`,\n\t\toptions: {\n\t\t\theaders: {\n\t\t\t\t'namespace': 'airops/user_searches',\n\t\t\t\t'route': ' user_search_used',\n\t\t\t}\n\t\t},\n\t\tdata: {\n\t\t\tid: searchId,\n\t\t},\n\t});\n};\n","import { Avatar, Icon, tokens } from '@freightos/design-system';\n\nimport styled from 'styled-components';\n\nimport Flex from '../../common/components/Flex';\n\nexport const STitle = styled.div`\n\tcolor: ${tokens.fdsColorPrimaryGray60};\n\tfont-size: ${tokens.fdsSizeXs};\n\tfont-weight: ${tokens.fdsFontWeightRegular};\n\tmargin-bottom: ${tokens.fdsComponentSpacingSm};\n\ti {\n\t\tmargin-right: ${tokens.fdsComponentSpacingSm};\n\t}\n\n`;\n\nexport const SCard = styled(Flex)`\n\tpadding-left: 0 !important;\n`;\n\nexport const UnitIcon = styled(Icon)`\n\tmargin-right: 0 !important;\n\tvertical-align: bottom;\n`;\n\nexport const STruncatedLabel = styled.span`\n\twhite-space: nowrap;\n\tmin-width: 0;\n\tcolor: ${tokens.fdsColorPrimaryGray80};\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\t${({$isLocationLabel}) => !$isLocationLabel && `\n\t\tfont-size: 10px; //TODO: FSN-145\n\t\tline-height: 15px;\n\t`}\n\t${({$isPort}) => {\n\t\tif ($isPort === undefined)\n\t\t\treturn;\n\n\t\treturn `min-width: ${$isPort ? '65px' : '55px'};`\n\t}};\n`;\n\nexport const SLocationFlag = styled(Avatar)`\n\tborder: 1px solid ${tokens.fdsColorPrimaryGray20};\n\twidth: ${tokens.fdsSizeSm};\n\theight: ${tokens.fdsSizeSm};\n`;\n\nexport const STinyWrapper = styled(Flex)`\n\toverflow: hidden !important;\n\tfont-size: 10px; //TODO: FSN-145\n\tline-height: 15px;\n\tflex: 1;\n\tmin-width: 0;\n`;\n\nexport const SListWrapper = styled(Flex)`\n\t:last-child {\n\t\tpadding-bottom: 0 !important;\n\t}\n`;\n\n","import { \n\tCONTAINER_TYPE_20_FOOT_FACTOR, \n\tCUBIC_FOOT_TO_CUBIC_INCH_CONVERSION_FACTOR, \n\tCUBIC_METER_TO_CUBIC_CM_CONVERSION_FACTOR, \n\tPACKAGE_TYPE, \n\tSEARCH_FIELDS,\n\tSEARCH_PLATFORMS,\n\tSHIPMENT_OPTIONS,\n\tVOLUME_OPTIONS, \n\tWEIGHT_OPTIONS\n} from \"./constants\";\n\n/**\n * Formats a number using thousand separators (e.g., 1000 becomes \"1,000\").\n * Limits fraction digits to 3.\n */\nexport const formatNumber = (value) => {\n\tif(!value) return '0';\n\n\treturn value.toLocaleString(\"en-US\", {\n\t\tmaximumFractionDigits: 3,\n\t\tuseGrouping: true\n\t});\n};\n\n/**\n * Orders locations by countries and also groups them by country\n * @param locations - Array of location objects\n * @param countryOrder - Array of country codes in desired order\n * @returns Object with countries as keys and their locations as values, ordered by countryOrder\n */\nexport const groupAndOrderLocationsByCountries = (\n\tlocations\n) => {\n\t// Group locations by country\n\tconst groupedByCountry = locations.reduce((acc, location) => {\n\t\tconst countryCode = location.country;\n\t\tif (!acc[countryCode]) {\n\t\t\tacc[countryCode] = [];\n\t\t}\n\t\tacc[countryCode].push(location);\n\t\treturn acc;\n\t}, {});\n\n\t// Sort locations within each country group\n\tObject.keys(groupedByCountry).forEach(countryCode => {\n\t\tgroupedByCountry[countryCode].sort((a, b) => a.value.localeCompare(b.value));\n\t});\n\treturn groupedByCountry;\n};\n\n/**\n * Extracts unique icons from box packages array\n * @param boxPackages - Array of box package objects\n * @returns Array of unique icon names\n */\nexport const getUniqueBoxPackageIcons = (boxPackages) =>\n\tboxPackages.reduce((uniqueIcons, packageItem) => {\n\t\tconst icon = packageItem.type?.value?.icon;\n\t\t\n\t\t// Add icon to array only if it's not already present\n\t\tif (!uniqueIcons.includes(icon)) {\n\t\t\tuniqueIcons.push(icon);\n\t\t}\n\t\t\n\t\treturn uniqueIcons;\n\t}, []);\n\nexport const chooseIconsType = (search) => {\n\tconst shipmentType = search.shipment_details.type;\n\tif(shipmentType === SHIPMENT_OPTIONS.TOTALS) {\n\t\treturn ['box-total'];\n\t}\n\n\tif(shipmentType === SHIPMENT_OPTIONS.UNITS) {\n\t\tconst unitsPackages = search.shipment_details[SEARCH_FIELDS.UNITS_SHIPMENT];\n\t\tif(unitsPackages?.packageType === PACKAGE_TYPE.BOX) {\n\t\t\tconst uniqueIcons = getUniqueBoxPackageIcons(unitsPackages.boxPackages);\n\t\t\treturn uniqueIcons;\n\t\t}\n\t\tif(unitsPackages?.packageType === PACKAGE_TYPE.ULD) {\n\t\t\treturn ['uld'];\n\t\t}\n\t\treturn ['box'];\n\t}\n\n\tif(shipmentType === SHIPMENT_OPTIONS.CONTAINER) {\n\t\treturn ['container'];\n\t}\n\n\treturn ['box'];\n}\n\n/**\n * Calculates total units, volume and weight based on package type in IRecentSearch\n * @param search - Recent search object containing shipment details\n * @returns Object with calculated totals for units, volume, and weight\n */\nexport const shipmentTotalsBasedOnPackages = (search) => {\n\tconst shipmentType = search.shipment_details.type;\n\tconst platformType = search.platform_type;\n\n\tif(platformType === SEARCH_PLATFORMS.QUOTATION) {\n\t\treturn { units: 0, volume: 0, weight: 0, weightUnit: WEIGHT_OPTIONS.KG, volumeUnit: VOLUME_OPTIONS.CBM };\n\t}\n\tswitch (shipmentType) {\n\t\tcase SHIPMENT_OPTIONS.CONTAINER: {\n\t\t\tlet calculatedUnits = 0;\n\t\t\tlet calculatedTEU = 0;\n\t\t\t// eslint-disable-next-line no-unused-expressions\n\t\t\tsearch.shipment_details[SEARCH_FIELDS.CONTAINER_PACKAGES]?.forEach((pkg) => {\n\t\t\t\tconst units = Number(pkg.units) || 0;\n\t\t\t\tif (units > 0) {\n\t\t\t\t\tcalculatedUnits += units;\n\t\t\t\t\tconst dimensionSelected = parseInt(pkg.dimensions.value, 10);\n\t\t\t\t\tcalculatedTEU += units * (dimensionSelected / CONTAINER_TYPE_20_FOOT_FACTOR);\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tunits: calculatedUnits, \n\t\t\t\tvolume: calculatedTEU, \n\t\t\t\tweight: null,\n\t\t\t\tweightUnit: null,\n\t\t\t\tvolumeUnit: 'TEU',\n\t\t\t};\n\t\t}\n\t\tcase SHIPMENT_OPTIONS.UNITS: {\n\t\t\tconst unitsPackages = search.shipment_details[SEARCH_FIELDS.UNITS_SHIPMENT];\n\t\t\tconst volumeCalculationFactor = unitsPackages?.volumeUnit === VOLUME_OPTIONS.CFT \n\t\t\t\t? CUBIC_FOOT_TO_CUBIC_INCH_CONVERSION_FACTOR : CUBIC_METER_TO_CUBIC_CM_CONVERSION_FACTOR;\n\t\t\tif (unitsPackages?.packageType === PACKAGE_TYPE.BOX) {\n\t\t\t\tconst formattedVolume = formatNumber(unitsPackages?.boxPackages.reduce((acc, curr) => {\n\t\t\t\t\tconst volume = parseFloat(curr.width || '0') * parseFloat(curr.height || '0') * parseFloat(curr.length || '0') * parseFloat(curr.units || '0') / volumeCalculationFactor;\n\t\t\t\t\treturn acc + volume;\n\t\t\t\t}, 0));\n\t\t\t\tconst formattedWeight = formatNumber(unitsPackages.boxPackages.reduce((acc, curr) => acc + parseFloat(curr.weight || '0'), 0));\n\n\t\t\t\treturn {\n\t\t\t\t\tunits: unitsPackages.boxPackages.reduce((acc, curr) => acc + parseFloat(curr.units || '0'), 0),\n\t\t\t\t\tvolume: formattedVolume, \n\t\t\t\t\tweight: formattedWeight,\n\t\t\t\t\tweightUnit: unitsPackages.weightUnit,\n\t\t\t\t\tvolumeUnit: unitsPackages.volumeUnit,\n\t\t\t\t};\n\t\t\t}\n\t\t\tif (unitsPackages?.packageType === PACKAGE_TYPE.ULD) {\n\t\t\t\tconst formattedVolume = formatNumber(unitsPackages.uldPackages.reduce((acc, curr) => acc + parseFloat(curr.volume || '0'), 0));\n\t\t\t\tconst formattedWeight = formatNumber(unitsPackages.uldPackages.reduce((acc, curr) => acc + parseFloat(curr.weight || '0'), 0));\n\t\t\t\treturn {\n\t\t\t\t\tunits: unitsPackages.uldPackages.length, \n\t\t\t\t\tvolume: formattedVolume, \n\t\t\t\t\tweight: formattedWeight,\n\t\t\t\t\tweightUnit: unitsPackages.weightUnit,\n\t\t\t\t\tvolumeUnit: unitsPackages.volumeUnit,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn { units: 0, volume: 0, weight: 0, weightUnit: WEIGHT_OPTIONS.KG, volumeUnit: VOLUME_OPTIONS.CBM };\n\t\t}\n\n\t\tcase SHIPMENT_OPTIONS.TOTALS: {\n\t\t\tconst formattedVolume = formatNumber(parseFloat(search.shipment_details[SEARCH_FIELDS.TOTALS_SHIPMENT]?.volume || '0'));\n\t\t\tconst formattedWeight = formatNumber(parseFloat(search.shipment_details[SEARCH_FIELDS.TOTALS_SHIPMENT]?.weight || '0'));\n\t\t\treturn {\n\t\t\t\tunits: search.shipment_details[SEARCH_FIELDS.TOTALS_SHIPMENT]?.units || 0, \n\t\t\t\tvolume: formattedVolume, \n\t\t\t\tweight: formattedWeight,\n\t\t\t\tweightUnit: search.shipment_details[SEARCH_FIELDS.TOTALS_SHIPMENT]?.weightUnit || WEIGHT_OPTIONS.KG,\n\t\t\t\tvolumeUnit: search.shipment_details[SEARCH_FIELDS.TOTALS_SHIPMENT]?.volumeUnit || VOLUME_OPTIONS.CBM,\n\t\t\t};\n\t\t}\n\n\t\tdefault:\n\t\t\treturn { units: 0, volume: 0, weight: 0, weightUnit: WEIGHT_OPTIONS.KG, volumeUnit: VOLUME_OPTIONS.CBM };\n\t}\n};\n","import React, { useEffect, useRef, useState } from \"react\";\n\nimport { Tooltip } from \"@freightos/design-system\";\n\nimport { STruncatedLabel } from \"../styled\";\n\n/**\n * TruncatedLabel component that automatically detects text truncation\n * and shows a tooltip with full text when content is truncated with ellipsis\n */\nconst TruncatedLabel = ({ \n\ttext = '', \n\ttestId, \n\tisPort = undefined,\n\tisLocationLabel = false,\n\tchildren = null\n}) => {\n\tconst labelRef = useRef(null);\n\tconst [isTruncated, setIsTruncated] = useState(false);\n\n\t/**\n\t * Check if the label text is truncated by comparing scroll width vs client width\n\t */\n\tconst checkTruncation = () => {\n\t\tif (labelRef.current) {\n\t\t\tconst element = labelRef.current;\n\t\t\tconst truncated = element.scrollWidth > element.clientWidth;\n\t\t\tsetIsTruncated(truncated);\n\t\t}\n\t};\n\n\t// Check truncation on mount and when text changes\n\tuseEffect(() => {\n\t\tcheckTruncation();\n\t}, [text]);\n\n\tconst labelElement = (\n\t\t<STruncatedLabel \n\t\t\tref={labelRef}\n\t\t\tdata-test-id={testId}\n\t\t\t$isLocationLabel={isLocationLabel}\n\t\t\t$isPort={isPort}\n\t\t>\n\t\t\t{children || text}\n\t\t</STruncatedLabel>\n\t);\n\n\t// Only show tooltip if text is actually truncated\n\tif (isTruncated) {\n\t\treturn (\n\t\t\t<Tooltip title={text} data-test-id={`${testId}-tooltip`}>\n\t\t\t\t<STruncatedLabel \n\t\t\t\t\tref={labelRef}\n\t\t\t\t\tdata-test-id={testId}\n\t\t\t\t\t$isLocationLabel={isLocationLabel}\n\t\t\t\t\t$isPort={isPort}\n\t\t\t\t>\n\t\t\t\t\t{children || text}\n\t\t\t\t</STruncatedLabel>\n\t\t\t</Tooltip>\n\t\t);\n\t}\n\n\treturn labelElement;\n};\n\nexport default TruncatedLabel; ","import React from \"react\";\n\nimport { Icon, tokens } from \"@freightos/design-system\";\n\nimport Flex from \"../../../common/components/Flex\";\nimport { FlexSpacings } from \"../../../common/helpers/constants\";\nimport { SLocationFlag } from \"../styled\";\nimport { groupAndOrderLocationsByCountries } from \"../utils\";\n\nimport TruncatedLabel from \"./TruncatedLabel.jsx\";\nimport { LOCATION_MODES } from \"../../../helpers/constant\";\n\nconst ItineraryDisplay = ({search, index, dataTestId}) => {\n\tconst isMultiOrigin = search.origin.length > 1;\t\n\tconst isMultiDestination = search.destination.length > 1;\n\tconst groupedOrigin = isMultiOrigin \n\t\t? groupAndOrderLocationsByCountries(search.origin) \n\t\t: { [search.origin[0].country]: search.origin };\n\tconst groupedDestination = isMultiDestination \n\t\t? groupAndOrderLocationsByCountries(search.destination) \n\t\t: { [search.destination[0].country]: search.destination };\n\treturn (\n\t\t<Flex alignItems='center' spacing={FlexSpacings.XSMALL} fullWidth>\n\t\t\t{Object.keys(groupedOrigin).map(countryCode =>{ \n\t\t\t\tconst labelOrigin = groupedOrigin[countryCode].map(origin => origin.selectedValue).join(', ');\n\t\t\t\treturn (\n\t\t\t\t\t<TruncatedLabel\n\t\t\t\t\t\tkey={countryCode}\n\t\t\t\t\t\ttext={labelOrigin}\n\t\t\t\t\t\tisLocationLabel\n\t\t\t\t\t\ttestId={`${dataTestId}-origin-${index}`}\n\t\t\t\t\t\tisPort={groupedOrigin[countryCode][0].type === LOCATION_MODES.SEAPORT}\n\t\t\t\t\t>\n\t\t\t\t\t\t<SLocationFlag\n\t\t\t\t\t\t\ttype='flag'\n\t\t\t\t\t\t\tcountry={countryCode}\n\t\t\t\t\t\t\tsize='small'\n\t\t\t\t\t\t\tdata-test-id={`${dataTestId}-origin-flag-${index}`}\n\t\t\t\t\t\t\tstyle={{ marginRight: '4px' }}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{labelOrigin}\n\t\t\t\t\t</TruncatedLabel>\n\t\t\t\t);\n\t\t\t})}\n\t\t\t<Icon type='arrow-forward' style={{ marginRight: 0, color: tokens.fdsColorPrimaryGray90, flex: 'none' }} />\n\t\t\t{Object.keys(groupedDestination).map(countryCode => {\n\t\t\t\tconst labelDestination = groupedDestination[countryCode].map(destination => destination.selectedValue).join(', ');\n\t\t\t\treturn (\n\t\t\t\t\t<TruncatedLabel \n\t\t\t\t\t\tkey={countryCode} \n\t\t\t\t\t\ttext={labelDestination} \n\t\t\t\t\t\tisLocationLabel \n\t\t\t\t\t\ttestId={`${dataTestId}-destination-${index}`}\n\t\t\t\t\t\tisPort={groupedDestination[countryCode][0].type === LOCATION_MODES.SEAPORT}\n\t\t\t\t\t>\n\t\t\t\t\t\t<SLocationFlag\n\t\t\t\t\t\t\ttype='flag'\n\t\t\t\t\t\t\tcountry={countryCode}\n\t\t\t\t\t\t\tsize='small'\n\t\t\t\t\t\t\tdata-test-id={`${dataTestId}-destination-flag-${index}`}\n\t\t\t\t\t\t\tstyle={{ marginRight: '4px' }}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{labelDestination}\n\t\t\t\t\t</TruncatedLabel>\n\t\t\t\t);\n\t\t\t})}\n\t\t</Flex>\n\t);\n};\n\nexport default ItineraryDisplay;","import React, { useMemo } from \"react\";\n\nimport { Icon } from \"@freightos/design-system\";\n\nimport Flex from \"../../../common/components/Flex\";\nimport { FlexSpacings } from \"../../../common/helpers/constants\";\nimport { SEARCH_PLATFORMS, TEMPERATURE_RANGES_DATA } from \"../constants\";\nimport { STinyWrapper, UnitIcon } from \"../styled\";\nimport { chooseIconsType, shipmentTotalsBasedOnPackages } from \"../utils\";\n\nimport TruncatedLabel from \"./TruncatedLabel.jsx\";\n\nconst ShipmentAndCommodityDisplay = ({search, index, dataTestId}) => {\n\tconst platformType = search.platform_type;\n\tconst icons = chooseIconsType(search);\n\tconst {units, volume, weight, weightUnit, volumeUnit} = useMemo(() => shipmentTotalsBasedOnPackages(search), [search]);\n\tconst isTemperature = search.commodity.length === 1 && search.commodity[0].is_temperature;\n\tconst temperatureRange = search.commodity_temperature?.tempRange && isTemperature \n\t\t? TEMPERATURE_RANGES_DATA[search.commodity_temperature?.tempRange][search.commodity_temperature?.temperatureSystem] \n\t\t: '';\n\n\treturn <Flex spacing={FlexSpacings.XSMALL} alignItems='center' fullWidth key={index}>\n\t\t{platformType === SEARCH_PLATFORMS.QUOTATION ? (\n\t\t\t<STinyWrapper alignItems='center' spacing={FlexSpacings.SMALL} style={{flex: 1}}>\n\t\t\t\t{icons.map((icon, iconIndex) => <UnitIcon type={icon} key={`${index}-${iconIndex}`} size='tiny' data-test-id={`${dataTestId}rs-package-icon-${index}-${iconIndex}`} />)}\n\t\t\t\t<TruncatedLabel\n\t\t\t\t\ttext={search.commodity.map(commodity => commodity.label).join(', ')}\n\t\t\t\t\ttestId={`${dataTestId}rs-commodity-${index}`}\n\t\t\t\t/>\n\t\t\t</STinyWrapper>\n\t\t) : (\n\t\t\t<STinyWrapper alignItems='center' spacing={FlexSpacings.SMALL}>\n\t\t\t\t<Flex\n\t\t\t\t\talignItems='center'\n\t\t\t\t\tspacing={FlexSpacings.XSMALL}\n\t\t\t\t\tdata-test-id={`rs-${index}-units`}\n\t\t\t\t\t\n\t\t\t\t>\n\t\t\t\t\t{units}&nbsp;{icons.map((icon, iconIndex) => <UnitIcon type={icon} key={`${index}-${iconIndex}`} size='tiny' data-test-id={`${dataTestId}rs-package-icon-${index}-${iconIndex}`}/>)}\n\t\t\t\t</Flex>\n\t\t\t\t<span data-test-id={`${dataTestId}rs-volume-${index}`}>\n\t\t\t\t\t{volume}&nbsp;{volumeUnit}\n\t\t\t\t</span>\n\t\t\t\t{weight && (\n\t\t\t\t\t<span data-test-id={`${dataTestId}rs-weight-${index}`}>\n\t\t\t\t\t\t{weight}&nbsp;{weightUnit}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t\t<TruncatedLabel\n\t\t\t\t\ttext={search.commodity.map(commodity => commodity.label).join(', ')}\n\t\t\t\t\ttestId={`${dataTestId}rs-commodity-${index}`}\n\t\t\t\t/>\n\t\t\t\t{isTemperature && (\n\t\t\t\t\t<Flex\n\t\t\t\t\t\talignItems='center'\n\t\t\t\t\t\tspacing={FlexSpacings.XSMALL}\n\t\t\t\t\t\tdata-test-id={`${dataTestId}rs-temperature-${index}`}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon type='temperature-low' size=\"tiny\" data-test-id={`${dataTestId}rs-temperature-icon-${index}`} />\n\t\t\t\t\t\t<span style={{whiteSpace: 'nowrap'}}>\n\t\t\t\t\t\t\t{temperatureRange}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Flex>\n\t\t\t\t)}\n\t\t\t</STinyWrapper>\n\t\t)}\n\t</Flex>;\n};\n\nexport default ShipmentAndCommodityDisplay;","import React from \"react\";\n\nimport { tokens } from \"@freightos/design-system\";\n\nimport { useFormikContext } from \"formik\";\n\nimport { FlexDirections, FlexSpacings } from \"../../../common/helpers/constants\";\nimport { saveLastUsedSearch } from \"../apis\";\nimport { SCard } from \"../styled\";\n\nimport ItineraryDisplay from \"./ItineraryDisplay.jsx\";\nimport ShipmentAndCommodityDisplay from \"./ShipmentAndCommodityDisplay.jsx\";\n\nexport const SearchCard = (\n\t{ search, index, setIsOpen, dataTestId, onRecentSearchSelect }) => {\n\n\tconst handleClick = async () => {\n\t\tonRecentSearchSelect(search);\n\t\ttry {\n\t\t\tawait saveLastUsedSearch(search.id);\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t}\t\n\t\tsetIsOpen(false);\n\t};\n\n\treturn <SCard \n\t\tdirection={FlexDirections.VERTICAL} \n\t\tfullWidth \n\t\tspacing={FlexSpacings.XSMALL}\n\t\tkey={search.id}\n\t\tstyle={{\n\t\t\tpadding: tokens.fdsComponentSpacingSm,\n\t\t}}\n\t\tdata-test-id={`${dataTestId}rs-card-${index}`}\n\t\tonClick={() => {\n\t\t\thandleClick();\n\t\t}}>\n\t\t<ItineraryDisplay search={search} index={index} dataTestId={dataTestId} />\n\t\t<ShipmentAndCommodityDisplay search={search} index={index} dataTestId={dataTestId} />\n\t</SCard>;\t\n};","import React from 'react';\n\nimport { Icon, tokens } from '@freightos/design-system';\nimport { TranslatableText } from '@freightos/freightos-i18n';\n\nimport { FlexDirections } from '../../common/helpers/constants';\nimport { StyledMenu } from '../../helpers/styled';\n\nimport { orderRecentSearches } from './adapters';\nimport { SearchCard } from './components/SearchCard.jsx';\nimport { SListWrapper, STitle } from './styled';\n\nconst RecentSearches = ({ recentSearches, setIsOpen, dataTestId, onRecentSearchSelect, initialValues }) => {\n\tconst firstSixSearches = recentSearches ? orderRecentSearches(recentSearches) : [];\n\treturn (\n\t\t<StyledMenu>\n\t\t\t<STitle>\n\t\t\t\t<Icon data-test-id={`${dataTestId}rs-icon`} color={tokens.fdsColorPrimaryGray60} type='history' size='tiny' /><TranslatableText stringId='Recent searches' />\n\t\t\t</STitle>\n\t\t\t<SListWrapper direction={FlexDirections.VERTICAL} fullWidth>\n\t\t\t\t{firstSixSearches.map((search, index) => (\n\t\t\t\t\t<SearchCard \n\t\t\t\t\t\tonRecentSearchSelect={onRecentSearchSelect} \n\t\t\t\t\t\tinitialValues={initialValues} \n\t\t\t\t\t\tsearch={search} \n\t\t\t\t\t\tindex={index} \n\t\t\t\t\t\tkey={search.id}\n\t\t\t\t\t\tsetIsOpen={setIsOpen} dataTestId={dataTestId} />\n\t\t\t\t))}\n\t\t\t</SListWrapper>\n\t\t</StyledMenu>\n\t);\n};\n\nexport default RecentSearches;\n","import { RECENT_SEARCHES_LIMIT, RS_PLATFORM_TYPES, SEARCH_FIELDS, SEARCH_PLATFORMS } from \"./constants\";\n\nexport const formatPlatformType = (platformType) => {\n\tswitch (platformType) {\n\t\tcase SEARCH_PLATFORMS.BOOKING:\n\t\t\treturn RS_PLATFORM_TYPES.BOOK;\n\t\tcase SEARCH_PLATFORMS.QUOTATION:\n\t\t\treturn RS_PLATFORM_TYPES.QUOTE;\n\t\tcase SEARCH_PLATFORMS.BI:\n\t\t\treturn RS_PLATFORM_TYPES.BI;\n\t\tdefault:\n\t\t\treturn platformType;\n\t}\n};\n\nexport const formatPlatformTypeFromRecentSearch = (platformType) => {\n\tswitch (platformType) {\n\t\tcase RS_PLATFORM_TYPES.BOOK:\n\t\t\treturn SEARCH_PLATFORMS.BOOKING;\n\t\tcase RS_PLATFORM_TYPES.QUOTE:\n\t\t\treturn SEARCH_PLATFORMS.QUOTATION;\n\t\tcase RS_PLATFORM_TYPES.BI:\n\t\t\treturn SEARCH_PLATFORMS.BI;\n\t\tdefault:\n\t\t\treturn SEARCH_PLATFORMS.BOOKING;\n\t}\n};\n\nconst formatContainerShipment = (search) => ({\t\n\t[SEARCH_FIELDS.CONTAINER_PACKAGES]: search.shipment_details[SEARCH_FIELDS.CONTAINER_PACKAGES],\n});\n\nexport const orderRecentSearches = (recentSearches) => {\n\tconst sorted = [...recentSearches].sort((a, b) => {\n\t\t// First: items with is_saved = true, then the rest\n\t\tif (a.is_saved !== b.is_saved) {\n\t\t\treturn a.is_saved ? -1 : 1;\n\t\t}\n\t\t// Among saved: sort by saved_update_date (most recent first)\n\t\tif (a.is_saved && b.is_saved) {\n\t\t\tconst aDate = new Date(a.saved_update_date).getTime();\n\t\t\tconst bDate = new Date(b.saved_update_date).getTime();\n\t\t\treturn bDate - aDate;\n\t\t}\n\t\t// Among non-saved: sort by most recent date (last_time_used_date vs saved_update_date)\n\t\tconst aMaxDate = new Date(Math.max(\n\t\t\tnew Date(a.last_time_used_date).getTime(),\n\t\t\tnew Date(a.saved_update_date || 0).getTime()\n\t\t)).getTime();\n\t\tconst bMaxDate = new Date(Math.max(\n\t\t\tnew Date(b.last_time_used_date).getTime(),\n\t\t\tnew Date(b.saved_update_date || 0).getTime()\n\t\t)).getTime();\n\t\treturn bMaxDate - aMaxDate;\n\t});\n\treturn sorted.slice(0, RECENT_SEARCHES_LIMIT);\n};\n\n","import React from 'react';\n\nimport { Spin } from '@freightos/design-system';\nimport { TRANSLATION_MODULES, TranslatableText } from '@freightos/freightos-i18n';\n\nimport PropTypes from 'prop-types';\n\nimport { NoMatchingResults } from '../helpers/styled';\n\nimport RecentSearches from './RecentSearches/index.jsx';\n\nconst SelectorContent = ({ \n\tisLoading, \n\trecentSearches, \n\tsearchKey, \n\tdataTestId, \n\tsetIsOpen, \n\tonRecentSearchSelect, \n\tinitialValues }) => {\n\t// Return null for initial state (no search, no recent searches)\n\tif (!searchKey && (!recentSearches || recentSearches.length === 0)) {\n\t\treturn null;\n\t}\n\n\tif (isLoading) {\n\t\treturn <Spin size='small' />;\n\t}\n\n\tif (recentSearches?.length > 0 && !searchKey.trim()) {\n\t\treturn (\n\t\t\t<RecentSearches\n\t\t\t\trecentSearches={recentSearches}\n\t\t\t\tdataTestId={dataTestId}\n\t\t\t\tsetIsOpen={setIsOpen}\n\t\t\t\tonRecentSearchSelect={onRecentSearchSelect}\n\t\t\t\tinitialValues={initialValues}\n\t\t\t/>\n\t\t);\n\t}\n\n\tif (searchKey.trim()) {\n\t\treturn (\n\t\t\t<NoMatchingResults>\n\t\t\t\t<TranslatableText stringId='No matching results' module={TRANSLATION_MODULES.SearchAndBook} />\n\t\t\t</NoMatchingResults>\n\t\t);\n\t}\n\n\treturn null;\n};\n\nSelectorContent.propTypes = {\n\tisLoading: PropTypes.bool,\n\trecentSearches: PropTypes.array,\n\tsearchKey: PropTypes.string,\n\tonSelect: PropTypes.func,\n\tdataTestId: PropTypes.string,\n\tsetIsOpen: PropTypes.func,\n};\n\nexport default SelectorContent;\n","import React, { useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Notification } from '@freightos/design-system';\nimport { debounce } from 'lodash';\nimport PropTypes from 'prop-types';\n\nimport { DEFAULT_LOCATION_MODE, LOCATION_MODES_MAP, MAX_TAG_COUNT, MAX_TAG_COUNT_MULTIPLE, SelectModes } from '../helpers/constant';\nimport { DebounceSelector, DropdownGlobalStyle } from '../helpers/styled';\n\nimport SelectorContent from './SelectorContent';\nimport Environment from 'common/helpers/Environment';\n\nconst DebounceSelect = ({\n\tfetchOptions,\n\trenderedOptions,\n\trecentSearches = [],\n\thasError,\n\tmode,\n\tdataTestId,\n\tvalue,\n\tdebounceTimeout = 800,\n\tactiveLocationMode,\n\tdefaultLocation,\n\tonChange,\n\t...props\n}) => {\n\tconst [options, setOptions] = useState([]);\n\tconst [isLoading, setIsLoading] = useState(false);\n\tconst [searchKey, setSearchKey] = useState('');\n\tconst fetchRef = useRef(0);\n\tconst [isOpen, setIsOpen] = useState(false);\n\tconst [maxTagCount, setMaxTagCount] = useState(MAX_TAG_COUNT);\n\tconst timeoutRef = useRef();\n\n\tuseEffect(() => {\n\t\tif ((!value || value.length === 0) && !isOpen) {\n\t\t\tsetOptions([]);\n\t\t\tsetSearchKey('');\n\t\t}\n\t}, [value, isOpen]);\n\n\tuseEffect(() => {\n\t\tif (activeLocationMode !== DEFAULT_LOCATION_MODE) {\n\t\t\tsetOptions(prevOptions =>\n\t\t\t\tprevOptions.filter(option => option.label === LOCATION_MODES_MAP[activeLocationMode].label)\n\t\t\t);\n\t\t}\n\t\tsetIsOpen(false);\n\n\t\t// Clear any existing timeout\n\t\tif (timeoutRef.current) {\n\t\t\tclearTimeout(timeoutRef.current);\n\t\t}\n\n\t\ttimeoutRef.current = setTimeout(() => {\n\t\t\tdocument.activeElement.blur(); // remove focus from input\n\t\t\tdocument.body.click(); // simulate outside click\n\t\t\tconst active = document.querySelector('.ant-select-focused');\n\t\t\tif (active) {\n\t\t\t\tactive.classList.remove('ant-select-focused');\n\t\t\t}\n\t\t\tsetMaxTagCount(MAX_TAG_COUNT);\n\t\t}, 100);\n\n\t\t// Cleanup function\n\t\treturn () => {\n\t\t\tif (timeoutRef.current) {\n\t\t\t\tclearTimeout(timeoutRef.current);\n\t\t\t}\n\t\t};\n\t}, [activeLocationMode]);\n\n\tconst debounceFetcher = useMemo(() => {\n\t\tconst loadOptions = async optionValue => {\n\t\t\tsetSearchKey(optionValue);\n\t\t\tfetchRef.current += 1;\n\t\t\tconst fetchId = fetchRef.current;\n\n\t\t\tsetOptions([]);\n\t\t\tsetIsLoading(true);\n\n\t\t\tlet returnOptions = null;\n\n\t\t\ttry {\n\t\t\t\tconst newOptions = await fetchOptions(optionValue);\n\t\t\t\tif (fetchId === fetchRef.current) {\n\t\t\t\t\tsetOptions(newOptions);\n\t\t\t\t\treturnOptions = newOptions;\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error('Error fetching options:', error);\n\t\t\t\tif (fetchId === fetchRef.current) {\n\t\t\t\t\tNotification.danger({\n\t\t\t\t\t\tmessage: 'Search failed',\n\t\t\t\t\t\tdescription: 'Unable to fetch location results. Please try again later.',\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tif (fetchId === fetchRef.current) {\n\t\t\t\t\tsetIsLoading(false);\n\t\t\t\t\treturn returnOptions;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\treturn debounce(loadOptions, debounceTimeout);\n\t}, [fetchOptions, debounceTimeout]);\n\n\tuseEffect(() => {\n\t\tif (!defaultLocation?.code) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst loadDefaultLocation = async () => {\n\t\t\ttry {\n\t\t\t\tsetOptions([]);\n\t\t\t\tsetIsLoading(true);\n\t\t\t\t\n\t\t\t\tconst options = await fetchOptions(defaultLocation.code);\n\t\t\t\tsetOptions(options);\n\t\t\t\t\n\t\t\t\tif (!options || options.length === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlet match = null;\n\t\t\t\t\n\t\t\t\tif (defaultLocation.type) {\n\t\t\t\t\tconst targetGroup = options.find(group => \n\t\t\t\t\t\tgroup.label.toLowerCase() === LOCATION_MODES_MAP[defaultLocation.type]?.label.toLowerCase()\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tif (targetGroup?.options) {\n\t\t\t\t\t\tmatch = targetGroup.options.find(option => \n\t\t\t\t\t\t\toption.code.toLowerCase() === defaultLocation.code.toLowerCase() || \n\t\t\t\t\t\t\toption.selectedValue.toLowerCase() === defaultLocation.code.toLowerCase()\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!match) {\n\t\t\t\t\tmatch = options\n\t\t\t\t\t\t.map(group => group.options)\n\t\t\t\t\t\t.flat()\n\t\t\t\t\t\t.find(option => \n\t\t\t\t\t\t\toption.code.toLowerCase() === defaultLocation.code.toLowerCase() || \n\t\t\t\t\t\t\toption.selectedValue.toLowerCase() === defaultLocation.code.toLowerCase()\n\t\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tif (match && onChange) {\n\t\t\t\t\tconst formattedMatch = {\n\t\t\t\t\t\tkey: JSON.stringify(match),\n\t\t\t\t\t\tlabel: match.selectedValue || match.displayLabel || match.code\n\t\t\t\t\t};\n\t\t\t\t\tonChange([formattedMatch]);\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tif (Environment.isLocal()) {\n\t\t\t\t\tconsole.error('Error loading default location:', error);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tsetIsLoading(false);\n\t\t\t}\n\t\t};\n\n\t\tloadDefaultLocation();\n\t}, [defaultLocation?.code, defaultLocation?.type]);\n\n\tconst shouldShowDropdown = () => isLoading || searchKey.trim() || recentSearches?.length > 0;\n\n\treturn (\n\t\t<>\n\t\t\t<DropdownGlobalStyle />\n\t\t\t<DebounceSelector\n\t\t\t\tmaxTagCount={maxTagCount}\n\t\t\t\tonSearch={debounceFetcher}\n\t\t\t\t$hasError={hasError}\n\t\t\t\tloading={isLoading}\n\t\t\t\toptions={options}\n\t\t\t\tfilterOption={false}\n\t\t\t\tnotFoundContent={\n\t\t\t\t\t<SelectorContent\n\t\t\t\t\t\tisLoading={isLoading}\n\t\t\t\t\t\trecentSearches={recentSearches}\n\t\t\t\t\t\tsearchKey={searchKey}\n\t\t\t\t\t\tdataTestId={dataTestId}\n\t\t\t\t\t\tsetIsOpen={setIsOpen}\n\t\t\t\t\t\tonRecentSearchSelect={props.onRecentSearchSelect}\n\t\t\t\t\t\tinitialValues={props.initialValues}\n\t\t\t\t\t/>\n\t\t\t\t}\n\t\t\t\tmode={mode}\n\t\t\t\tdata-test-id={`${dataTestId}-selector`}\n\t\t\t\tallowClear={mode === SelectModes.SINGLE}\n\t\t\t\tlabelInValue\n\t\t\t\toptionLabelProp='label'\n\t\t\t\tshowSearch\n\t\t\t\tonDropdownVisibleChange={open => {\n\t\t\t\t\tif (open) {\n\t\t\t\t\t\tsetMaxTagCount(MAX_TAG_COUNT_MULTIPLE);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetMaxTagCount(MAX_TAG_COUNT);\n\t\t\t\t\t}\n\t\t\t\t\tsetOptions([]);\n\t\t\t\t\tsetSearchKey('');\n\t\t\t\t\tsetIsOpen(open);\n\t\t\t\t}}\n\t\t\t\topen={isOpen && shouldShowDropdown()}\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={onChange}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{renderedOptions(options)}\n\t\t\t</DebounceSelector>\n\t\t</>\n\t);\n};\n\nDebounceSelect.propTypes = {\n\tfetchOptions: PropTypes.func.isRequired,\n\trenderedOptions: PropTypes.func.isRequired,\n\thasError: PropTypes.bool,\n\tmode: PropTypes.string.isRequired,\n\tdataTestId: PropTypes.string,\n\tdebounceTimeout: PropTypes.number,\n\tvalue: PropTypes.array,\n\tactiveLocationMode: PropTypes.string,\n\trecentSearches: PropTypes.array,\n\tmaxTagCount: PropTypes.number,\n\tdefaultLocation: PropTypes.shape({\n\t\tcode: PropTypes.string.isRequired,\n\t\ttype: PropTypes.string.isRequired,\n\t}),\n\tonChange: PropTypes.func,\n};\n\nexport default DebounceSelect;\n","import React from 'react';\n\nimport { Tooltip } from '@freightos/design-system';\nimport PropTypes from 'prop-types';\n\nimport { SelectedOptionLabel } from '../helpers/styled';\n\nconst MaxPortsPlaceholder = ({ omittedPorts, dataTestId }) => {\n\tconst selectedItems = omittedPorts.map(omittedPort => JSON.parse(omittedPort.key)?.selectedValue);\n\n\treturn (\n\t\t<Tooltip title={selectedItems.join(',')}>\n\t\t\t<SelectedOptionLabel data-test-id={`${dataTestId}-extra-ports`}>{`+${omittedPorts.length}`}</SelectedOptionLabel>\n\t\t</Tooltip>\n\t);\n};\n\nMaxPortsPlaceholder.propTypes = {\n\tomittedPorts: PropTypes.array,\n\tdataTestId: PropTypes.string,\n};\n\nexport default MaxPortsPlaceholder;\n","import React, { useEffect, useState } from 'react';\n\nimport { tokens } from '@freightos/design-system';\nimport { TranslatableText } from '@freightos/freightos-i18n';\n\nimport PropTypes from 'prop-types';\n\nimport DebounceSelect from './components/DebounceSelect';\nimport MaxPortsPlaceholder from './components/MaxPortsPlaceholder';\nimport {\n\tDEFAULT_LOCATION_MODE,\n\tLocationTypes,\n\tSelectModes,\n} from './helpers/constant';\nimport {\n\tfetchLocations,\n\tgetLocationInputValue,\n\thandleLocationChange,\n\tisLocationAddress,\n\trenderLocationOptions,\n} from './helpers/utils';\n\n/**\n * LocationInput component for selecting locations (ports, airports, addresses, etc.)\n * \n * @param {Object|Array} value - Current selected location(s)\n * @param {Function} onChange - Callback fired when location changes\n * @param {boolean} hasError - Whether the input has validation errors\n * @param {string} dataTestId - Test ID for the component\n * @param {boolean} isOriginLocation - Whether this is an origin location input\n * @param {number} maxPorts - Maximum number of ports that can be selected\n * @param {Array<string>} supportedLocationModes - Array of supported location modes\n * @param {Object} customer - Customer object for API requests\n * @param {Object} defaultLocation - Default location to load\n * @param {string} defaultLocation.code - Location code (e.g., 'BCN')\n * @param {string} defaultLocation.type - Location type ('airport', 'seaport', 'address', etc.)\n * \n * @example\n * // Basic usage\n * <LocationInput \n * onChange={handleLocationChange}\n * supportedLocationModes={['airport', 'seaport']}\n * />\n * \n * @example\n * // With default value - will automatically load and select Barcelona airport\n * <LocationInput \n * onChange={handleLocationChange}\n * supportedLocationModes={['airport', 'seaport']}\n * defaultLocation={{ code: 'BCN', type: 'airport' }}\n * />\n */\nconst LocationInput = ({\n\tvalue,\n\tonChange,\n\thasError,\n\tdataTestId = 'location-input',\n\tisOriginLocation = true,\n\tmaxPorts = 1,\n\tsupportedLocationModes,\n\tcustomer,\n\tdefaultLocation,\n\t...rest\n}) => {\n\tconst [selectedLocation, setSelectedLocation] = useState(value);\n\tconst [activeLocationMode, setActiveLocationMode] = useState(\n\t\tsupportedLocationModes.length === 1 ? supportedLocationModes[0] : DEFAULT_LOCATION_MODE\n\t);\n\n\tconst [selectionMode, setSelectionMode] = useState(\n\t\tisLocationAddress(activeLocationMode) || activeLocationMode === DEFAULT_LOCATION_MODE\n\t\t\t? SelectModes.SINGLE\n\t\t\t: SelectModes.MULTIPLE\n\t);\n\n\tuseEffect(() => {\n\t\tif (isLocationAddress(activeLocationMode)) {\n\t\t\tsetSelectionMode(SelectModes.SINGLE);\n\t\t} else {\n\t\t\tsetSelectionMode(SelectModes.MULTIPLE);\n\t\t}\n\t}, [activeLocationMode]);\n\n\tuseEffect(() => {\n\t\tsetSelectedLocation(value);\n\t\tif (Array.isArray(value) && value.length > 0) {\n\t\t\tsetActiveLocationMode(value[0].type);\n\t\t} else if (defaultLocation?.type) {\n\t\t\tsetActiveLocationMode(defaultLocation.type);\n\t\t} else {\n\t\t\tsetActiveLocationMode(DEFAULT_LOCATION_MODE);\n\t\t}\n\t}, [value, defaultLocation?.type]);\n\n\treturn (\n\t\t<DebounceSelect\n\t\t\tmode={selectionMode}\n\t\t\tdataTestId={dataTestId}\n\t\t\thasError={hasError}\n\t\t\tplaceholder={\n\t\t\t\t<TranslatableText\n\t\t\t\t\tstyle={{ fontSize: tokens.fdsFontSizeBase }}\n\t\t\t\t\tstringId={`Select ${isOriginLocation ? LocationTypes.ORIGIN : LocationTypes.DESTINATION}`}\n\t\t\t\t/>\n\t\t\t}\n\t\t\tvalue={getLocationInputValue(selectedLocation)}\n\t\t\tfetchOptions={fetchLocations(activeLocationMode, supportedLocationModes, customer)}\n\t\t\trenderedOptions={optionGroups => renderLocationOptions(optionGroups, dataTestId)}\n\t\t\tonChange={location => {\n\t\t\t\thandleLocationChange(location ?? [], selectionMode, maxPorts, setSelectedLocation, onChange);\n\t\t\t\tsetActiveLocationMode(DEFAULT_LOCATION_MODE);\n\t\t\t}}\n\t\t\tactiveLocationMode={activeLocationMode}\n\t\t\tmaxTagPlaceholder={omittedPorts => <MaxPortsPlaceholder omittedPorts={omittedPorts} dataTestId={dataTestId} />}\n\t\t\tdefaultLocation={defaultLocation}\n\t\t\t{...rest}\n\t\t/>\n\t);\n};\n\nLocationInput.propTypes = {\n\tvalue: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n\tonChange: PropTypes.func.isRequired,\n\thasError: PropTypes.bool,\n\tdataTestId: PropTypes.string,\n\tisOriginLocation: PropTypes.bool,\n\tmaxPorts: PropTypes.number,\n\tsupportedLocationModes: PropTypes.arrayOf(PropTypes.string).isRequired,\n\tcustomer: PropTypes.object,\n\trecentSearches: PropTypes.array,\n\tonRecentSearchSelect: PropTypes.func,\n\tinitialValues: PropTypes.object,\n\tdefaultLocation: PropTypes.shape({\n\t\tcode: PropTypes.string.isRequired,\n\t\ttype: PropTypes.string.isRequired,\n\t}),\n};\n\nexport default LocationInput;\n"],"sourceRoot":""}
@@ -4,7 +4,7 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
4
4
  "url": "http://ship.freightos.local:8800/FusionLocationInput/index.html"
5
5
  },
6
6
  {
7
- "revision": "62c92219ecf620303fdc",
7
+ "revision": "9797890cf838284ee77c",
8
8
  "url": "http://ship.freightos.local:8800/FusionLocationInput/main.bundle.js"
9
9
  }
10
10
  ]);
@@ -14,7 +14,7 @@
14
14
  importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
15
15
 
16
16
  importScripts(
17
- "http://ship.freightos.local:8800/FusionLocationInput/precache-manifest.016e278e3cd14da77a40a8f2083709a5.js"
17
+ "http://ship.freightos.local:8800/FusionLocationInput/precache-manifest.bd943a4da10dda31f79e54ea09f73afc.js"
18
18
  );
19
19
 
20
20
  self.addEventListener('message', (event) => {
package/package.json CHANGED
@@ -1,66 +1,66 @@
1
- {
2
- "name": "@freightos/fusion-location-input",
3
- "version": "2.1.4",
4
- "description": "Fusion Location Input",
5
- "author": "Nowwar Kusa",
6
- "main": "build/main.bundle.js",
7
- "files": [
8
- "build",
9
- "public"
10
- ],
11
- "scripts": {
12
- "start": "npx craco start",
13
- "build": "npx craco build",
14
- "test": "react-scripts test",
15
- "yalcPublish": "npx yalc publish",
16
- "yalcBuild": "npx yarn build && npx yalc push"
17
- },
18
- "jest": {
19
- "transform": {
20
- "^.+\\.[t|j]sx?$": "babel-jest"
21
- },
22
- "transformIgnorePatterns": [
23
- "node_modules/(?!@shotgunjed)/",
24
- "node_modules/(?!(axios)/)"
25
- ]
26
- },
27
- "dependencies": {
28
- "axios-mock-adapter": "^1.20.0",
29
- "formik": "^2.2.6",
30
- "peer-deps-externals-webpack-plugin": "^1.0.4",
31
- "yalc": "^1.0.0-pre.53",
32
- "yup": "^0.32.9"
33
- },
34
- "devDependencies": {
35
- "@craco/craco": "5.8.0",
36
- "@freightos/design-system": "^7.1.0",
37
- "@freightos/freightos-i18n": "^4.0.2-test-fusion1",
38
- "@freightos/http-client": "^5.0.1"
39
- },
40
- "peerDependencies": {
41
- "@freightos/design-system": "^7.1.0",
42
- "@freightos/freightos-i18n": "^4.0.2-test-fusion1",
43
- "@freightos/http-client": "^5.0.1",
44
- "lodash": "^4.17.21",
45
- "moment": ">=2.26.0",
46
- "react": "16.x || 17.x || 18.x",
47
- "react-dom": "16.x || 17.x || 18.x",
48
- "styled-components": "^6.1.14"
49
- },
50
- "engines": {
51
- "node": "16.14",
52
- "npm": "8.x"
53
- },
54
- "browserslist": {
55
- "production": [
56
- ">0.2%",
57
- "not dead",
58
- "not op_mini all"
59
- ],
60
- "development": [
61
- "last 1 chrome version",
62
- "last 1 firefox version",
63
- "last 1 safari version"
64
- ]
65
- }
66
- }
1
+ {
2
+ "name": "@freightos/fusion-location-input",
3
+ "version": "2.1.5-34cffdb2",
4
+ "description": "Fusion Location Input",
5
+ "author": "Nowwar Kusa",
6
+ "main": "build/main.bundle.js",
7
+ "files": [
8
+ "build",
9
+ "public"
10
+ ],
11
+ "scripts": {
12
+ "start": "npx craco start",
13
+ "build": "npx craco build",
14
+ "test": "react-scripts test",
15
+ "yalcPublish": "npx yalc publish",
16
+ "yalcBuild": "npx yarn build && npx yalc push"
17
+ },
18
+ "jest": {
19
+ "transform": {
20
+ "^.+\\.[t|j]sx?$": "babel-jest"
21
+ },
22
+ "transformIgnorePatterns": [
23
+ "node_modules/(?!@shotgunjed)/",
24
+ "node_modules/(?!(axios)/)"
25
+ ]
26
+ },
27
+ "dependencies": {
28
+ "axios-mock-adapter": "^1.20.0",
29
+ "formik": "^2.2.6",
30
+ "peer-deps-externals-webpack-plugin": "^1.0.4",
31
+ "yalc": "^1.0.0-pre.53",
32
+ "yup": "^0.32.9"
33
+ },
34
+ "devDependencies": {
35
+ "@craco/craco": "5.8.0",
36
+ "@freightos/design-system": "^7.3.2",
37
+ "@freightos/freightos-i18n": "^4.0.2-test-fusion1",
38
+ "@freightos/http-client": "^5.0.1"
39
+ },
40
+ "peerDependencies": {
41
+ "@freightos/design-system": "^7.3.2",
42
+ "@freightos/freightos-i18n": "^4.0.2-test-fusion1",
43
+ "@freightos/http-client": "^5.0.1",
44
+ "lodash": "^4.17.21",
45
+ "moment": ">=2.26.0",
46
+ "react": "16.x || 17.x || 18.x",
47
+ "react-dom": "16.x || 17.x || 18.x",
48
+ "styled-components": "^6.1.14"
49
+ },
50
+ "engines": {
51
+ "node": "16.14",
52
+ "npm": "8.x"
53
+ },
54
+ "browserslist": {
55
+ "production": [
56
+ ">0.2%",
57
+ "not dead",
58
+ "not op_mini all"
59
+ ],
60
+ "development": [
61
+ "last 1 chrome version",
62
+ "last 1 firefox version",
63
+ "last 1 safari version"
64
+ ]
65
+ }
66
+ }
package/public/index.html CHANGED
@@ -1,9 +1,9 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1" />
6
- <meta name="theme-color" content="#000000" />
7
- <title>Fusion location input</title>
8
- </head>
9
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
6
+ <meta name="theme-color" content="#000000" />
7
+ <title>Fusion location input</title>
8
+ </head>
9
+ </html>