(()=>{var e,t,n,a={2366(){},6578(e,t,n){"use strict";n.d(t,{A:()=>Z});var a=n(71354),i=n.n(a),l=n(76314),r=n.n(l),o=n(4417),s=n.n(o),d=new URL(n(29248),n.b),c=new URL(n(19844),n.b),p=new URL(n(82471),n.b),u=new URL(n(69915),n.b),m=new URL(n(51318),n.b),h=new URL(n(93974),n.b),g=new URL(n(97477),n.b),f=new URL(n(87171),n.b),y=new URL(n(41596),n.b),v=new URL(n(57376),n.b),w=new URL(n(15731),n.b),x=new URL(n(92583),n.b),E=new URL(n(77346),n.b),b=new URL(n(65090),n.b),C=new URL(n(93657),n.b),_=new URL(n(88817),n.b),k=new URL(n(55368),n.b),S=new URL(n(40290),n.b),A=r()(i()),T=s()(d),I=s()(c),N=s()(p),M=s()(u),D=s()(m),L=s()(h),B=s()(g),R=s()(f),F=s()(y),O=s()(v),P=s()(w),z=s()(x),j=s()(E),W=s()(b),$=s()(C),V=s()(_),G=s()(k),U=s()(S);A.push([e.id,`/* montserrat-100 - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 100;\n src: url(${T}) format('woff2');\n}\n/* montserrat-100italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 100;\n src: url(${I}) format('woff2'); \n}\n/* montserrat-200 - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 200;\n src: url(${N}) format('woff2'); \n}\n/* montserrat-200italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 200;\n src: url(${M}) format('woff2'); \n}\n/* montserrat-300 - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 300;\n src: url(${D}) format('woff2'); \n}\n/* montserrat-300italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 300;\n src: url(${L}) format('woff2'); \n}\n/* montserrat-regular - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 400;\n src: url(${B}) format('woff2'); \n}\n/* montserrat-italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 400;\n src: url(${R}) format('woff2'); \n}\n/* montserrat-500 - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 500;\n src: url(${F}) format('woff2'); \n}\n/* montserrat-500italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 500;\n src: url(${O}) format('woff2'); \n}\n/* montserrat-600 - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 600;\n src: url(${P}) format('woff2'); \n}\n/* montserrat-600italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 600;\n src: url(${z}) format('woff2'); \n}\n/* montserrat-700 - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 700;\n src: url(${j}) format('woff2'); \n}\n/* montserrat-700italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 700;\n src: url(${W}) format('woff2'); \n}\n/* montserrat-800 - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 800;\n src: url(${$}) format('woff2'); \n}\n/* montserrat-800italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 800;\n src: url(${V}) format('woff2'); \n}\n/* montserrat-900 - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 900;\n src: url(${G}) format('woff2'); \n}\n/* montserrat-900italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 900;\n src: url(${U}) format('woff2'); \n}\n`,"",{version:3,sources:["webpack://./src/css/fonts.css"],names:[],mappings:"AAAA,2BAA2B;AAC3B;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,4DAA+F;AACjG;AACA,iCAAiC;AACjC;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,4DAAqG;AACvG;AACA,2BAA2B;AAC3B;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,4DAA+F;AACjG;AACA,iCAAiC;AACjC;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,4DAAqG;AACvG;AACA,2BAA2B;AAC3B;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,4DAA+F;AACjG;AACA,iCAAiC;AACjC;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,4DAAqG;AACvG;AACA,+BAA+B;AAC/B;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,4DAAmG;AACrG;AACA,8BAA8B;AAC9B;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,4DAAkG;AACpG;AACA,2BAA2B;AAC3B;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,4DAA+F;AACjG;AACA,iCAAiC;AACjC;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,4DAAqG;AACvG;AACA,2BAA2B;AAC3B;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,6DAA+F;AACjG;AACA,iCAAiC;AACjC;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,6DAAqG;AACvG;AACA,2BAA2B;AAC3B;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,6DAA+F;AACjG;AACA,iCAAiC;AACjC;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,6DAAqG;AACvG;AACA,2BAA2B;AAC3B;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,6DAA+F;AACjG;AACA,iCAAiC;AACjC;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,6DAAqG;AACvG;AACA,2BAA2B;AAC3B;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,6DAA+F;AACjG;AACA,iCAAiC;AACjC;EACE,kBAAkB;EAClB,yBAAyB;EACzB,kBAAkB;EAClB,gBAAgB;EAChB,6DAAqG;AACvG",sourcesContent:["/* montserrat-100 - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 100;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-100.woff2') format('woff2');\n}\n/* montserrat-100italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 100;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-100italic.woff2') format('woff2'); \n}\n/* montserrat-200 - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 200;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-200.woff2') format('woff2'); \n}\n/* montserrat-200italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 200;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-200italic.woff2') format('woff2'); \n}\n/* montserrat-300 - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 300;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-300.woff2') format('woff2'); \n}\n/* montserrat-300italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 300;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-300italic.woff2') format('woff2'); \n}\n/* montserrat-regular - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 400;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-regular.woff2') format('woff2'); \n}\n/* montserrat-italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 400;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-italic.woff2') format('woff2'); \n}\n/* montserrat-500 - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 500;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-500.woff2') format('woff2'); \n}\n/* montserrat-500italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 500;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-500italic.woff2') format('woff2'); \n}\n/* montserrat-600 - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 600;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-600.woff2') format('woff2'); \n}\n/* montserrat-600italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 600;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-600italic.woff2') format('woff2'); \n}\n/* montserrat-700 - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 700;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-700.woff2') format('woff2'); \n}\n/* montserrat-700italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 700;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-700italic.woff2') format('woff2'); \n}\n/* montserrat-800 - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 800;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-800.woff2') format('woff2'); \n}\n/* montserrat-800italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 800;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-800italic.woff2') format('woff2'); \n}\n/* montserrat-900 - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: normal;\n font-weight: 900;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-900.woff2') format('woff2'); \n}\n/* montserrat-900italic - latin */\n@font-face {\n font-display: swap;\n font-family: 'Montserrat';\n font-style: italic;\n font-weight: 900;\n src: url('../assets/fonts/montserrat-v31-latin/montserrat-v31-latin-900italic.woff2') format('woff2'); \n}\n"],sourceRoot:""}]),A.locals={};const Z=A},14141(){},15731(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-600.woff2"},19844(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-100italic.woff2"},21853(e,t,n){"use strict";var a=n(96540),i=n(5338),l=n(84976),r=n(47767),o=n(78094);const s="11px",d="12px",c="13px",p="14px",u="16px",m="18px",h="#1482fd",g="#6f6f6f",f="#cbcbcb",y="#F03A5F",v="#ffffff",w="#333333",x="#212229",E=(0,o.createGlobalStyle)(["body{margin:0px;font-family:'Montserrat';width:100%;height:100%;overflow:hidden;}button{font-family:'Montserrat';}input{font-family:'Montserrat';color:",";}"],w);var b=n(72635),C=n(22022),_=n(65606);const k={GMAPS_API_KEY:_.env.NEXT_PUBLIC_GMAPS_API_KEY||"AIzaSyDAgEeI0DnlqcTSD0EdCHK4KG7b0gjIjyw",LANGUAGE:_.env.NEXT_PUBLIC_LANGUAGE,THEME_PRIMARY_COLOR:null,THEME_SECONDARY_COLOR:null},S=JSON.parse('{"admin":{"system-settings":{}},"reports":{"title":"Reports","options":{"rides":"Ride Operation","fieldServicing":"Field Servicing"}},"map":{"searchPlaceholder":"Search","topBanner":{"title":"Add stations using the pin tool or by searching for a specific address","searchPlaceholder":"Search location","addStationButton":"Add station"}},"upload":"Upload","new":"New","addressPlaceholder":"Loading full address","addVariationButton":"+ Add variation","deleteVariationButton":"Delete variation","deleteVariationText":"Delete this variation? This action cannot be undone.","deleteExperimentButton":"Delete experiment","deleteExperimentText":"Delete this experiment? This action cannot be undone.","addExperimentButton":"+ New Experiment","untitledExperimentName":"Untitled Experiment","genericBackButtonText":"Back","searchLocationPlaceholder":"Search by location","genericServerError":"Oops, something went wrong. Please wait a moment and try again","logout":"Log out","deleteVariationError":"Cannot delete a variation while it\'s running.","yesDeleteButtonText":"Yes, delete","variationType":{"fieldServicing":"Field servicing","rides":"Rides"},"cloneToAnotherExperiment":{"buttonLabel":"Clone to another experiment","title":"Clone to another experiment","description":"Select an experiment to clone this variation to","selectExperiment":"Select an experiment","selectVariation":"Select a variation","clone":"Clone","close":"Close"},"variationStatus":{"pending":"pending","initializing":"initializing","preparingData":"preparing data","failed":"failed","completed":"completed","running":"running","draft":"draft","awaitingApproval":"awaiting approval"},"inputLabels":{"name":"Name","details":"Description","tags":"Tags","simType":"Simulation Type"},"menu":{"experiments":"Experiments","reports":"Data Management","user":"User"},"general":{"days":{"monday":"Monday","tuesday":"Tuesday","wednesday":"Wednesday","thursday":"Thursday","friday":"Friday","saturday":"Saturday","sunday":"Sunday"},"required":"Required"},"fileUploader":{"fileErrorText":"This file does not have the required structure.","genericErrorText":"Something went wrong, Please wait a moment and try again.","timeLimitationValidation":{"invalidTime":"Invalid time \\"{{time}}\\" (expected HH:MM)","missingDay":"Missing day on time limitation {{start}}-{{end}}","invalidDay":"Invalid day \\"{{day}}\\" on time limitation {{start}}-{{end}}","invalidRange":"Invalid time range: {{start}}-{{end}} (end must be after start)","overnightRange":"Overnight range {{start}}-{{end}} is not supported. Split into two same-day entries instead.","overlappingHeader":"Station \\"{{address}}\\" has overlapping time limitations:","overlapDetail":"{{start1}}-{{end1}} overlaps with {{start2}}-{{end2}}","stationPrefix":"Station \\"{{address}}\\""},"successMessage":"Upload Successful","text":"Drag & drop file here or","browseText":"Browse files","requiredField":"Required: ","invalidField":"Invalid field: ","misStructuredField":"Incorrect format found in column: ","supported":{"csv":"Supported: CSV files","csvAndJson":"Supported: CSV, JSON files","geo":"Supported: GeoJSON files","json":"Supported: JSON files"}},"experimentsEmptyState":{"title":"Click New Experiment to get started","body":"You\'ll see your experiments and variations here"},"addExperimentWizard":{"saveAndExit":"Save and exit","saving":"Saving...","validating":"Validating...","processing":"Processing...","title":"New Variation","wizardViewStates":{"readOnly":"Read Only"},"cloneTitle":"Copy of {{var_name}}","nextStep":"Next step","launchSimulation":"Create variation","backButton":"Back","untitledGroup":"Untitled group","tableHeader":{"edit":"Edit Name","delete":"Delete","reports":"Reports"},"tableRowEndButtons":{"view":"View","delete":"Delete","duplicate":"Duplicate","logs":"Logs","kepler":"Kepler"},"steps":{"details":{"title":"Details","description":"Provide background information and context for what is being tested in this variation.","placeHolders":{"name":"Add a descriptive name...","details":"Describe what is being tested...","tags":"Press enter to add a tag..."},"simulationTypes":{"rides":{"name":"Ride operation","description":"Any ride-based operation, such as ride hailing, delivery, logistic services and more"},"fieldServicing":{"name":"Field servicing","description":"Simulate operations of predetermined vehicle routes, such as field servicing or other mobile workforces"},"disabledText":"Variations in this experiment must be of type"}},"territory":{"title":"Territory","incompleteErrorText":"Please upload a GeoJSON file or draw a territory on the map","popupErrorTitle":"Error","popupErrorText":"There was an error uploading the file. Please verify the file is a valid GeoJSON and try again.","description":"At the start of the simulation, vehicles will be placed randomly throughout the territory. Note that rides and routes do not need to be contained within the territory."},"parkingStations":{"title":"Parking Stations","stations":"Stations","incompleteErrorText":"Please add at least one parking station","description":"Parking stations define where vehicles are routed at the end of their shifts. Vehicles are triggered to drive to a parking station at a specified time before the shift end (defined in the settings). The station nearest to the vehicle is selected. Vehicles also start upcoming shifts from their respective parking station."},"fillingStations":{"stationOptions":{"electric":"EV","ice":"ICE"},"stationTypeOptions":{"charging":"Filling","parking":"Parking","parking_and_charging":"Filling & Parking","maintenance":"Maintenance"},"stationType":"Station type:","stationDetails":"Station details:","stationLocation":"Station location:","title":"Stations","stationTypeLabel":"Type","stationRateLabel":"Fill rate","stationSlotsLabel":"Slots at location","parkingSpotsLabel":"Parking spots","maintenanceCapacityLabel":"Maintenance capacity","stationsLabel":"Stations","maintenanceLabel":"Maintenance","endOfShiftChargingLabel":"End of Simulation Charging","duringShiftChargingLabel":"During Simulation Charging","rateUnitIce":"min","rateUnitEV":"Kw","slots":"Slots","spots":"spots","incompleteErrorText":"Please add at least one filling station","description":"Define station locations. Filling Stations: Vehicles are routed here when they reach their Refuel Threshold (defined in settings) to refuel/recharge. Parking Stations: Vehicles are routed here at the end of their shifts. Maintenance Stations: Vehicles are routed here for scheduled maintenance tasks.","showPublicStationsLable":"Add public EV charging stations","importPublicChargingStations":"Import public charging stations","operators":"Operators","powerSupply":"Power supply","kW":"kW","loading":"Loading...","stationsFound":"Stations found:","import":"Import","removeAll":" Remove All","capabilitiesLabel":"Parking Type","capabilities":{"staging":"Staging","parking":"Parking","parking_and_staging":"Both"},"uploadSection":{"stationsUploadTitle":"Stations Upload:","maintenanceStationsUploadTitle":"Maintenance Stations Upload:","downloadExample":"Download example","downloadExampleFile":"Download example file"},"emptyState":{"noStationAdded":"No station added","addStationsInstruction":"Add stations using the pin tool or by searching for a specific address on the map"},"newStationConfiguration":{"title":"New station configurations","stationTypeLabel":"Station type","subTypeLabel":"Sub type","fillRateLabel":"Fill rate","slotsLabel":"Slots","chargersLabel":"Chargers","parkingSpotsLabel":"Parking spots","stationCapacityLabel":"Station capacity","availableTasksLabel":"Available tasks","taskTypeLabel":"Task type","taskDurationLabel":"Task duration","addTaskButton":"Add task","cancelButton":"Cancel","addStationButton":"Add Station","searchPlaceholder":"Search","addPlaceholder":"Add","requiredError":"Required","fillRateRequiredError":"Fill rate is required","fillRateRangeError":"Fill rate must be positive","slotsRequiredError":"Slots amount is required","slotsRangeError":"Slots amount must be Positive","chargersRequiredError":"Chargers amount is required","chargersRangeError":"Chargers amount must be positive","parkingSpotsRequiredError":"Parking spots is required","parkingSpotsRangeError":"Parking spots must be positive","stationCapacityRequiredError":"Station capacity is required","stationCapacityRangeError":"Station capacity must be 0 or more","durationRequiredError":"Duration is required","durationRangeError":"Invalid duration","invalidFormatError":"Invalid format","taskMissingError":"Add at least one task to continue","duplicateTaskError":"Value already in use. Try different one."}},"vehiclesAndRoutes":{"title":"Vehicles and Routes","description":"Define the properties and servicing routes that will be performed by each vehicle.","incompleteErrorText":"Please upload a vehicles and routes file"},"vehicles":{"options":{"bodyType":{"hatchback":"Hatchback","sedan":"Sedan","coupe":"Coupe","estate":"Estate","minivan":"Minivan","van":"Van","truck":"Truck","convertible":"Convertible","shuttle":"Shuttle","suv":"SUV","bike":"Bike","motorcycle":"Motorcycle"},"power":{"ice":"ICE","electric":"EV"},"model":{"other":"Other"}},"title":"Vehicles","description":"Define groups of vehicle models and their configurations.","incompleteErrorText":"Please add at least one vehicle group","addGroup":"+ Add vehicle group","uploadJson":"Vehicle Groups JSON Upload:","clearAll":"Clear all","uploadJsonError":"Invalid JSON file. Please ensure the file contains a valid vehicle groups configuration.","uploadJsonParseError":"Failed to parse JSON file. Please check the file format.","uploadJsonMissingFields":"Vehicle group \\"{{label}}\\" is missing required fields: {{fields}}","uploadJsonSocMissing":"Vehicle group \\"{{label}}\\": starting_soc requires both min_soc and max_soc","uploadJsonSocRange":"Vehicle group \\"{{label}}\\": min_soc and max_soc must be numbers between 1 and 100","uploadJsonSocMinMax":"Vehicle group \\"{{label}}\\": min_soc must be less than max_soc","uploadJsonRefuelThreshold":"Vehicle group \\"{{label}}\\": refuel_threshold must be a positive number","uploadJsonRideRefuelThreshold":"Vehicle group \\"{{label}}\\": ride_refuel_threshold must be a positive number","uploadJsonMinLevelEndShift":"Vehicle group \\"{{label}}\\": minimal_level_at_end_of_shift must be a number between 0 and 100","uploadJsonPostRefuelWait":"Vehicle group \\"{{label}}\\": vehicle_post_refuel_wait_time_sec must be a non-negative number","uploadJsonOppChargingActive":"Vehicle group \\"{{label}}\\": opportunistic_charging.active is required and must be a boolean","uploadJsonOppChargingThreshold":"Vehicle group \\"{{label}}\\": opportunistic_charging.threshold_percent is required and must be a number between 1 and 100","uploadJsonOppChargingMaxDriving":"Vehicle group \\"{{label}}\\": opportunistic_charging.max_driving_time_minutes is required and must be a positive integer","uploadJsonOppChargingDemandActive":"Vehicle group \\"{{label}}\\": opportunistic_charging.demand_sensitive.active is required and must be a boolean","uploadJsonOppChargingDemandRatio":"Vehicle group \\"{{label}}\\": opportunistic_charging.demand_sensitive.rides_per_vehicle_ratio is required and must be a positive number","uploadJsonInvalidDemandSensitiveWindow":"max_charge_level_demand_window_minutes must be a positive integer","uploadJsonInvalidChargeOnTheWayWindow":"opportunistic_charging_demand_window_minutes must be a positive integer","uploadJsonRequiredDemandSensitiveWindow":"max_charge_level_demand_window_minutes is required when any vehicle group uses demand_sensitive max_charge_level","uploadJsonRequiredChargeOnTheWayWindow":"opportunistic_charging_demand_window_minutes is required when any vehicle group has active opportunistic charging with demand_sensitive","uploadJsonMaxChargeLevelType":"Vehicle group \\"{{label}}\\": max_charge_level.type must be either \\"fixed\\" or \\"demand_sensitive\\"","uploadJsonMaxChargeLevelFixedValue":"Vehicle group \\"{{label}}\\": max_charge_level.value is required and must be a number between 1 and 100","uploadJsonMaxChargeLevelDemandValues":"Vehicle group \\"{{label}}\\": max_charge_level.values is required and must be a non-empty array","uploadJsonMaxChargeLevelDemandRpv":"Vehicle group \\"{{label}}\\": max_charge_level.values entries must have rpv as a non-negative number","uploadJsonMaxChargeLevelDemandSoc":"Vehicle group \\"{{label}}\\": max_charge_level.values entries must have target_soc as a number between 1 and 100","uploadJsonInvalidNumberOfVehicles":"Vehicle group \\"{{label}}\\": number_of_vehicles must be a positive integer","uploadJsonInvalidCapacity":"Vehicle group \\"{{label}}\\": capacity must be a positive integer","uploadJsonInvalidBatteryCapacity":"Vehicle group \\"{{label}}\\": battery_capacity_kwh must be a positive number","uploadJsonInvalidFuelRange":"Vehicle group \\"{{label}}\\": fuel_range_km must be a positive number","uploadJsonInvalidCostPerKm":"Vehicle group \\"{{label}}\\": cost_per_km must be a non-negative number","uploadJsonInvalidIdleConsumption":"Vehicle group \\"{{label}}\\": idle_consumption_kwh_per_hour must be a non-negative number","uploadJsonInvalidFuelType":"Vehicle group \\"{{label}}\\": fuel_type must be either \\"EV\\" or \\"IC\\"","uploadJsonChargingRateType":"Vehicle group \\"{{label}}\\": charging_rate.type must be either \\"constant\\" or \\"curve\\"","uploadJsonChargingRateConstantValue":"Vehicle group \\"{{label}}\\": charging_rate.value must be a positive number","uploadJsonChargingRateCurvePoints":"Vehicle group \\"{{label}}\\": charging_rate.points is required and must be a non-empty array","uploadJsonChargingRateCurveSoc":"Vehicle group \\"{{label}}\\": charging_rate.points entries must have state_of_charge as a number between 1 and 100","uploadJsonChargingRateCurveKw":"Vehicle group \\"{{label}}\\": charging_rate.points entries must have kw as a positive number","tableColumns":{"amount":"NO.","modelName":"MODEL NAME","labels":"LABELS","bodyType":"BODY TYPE","capacity":"CAPACITY","powerTrain":"POWER TRAIN","cost":{"metric":"COST/KM","imperial":"COST/MI"},"range":{"metric":"GROSS RANGE (KM)","imperial":"GROSS RANGE (MI)"},"batteryCapacity":"BATTERY CAPACITY","chargeRateKWH":"CHARGE RATE (KW)","idleConsumption":"IDLE CONSUMPTION (KW)","chargingCurve":{"invalidFile":"Invalid file format","invalidNumber":"Invalid number","numberGreaterThanZero":"Value must be positive","errors":{"header":"File format error","monotonicallyIncrease":"State of charge must be monotonically increasing","lastEntryStateOfCharge":"Last entry of state of charge must be 100","invalidFileError":"Invalid file format","close":"Close"},"curve":"Curve","numberOption":{"title":"Constant","subtitle":"Fill in fixed value"},"curveOption":{"title":"Curve","subtitle":"Upload a CSV file with the charging curve"}}}},"shifts":{"initialLocation":{"title":"Start Location (Lat, Lng)","lat":"Latitude","lng":"Longitude"},"buttonMenu":{"edit":"Edit","delete":"Delete"},"title":"Shifts","addShift":"+ Add shift","save":"Save","cancel":"Cancel","time":"Shift time","name":"Shift name","location":"Start Location","requireErrorLabel":"Required","uniqueErrorLabel":"Name already exists","edit":"Edit","delete":"Delete","incompleteErrorText":"Please add driver shifts","description":"Define driver shifts, day and time"},"drivers":{"title":"Drivers","description":"Driver groups that are assigned shifts will be limited to working only in the specified hours. Driver groups with no shifts will be considered available 24/7.","incompleteErrorText":"Please add at least one driver group","addGroup":"+ Add driver group","tableColumns":{"amount":"AMOUNT","groupName":"GROUP NAME","driverShifts":"DRIVER SHIFTS","vehicleLabel":"VEHICLE LABEL"}},"demandData":{"title":"Demand Data","description":"Upload a CSV file of demand data. The file includes up to 24 hours of data that includes individual rides and defines pickup and dropoff locations, time windows, and more. Download the example file for more instructions.","demandPrediction":{"title":"Demand Prediction","description":"use demand prediction for placement (instead of 100% accurate prediction)"},"incompleteErrorText":"Please upload a demand data file","exampleDownload":"Download example file","downloadSuffixExample":"Download example {{suffix}}","failedUploadText":"File upload failed","errorTitle":"Error","uploadingMessage":"File uploading...","chooseFileFromListHeader":"Select from existing data sets","chooseFileFromListPlaceholder":"Select a saved demand file..."},"tasks":{"title":"Tasks","description":"Upload a CSV file of tasks data. The file includes individual tasks and defines order id, vehicle group, order time and task type.","incompleteErrorText":"Please upload a tasks data file","unsupportedTaskTypesError":"Some task types are not supported by any maintenance station","unsupportedVehicleGroupsError":"Some vehicle groups are not defined in vehicle labels","exampleDownload":"Download example file","downloadSuffixExample":"Download example {{suffix}}","failedUploadText":"File upload failed","errorTitle":"Error","uploadingMessage":"File uploading...","chooseFileFromListHeader":"Select from existing data sets","chooseFileFromListPlaceholder":"Select a saved tasks file..."},"settings":{"title":"Settings","description":"","unit":{"percentage":"%","number":"number","minutes":"minutes","currency":"$","vehicles":"vehicles","placementMoves":"Max moves","demandStagingMaxDistance":"Max distance","km":"km","meters":"Meters","demandChargingTimeWindow":"Demand window (minutes)"},"entries":{"nullOption":"None","placement":{"title":"Placement","description":"When Vehicles are idle, route them according to three available options: \\n 1. Staging: Vehicles are routed to the nearest staging station.\\n 2. Territory Wide: Vehicles are routed to high demand area. \\n 3. Demand Staging: Vehicles are routed to staging station located near or in high demand area","options":{"off":{"title":"Off"},"staging":{"title":"Staging"},"territoryWide":{"title":"Territory Wide"},"demandStaging":{"title":"Demand Staging"}},"active":{"false":"Off","true":"On"},"mode":{"title":"Placement Mode"},"maxMoves":{"title":"Max moves per placement interval"},"maxPlacementOverClosestKm":{"title":"Max Placement Distance Over Closest"}},"demandSensitiveCharging":{"title":"Demand Sensitive Charging","description":"Allow dynamic charging limit based on demand"},"idleType":{"title":"Idle Strategy","description":"Choose from two available idle strategies: \\"Idle In Place\\" and \\"Circling Idle\\"","descriptionList":{"inPlace":"Idle In Place (default selection): The vehicle will remain at the last active location, such as the dropoff point.","circling":"Circling Idle: The vehicle will continue driving idly."},"active":{"false":"Off","true":"On"},"mode":{"title":"Idle Mode"},"options":{"inPlace":{"title":"Idle in place"},"circling":{"title":"Circling Idle"}},"circlingDistance":{"title":"Max moves per placement interval"}},"router":{"title":"Routing Engine","description":"Define the engine that will calculate vehicle routes. For OSRM or Google Maps, realtime ETAs are calculated based on the ride times and day of week.","options":{"osrm":{"title":"OSRM"},"gmaps":{"title":"Google Maps"},"linear":{"title":"Linear"}}},"secondaryRouter":{"title":"Adjust Trip Durations According to External Mapping Provider","description":"This mapping provider will be used to calculate a dynamic coefficient (based on time of day) that will be applied to the primary mapping provider.","options":{"null":{"title":"Off"},"gmaps":{"title":"Google Maps"}}},"pooling":{"title":"Ride Pooling","description":"Set whether rides will be pooled in Ride Operation simulations.","options":{"active":{"title":"Active"},"passive":{"title":"Passive"},"no":{"title":"No pooling"}}},"maxStopPointsOnVehicle":{"title":"Max Stop Points on Vehicle","description":"Set the maximum number of stop points that can be assigned to a vehicle at once. This setting does not limit adding non-ride stop points."},"refuelThreshold":{"title":"Filling Threshold","description":"Set the value that will determine when vehicles will be sent to refuel/charge."},"rideRefuelThreshold":{"title":"Ride Filling Threshold","description":"Set the minimum permitted fuel/charge level that a vehicle may reach after completing a ride."},"gmapsApiKey":{"title":"Gmaps API key","description":"desc"},"timeToParkVehicleBeforeShiftEnd":{"title":"Route to parking stations at shift end","description":"Set the amount of time before the end of the shift when vehicles need to start driving to the nearest parking station. Note that the simulator will enforce that all rides are completed before this time."},"driftFactor":{"title":"Max Drift From Direct Route - Percentage","description":"Set the maximum amount that a ride can be extended due to ride pooling as a percentage of the direct route distance."},"driftConstant":{"title":"Max Drift From Direct Route - minutes","description":"Set the maximum amount of time that a ride can be extended due to ride pooling relative to the duration of a direct route."},"durationCoefficient":{"title":"Travel time coefficient","description":"This coefficient will be used to increase/decrease the travel time returned from the mapping provider with every route calculation"},"distanceCoefficient":{"title":"Distance coefficient","description":"This coefficient will be used to increase/decrease the distance returned from the mapping provider with every route calculation"},"maxStationsToCheckForBestCharger":{"title":"Max Stations To Check For Best Charger","description":"The number of chargers that are “scored” when sending a vehicle to charge"},"indefleet":{"title":"Automated In/de-fleeting","description":"Automatically in-fleet and de-fleet vehicles from/to parking locations based on a predefined policy or actual demand levels.","active":{"false":"Off","true":"On"},"replaceChargingVehicles":{"title":"Replace charging vehicles","label":"Replace charging vehicles","false":"Off","true":"On","description":"Activate a parked vehicle instead of another vehicle that gets routed to charge."},"maxFuelRangeForRefuel":{"title":"Filing Threshold","label":"Filing Threshold"},"ridePerVehicleRatio":{"title":"Rides per Vehicle","label":"Rides per Vehicle"},"minInfleetedVehicles":{"title":"Min In-fleeted Vehicles","label":"Min In-fleeted Vehicles"},"scheduleInterval":{"title":"Schedule Interval","label":"Schedule Interval"},"demandWindowEnd":{"title":"Demand Window","label":"Demand Window"},"indefleetDemandBased":{"title":"Demand Based","maxFuelRangeForRefuel":{"label":"Filing Threshold","hover":"If a de-fleeted vehicle fuel/charge level is below this threshold, the vehicle will charge before parking."},"ridePerVehicleRatio":{"label":"Rides per Vehicle","hover":"The target ratio between rides (in the demand window) and in-fleeted vehicles. Vehicles will in-fleet or de-fleet to maintain this ratio."},"minInfleetedVehicles":{"label":"Min In-fleeted Vehicles","hover":"Minimum number of vehicles to keep in-fleet at all times."},"scheduleInterval":{"label":"Schedule Interval","hover":"How often (in minutes) the in/de-fleeting schedule is recalculated."},"demandWindowEnd":{"label":"Demand Window","hover":"Time window (in minutes) used to measure demand and calculate the required fleet size."}},"timeBasedVehicleAvailability":{"title":"Predefined policy"}},"chargeOnTheWay":{"title":"Opportunity-Based Charging","description":"Idle vehicles will be sent to charge","active":{"title":"Opportunity-Based Charging","false":"Off","true":"On"},"threshold":{"title":"Filling Threshold","description":"The maximum threshold for considering opportunistic charging"},"maxTimeInMinutes":{"title":"Max Driving Time (minutes)","description":"Maximum Driving Time to Charging Station"},"demandSensitive":{"title":"Demand Sensitive","false":"Off","true":"On","description":"Change the amount of vehicles that will be sent to charge based on the demand level"},"ridePerVehicleRatio":{"title":"Rides per Vehicle","description":"The relation between rides and vehicles that will be used to calculate the demand level"},"demandWindowEnd":{"title":"Demand Window","description":"The time window that will be used to calculate the demand level"}},"minInfleetedVehicles":{"label":"Minimum In-fleeted Vehicles","hover":"The minimum number of vehicles that should stay in-fleeted regardless of the ratio"},"scheduleInterval":{"label":"Execution Frequency","hover":"The amount of time between in/de fleeting events"},"demandWindowEnd":{"label":"Prediction Window","hover":"Length of Time Window For Demand Prediction"},"ridePerVehicleRatio":{"label":"Rides per Vehicle","hover":"The target ratio between rides (in the demand window) and in-fleeted vehicles. Vehicles will in-fleet or de-fleet to maintain this ratio."},"maxFuelRangeForRefuel":{"label":"Filing Threshold","hover":"If a de-fleeted vehicle fuel/charge level is below this threshold, the vehicle will charge before parking."},"evChargingRates":{"title":"kWh Cost","description":"Configure the cost of EV charging","defaultRate":{"label":"Rate"},"hourlyRates":{"label":"Hourly Rate","newLine":"+ Add hourly rate"}},"hourlyRates":{"label":"Hourly Rate","newLine":"+ Add hourly rate"},"gasPrice":{"title":"Gas Price","description":"Configure the cost for ICE refueling"},"maxChargeLevelSettings":{"title":"Max Charge Level","description":"Set the level to which EVs will be charged","options":{"fixed":{"title":"Fixed"},"demandSensitive":{"title":"Demand Sensitive"}},"mode":{"title":"Max Charge Mode"},"maxChargeLevel":{"title":"Max Charge Level (%)"},"demandTimeWindow":{"title":"Demand Time Window"},"demandSensitiveChargingFile":{"title":"Demand-Based Charging Schedule"}},"maxChargeLevel":{"title":"Max Charge Level (%)"},"vehiclePostRefuelWaitTime":{"title":"Vehicle Unavailable Time After Charge (Seconds)","description":"Time each vehicle should be unavailable after charging"},"chargerPostRefuelWaitTime":{"title":"Charger Unavailable Time After Charge (Seconds)","description":"Time each charger should be unavailable after charging"},"matchToBestNVehicles":{"title":"Best N Vehicles to be Considered for Matching","description":"Out of the best matches sorted vehicles list, how many vehicles should be relevant for matching"},"retriesOnMatching":{"title":"Amount of Retries If Vehicle Not Found","description":"How many tries should the booking try to match to any of the N best vehicles. Leave empty for unlimited"},"demandFileUrl":{"title":"Custom url of demand file (skip file upload)","description":"Custom url of demand file (skip file upload)"},"snapshotFileUrl":{"title":"Custom url of vehicle snapshot file (skip file upload)","description":"Custom url of vehicle snapshot file (skip file upload)"},"DemandSensitiveCharging":{"title":"Demand Sensitive Charging","description":"Upload a settings-related CSV/JSON file and store its URL"},"osrmServer":{"title":"Mapping Layer","description":"Select which mapping layer will be used. Additional maps can be added based on needs.","options":{"osrm":{"title":"Standard"},"northCalifornia":{"title":"North California OSRM"},"noDriverNorthCalifornia":{"title":"SF without D.R.I.V.E.R"}}},"mapsMaxDeviation":{"title":"Distance Matrix max deviation","description":"Maximum distance allowed between actual points in the simulation to OSRM\'s matched location."},"startingChargeLevel":{"title":"Starting Charge Level","description":"Define the charge/fuel level for vehicles at the start of the simulation.","min":{"label":"Min"},"max":{"label":"Max"}},"min":{"label":"Min"},"max":{"label":"Max"},"minimalChargingLevelAtEndOfShift":{"title":"Minimal Charge Level At End of Simulation","description":"Define the minimal charge level that vehicles can have at the end of the simulation."},"routePlanConcurrency":{"title":"Matching Concurrency","description":"Set the maximum amount of parallel matching requests."},"critical":{"title":"Critical Simulation","description":"Allocate dedicated resources for this simulation","active":{"true":"On","false":"Off"}},"accelerated":{"title":"Accelerated Simulation","description":"Make the simulation run faster by using air distance (vs the actual route distance) during dispatching.","active":{"undefined":"Off","true":"On","false":"Off"}},"matchingEngine":{"title":"Matching Engine","description":"Determines how rides are matched to vehicles. Select “Traditional” to run more expedient simulations where rides are not pooled and where ride stacking is not required (ie, where rides can be assigned to vehicles that already have rides assigned). Select the “Autofleet” option to support ride pooling and ride stacking.","options":{"autofleet":{"title":"Autofleet"},"greedy":{"title":"Traditional"}}},"raasSimulatorBranch":{"title":"Simulator Branch","description":"Choose the raas-simulator job branch to dispatch."},"measurePerformance":{"title":"Measure Performance","description":"Measure the performance of the simulation","active":{"true":"On","false":"Off"}},"allowRemoteDebugging":{"title":"Allow Remote Debugging","description":"Allow remote debugging of the simulation","active":{"true":"On","false":"Off","undefined":"Off"}},"remoteDebugWaitForClient":{"title":"Wait for Debug Client","description":"Wait for the debug client to connect before starting the simulation","active":{"true":"On","false":"Off","undefined":"Off"}},"generalSeed":{"title":"General Seed","description":"Set the general seed for the simulation"},"logLevel":{"title":"Log Level","description":"Choose the minimal log level for this simulation\'s logs","options":{"debug":{"title":"Debug"},"info":{"title":"Info"},"warning":{"title":"Warning"},"error":{"title":"Error"},"critical":{"title":"Critical"}}},"logTypes":{"title":"Log Types","description":"Enter the types of debug logs to output as a comma separated list. Ex. general,charging"},"exportPath":{"title":"Export path for simulation raw artifacts","description":"Can be GCS (gs://) or S3 (s3://) path, if none provided the data would still be available on the UI"},"chargerSelectionStrategy":{"title":"Charger Selection Strategy","description":"Define how vehicles select charging stations when multiple options are available","descriptionList":{"firstToLeave":"First to Leave: Selects a charger based on driving time, queue wait time, and charging duration.","firstToArrive":"First to Arrive: Selects a charger based on driving time and queue wait time."},"options":{"first_to_leave":{"title":"First to Leave"},"first_to_arrive":{"title":"First to Arrive"}},"enableChargerPowerPrioritization":{"title":"Charger Power Prioritization","true":"Enabled","false":"Disabled"},"firstToLeavePrametersExplanation":{"title":"","text":"These parameters guide vehicles toward chargers that match their charging capabilities. The system calculates an effective time penalty based on power mismatch:\\n\\n• When a vehicle can charge faster than the charger supports: penalty = $\\\\alpha \\\\times (p_{vehicle} - p_{charger})$\\n \\n• When a charger\'s power is higher than the vehicle can use: penalty = $\\\\beta \\\\times (p_{charger} - p_{vehicle})$ \\n\\nExample: To prioritize high-power chargers for high-power vehicles, set $\\\\alpha$ much larger than $\\\\beta$ (e.g., $\\\\alpha = 2.0$, $\\\\beta = 0.1$). This makes high-power vehicles avoid low-power chargers.\\n\\nSetting both to 0 disables this feature - vehicles will select chargers based only on travel time, queue time, and charging duration."},"powerMismatchAlpha":{"title":"α (Alpha)","description":"Scale factor applied when charger power exceeds vehicle maximum power. Controls the penalty for low-power vehicles using high-power chargers. Higher values discourage mismatches more strongly."},"powerMismatchBeta":{"title":"β (Beta)","description":"Scale factor applied when vehicle maximum power exceeds charger power. Controls the penalty for high-power vehicles using low-power chargers. Set beta >> alpha to prioritize high-power chargers for high-power vehicles."}},"advancedRouting":{"title":"Advanced Routing","description":"Enable advanced routing algorithem","active":{"true":"On","false":"Off","undefined":"Off"}}},"validationLabels":{"demandTimeWindow":"Must be an integer greater than 1","maxStopPointsOnVehicle":"Must be an integer between 2 and 50","refuelThreshold":"Must be an integer between 0 and 99","rideRefuelThreshold":"Must be an integer between 0 and 99","maxNumOfVehicles":"Must be greater than 1","maxMoves":"Must be an integer greater than 1","gmapsApiKey":"Must be longer than 5 characters","timeToParkVehicleBeforeShiftEnd":"Must be between 0 and 99","driftFactor":"Must be an integer greater than 1","driftConstant":"Must be an integer greater than 1","indefleet":"Must be greater than 1","defaultRate":"Must be greater than 0","hourlyRates":"Times from one hourly rate cannot overlap another hourly rate","hourlyRates_number":"Must be greater than 0","gasPrice":"Must be greater than 0","min":"Must be an integer between 0 and 100","max":"Must be an integer between 0 and 100","startingChargeLevel":"Min must be lower than max","required":"Required","minInfleetedVehicles":"Must be non-negative integer","scheduleInterval":"Must be an integer greater than 1","demandWindowEnd":"Must be an integer greater than 1","ridePerVehicleRatio":"Must be greater than 0","maxFuelRangeForRefuel":"Must be greater than 1","maxChargeLevel":"Must be an integer between 0 and 99","routePlanConcurrency":"Must be an integer greater than 0","minimalChargingLevelAtEndOfShift":"Must be an integer between 0 and 99","vehiclePostRefuelWaitTime":"Must be a positive integer","chargerPostRefuelWaitTime":"Must be an integer greater than 20","matchToBestNVehicles":"Must be a positive integer","retriesOnMatching":"Must be a positive integer or undefined","exportPath":"Must be a valid GCS or S3 path","mapsMaxDeviation":"Must be a positive integer","durationCoefficient":"Must be a positive number","distanceCoefficient":"Must be a positive number","FillingThresholdGreaterThanMaxChargeLevel":"Max refuel threshold must be greater than the refuel threshold","RideFillingThresholdGreaterThanFillingThreshold":"Filling threshold must be greater than the ride filling threshold","maxPlacementOverClosestKm":"Must be a positive number","maxTimeInMinutes":"Must be a positive number","threshold":"Must be between 0 and 99","powerMismatchAlpha":"Must be a non-negative number","powerMismatchBeta":"Must be a non-negative number"}},"review":{"title":"Review","description":"Here is a summary of your simulation:","goToSection":"Go to section","details":{"title":"Details","simulationType":"Simulation Type","rideOperation":"Ride Operation","fieldServicing":"Field servicing","tags":"Tags"},"territory":{"title":"Territory","subtitle":"Km² area"},"fillingStations":{"title":"Stations","totalCount":"{{total}} Total ( {{charging}} Filling, {{parking}} Parking, {{parkingAndCharging}} Both)","parkingCount":"{{parking}} Parking spots","fillingCount":"{{charging}} Filling slots","maintenanceCount":"{{maintenance}} Maintenance stations","EV":"EV","ICE":"ICE","maintenance":"Maintenance","slots":"Slots","total":"Total","fiiling":"Filling","parking":"Parking","parkingAndCharging":"Parking & Filling","totalPower":"kWh total power","totalDefaultCapacity":"total default capacity"},"vehicles":{"title":"Vehicles","total":"Total","EV":"EV","ICE":"ICE","kmRange":"KM range"},"shifts":{"title":"Shifts","monday":"Mon","tuesday":"Tue","wednesday":"Wed","thursday":"Thu","friday":"Fri","saturday":"Sat","sunday":"Sun","totalAcross":"total across","days":"days"},"driverGroups":{"title":"Drivers","totalAcross":"total across","groups":"groups"},"demandData":{"title":"Demand Data","totalRidesAcross":"total rides across","subText":"Hourly statistics:","days":"days","min":"Min","max":"Max","avg":"Avg","median":"Median"},"tasks":{"title":"Tasks","totalTasksAcross":"total tasks across","days":"days"},"dateRangeExceededError":"Simulation date range exceeds {{maxDays}} days. The combined date range of demand and tasks files must not exceed {{maxDays}} days.","timeline":{"title":"Timeline","noData":"No distribution data available","demand":"Demand","tasks":"Tasks","noDemand":"No demand","noTasks":"No tasks"},"settings":{"title":"Settings","subtitle":"Changed from default"},"approveBanner":{"ApprovedMessage":"This simulation was approved","approveRequiredMessage":"This simulation is waiting for approval","approve":"Approve"}}}}}');b.Ay.use(C.r9).init({lng:k.LANGUAGE,fallbackLng:"en",resources:{en:{translation:S},ns:["translation"],defaultNS:"translation",interpolation:{escapeValue:!1},react:{wait:!0,bindI18n:"languageChanged loaded"}}});const A=new Set(["en"]),T=b.Ay;var I=n(76751);const N="undefined"!=typeof window&&(window.location.origin.includes("simulator.autofleet.io")||window.location.origin.includes("simulator.jp.autofleet.io")),M="/advanced",D=()=>window.location.href.includes("/extended-settings")||window.location.href.includes(M),L=()=>D()?M:"";var B=n(65606);const R=B.env.USE_MIXPANEL_ENV||N,F=B.env.DEBUG_MIXPANEL_ENV||!1,O=B.env.MIXPANEL_TOKEN_ENV||"4ec634bc700b6a57b62272d698a628bb",P=new class{constructor(){var e=this;this.user=void 0,this.setUser=async e=>{let{user:t,context:n}=e;const a=t&&t.id;R&&!this.user&&a&&(this.user=t,await I.A.opt_in_tracking(),await I.A.identify(a),await I.A.people.set({id:t.id,$email:t.email,$phone:t.phoneNumber,$first_name:t.firstName,$last_name:t.lastName}),n&&this.registerSuperProperties({af_context_name:n.name,af_context_id:n.id}))},this.resetIdentifier=async()=>{await I.A.reset()},this.registerSuperProperties=e=>{I.A.register(e)},this.logout=()=>{R&&(I.A.opt_out_tracking(),this.resetIdentifier())},this.track=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};R?I.A.track(e,t):F&&console.debug(`Mixpanel event - ${e}`,t)},this.trackPageView=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.track(`Page View - ${t}`,{page_name:t,event_type:"page_view",...n})},this.trackEvent=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.track(t,{event_name:t,event_type:"event",...n})},this.trackClickEvent=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.track(`Click - ${t}`,{event_name:t,event_type:"click",...n})},this.trackRedirectEvent=function(t,n){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=`Redirect - ${t} to ${n}`;e.track(i,{event_name:i,event_type:"redirect",...a})},this.trackElementClick=function(t,n){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=(e=>e["data-test-id"]||e.id)(n),l=`${t} '${i}'`;i&&e.trackClickEvent(l,a)},R&&I.A.init(O,{debug:F})}},z={PENDING:"pending",DISPATCHING:"initializing",FAILED:"failed",COMPLETED:"completed",RUNNING:"running",DRAFT:"draft",PREPARING_DATA:"preparing data",AWAITING_APPROVAL:"awaitingApproval"},j="metric",W="imperial",$={HATCHBACK:"https://res.cloudinary.com/autofleet/image/upload/w_700,h_500,c_thumb,q_auto/vehicle-images/Hatchback/hatchback_white.png",SEDAN:"https://res.cloudinary.com/autofleet/image/upload/w_700,h_500,c_thumb,q_auto/vehicle-images/Sedan/sedan_white.png",COUPE:"https://res.cloudinary.com/autofleet/image/upload/w_700,h_500,c_thumb,q_auto/vehicle-images/Coupe/coupe_white.png",ESTATE:"https://res.cloudinary.com/autofleet/image/upload/w_700,h_500,c_thumb,q_auto/vehicle-images/Estate/estate_white.png",MINIVAN:"https://res.cloudinary.com/autofleet/image/upload/w_700,h_500,c_thumb,q_auto/vehicle-images/Minivan/minivan_white.png",VAN:"https://res.cloudinary.com/autofleet/image/upload/w_700,h_500,c_thumb,q_auto/vehicle-images/Van/van_white.png",TRUCK:"https://res.cloudinary.com/autofleet/image/upload/w_700,h_500,c_thumb,q_auto/vehicle-images/Truck/truck_white.png",CONVERTIBLE:"https://res.cloudinary.com/autofleet/image/upload/w_700,h_500,c_thumb,q_auto/vehicle-images/Convertible/convertible_white.png",SUV:"https://res.cloudinary.com/autofleet/image/upload/w_700,h_500,c_thumb,q_auto/vehicle-images/SUV/suv_white.png",SHUTTLE:"https://res.cloudinary.com/autofleet/image/upload/w_700,h_500,c_thumb,q_auto/vehicle-images/Shuttle/shuttle_white.png",MOTORCYCLE:"https://res.cloudinary.com/autofleet/image/upload/f_auto,q_auto/v1/vehicle-images/Motorcycle/Scooter_white.png",BIKE:"https://res.cloudinary.com/autofleet/image/upload/f_auto,q_auto/v1/vehicle-images/Bike/Bicycle_white.png"};var V=n(95093),G=n.n(V);const U=new class{constructor(){this.INFINITY_CACHING_LIFETIME=0,this.getSuffix=e=>"",this.getFullKey=(e,t)=>e+this.getSuffix(t),this.prepareItem=e=>({data:e}),this.prepareWithExpireTime=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return{data:e,expiredAt:G()().add(t,"minutes")}},this.getItem=e=>{let{key:t,isGlobal:n}=e,a=localStorage.getItem(this.getFullKey(t,n));return a?(a=JSON.parse(a),a.expiredAt?G()().isBefore(a.expiredAt)?a.data:null:a.data):null},this.setItem=e=>{let{key:t,item:n,isGlobal:a}=e;localStorage.setItem(this.getFullKey(t,a),JSON.stringify(n))},this.clearCacheFromEntities=e=>{e.forEach(e=>{localStorage.removeItem(e)})},this.getGlobalItem=e=>this.getItem({...e,isGlobal:!0}),this.setGlobalItem=e=>this.setItem({...e,isGlobal:!0})}},Z={TOKEN:"token",REFRESH_TOKEN:"refreshToken",CONTEXTS:"contexts",LAST_EXPERIMENT_LIST_PAGE:"lastExperimentPage"};var H=n(65606);const q=()=>{window.location.href.includes("/enter-refresh-token")||window.location.replace("https://control.autofleet.io/logout"),U.clearCacheFromEntities(Object.values(Z))},K=(e,t)=>{(e=>{const t=U.prepareItem(e);U.setGlobalItem({key:Z.TOKEN,item:t})})(e),t&&(e=>{const t=U.prepareItem(e);U.setGlobalItem({key:Z.REFRESH_TOKEN,item:t})})(t)},J=()=>{const e=U.getGlobalItem({key:Z.CONTEXTS}),[t]=e||[];return(t||{}).fleetId},X=async()=>{const e=H.env.REACT_APP_PUBLIC_REFRESH_TOKEN||U.getGlobalItem({key:Z.REFRESH_TOKEN});try{const{apps:t,user:n,refreshToken:a,contexts:i}=await(async e=>ie(e))(e),l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];const[t]=e;return t?.query?.token}(t);return(e=>{if(!e)return null;const t=U.prepareItem(e);U.setGlobalItem({key:Z.CONTEXTS,item:t})})(i),l||q(),K(l,a),{user:n,contexts:i}}catch(e){return q()}};var Y=n(71083);const Q=["get","post","delete","head","put","patch","options"];class ee{constructor(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.axios=void 0,this.settings=void 0,this.settings=Object.assign(ee.defaultSettings,t),this.axios=Y.A.create(t),Q.map(t=>(this[t]=async function(){return e.axios[t](...arguments).catch(e=>{throw e.response&&401===e.response.status&&(window.location.href.includes("/login")||q()),e})},!0)),this.axios.interceptors.request.use(e=>{const t=H.env.REACT_APP_PUBLIC_TOKEN||U.getGlobalItem({key:Z.TOKEN}),n={...e};return t&&(n.headers.authorization=`Bearer ${t}`),n.params=n.params||{},n})}}ee.defaultSettings={baseURL:"/",timeout:2500};const te=new ee({baseURL:"/"}),ne=async e=>{const{data:t}=await te.delete(`/api/v1/experiments/${e}`);return t},ae=async e=>{const{data:t}=await te.get(`/api/v1/files/${encodeURIComponent(e)}/download`);return t},ie=async e=>{const{data:t}=await te.post("/api/v1/login/refresh",{refreshToken:e});return t},le="lastSearchKeyWord",re="new",oe=(0,a.createContext)({experiments:[{id:"new",name:"",variations:[],type:null}],isLoading:!0,handleFetchExperiments:e=>null,handleDeleteExperiment:e=>{},handleUpdateExperiment:(e,t)=>{},handleCreateExperiment:()=>null,handleGetExperiment:e=>{},handlePageChange:e=>{},handleSearchKeywordChanged:e=>{},handleCreateExperimentButton:()=>null,searchKeyWord:"",count:10,page:1}),se=e=>{let{children:t}=e;const[n,i]=(0,a.useState)(null),[l,o]=(0,a.useState)(!0),s=U.getGlobalItem({key:Z.LAST_EXPERIMENT_LIST_PAGE}),d=U.getGlobalItem({key:le}),[c,p]=(0,a.useState)(s),[u,m]=(0,a.useState)(d||""),[h,g]=(0,a.useState)(10),f=(0,r.Zp)(),{pathname:y}=(0,r.zy)(),v=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[c];try{const t=await Promise.all(e.map(async e=>(async(e,t)=>{const{data:n}=await te.get("/api/v1/experiments",{params:{page:e,searchKey:t||void 0}});return n})(e,u))),{experiments:n,count:a}=t.reduce((e,t)=>{let{experiments:n,count:a}=t;return e.experiments.push(...n),e.count=a,e},{experiments:[],count:0});g(a),i(n)}catch(e){console.error("Failed to fetch experiments")}};return(0,a.useEffect)(()=>{l&&o(!1)},[n]),(0,a.useEffect)(()=>{let e;return["/",M].includes(y)&&(v(),e=setInterval(v,5e3)),()=>{clearInterval(e)}},[c,y,u]),a.createElement(oe.Provider,{value:{experiments:n,isLoading:l,handleFetchExperiments:v,handleCreateExperiment:async()=>{P.trackEvent("trying to create experiment");const e={name:T.t("untitledExperimentName")},t=await(async e=>{const{data:t}=await te.post("/api/v1/experiments",e);return t})(e);return P.trackEvent("create experiment - successful"),t},handleDeleteExperiment:async e=>{await ne(e),v()},handleUpdateExperiment:async(e,t)=>{await(async(e,t)=>{const{data:n}=await te.patch(`/api/v1/experiments/${e}`,t);return n})(e,t),v()},handleGetExperiment:async e=>await(async e=>{const{data:t}=await te.get(`/api/v1/experiments/${e}`);return t})(e),handlePageChange:e=>{o(!0),(e=>{const t=U.prepareItem(e);U.setGlobalItem({key:Z.LAST_EXPERIMENT_LIST_PAGE,item:t})})(e),p(e)},handleCreateExperimentButton:async()=>{P.trackEvent("create experiment clicked");const e=L();f(`${e}/experiment/${re}/create-variation`)},handleSearchKeywordChanged:e=>{o(!0),(e=>{const t=U.prepareItem(e);U.setGlobalItem({key:le,item:t})})(e),m(e)},searchKeyWord:u,count:h,page:c}},t)},de=e=>{e(L()||"/")},ce=e=>{let{navigate:t,variation:n,isDraft:a=!1,isCloned:i=!1,readOnly:l}=e;const r=L();t(Y.A.getUri({url:`${r}/experiment/${n.experimentId}/create-variation`,params:{variationId:n.id,readOnly:l,draft:a,cloned:i}}))},pe=(0,a.createContext)({user:{},context:{}}),ue=()=>{const{context:e}=(0,a.useContext)(pe);return e.distanceSystem||(e.distanceSystem=j),e},me=e=>{let{children:t}=e;const[n,i]=(0,a.useState)({}),[l,o]=(0,a.useState)(!1),[s,d]=(0,a.useState)([{}]),c=(0,r.Zp)(),{search:p}=(0,r.zy)(),u=async()=>{const{user:e,contexts:t}=await X();d(t[0]),i(e),o(!0)};return(0,a.useEffect)(()=>{(()=>{const e=new URLSearchParams(p),t=e.get("token"),n=e.get("refreshToken");t||n?(K(t,n),u(),de(c)):u()})()},[]),a.createElement(pe.Provider,{value:{user:n,context:s}},l?t:"Loading")};var he=n(89296);const ge=o.default.button.withConfig({displayName:"styled__StyledButton",componentId:"sc-uiiej5-0"})(["border-radius:6px;background-color:",";box-shadow:",";font-size:",";font-weight:400;font-style:normal;font-stretch:normal;line-height:1.29;letter-spacing:normal;text-align:center;color:",";transition:all 0.25s ease 0s;cursor:pointer;border:0;padding:0.8em 1em;",";",""],e=>{let{backgroundColor:t}=e;return t},e=>{let{backgroundColor:t}=e;return"transparent"===t?"none":"rgb(51 70 85 / 24%) 0px 15px 29px 0px"},p,e=>{let{backgroundColor:t}=e;return"transparent"===t?`${w}`:`${v}`},e=>{let{backgroundColor:t}=e;return"transparent"!==t&&"&:hover {\n background-color: rgb(16, 120, 240);\n box-shadow: rgb(51 70 85 / 40%) 0px 10px 29px 0px;\n }\n \n &:active {\n background-color: rgb(4, 114, 237);\n box-shadow: rgb(51 70 85 / 50%) 0px 0px 20px 0px;\n }"},e=>{let{disabled:t}=e;return t&&"opacity: 0.7; cursor: unset;"}),fe=e=>{let{title:t,disabled:n=!1,displayLoader:i=!0,onClick:l=()=>null,backgroundColor:r,children:o,id:s}=e;return a.createElement(ge,{id:s,disabled:n,onClick:l,backgroundColor:r},t,o)},ye=o.default.div.withConfig({displayName:"styled__AddExperimentButtonContainer",componentId:"sc-1ilwh62-0"})(["width:fit-content;position:absolute;top:30px;margin-left:auto;right:50px;z-index:9999;"]),ve=()=>{const{handleCreateExperimentButton:e}=(0,a.useContext)(oe);return a.createElement(ye,null,a.createElement(fe,{id:"addExperimentButton",backgroundColor:h,title:T.t("addExperimentButton"),onClick:e}))};n(2815);const we=o.default.div.withConfig({displayName:"styled__OptionContainer",componentId:"sc-15c7bt7-0"})(["display:flex;align-items:flex-start;cursor:",";margin-bottom:20px;position:relative;"],e=>{let{disabled:t}=e;return!t&&"pointer"}),xe=o.default.div.withConfig({displayName:"styled__LabelContainer",componentId:"sc-15c7bt7-1"})(["display:flex;flex-direction:column;margin-left:10px;"]),Ee=o.default.div.withConfig({displayName:"styled__Label",componentId:"sc-15c7bt7-2"})(["color:",";font-size:",";font-weight:500;margin-bottom:5px;"],w,c),be=o.default.div.withConfig({displayName:"styled__Description",componentId:"sc-15c7bt7-3"})(["color:",";font-size:",";font-weight:300;"],w,c),Ce=o.default.input.withConfig({displayName:"styled__RadioButton",componentId:"sc-15c7bt7-4"})([":hover{cursor:",";}"],e=>{let{disabled:t}=e;return!t&&"pointer"}),_e=e=>{let{type:t,changeType:n,isSelected:i,disabled:l,id:r}=e;return a.createElement(we,{onClick:()=>!l&&n(t.value),disabled:l},a.createElement(Ce,{id:r,disabled:l,checked:i,onChange:()=>!l&&n(t.value),name:"simulationTypeRadio",value:t.value,type:"radio"}),a.createElement(xe,null,a.createElement(Ee,null,t.name),a.createElement(be,null,t.description)))},ke="addExperimentWizard.steps.details.simulationTypes",Se="rides",Ae="fieldServicing",Te=[{name:T.t(`${ke}.rides.name`),description:T.t(`${ke}.rides.description`),value:Se},{name:T.t(`${ke}.fieldServicing.name`),description:T.t(`${ke}.fieldServicing.description`),value:Ae}],Ie=e=>{let{title:t,onChange:n,value:i,enabledType:l,disabled:r}=e;return a.createElement(a.Fragment,null,t,Te.map(e=>a.createElement(_e,{id:e.name,isSelected:i===e.value,key:e.name,type:e,changeType:n,disabled:!!l&&l!==e.value||r})))};function Ne(){return Ne=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,children:n,reverse:i=!1,...l}=e,r=[n];return i&&(r=r.reverse()),a.createElement("div",Ne({className:t},l),r)},De=(0,o.default)(Me).withConfig({displayName:"Header",componentId:"sc-3h4x5c-0"})(["width:100%;max-height:60px;height:60px;display:flex;flex-direction:row;"]);Me.defaultProps={className:null,children:!1,reverse:!1};const Le=De,Be=o.default.div.withConfig({displayName:"Layout__MainView",componentId:"sc-1o55n9r-0"})(["display:flex;width:100%;height:100%;overflow:hidden;"]),Re=o.default.div.withConfig({displayName:"Layout__SidePanel",componentId:"sc-1o55n9r-1"})(["width:100px;min-width:100px;max-width:100px;display:flex;flex-direction:column;justify-content:center;position:relative;"]),Fe=o.default.div.withConfig({displayName:"Layout__ContentView",componentId:"sc-1o55n9r-2"})(["display:flex;flex-direction:column;height:100%;width:100%;"]),Oe=o.default.div.withConfig({displayName:"Layout__ContentContainer",componentId:"sc-1o55n9r-3"})(["height:",";border:1px solid rgb(223,223,223);border-right:none;border-radius:6px 0px 0px 6px;overflow:",";-ms-overflow-style:none;scrollbar-width:none;::-webkit-scrollbar{display:none;}"],e=>{let{withFooter:t}=e;return t?"calc(100vh - 110px)":"calc(100vh - 60px)"},e=>{let{withScroll:t}=e;return t?"scroll":"hidden"}),Pe=(o.default.div.withConfig({displayName:"Layout__ContentInnerPadding",componentId:"sc-1o55n9r-4"})(["padding:36px;"]),o.default.div.withConfig({displayName:"Layout__Footer",componentId:"sc-1o55n9r-5"})(["height:50px;max-height:50px;display:flex;align-items:center;justify-content:flex-end;padding:0 10px;"])),ze=o.default.div.withConfig({displayName:"Layout__WithPadding",componentId:"sc-1o55n9r-6"})(["padding:2em;min-width:700px;height:calc(100% - 4em);overflow-y:scroll !important;"]),je=e=>{let{children:t}=e;return a.createElement(Be,null,t)},We=e=>{let{children:t,showBottomBar:n=!1,sidePanelContent:i,headerContent:l,withScroll:r=!0,footerContent:o}=e;return a.createElement(je,null,a.createElement(Re,null,i),a.createElement(Fe,null,a.createElement(Le,null,l),a.createElement(Oe,{withScroll:r,withFooter:n},t),n&&a.createElement(Pe,null,o)))},$e=o.default.div.withConfig({displayName:"styled__Container",componentId:"sc-1v6aiag-0"})(["width:100%;display:flex;flex-direction:column;align-items:center;margin:3vh 0;cursor:pointer;justify-content:center;"]),Ve=o.default.div.withConfig({displayName:"styled__ContainerDisabled",componentId:"sc-1v6aiag-1"})(["width:100%;display:flex;flex-direction:column;align-items:center;margin:3vh 0;cursor:default;justify-content:center;"]),Ge=o.default.div.withConfig({displayName:"styled__MenuButtonTitle",componentId:"sc-1v6aiag-2"})(["font-size:",";display:none;color:",";",":hover &{display:flex;}",":hover &{display:flex;}"],c,f,$e,Ve),Ue=o.default.div.withConfig({displayName:"styled__IconContainer",componentId:"sc-1v6aiag-3"})(["height:100px;width:100%;align-items:center;display:flex;flex-direction:column;text-align:center;"]),Ze=e=>{let{buttonData:t,children:n,openScreen:i,closeUserTab:l,isUserPanelItem:s}=e;const d=(0,a.useRef)(null),[c,p]=(0,a.useState)(!1),u=(0,r.zy)(),[m]=u.pathname.split(/(?=\/)/g),h=!!t?.shouldDisable&&t.shouldDisable(),g=h?((e,t)=>(0,o.default)(e.pathsActive&&e.pathsActive.includes(t)?e.iconActive:e.icon).withConfig({displayName:"styled__getDisabledIconAccordingToPath",componentId:"sc-1v6aiag-5"})(["margin:20px 0;",":hover &{opacity:1;}"],Ve))(t,m):((e,t)=>(0,o.default)(e.pathsActive&&e.pathsActive.includes(t)?e.iconActive:e.icon).withConfig({displayName:"styled__getIconAccordingToPath",componentId:"sc-1v6aiag-4"})(["margin:20px 0;",":hover &{opacity:0.7;}"],$e))(t,m),f=e=>{d.current&&!d.current.contains(e.target)&&p(!0)};(0,a.useEffect)(()=>{c&&(l(),p(!1))},[c]),(0,a.useEffect)(()=>(document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}),[]);const y=h?Ve:$e;return a.createElement(y,{onClick:h?void 0:()=>t.onClick(),ref:s?d:null},a.createElement(Ue,null,a.createElement(g,null),a.createElement(Ge,null,t.title)),n)};var He=function(e){return a.createElement("svg",e,a.createElement("path",{d:"m0 0 5.688 6L12 0",transform:"rotate(180 6 3)",style:{fill:"current"}}))};He.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"current",height:"current",viewBox:"0 0 12 6"};const qe=o.default.div.withConfig({displayName:"styled__Container",componentId:"sc-1gauv2h-0"})(["min-width:300px;min-height:50px;position:absolute;z-index:999;left:99px;display:flex;justify-content:space-between;background-color:",";padding:10px;border-radius:6px;border:1px solid rgb(217,218,218);margin-top:-35px;"],v),Ke=o.default.div.withConfig({displayName:"styled__InfoContainer",componentId:"sc-1gauv2h-1"})(["padding:5px 0;"]),Je=o.default.div.withConfig({displayName:"styled__Name",componentId:"sc-1gauv2h-2"})(["color:",";font-size:",";font-weight:600;"],h,u),Xe=(o.default.div.withConfig({displayName:"styled__Status",componentId:"sc-1gauv2h-3"})(["color:",";font-size:",";"],f,d),o.default.div.withConfig({displayName:"styled__Text",componentId:"sc-1gauv2h-4"})(["color:",";font-size:",";margin:5px 0;"],g,c)),Ye=o.default.div.withConfig({displayName:"styled__Logout",componentId:"sc-1gauv2h-5"})(["cursor:pointer;font-weight:500;margin-top:5px;width:80px;min-width:80px;border-radius:45px;background-color:rgba(205,204,204,0.45);height:25px;font-size:",";color:",";display:flex;justify-content:center;line-height:25px;"],c,w),Qe=(0,o.default)(He).withConfig({displayName:"styled__Arrow",componentId:"sc-1gauv2h-6"})(["transform:rotate(270deg);position:absolute;width:15px;height:15px;left:-12px;top:45%;fill:",";stroke:",";"],v,f),et=()=>{const{user:e}=(0,a.useContext)(pe);return a.createElement(qe,{onClick:e=>e.stopPropagation()},a.createElement(Qe,null),a.createElement(Ke,null,a.createElement(Je,null,`${e.firstName} ${e.lastName}`),a.createElement(Xe,null,e.email),a.createElement(Xe,null,e.phone)),a.createElement(Ye,{onClick:q},T.t("logout")))};var tt=function(e){return a.createElement("svg",e,a.createElement("path",{fill:"#6F6F6F",fillRule:"evenodd",d:"M10.313 8.339a4.48 4.48 0 0 0 2.186-3.84 4.5 4.5 0 1 0-8.999 0 4.48 4.48 0 0 0 2.185 3.84 8.006 8.006 0 0 0-5.668 7.136.5.5 0 0 0 .504.523h14.957a.5.5 0 0 0 .503-.523 8.004 8.004 0 0 0-5.668-7.136zm-5.814-3.84c0-1.93 1.57-3.5 3.5-3.5s3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5-3.5-1.57-3.5-3.5zm-3.428 10.5a7.015 7.015 0 0 1 6.928-6.001 7.015 7.015 0 0 1 6.928 6.001H1.071z"}))};tt.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16"};var nt=function(e){return a.createElement("svg",e,a.createElement("path",{fill:"#6F6F6F",fillRule:"evenodd",d:"M14.499-.001H4.414a1 1 0 0 0-.708.293L.292 3.706a1.003 1.003 0 0 0-.293.707v12.085a.5.5 0 0 0 .5.501h14a.5.5 0 0 0 .5-.501v-16a.5.5 0 0 0-.5-.499zm-10.5 1.414v2.586H1.413l2.586-2.586zm10 14.586h-13v-11h2.889c.613 0 1.111-.499 1.111-1.111V.999h9v15zm-10-6h1v3h-1v-3zm3 3v-7h1v7h-1zm4 0h-1v-5h1v5z"}))};nt.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"15",height:"17"};var at=function(e){return a.createElement("svg",e,a.createElement("path",{fill:"#6F6F6F",fillRule:"evenodd",d:"M20.87 12.739a6.722 6.722 0 0 1-4.832 2.041H9.416l.127-.104c.412-.34.796-.737 1.171-1.214l5.324-.02a5.43 5.43 0 0 0 3.903-1.649 5.647 5.647 0 0 0 1.615-3.981c0-1.506-.573-2.92-1.615-3.982a5.436 5.436 0 0 0-3.903-1.648c-1.934 0-3.666 1.094-4.751 3.002a232.743 232.743 0 0 0-2.262 4.059c-.684 1.283-1.392 2.609-2.601 3.002-.182.06-.376.098-.579.115l-.241.01c-1.565 0-2.838-1.299-2.838-2.895 0-1.595 1.273-2.893 2.838-2.893.57 0 1.12.171 1.591.497l.043.03-.025.047c-.212.374-.41.729-.599 1.066l-.032.059-.053-.042a1.497 1.497 0 0 0-.925-.32c-.842 0-1.526.698-1.526 1.556 0 .859.684 1.557 1.521 1.557.154.008.29-.017.426-.062.707-.23 1.286-1.315 1.846-2.363 0 0 1.507-2.734 2.28-4.094 1.328-2.332 3.473-3.67 5.887-3.67a6.73 6.73 0 0 1 4.832 2.041 6.993 6.993 0 0 1 1.998 4.928 6.99 6.99 0 0 1-1.998 4.927zM7.729 6.115a3.872 3.872 0 0 0-4.903.531c-1.526 1.556-1.526 4.089 0 5.645a3.95 3.95 0 0 0 2.798 1.184h.002c.388 0 .768-.06 1.13-.178 1.62-.529 2.47-2.121 3.22-3.522 0-.001 1.482-2.689 2.248-4.037.52-.916 1.707-2.452 3.814-2.452 1.185 0 2.299.471 3.137 1.326a4.536 4.536 0 0 1 1.299 3.2 4.54 4.54 0 0 1-1.299 3.2 4.364 4.364 0 0 1-3.137 1.326h-4.546l.054-.09c.272-.452.518-.913.681-1.219l.017-.03h3.794c.835 0 1.62-.332 2.21-.934.589-.599.913-1.4.913-2.253 0-.854-.324-1.654-.913-2.254a3.073 3.073 0 0 0-2.21-.933c-1.448 0-2.299 1.118-2.679 1.785a402.585 402.585 0 0 0-2.229 4c-.783 1.464-1.853 3.47-3.974 4.162h-.001a4.91 4.91 0 0 1-1.529.241 5.256 5.256 0 0 1-3.728-1.576c-2.039-2.077-2.039-5.46 0-7.538a5.158 5.158 0 0 1 3.726-1.56h.004l.126.005a5.139 5.139 0 0 1 2.635.813l.046.029-.655 1.162-.051-.033z"}))};at.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"23",height:"15"};var it=function(e){return a.createElement("svg",e,a.createElement("defs",null,a.createElement("linearGradient",{id:"a",x1:"0%",x2:"0%",y1:"100%",y2:"0%"},a.createElement("stop",{offset:"0%",stopColor:"#1EF5B9"}),a.createElement("stop",{offset:"100%",stopColor:"#55C3FF"}))),a.createElement("path",{fill:"url(#a)",fillRule:"evenodd",d:"M10.312 8.339a4.48 4.48 0 0 0 2.186-3.84 4.499 4.499 0 1 0-8.999 0 4.48 4.48 0 0 0 2.186 3.84 8.006 8.006 0 0 0-5.668 7.136.5.5 0 0 0 .503.523h14.958a.501.501 0 0 0 .503-.523 8.007 8.007 0 0 0-5.669-7.136zm-5.813-3.84c0-1.93 1.57-3.5 3.5-3.5a3.504 3.504 0 0 1 3.499 3.5c0 1.93-1.57 3.5-3.499 3.5-1.93 0-3.5-1.57-3.5-3.5zm-3.429 10.5a7.017 7.017 0 0 1 6.929-6.001c3.496 0 6.44 2.596 6.928 6.001H1.07z"}))};it.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16"};var lt=function(e){return a.createElement("svg",e,a.createElement("defs",null,a.createElement("linearGradient",{id:"a",x1:"0%",x2:"0%",y1:"100%",y2:"0%"},a.createElement("stop",{offset:"0%",stopColor:"#1EF5B9"}),a.createElement("stop",{offset:"100%",stopColor:"#55C3FF"}))),a.createElement("path",{fill:"url(#a)",fillRule:"evenodd",d:"M14.499-.001H4.413a.997.997 0 0 0-.707.293L.292 3.706a1 1 0 0 0-.293.707v12.085a.5.5 0 0 0 .5.501h14a.5.5 0 0 0 .5-.501v-16a.5.5 0 0 0-.5-.499zm-10.5 1.414v2.586H1.413l2.586-2.586zm10 14.586h-13v-11h2.889c.612 0 1.111-.499 1.111-1.111V.999h9v15zm-10-6h1v3h-1v-3zm3 3v-7h1v7h-1zm4 0h-1v-5h1v5z"}))};lt.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"15",height:"17"};var rt=function(e){return a.createElement("svg",e,a.createElement("defs",null,a.createElement("linearGradient",{id:"a",x1:"0%",x2:"0%",y1:"100%",y2:"0%"},a.createElement("stop",{offset:"0%",stopColor:"#1EF5B9"}),a.createElement("stop",{offset:"100%",stopColor:"#55C3FF"}))),a.createElement("path",{fill:"url(#a)",fillRule:"evenodd",d:"M20.869 12.739a6.72 6.72 0 0 1-4.832 2.041H9.416l.126-.104c.413-.34.797-.737 1.172-1.214l5.323-.02a5.433 5.433 0 0 0 3.904-1.649 5.65 5.65 0 0 0 1.615-3.981c0-1.506-.574-2.92-1.615-3.982a5.438 5.438 0 0 0-3.904-1.648c-1.933 0-3.666 1.094-4.751 3.002A232.743 232.743 0 0 0 9.3 8.734c-.082.147-.275.509-.275.509-.684 1.283-1.392 2.609-2.601 3.002a2.53 2.53 0 0 1-.579.115l-.241.01c-1.566 0-2.838-1.299-2.838-2.895 0-1.595 1.272-2.893 2.838-2.893.569 0 1.12.171 1.59.497l.044.03-.025.047c-.212.374-.41.729-.599 1.066l-.032.059-.053-.042a1.499 1.499 0 0 0-.925-.32c-.842 0-1.527.698-1.527 1.556 0 .859.685 1.557 1.522 1.557.154.008.289-.017.426-.062.706-.23 1.285-1.315 1.845-2.363 0 0 1.507-2.734 2.281-4.094 1.327-2.332 3.472-3.67 5.886-3.67 1.825 0 3.541.726 4.832 2.041a6.994 6.994 0 0 1 1.999 4.928c0 1.863-.71 3.612-1.999 4.927zM7.728 6.115a3.872 3.872 0 0 0-4.903.531c-1.525 1.556-1.525 4.089 0 5.645a3.95 3.95 0 0 0 2.798 1.184h.002c.388 0 .768-.06 1.13-.178 1.62-.529 2.471-2.121 3.22-3.522 0-.001 1.483-2.689 2.248-4.037.521-.916 1.707-2.452 3.814-2.452 1.186 0 2.299.471 3.138 1.326a4.535 4.535 0 0 1 1.298 3.2c0 1.209-.46 2.346-1.298 3.2a4.366 4.366 0 0 1-3.138 1.326h-4.545l.054-.09c.271-.452.517-.913.68-1.219l.017-.03h3.794c.835 0 1.62-.332 2.21-.934.589-.599.914-1.4.914-2.253 0-.854-.325-1.654-.914-2.254a3.073 3.073 0 0 0-2.21-.933c-1.447 0-2.298 1.118-2.678 1.785a363.897 363.897 0 0 0-2.229 4c-.783 1.464-1.854 3.47-3.975 4.162a4.917 4.917 0 0 1-1.53.241 5.255 5.255 0 0 1-3.727-1.576c-2.039-2.077-2.039-5.46 0-7.538a5.156 5.156 0 0 1 3.726-1.56h.004l.125.005a5.136 5.136 0 0 1 2.635.813l.047.029-.656 1.162-.051-.033z"}))};rt.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"23",height:"15"};const ot="USER",st=e=>{let{onClickReports:t,onClickExperiments:n}=e;const[i,l]=(0,a.useState)(!1),o=(0,r.zy)(),[s,d]=(0,a.useState)(),c=[{id:"EXPERIMENTS",icon:at,iconActive:rt,onClick:()=>{d(T.t("menu.experiments")),n()},title:T.t("menu.experiments"),pathsActive:["/","/experiment"]},{id:"REPORTS",icon:nt,iconActive:lt,shouldDisable:()=>!D(),onClick:()=>{d(T.t("menu.reports")),t()},title:T.t("menu.reports")},{id:ot,icon:tt,iconActive:it,onClick:()=>{l(!i)},title:T.t("menu.user")}];return(0,a.useEffect)(()=>{d(o.pathname||T.t("menu.experiments"))},[]),a.createElement(a.Fragment,null,c.map(e=>{const t=e.id===ot&&i;return a.createElement(Ze,{key:e.title,buttonData:e,closeUserTab:()=>l(!1),openScreen:s,isUserPanelItem:e.id===ot},t&&a.createElement(et,null))}))};var dt=n(20312),ct=n.n(dt);const pt=o.default.div.withConfig({displayName:"styled__PopupContainer",componentId:"sc-8se1h-0"})(["position:relative;border-radius:6px;overflow:hidden;height:100%;width:100%;"]),ut=o.default.div.withConfig({displayName:"styled__Header",componentId:"sc-8se1h-1"})(["background-color:#d9d9db;font-size:",";height:14%;color:",";display:flex;justify-content:center;align-items:center;"],u,w),mt=o.default.div.withConfig({displayName:"styled__Body",componentId:"sc-8se1h-2"})(["display:flex;justify-content:center;flex-direction:column;align-items:center;text-align:center;height:65%;padding:10px;"]),ht=o.default.div.withConfig({displayName:"styled__FooterContainer",componentId:"sc-8se1h-3"})(["width:100%;height:20%;display:flex;flex-direction:row;justify-content:center;"]),gt=o.default.div.withConfig({displayName:"styled__SubmitButton",componentId:"sc-8se1h-4"})([" min-width:120px;height:37px;border-radius:4px;background-color:",";",";padding:0 10px;font-size:",";color:",";cursor:pointer;display:flex;line-height:37px;justify-content:center;"],e=>{let{isCritical:t,isBack:n}=e;return((e,t)=>e?y:t?"none":h)(t,n)},e=>{let{isBack:t}=e;return!t&&"box-shadow: rgb(51 70 85 / 24%) 0px 15px 29px 0px"},p,e=>{let{isBack:t}=e;return t?w:v});gt.defaultProps={isCritical:!0,isBack:!1};const ft=e=>{let{onClickSubmitButton:t,submitButtonText:n,onClickCloseButton:i,closeButtonText:l,isCritical:r}=e;return a.createElement(ht,null,l?a.createElement(gt,{onClick:i,isBack:!0,isCritical:!1},l):null,a.createElement(gt,{onClick:t,isCritical:r},n))},yt=ft;ft.defaultProps={isCritical:!0};const vt=e=>{let{closeOnBackdropPress:t,title:n,closeOnEsc:i,isVisible:l,onClose:r,children:o,onClickSubmitButton:s,submitButtonText:d,onClickCloseButton:c,closeButtonText:p,isCritical:u}=e;return a.createElement(ct(),{style:{content:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:550,height:380,padding:0},overlay:{zIndex:999,backgroundColor:"rgba(51,51,51,0.9)"}},backdropOpacity:.85,shouldCloseOnOverlayClick:t,shouldCloseOnEsc:i,isOpen:l,onRequestClose:r,ariaHideApp:!1},a.createElement(pt,null,a.createElement(ut,null,n),a.createElement(mt,null,o),a.createElement(yt,{isCritical:u,onClickSubmitButton:s,submitButtonText:d,onClickCloseButton:c,closeButtonText:p})))},wt=vt;vt.defaultProps={isCritical:!0};var xt=n(32885);const Et=o.default.div.withConfig({displayName:"styled__TableContainer",componentId:"sc-wma50k-0"})(["margin-bottom:25px;"]),bt=o.default.div.withConfig({displayName:"styled__TableHeaderContainer",componentId:"sc-wma50k-1"})(["font-size:",";letter-spacing:0.2px;text-align:left;color:rgba(92,92,92,0.5);display:flex;margin-bottom:0.5em;",";"],d,e=>{let{padding:t}=e;return t&&`padding: ${t}`}),Ct=o.default.div.withConfig({displayName:"styled__HeaderColumn",componentId:"sc-wma50k-2"})(["",";",";"],e=>{let{width:t}=e;return t&&`width: ${t}`},e=>{let{width:t}=e;return t&&`minWidth: ${t}`}),_t=o.default.div.withConfig({displayName:"styled__TableRowContainer",componentId:"sc-wma50k-3"})(["display:flex;width:100%;border-radius:4px;background-color:rgb(255,255,255);box-shadow:rgb(157 165 180 / 42%) 0px 1px 3px 0px;padding:1em 0 1em 0.5em;margin-bottom:1em;align-items:center;&:hover{box-shadow:0px 2px 5px 0 rgb(157 165 180 / 50%);}"]),kt=o.default.div.withConfig({displayName:"styled__TableRow",componentId:"sc-wma50k-4"})(["display:flex;border:none;background-color:rgb(255,255,255);align-items:center;font-size:",";flex-grow:1;"],c),St=o.default.div.withConfig({displayName:"styled__TableBody",componentId:"sc-wma50k-5"})(["color:#333;"]),At=o.default.text.withConfig({displayName:"styled__CellContainer",componentId:"sc-wma50k-6"})([""," "," text-align:left;"],e=>{let{columnDetails:t}=e;return t?.width&&`width: ${t.width};`},e=>{let{columnDetails:t}=e;return t?.width&&`minWidth: ${t.width};`}),Tt=o.default.button.withConfig({displayName:"styled__AddVariantRow",componentId:"sc-wma50k-7"})(["width:100%;min-width:700px;height:30px;line-height:30px;border-radius:4px;background-color:#f7f7f8;font-size:",";color:",";text-align:center;border:none;cursor:pointer;margin:5px 0;&:hover{background-color:rgb(241 241 241);}"],d,h);function It(){return It=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{columns:t,data:n,experiment:i}=e;const l=(0,r.Zp)(),{getTableProps:o,getTableBodyProps:s,headerGroups:d,rows:c,prepareRow:p}=(0,xt.useTable)({columns:t,data:n},xt.useExpanded);return a.createElement(Et,o(),d.map((e,t)=>a.createElement(bt,It({key:t,padding:0===t?"0":"1em 0 1em 1em;"},e.getHeaderGroupProps()),e.headers.map(e=>a.createElement(Ct,It({key:e.Header},e.getHeaderProps(),e),e.render("Header"))))),a.createElement(St,s(),c.map(e=>{p(e);const n=e.original,i=n.status===z.DRAFT,r={onClick:e=>{if(e.ctrlKey||e.metaKey)return e.preventDefault(),e.stopPropagation(),void(async e=>{try{await navigator.clipboard.writeText(e),console.log("Variation ID copied to clipboard:",e)}catch(t){console.error("Failed to copy variation ID:",t);const n=document.createElement("textarea");n.value=e,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}})(n.id);"path"!==e.target.nodeName&&ce({readOnly:!i,variation:n,isDraft:i,navigate:l})},style:{cursor:"pointer"}};return a.createElement(_t,{key:e.id},a.createElement(kt,It({},e.getRowProps(r),{"data-test-id":`variationRow-${n.id}`}),e.cells.map((e,n)=>a.createElement(At,It({},e.getCellProps(()=>({style:{color:"Tags"===e.column.Header?`${h}`:"rgba(51, 51, 51, 0.9)",fontSize:"Tags"===e.column.Header?"default":"13px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}})),{columnDetails:t[0].columns[n],key:t[0].columns[n].accessor}),e.render("Cell")))))}),a.createElement(Tt,{onClick:()=>{const e=L();l(`${e}/experiment/${i.id}/create-variation`)}},T.t("addVariationButton"))))};var Mt=n(8727);const Dt=e=>e.show?a.createElement(Mt.A,e):e.children,Lt=o.default.div.withConfig({displayName:"styled__StatusContainer",componentId:"sc-1afsryc-0"})(["position:relative;display:flex;flex-direction:row;align-content:center;width:100%;align-items:center;justify-content:space-between;"]),Bt=o.default.div.withConfig({displayName:"styled__StatusCircle",componentId:"sc-1afsryc-1"})(["margin:auto 0;border-radius:50px;",";height:7px;min-width:7px;width:7px;"],e=>{let{state:t}=e;switch(t){case z.PENDING:return"background-color: #676767";case z.DISPATCHING:return`background-color: ${h}`;case z.FAILED:return`background-color: ${y}`;case z.RUNNING:return`background-color: ${h}`;case z.COMPLETED:return"background-color: #20f2bc";case z.PREPARING_DATA:return"background-color: #329F76";default:return"background-color: #676767"}}),Rt=o.default.text.withConfig({displayName:"styled__CurrentStatus",componentId:"sc-1afsryc-2"})(["line-height:100%;",";margin-left:10px;text-align:left;text-transform:capitalize;"],e=>{let{width:t}=e;return t&&`width: ${t}`}),Ft=o.default.div.withConfig({displayName:"styled__StatusBarContainer",componentId:"sc-1afsryc-3"})(["width:55px;position:relative;display:flex;"]),Ot=o.default.div.withConfig({displayName:"styled__DefaultStatusBar",componentId:"sc-1afsryc-4"})(["width:100%;height:3px;background-color:#dfe0e1;border-radius:10px;margin:auto;"]),Pt=o.default.div.withConfig({displayName:"styled__CurrentStatusBar",componentId:"sc-1afsryc-5"})(["",";height:3px;background-color:",";border-radius:10px;margin:auto 0;position:absolute;top:0;left:0;bottom:0;right:0;"],e=>{let{percentageCompleted:t}=e;return`width: ${t&&t>1?t:1}%`},h),zt=o.default.div.withConfig({displayName:"styled__StatusBarSection",componentId:"sc-1afsryc-6"})(["display:flex;flex-direction:row;width:50%;"]),jt=e=>{let{cell:t}=e;const n=Math.round(100*t.row.original.progress),i=t.row.original;return a.createElement(Lt,null,a.createElement(Dt,{placement:"bottom",show:!!i.errorType&&D(),overlay:`${i.errorType} - ${i.errorDetails}`,type:"error",overlayStyle:{width:"fit-content",height:"fit-content"}},a.createElement(zt,null,a.createElement(Bt,{state:t.value}),a.createElement(Rt,{"data-test-id":"statusText",width:"80%"},T.t(`variationStatus.${t.value}`)))),a.createElement(zt,null,i.progress&&t.value===z.RUNNING?a.createElement(a.Fragment,null,a.createElement(Ft,null,a.createElement(Ot,null),a.createElement(Pt,{percentageCompleted:n})),a.createElement(Rt,{width:"50px"},n,"%")):null))},Wt=o.default.div.withConfig({displayName:"styled__FlexRowContainer",componentId:"sc-7kkglf-0"})(["display:flex;flex-direction:row;align-items:center;"]),$t=o.default.button.withConfig({displayName:"styled__FlexRowSVGContainer",componentId:"sc-7kkglf-1"})(["display:flex;flex-direction:row;align-items:center;cursor:pointer;background-color:transparent;border:none;:disabled{cursor:default;}",""],e=>{let{withText:t}=e;return t?"padding: 10px;":""}),Vt=o.default.div.withConfig({displayName:"styled__HiddenDropdownContainer",componentId:"sc-7kkglf-2"})(["display:flex;flex-direction:row;position:relative;"]),Gt=o.default.div.withConfig({displayName:"styled__HiddenDropdown",componentId:"sc-7kkglf-3"})(["display:",";flex-direction:",";align-content:center;position:absolute;top:",";",";background-color:white;box-shadow:0px 2px 5px 0 rgb(157 165 180 / 50%);z-index:999;align-items:center;",""],e=>{let{isHover:t}=e;return t?"none":"flex"},e=>{let{flexDirection:t}=e;return t||"row"},e=>{let{top:t}=e;return t||"32px"},e=>{let{flexDirection:t}=e;return"column"===t&&"right: 0px"},e=>{let{isHover:t}=e;return t&&`${Vt}:hover & {\ndisplay: flex;\n}`});function Ut(){return Ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{children:t,...n}=e;return a.createElement("div",Ut({},n,{onClick:e=>e.stopPropagation()}),t)},Ht={"font-size":p,"font-weight":300,color:w,width:"100px","text-align":"left",display:"flex","align-items":"center",transition:"0.25s"},qt=o.default.text.withConfig({displayName:"styled__EnabledButtonText",componentId:"sc-1f74x84-0"})(["",";",":hover &{color:",";}"],Ht,$t,h),Kt=o.default.text.withConfig({displayName:"styled__DisabledButtonText",componentId:"sc-1f74x84-1"})(["",";opacity:.5;"],Ht),Jt={transition:"fill 0.25s","margin-right":"10px"},Xt=o.default.div.withConfig({displayName:"styled__DisabledStrokeButtonIcon",componentId:"sc-1f74x84-2"})(["svg{"," ",";fill:transparent;stroke:",";opacity:.5;}"],Jt,e=>{let{withText:t}=e;return t?"margin-right: 10px;":"margin-right: 0;"},e=>{let{defaultStroke:t}=e;return t}),Yt=o.default.div.withConfig({displayName:"styled__EnabledStrokeButtonIcon",componentId:"sc-1f74x84-3"})(["svg{"," ",";fill:transparent;stroke:",";",":hover &{stroke:",";}}"],Jt,e=>{let{withText:t}=e;return t?"margin-right: 10px;":"margin-right: 0;"},e=>{let{defaultStroke:t}=e;return t},$t,e=>{let{hoverStroke:t}=e;return t}),Qt=o.default.div.withConfig({displayName:"styled__EnabledFillButtonIcon",componentId:"sc-1f74x84-4"})(["svg{"," ",";fill:",";",":hover &{fill:","}}"],Jt,e=>{let{withText:t}=e;return t?"margin-right: 10px;":"margin-right: 0;"},e=>{let{defaultFill:t}=e;return t},$t,e=>{let{hoverFill:t}=e;return t}),en=o.default.div.withConfig({displayName:"styled__DisabledFillButtonIcon",componentId:"sc-1f74x84-5"})(["svg{"," ",";fill:",";opacity:.5;}"],Jt,e=>{let{withText:t}=e;return t?"margin-right: 10px;":"margin-right: 0;"},e=>{let{defaultFill:t}=e;return t}),tn=e=>{let{title:t,svg:n,onClick:i,disabled:l}=e;const r=l?Kt:qt,o=l?en:Qt;return a.createElement($t,{withText:!!t,onClick:i,disabled:l},a.createElement(o,{withText:!!t,defaultFill:g,hoverFill:h},n),t?a.createElement(r,null,t):void 0)},nn=e=>{let{title:t,svg:n,onClick:i,disabled:l}=e;const r=l?Kt:qt,o=l?Xt:Yt;return a.createElement($t,{withText:!!t,onClick:i,disabled:l},a.createElement(o,{withText:!!t,defaultStroke:g,hoverStroke:h},n),t?a.createElement(r,null,t):void 0)};var an=function(e){return a.createElement("svg",e,a.createElement("defs",null,a.createElement("style",null,".cls-eye","{","fill:current;stroke:current;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px","}")),a.createElement("g",{id:"Icon_feather-eye",transform:"translate(-.75 -5.25)"},a.createElement("path",{id:"Path_110",className:"cls-eye",d:"M1.5 11s2.545-5 7-5 7 5 7 5-2.545 5-7 5-7-5-7-5z"}),a.createElement("path",{id:"Path_111",className:"cls-eye",d:"M17.341 15.42a1.92 1.92 0 1 1-1.92-1.92 1.92 1.92 0 0 1 1.92 1.92z",transform:"translate(-6.92 -4.42)"})))};an.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"15.5",height:"11.5"};var ln=function(e){return a.createElement("svg",e,a.createElement("defs",null,a.createElement("style",null,".cls-delete","{","fill:transparent;stroke:current;stroke-width:1.5px;fill-rule:evenodd","}")),a.createElement("g",{id:"_-e-delete",transform:"translate(-1281.25 -317.25)"},a.createElement("path",{id:"Path_91",className:"cls-delete",d:"M5120 677h6a2 2 0 0 1 2 2l-1 7a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2l-1-7a2 2 0 0 1 2-2z",transform:"translate(-3835 -356)"}),a.createElement("path",{id:"Path_92",className:"cls-delete",d:"M5120 677v-2a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2",transform:"translate(-3835 -356)"}),a.createElement("path",{id:"Rectangle_164",transform:"translate(1282 321)",style:{fill:"transparent",stroke:"current",strokeWidth:"1.5px"},d:"M0 0h12v1H0z"})))};ln.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"13.5",height:"15.5"};var rn=function(e){return a.createElement("svg",e,a.createElement("defs",null,a.createElement("style",null,".cls-clone,.cls-clone2","{","fill:current;stroke:current;stroke-width:1.5px","}",".cls-clone","{","stroke-linejoin:round","}")),a.createElement("g",{id:"Group_4096",transform:"translate(-1271.25 -437.734)"},a.createElement("path",{id:"Rectangle_2496",className:"cls-clone",transform:"translate(1275 441.484)",d:"M0 0h12v12H0z"}),a.createElement("path",{id:"Path_649",className:"cls-clone",d:"M.5 12.5V.5h12",transform:"translate(1271.5 437.984)"}),a.createElement("path",{id:"Line_106",className:"cls-clone2",transform:"translate(1281 444.484)",d:"M0 0v6"}),a.createElement("path",{id:"Line_107",className:"cls-clone2",transform:"rotate(90 418.258 865.742)",d:"M0 0v6"})))};rn.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"16.5",height:"16.5"};var on=function(e){return a.createElement("svg",e,a.createElement("path",{style:{stroke:"none",fillRule:"nonzero",fill:"#000",fillOpacity:"1"},d:"m1.938 1.668-.09.078-.008 3.191c-.008 2.36 0 3.211.023 3.266.02.043.063.102.102.129.062.055.137.055 5.035.055h4.969l.07-.059a.328.328 0 0 0 .102-.152c.02-.07.027-1.074.02-3.266l-.009-3.164-.09-.078-.085-.078H2.023Zm9.82 3.144v2.649H2.242v-5.3h9.516ZM.984 10.324C.02 12.262.06 12.148.246 12.32l.094.09h13.32l.094-.09c.187-.172.226-.058-.738-1.996l-.875-1.746H1.859Zm11.23-.61c.243.509.446.942.458.966.015.043-.39.047-5.668.047-3.129 0-5.688-.008-5.688-.016s.204-.445.454-.969l.453-.949h9.55Zm-3.827 1.169c0 .012.043.265.093.57.055.3.098.574.098.606 0 .054-.008.054-1.578.054H5.422v-.062c0-.035.043-.305.098-.606.05-.297.093-.55.093-.566 0-.008.625-.016 1.387-.016.766 0 1.387.008 1.387.02Zm0 0"}),a.createElement("path",{style:{stroke:"none",fillRule:"nonzero",fill:"#000",fillOpacity:"1"},d:"M2.313 8.918c-.036.09-.016.098.19.09.18-.008.216-.016.25-.07l.036-.063h-.23c-.184 0-.235.008-.247.043ZM2.871 8.93c-.02.027-.02.054-.012.066a.899.899 0 0 0 .215.016c.168 0 .203-.008.227-.051a.287.287 0 0 0 .027-.066c0-.012-.098-.02-.219-.02-.18 0-.218.008-.238.055ZM3.426 8.918c-.031.09-.012.098.203.09.203-.008.226-.016.246-.07.023-.063.02-.063-.203-.063-.184 0-.23.008-.246.043ZM4 8.895c-.012.007-.02.043-.02.07 0 .043.028.047.2.047.195 0 .265-.028.265-.102 0-.027-.058-.035-.215-.035-.117 0-.222.008-.23.02ZM4.543 8.922c-.031.074.02.094.227.086.175-.008.203-.016.222-.07.02-.063.016-.063-.207-.063-.187 0-.23.008-.242.047ZM5.098 8.945c0 .07 0 .07.222.063.207-.008.227-.016.235-.07.008-.06 0-.063-.223-.063-.234 0-.234 0-.234.07ZM5.66 8.934c-.02.074.016.086.242.074.172-.008.188-.016.196-.07.007-.06.004-.063-.207-.063-.196 0-.22.008-.23.059ZM6.219 8.938c.008.058.02.062.222.062.207 0 .22-.004.227-.063.008-.058.004-.062-.227-.062-.226 0-.234.004-.222.063ZM6.781 8.945c0 .067.004.067.219.067s.219 0 .219-.067c0-.07-.004-.07-.219-.07s-.219 0-.219.07ZM7.332 8.938c.008.054.023.062.234.07.223.008.223.008.223-.063 0-.07-.004-.07-.234-.07-.227 0-.23.004-.223.063ZM7.902 8.938c.008.054.024.062.211.07.211.008.262-.012.23-.086-.015-.04-.058-.047-.234-.047-.21 0-.214.004-.207.063ZM8.441 8.902c0 .094.036.11.246.11.215 0 .215 0 .215-.067 0-.07 0-.07-.23-.07-.129 0-.23.012-.23.027ZM9.02 8.938c.007.054.023.062.23.07.223.008.242 0 .207-.09-.012-.035-.059-.043-.234-.043-.207 0-.215.004-.203.063ZM9.555 8.895c0 .007.015.035.027.066.027.043.063.05.23.05.11 0 .204-.007.211-.015.008-.008.012-.039.004-.066-.015-.047-.043-.055-.242-.055-.125 0-.23.008-.23.02ZM10.125 8.938c.02.054.043.062.246.07.215.008.234 0 .203-.09-.015-.035-.062-.043-.246-.043-.223 0-.226 0-.203.063ZM10.672 8.895c0 .007.012.035.027.066.024.043.059.05.242.05a.816.816 0 0 0 .22-.015.231.231 0 0 0-.028-.066c-.024-.047-.059-.055-.242-.055-.121 0-.22.008-.22.02ZM11.246 8.938c.035.054.07.062.25.07.207.008.227 0 .191-.09-.011-.035-.062-.043-.246-.043h-.23ZM2.188 9.172c-.067.129-.063.133.238.117l.222-.012.043-.093c.02-.051.04-.102.04-.106 0-.008-.11-.012-.247-.012h-.242ZM2.84 9.078c0 .004-.02.055-.043.11l-.04.097h.513L3.3 9.2a.6.6 0 0 0 .028-.11c0-.01-.11-.023-.242-.023-.137 0-.246.004-.246.012ZM3.414 9.168a.795.795 0 0 0-.023.105c.007.004.421.02.472.012.016 0 .04-.031.047-.066a.601.601 0 0 1 .035-.11c.012-.039-.02-.043-.242-.043h-.258ZM4.055 9.086c-.008.012-.02.062-.032.11l-.02.09.173.003c.328.008.332.008.363-.137l.02-.086h-.25c-.133 0-.25.008-.254.02ZM4.64 9.176l-.027.11.14.003c.157.008.352-.004.364-.02.008-.003.02-.054.035-.105l.02-.098h-.504ZM5.277 9.098c-.054.172-.05.187.055.191.102.004.402-.008.406-.016.004 0 .012-.05.024-.105l.015-.102h-.246c-.172 0-.25.012-.254.032ZM5.867 9.16a.356.356 0 0 0-.004.11c.016.015.149.027.344.02l.168-.005v-.219h-.488ZM6.484 9.172c0 .062.012.11.036.117.015.008.132.008.257 0L7 9.277v-.21h-.516ZM7.11 9.176v.11h.488v-.22h-.489ZM7.707 9.172v.11l.23.007c.278.012.286.008.286-.074 0-.14-.016-.149-.274-.149h-.242ZM8.32 9.168c.012.055.02.105.024.11.011.011.476.019.488.003.008-.008.008-.058 0-.113l-.02-.102h-.511ZM8.938 9.164c.007.055.019.106.027.106.008.011.312.023.418.02l.086-.005-.055-.219h-.492ZM9.543 9.152c.012.051.031.102.039.118.027.023.457.027.484.003.008-.007.004-.054-.011-.101l-.024-.09-.254-.008-.254-.011ZM10.16 9.152c.016.051.04.102.05.118.024.023 1.056.027 1.08.007a.344.344 0 0 0-.036-.113l-.05-.098h-1.075ZM11.324 9.082c0 .027.086.188.11.203a.878.878 0 0 0 .226.004l.207-.012-.11-.21h-.214c-.121 0-.219.003-.219.015ZM2.117 9.36a.605.605 0 0 0-.12.21c0 .008.19.012.429.012h.426l.043-.105c.027-.059.039-.114.03-.122-.019-.023-.773-.02-.808.004ZM3.047 9.398a.682.682 0 0 0-.059.122c-.015.062-.011.062.239.062h.261l.04-.102c.023-.054.034-.109.027-.12-.004-.012-.114-.02-.239-.02-.21 0-.234.004-.27.058ZM3.691 9.371a.585.585 0 0 0-.058.121l-.031.09h.53l.028-.105c.016-.063.024-.118.016-.125-.031-.028-.461-.012-.485.02ZM4.316 9.371a.45.45 0 0 0-.05.121l-.02.09h.262c.25 0 .262 0 .277-.062.035-.176.047-.168-.207-.176-.168-.004-.242.004-.262.027ZM4.938 9.387a.834.834 0 0 0-.043.12l-.016.075h.539l.012-.102a.294.294 0 0 0 0-.12c-.004-.012-.114-.02-.239-.02-.191 0-.234.008-.253.047ZM5.559 9.41c-.063.164-.051.172.23.172h.25l.016-.098a.273.273 0 0 0 .004-.125c-.008-.011-.118-.02-.247-.02-.222 0-.23 0-.253.071ZM6.203 9.36c-.004.007-.02.066-.031.12l-.02.102h.551l-.008-.117-.008-.113-.238-.008c-.125-.004-.238.004-.246.015ZM6.828 9.355c-.012.012-.02.067-.02.125v.102h.52l-.008-.117-.008-.113-.23-.008c-.129-.004-.242 0-.254.011ZM7.453 9.355c-.012.012-.02.067-.02.125v.102h.536l-.016-.117-.016-.113-.23-.008c-.129-.004-.242 0-.254.011ZM8.074 9.367c-.011.02-.011.07-.004.125l.02.09h.52l-.02-.098a2.112 2.112 0 0 0-.027-.125c-.024-.03-.47-.023-.489.008ZM8.703 9.36a.318.318 0 0 0 0 .124l.02.098h.53l-.034-.117-.031-.113-.235-.008c-.133-.004-.242.004-.25.015ZM9.328 9.36c-.008.015-.004.07.012.124l.027.098h.516l-.016-.074c-.043-.164-.05-.168-.297-.168a1 1 0 0 0-.242.02ZM9.953 9.36c-.008.015 0 .07.016.124l.031.098h.531l-.047-.117-.05-.113-.235-.008c-.125-.004-.238.004-.246.015ZM10.578 9.363c-.035.055.063.215.149.246.062.02.097.059.144.164l.055.137h.668l-.055-.133c-.031-.07-.086-.195-.129-.277l-.074-.148-.371-.008c-.207-.004-.38.008-.387.02ZM11.48 9.355c-.007.012.008.067.036.122l.054.105h.215a.933.933 0 0 0 .219-.012.605.605 0 0 0-.121-.21c-.035-.024-.38-.028-.403-.005ZM1.938 9.71a.576.576 0 0 0-.106.185c0 .007.238.015.527.015h.52l.043-.105c.027-.063.039-.117.031-.125a4.38 4.38 0 0 0-.496-.016c-.422 0-.484.008-.52.047ZM3.102 9.684c-.02.02-.098.195-.098.214 0 .008.121.012.27.012h.269l.027-.086c.055-.156.051-.16-.207-.16-.136 0-.254.008-.261.02ZM3.715 9.738a.79.79 0 0 1-.047.121c-.02.047.008.051.254.051h.273l.028-.086c.054-.156.05-.16-.227-.16-.254 0-.254 0-.281.074ZM4.379 9.7c-.008.015-.024.073-.043.12l-.024.09h.266c.149 0 .277-.008.281-.023a.534.534 0 0 0 .032-.121l.02-.102h-.263c-.187 0-.265.012-.27.035ZM5.016 9.734c-.067.168-.055.176.242.176h.27l.011-.105a.301.301 0 0 0 0-.121c-.004-.012-.121-.02-.254-.02-.238 0-.246.004-.27.07ZM5.668 9.734c-.066.168-.055.176.246.176h.27v-.246h-.247c-.238 0-.246.004-.269.07ZM6.309 9.75c-.032.164-.04.16.257.16h.27v-.246h-.508ZM6.965 9.68c-.012.011-.02.07-.02.125v.105h.547l-.008-.117-.007-.113-.247-.008c-.136-.004-.253 0-.265.008ZM7.613 9.691a.318.318 0 0 0 0 .125l.02.094h.535l-.016-.09c-.027-.16-.02-.156-.28-.156-.134 0-.25.012-.259.027ZM8.25 9.703c0 .02.008.074.016.121l.02.086h.538l-.02-.105-.027-.121c-.007-.012-.129-.02-.27-.02-.198 0-.257.008-.257.04ZM8.902 9.703c0 .02.008.074.02.121l.015.086h.27c.148 0 .27-.008.27-.023 0-.008-.016-.063-.032-.121l-.027-.102H9.16c-.2 0-.258.008-.258.04ZM9.555 9.715c0 .031.011.086.027.125.027.066.035.07.285.07.164 0 .262-.012.262-.027 0-.016-.02-.07-.04-.121l-.042-.098h-.242c-.227 0-.25.008-.25.05ZM10.203 9.68c-.012.008-.004.062.016.117l.035.098.277.011.274.008-.051-.117-.047-.117-.242-.008c-.137-.004-.254 0-.262.008ZM11.621 9.691c0 .016.024.07.047.125l.047.094h.226c.125 0 .227-.004.227-.015 0-.008-.027-.063-.055-.122l-.054-.109h-.22c-.12 0-.218.012-.218.027ZM1.71 10.129l-.065.133h.78l.044-.106a.88.88 0 0 0 .043-.136c0-.016-.145-.028-.367-.028h-.368ZM2.64 10.023c-.007.02-.03.082-.058.137l-.043.102h.566l.043-.125c.024-.07.043-.133.043-.137 0-.008-.12-.008-.27-.008-.187 0-.269.012-.28.031ZM3.316 10.016a1.352 1.352 0 0 0-.054.136l-.04.11h.567l.027-.102c.047-.172.055-.168-.226-.168-.14 0-.266.012-.274.024ZM3.953 10.105c-.02.067-.035.125-.047.137-.004.012.117.02.274.02h.285l.031-.117c.016-.07.027-.13.027-.137 0-.008-.12-.016-.27-.016h-.269ZM4.648 10.012c-.007.015-.02.078-.03.136l-.02.114h.277c.297 0 .305 0 .305-.196v-.074h-.258c-.14 0-.262.012-.274.02ZM5.305 10.074c-.04.196-.047.188.25.188h.27l.015-.082c.039-.196.047-.188-.25-.188h-.27ZM5.984 10.012a.353.353 0 0 0-.02.133v.117h.54l.016-.114a.371.371 0 0 0 0-.136c-.016-.028-.508-.028-.536 0ZM6.648 10.129v.133h.543v-.27h-.543ZM7.328 10.129v.133h.543l-.016-.258-.261-.008-.266-.008ZM7.98 10.043c0 .027.008.09.016.137l.02.082h.535v-.075c0-.195-.008-.195-.301-.195-.246 0-.27.004-.27.051ZM8.66 10.066c0 .196.004.196.305.196h.273l-.02-.114c-.011-.058-.023-.12-.03-.136a1.267 1.267 0 0 0-.274-.02H8.66ZM9.313 10.008c0 .008.011.066.027.137l.031.117h.27c.3 0 .3 0 .238-.188l-.027-.082h-.27c-.148 0-.27.008-.27.016ZM9.992 10.023c0 .02.012.082.028.137l.027.102h.844c.562 0 .84-.008.84-.028a.463.463 0 0 0-.055-.132l-.051-.11h-.816c-.637 0-.817.008-.817.031ZM11.758 10.004c0 .004.027.062.055.133l.058.125h.484l-.066-.133-.066-.137h-.235c-.125 0-.23.004-.23.012ZM1.594 10.379a.914.914 0 0 0-.114.238c0 .02.09.028.278.02l.281-.008.059-.121a.757.757 0 0 0 .058-.145c.004-.035-.531-.02-.562.016ZM2.242 10.46c-.086.185-.09.185.215.185h.277l.051-.118c.086-.183.086-.183-.219-.183h-.273ZM2.938 10.453c-.079.192-.079.192.226.192.3 0 .297.003.352-.2l.023-.101H2.98ZM3.64 10.434c-.081.199-.081.195.227.203.309.011.297.02.344-.203l.02-.09H3.68ZM4.348 10.379c-.04.113-.059.234-.047.25.008.008.902.016 1.984.016H8.25v-.067c0-.035-.008-.101-.016-.148l-.015-.086h-1.93c-1.52 0-1.934.008-1.941.035ZM8.36 10.434c0 .21.003.21.32.21h.28l-.019-.132a.636.636 0 0 0-.03-.149c-.005-.011-.134-.02-.282-.02h-.27ZM9.05 10.445c.04.211.02.2.333.2h.289l-.02-.09c-.05-.22-.039-.211-.343-.211h-.274ZM9.719 10.352c0 .007.02.074.043.152l.043.14h.28c.161 0 .286-.003.286-.007 0-.008-.02-.075-.039-.153l-.043-.14h-.285c-.156 0-.285.004-.285.008ZM10.441 10.406c.008.035.036.102.055.149l.035.09h.274c.304 0 .3.003.23-.184l-.047-.117h-.281c-.285 0-.285 0-.266.062ZM11.133 10.352l.05.144.055.133.29.008c.23.008.288 0 .277-.028a2.291 2.291 0 0 1-.059-.152l-.047-.113h-.281c-.156 0-.285.004-.285.008ZM11.844 10.363c0 .012.027.078.058.145l.059.12.281.009c.313.011.317.008.215-.168l-.062-.11-.278-.007c-.152-.004-.277 0-.273.011Zm0 0"}))};on.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14"};var sn=function(e){return a.createElement("svg",e,a.createElement("path",{d:"m12.479 17.5-4.937-1.75-3.896 1.521q-.417.167-.781-.094-.365-.26-.365-.719V4.812q0-.291.167-.499.166-.209.437-.313l4.438-1.5 4.937 1.729 3.917-1.521q.416-.146.76.115.344.26.344.698v11.667q0 .27-.156.479-.156.208-.406.312Zm-.875-2.146V5.75L8.417 4.646v9.604Zm1.75 0 2.396-.833V4.833l-2.396.917Zm-9.104-.208 2.417-.896V4.646l-2.417.812Zm9.104-9.396v9.604ZM6.667 4.646v9.604Z"}))};sn.defaultProps={xmlns:"http://www.w3.org/2000/svg",height:"20",width:"20"};var dn=function(e){return a.createElement("svg",e,a.createElement("path",{d:"m3.12 9.455 1.42 1.417 7.33-7.331-1.42-1.416zM12.58 0l-1.42 1.417 1.42 1.416L14 1.417zM.35 12.227 0 14l1.77-.354 1.06-1.063-1.42-1.416z",fill:"current",stroke:"current"}))};dn.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"14"};var cn=function(e){return a.createElement("svg",e,a.createElement("g",{clipPath:"url(#a)",stroke:"current",strokeWidth:"1.5",strokeLinejoin:"round"},a.createElement("path",{d:"M12.75 6.75h3v7h-3v-7ZM.75 3.75h3v10h-3v-10ZM6.75.75h3v13h-3v-13Z"})),a.createElement("defs",null,a.createElement("clipPath",{id:"a"},a.createElement("path",{fill:"#fff",d:"M0 0h16.5v14.5H0z"}))))};cn.defaultProps={width:"17",height:"15",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const pn="fill",un="stroke",mn=e=>{let t,n,{title:i,icon:l,onClick:r,disabled:o}=e;switch(l){case"eye":default:t=a.createElement(an,null),n=un;break;case"delete":t=a.createElement(ln,null),n=un;break;case"clone":t=a.createElement(rn,null),n=un;break;case"logs":t=a.createElement(on,null),n=un;break;case"edit":t=a.createElement(dn,null),n=pn;break;case"reports":t=a.createElement(cn,null),n=un;break;case"kepler":t=a.createElement(sn,null),n=pn}return a.createElement(a.Fragment,null,n===pn?a.createElement(tn,{title:i,svg:t,onClick:r||(()=>{}),disabled:o}):a.createElement(nn,{title:i,svg:t,onClick:r||(()=>{}),disabled:o}))};var hn=function(e){return a.createElement("svg",e,a.createElement("defs",null,a.createElement("style",null,".cls-ellipsis","{","fill:current;stroke:current","}")),a.createElement("g",{id:"Group_4094",transform:"rotate(-90 160.4 336.6)"},a.createElement("circle",{id:"Ellipse_291",className:"cls-ellipsis",cx:"1.5",cy:"1.5",r:"1.5",transform:"translate(494 176.2)"}),a.createElement("circle",{id:"Ellipse_292",className:"cls-ellipsis",cx:"1.5",cy:"1.5",r:"1.5",transform:"translate(494 182.2)"}),a.createElement("circle",{id:"Ellipse_293",className:"cls-ellipsis",cx:"1.5",cy:"1.5",r:"1.5",transform:"translate(494 188.2)"})))};hn.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"15",height:"3"};const gn=(0,o.default)(hn).withConfig({displayName:"styled__StyledEllipsis",componentId:"sc-18qa122-0"})(["overflow:visible;padding:5px;fill:",";stroke:",";cursor:pointer;&:hover{fill:",";stroke:",";}"],e=>{let{color:t}=e;return t},e=>{let{color:t}=e;return t},h,h),fn=e=>{let{dropDownData:t,color:n,containerStyle:i}=e;const[l,r]=(0,a.useState)(!1),o=(0,a.useRef)(null),s=e=>{o.current&&!o.current.contains(e.target)&&r(!1)};return(0,a.useEffect)(()=>(document.addEventListener("mousedown",s),()=>{document.removeEventListener("mousedown",s)}),[o]),a.createElement(Zt,{style:i},a.createElement(Vt,{onClick:()=>r(!l),ref:o},a.createElement(gn,{color:n}),l&&a.createElement(Gt,{flexDirection:"column",top:"23px"},t.filter(e=>!e.shouldShow||e.shouldShow()).map(e=>a.createElement(Wt,{key:e.title,"data-test-id":e?.testId},a.createElement(mn,{onClick:e.onClick,title:e.title,icon:e.icon,disabled:e.disabled}))))))},yn=o.default.div.withConfig({displayName:"styled__HeaderContainer",componentId:"sc-v3omc4-0"})(["width:100%;background-color:rgb(251,251,252);display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:20px;"]),vn=o.default.span.withConfig({displayName:"styled__Title",componentId:"sc-v3omc4-1"})(["font-size:",";letter-spacing:0.2px;color:#333333;"],m),wn=o.default.span.withConfig({displayName:"styled__SubTitle",componentId:"sc-v3omc4-2"})(["margin:0 15px;font-size:",";letter-spacing:0.2px;color:#333333;"],c),xn=(o.default.button.withConfig({displayName:"styled__StartExperimentButton",componentId:"sc-v3omc4-3"})(["font-size:",";color:",";background-color:transparent;border:none;cursor:pointer;"],d,h),o.default.input.withConfig({displayName:"styled__TextInput",componentId:"sc-v3omc4-4"})(["min-width:200px;",";height:24px;border-radius:2px;box-shadow:0 3px 6px 0 rgba(0,0,0,0.16);background-color:#fff;border:none;outline:none;font-size:",";letter-spacing:0.2px;color:#333333;"],e=>{let{width:t}=e;return t&&`width: ${t}`},m)),En=e=>{let{title:t,variantAmount:n,editTitle:i,setTitleEditing:l,experimentId:o,containsReports:s,simType:d,setExperimentIdPopup:c}=e;const{handleUpdateExperiment:p}=(0,a.useContext)(oe),u=(0,r.Zp)(),[m,h]=(0,a.useState)(t),g=[{title:T.t("addExperimentWizard.tableHeader.reports"),icon:"reports",disabled:!s,onClick:()=>{const e=L();return u(`${e}/reports?experimentId=${o}&simType=${d}`)}},{title:T.t("addExperimentWizard.tableHeader.edit"),icon:"edit",onClick:()=>l(o)},{title:T.t("addExperimentWizard.tableHeader.delete"),icon:"delete",onClick:()=>{c(o)}}],f=async()=>{P.trackEvent("trying to update experiment",{experimentId:o}),p(o,{name:m}),P.trackEvent("update experiment - successful",{experimentId:o}),l("")};return a.createElement(yn,null,a.createElement(Wt,{style:{width:"100%"}},i?a.createElement(Zt,null,a.createElement(xn,{width:`${m.length}ch`,onKeyDown:e=>"Enter"===e.key&&f(),value:m,onChange:e=>h(e.target.value),autoFocus:!0,onBlur:()=>f()})):a.createElement(vn,null,m),a.createElement(wn,null,n," variants"),a.createElement(fn,{containerStyle:{marginLeft:"auto"},dropDownData:g,color:"#ababab"})))},bn=o.default.div.withConfig({displayName:"styled__Tag",componentId:"sc-p4jzo0-0"})(["margin:","px;background-color:rgba(20,130,253,0.1);height:100%;display:flex;justify-content:center;align-content:center;flex-direction:column;padding:4px 7px;font-size:",";color:",";border-radius:2px;height:13px;font-weight:normal;"],3,s,h),Cn=o.default.div.withConfig({displayName:"styled__TagContainer",componentId:"sc-p4jzo0-1"})(["display:flex;flex-direction:row;align-content:center;width:90%;"]),_n=o.default.div.withConfig({displayName:"styled__ShownTagsContainer",componentId:"sc-p4jzo0-2"})(["display:flex;flex-direction:row;max-width:90%;overflow-x:hidden;align-content:flex-start;"]),kn=e=>{let{cell:t}=e;const n=(0,a.useRef)(null);if(!t.value)return null;const[i,l]=(0,a.useState)(t.value.length),r=t.value,o=r.slice(0,i),s=r.slice(i);return(0,a.useEffect)(()=>{const e=n.current?.children;let t=1;if(e&&e.length>0){for(let a=1;an.current?.offsetLeft+n.current?.clientWidth-i)break;t++}l(t)}},[]),a.createElement(Cn,null,a.createElement(_n,{ref:n},o.map((e,t)=>a.createElement(bn,{key:t},e))),s.length>0&&a.createElement(Vt,null,a.createElement(bn,{onHover:!0},"+",s.length),a.createElement(Gt,{isHover:!0,flexDirection:"row"},s.map((e,t)=>a.createElement(bn,{key:t},e)))))},Sn=o.default.div.withConfig({displayName:"Type__TypeComponent",componentId:"sc-1kafpqk-0"})(["line-height:100%;text-transform:capitalize;"]),An=e=>{let{cell:t}=e;return a.createElement(Sn,null,T.t(`variationType.${t.value||"rides"}`))},Tn=o.default.div.withConfig({displayName:"styled__Container",componentId:"sc-dfgv8x-0"})(["display:flex;flex-direction:row;justify-content:flex-end;align-items:center;padding:0 15px;"]);var In=function(e){return a.createElement("svg",e,a.createElement("g",{transform:"translate(8701.75 7364.75)"},a.createElement("path",{d:"m0 0 3.517 4.079L7.42 0",transform:"rotate(-90 -8024.314 671.024)",style:{fill:"current"}}),a.createElement("circle",{cx:"7",cy:"7",r:"7",transform:"translate(-8701 -7364)",style:{fill:"none",stroke:"current",strokeLinejoin:"round",strokeWidth:"1.5px"}})))};In.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"15.5",height:"15.5"};var Nn=function(e){return a.createElement("svg",e,a.createElement("g",{clipPath:"url(#a)",stroke:"current",strokeWidth:"1.5",strokeLinejoin:"round"},a.createElement("path",{d:"M12.75 6.75h3v7h-3v-7ZM.75 3.75h3v10h-3v-10ZM6.75.75h3v13h-3v-13Z"})),a.createElement("defs",null,a.createElement("clipPath",{id:"a"},a.createElement("path",{fill:"#fff",d:"M0 0h16.5v14.5H0z"}))))};Nn.defaultProps={width:"17",height:"15",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const Mn=e=>{let t,{variation:n,onClick:i}=e;const{status:l}=n;t=l===z.PENDING?In:Nn;const r=t&&(0,o.default)(t).withConfig({displayName:"CurrentStatusButton__StyledIcon",componentId:"sc-1egzqq1-0"})(["",";margin-top:3px;padding:0 6px;transform:scale(1.1);stroke:",";",""],e=>{let{disabled:t}=e;return t&&"opacity: 0.5"},g,[z.PENDING,z.COMPLETED].includes(l)&&`\n stroke: ${g};\n cursor: pointer;\n &:hover {\n stroke: ${h};\n ${l===z.PENDING&&`fill: ${h}`};\n `);return a.createElement(Zt,null,t&&a.createElement(r,{disabled:![z.PENDING,z.COMPLETED].includes(l),status:l,onClick:i}))},Dn=async e=>(async e=>{const{data:t}=await te.get(`/api/v1/variations/${e}`);return t})(e),Ln=async e=>(async e=>{const{data:t}=await te.post("/api/v1/variations",e);return t})(e),Bn=async(e,t)=>(async(e,t)=>{const{data:n}=await te.patch(`/api/v1/variations/${t}`,e);return n})(e,t),Rn=o.default.img.withConfig({displayName:"Error__ErrorImage",componentId:"sc-1vv5gr8-0"})(["margin-bottom:16px;"]),Fn=o.default.div.withConfig({displayName:"Error__ErrorMessage",componentId:"sc-1vv5gr8-1"})([""]),On=e=>{let{errorMessage:t,errorIssue:n}=e;return a.createElement(a.Fragment,null,a.createElement(Rn,{alt:"",src:"https://res.cloudinary.com/autofleet/image/upload/v1533651669/Control-Center/error.png"}),a.createElement(Fn,null,n),a.createElement(Fn,null,t))};var Pn=n(2543),zn=n(50454),jn=n(57901),Wn=n(21021);o.default.span.withConfig({displayName:"styled__IconContainer",componentId:"sc-1t317zv-0"})(["stroke:",";margin:",";vertical-align:middle;cursor:pointer;width:",";height:",";",";&:hover{stroke:",";}&:active{stroke:",";}"],e=>{let{stroke:t}=e;return t||`${g}`},e=>{let{margin:t}=e;return t?-1!==`${t}`.search(" ")?t:`${t}px`:"0px 10px"},e=>{let{width:t}=e;return t?`${t}px`:"16px"},e=>{let{height:t}=e;return t?`${t}px`:"16px"},e=>{let{disableClass:t}=e;return t?"stroke: #dfdfdf;\n cursor: default;\n ":""},e=>{let{disableClass:t,hoverColor:n}=e;return t?"#dfdfdf":n||"rgb(17, 113, 219)"},e=>{let{disableClass:t,activeColor:n}=e;return t?"#dfdfdf":n||"rgb(57, 153, 255)"});function $n(){return $n=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement("image",$n({},e,{src:e.src,onClick:t=>{if(e.onClick)return e.onClick(t)}}));function Gn(){return Gn=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(Vn,(0,Pn.omit)(e,["disableClass"]))).attrs({height:"20px",width:"20px"}).withConfig({displayName:"AFMenu__Icon",componentId:"sc-h120hk-1"})(["height:20px;width:20px;fill:",";position:relative;left:calc(50% - 7px);top:calc(50% - 10px);"],e=>{let{disable:t}=e;return t?"#dfdfdf":`${h}`}),o.default.div.withConfig({displayName:"AFMenu__ContainerButton",componentId:"sc-h120hk-2"})(["height:27px;box-shadow:none;cursor:",";",""],e=>{let{disable:t}=e;return t?"default":"pointer"},e=>{let{disable:t}=e;return!t&&`\n &:hover {\n border-color: ${h};\n }\n `})),Hn=(0,zn.A)({paper:{border:0,boxShadow:"0 15px 29px 0 rgba(51, 70, 85, 0.24)",borderRadius:"3px"},list:{}})(e=>a.createElement(jn.A,Gn({elevation:0,getContentAnchorEl:null,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"}},e,{TransitionProps:{onEnter:t=>e.onEnter&&e.onEnter(t)}}))),qn=(0,zn.A)({root:{"& .MuiListItemText-primary":{height:"14px",fontSize:"13px",cursor:"pointer"},"&:hover":{backgroundColor:"#fff",color:"#298dfc","& #ListItemIcon":{stroke:"#298dfc"}}}})(Wn.A),Kn=e=>{let{variation:t,setVariationIdPopup:n,showExperimentPopup:i}=e;const{handleFetchExperiments:l}=(0,a.useContext)(oe),[o,s]=(0,a.useState)(!1),[d,c]=(0,a.useState)(!1),p=(0,r.Zp)(),{status:u}=t,[m,h]=(0,a.useState)(null);return a.createElement(a.Fragment,null,a.createElement(Tn,{onClick:e=>e.stopPropagation()},a.createElement(Mn,{variation:t,onClick:async()=>{if(u===z.PENDING)try{P.trackEvent("trying to dispatch variation",{variationId:t.id}),await(async e=>(async e=>{const{data:t}=await te.post(`/api/v1/variations/${e}/dispatch`,null);return t})(e))(t.id),P.trackEvent("dispatching variation - successful",{variationId:t.id}),l()}catch{P.trackEvent("dispatching variation - failed",{variationId:t.id})}u===z.COMPLETED&&p(`/reports?experimentId=${t.experimentId}&variationId=${t.id}&simType=${t.type}`)}}),t.status===z.COMPLETED?a.createElement(mn,{onClick:()=>(async()=>{const e=await(async e=>(async e=>{const{data:t}=await te.get(`/api/v1/variations/${e}/kepler`);return t})(e))(t.id),n=new Blob([e],{type:"text/html"}),a=URL.createObjectURL(n);window.open(a)})(),icon:"kepler"}):void 0,a.createElement(mn,{onClick:e=>{h(e.currentTarget),c(!0)},icon:"clone"}),a.createElement(Hn,{anchorEl:m,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},open:d,onClose:()=>c(!1)},a.createElement(qn,{onClick:()=>ce({readOnly:!1,isDraft:!1,isCloned:!0,variation:t,navigate:p})},a.createElement(mn,{icon:"clone"}),T.t("cloneToAnotherExperiment.clone")),a.createElement(qn,{onClick:()=>i(t)},a.createElement(mn,{icon:"clone"}),T.t("cloneToAnotherExperiment.buttonLabel"))),a.createElement(mn,{onClick:async()=>{n(t.id)},icon:"delete"}),D()&&t.jobId?a.createElement(a.Fragment,null,a.createElement(mn,{onClick:e=>function(e,t){let{jobId:n,id:a}=e;const i=t?.metaKey||t?.ctrlKey,l=window.location.hostname.includes("staging")?"simulation-cluster-staging":"autofleet-sim-cluster";i&&a?window.open(`https://console.cloud.google.com/kubernetes/job/europe-west1-b/${l}/default/${a}/details?authuser=0&project=autofleet-sim-cluster`):window.open(`https://console.cloud.google.com/logs/query;query=resource.type%3D%22k8s_container%22%0Aresource.labels.project_id%3D%22autofleet-sim-cluster%22%0Aresource.labels.location%3D%22europe-west1-b%22%0Aresource.labels.namespace_name%3D%22default%22%0Alabels.k8s-pod%2Fcontroller-uid%3D%22${n}%22;cursorTimestamp=2022-05-01T16:04:46.429981392Z?authuser=0&project=autofleet-sim-cluster`)}(t,e),icon:"logs"})):void 0),a.createElement(wt,{submitButtonText:"Back",isVisible:o,onClose:()=>s(!1),title:T.t("addExperimentWizard.steps.territory.popupErrorTitle"),onClickSubmitButton:()=>s(!1)},a.createElement(On,{errorMessage:T.t("deleteVariationError")})))};var Jn=n(22488);const Xn=[5,2,4,3],Yn=o.default.div.withConfig({displayName:"skeleton__PaddedDiv",componentId:"sc-1tnxpdn-0"})(["",";"],e=>{let{padding:t}=e;return t&&`padding: ${t}`}),Qn=e=>{let{skeletonWidth:t,padding:n}=e;return a.createElement(a.Fragment,null,a.createElement(Jn.A,{width:`${t}`}),a.createElement(Yn,{padding:`0 0 0 ${n}`}))},ea=()=>a.createElement(kt,null,a.createElement(Qn,{skeletonWidth:"8%",padding:"12%"}),a.createElement(Qn,{skeletonWidth:"6%",padding:"4%"}),a.createElement(Qn,{skeletonWidth:"5%",padding:"8%"}),a.createElement(Qn,{skeletonWidth:"6%",padding:"2%"}),a.createElement(Qn,{skeletonWidth:"2%",padding:"8%"}),a.createElement(Qn,{skeletonWidth:"2%",padding:"8%"}),a.createElement(Qn,{skeletonWidth:"2%",padding:"22%"}),a.createElement(Qn,{skeletonWidth:"3%",padding:"1%"})),ta=()=>a.createElement(bt,{padding:"10px"},a.createElement(Jn.A,{width:"200px"})),na=()=>a.createElement(a.Fragment,null,Xn.map((e,t)=>a.createElement(Et,{key:`table-${e}-${t}`},a.createElement(ta,null),a.createElement(St,null,[...Array(e)].map((n,i)=>a.createElement(_t,{key:`table-${e}-${t}-row-${i}`},a.createElement(ea,null))),a.createElement(Tt,null)))));var aa=n(52813);const ia=o.default.div.withConfig({displayName:"styled__DropDownOption",componentId:"sc-1h07awg-0"})(["display:flex;flex-direction:column;padding:4px;gap:6px;align-self:stretch;cursor:pointer;"]),la=o.default.span.withConfig({displayName:"styled__DropDownOptionTitle",componentId:"sc-1h07awg-1"})(["color:#6F6F6F;font-family:Montserrat;font-size:14px;font-style:normal;font-weight:500;line-height:20px;"]),ra=o.default.span.withConfig({displayName:"styled__DropDownOptionSubtitle",componentId:"sc-1h07awg-2"})(["color:#6F6F6F;font-family:Montserrat;font-size:12px;font-style:normal;font-weight:500;line-height:16px;"]),oa=e=>{let{title:t,subtitle:n,titleId:i}=e;return a.createElement(ia,null,a.createElement(la,{id:i},t),n&&a.createElement(ra,null,n))},sa=e=>{let{handleChange:t,options:n,value:i,isMulti:l,backgroundColor:r,height:o,noHeight:s=!1,error:d,placeholder:c,menuPlacement:p,id:u,menuHeight:m,disabled:g=!1,classNamePrefix:y}=e;const v={option:(e,t)=>({...e,...x}),placeholder:e=>({...e,color:"#adadad",fontWeight:200}),control:(e,t)=>({...e,...x,...w,"&:hover":{borderColor:"auto"},boxShadow:t.isFocused?"none":"auto",border:t.isFocused?`2px solid ${h}`:"default",minWidth:s?"275px":void 0}),multiValue:(e,t)=>({...e,backgroundColor:"rgba(20, 130, 253, 0.1)",color:`${h}`}),multiValueLabel:(e,t)=>({...e,color:`${h}`,fontSize:11}),multiValueRemove:(e,t)=>({...e,"&:hover":{backgroundColor:"transparent",color:`${h}`}}),valueContainer:(e,t)=>({...e,...s?{maxHeight:50,overflowX:"hidden",overflowY:"auto"}:{}}),menu:e=>({...e,zIndex:2})},w={minHeight:o||30,height:s?void 0:o||30,backgroundColor:r||"#ffffff",borderRadius:3,alignContent:"center",transition:"none",borderColor:d?"red":`${f}`},x={fontSize:12,color:"#313131",fontFamily:"Montserrat"},E=l?i?.map(e=>({value:e,label:e.name})):i;return a.createElement(aa.Ay,{id:u,maxMenuHeight:m||200,menuPlacement:p,hideSelectedOptions:!0,placeholder:c,options:(()=>{if(l){const e=E?.reduce((e,t)=>({...e,[t.label]:!0}),{});return(n||[]).filter(t=>!e[t.label]&&{value:t.value,label:t.label})}return n})(),isMulti:l,styles:v,value:E,components:{IndicatorSeparator:()=>null},onChange:e=>t(l?e?.map(e=>e.value):e?.value),isDisabled:g,classNamePrefix:y})},da=()=>{const[e,t]=(0,a.useState)(""),[n,i]=(0,a.useState)(null),{experiments:l,isLoading:o}=(0,a.useContext)(oe),[s,d]=(0,a.useState)(null),{handleFetchExperiments:c,page:p}=(0,a.useContext)(oe),[u,m]=(0,a.useState)(!1),[h,g]=(0,a.useState)(null),[f,y]=(0,a.useState)(null),v=(0,r.Zp)(),w=e=>{g(e),y(e.experimentId),c(1===p?[p]:[1,p]),m(!0)},x=(0,a.useMemo)(()=>l?.map(e=>({label:e.name,value:e.id})),[l]),E=e=>{for(let t=0;t{return a.createElement(Nt,{key:n.id,experiment:n,data:n.variations,columns:(l=n.name,r=n.variations.length,o=n.id,s=E(n),c=n?.variations?.[0]?.type,[{Header:a.createElement(En,{setExperimentIdPopup:i,simType:c,experimentId:o,setTitleEditing:t,editTitle:e===o,title:l,variantAmount:r,containsReports:s}),width:"100%",id:1,columns:[{Header:"Name",accessor:"name",width:"15%"},{Header:"Type",accessor:"type",width:"10%",Cell:e=>{let{cell:t}=e;return a.createElement(An,{cell:t})}},{Header:"Tags",accessor:"tags",width:"20%",Cell:e=>{let{cell:t}=e;return a.createElement(kn,{cell:t})}},{Header:"Status",accessor:"status",width:"20%",Cell:e=>{let{cell:t}=e;return a.createElement(jt,{cell:t})}},{Header:"No. vehicles",accessor:"numberOfVehicles",width:"10%"},{Header:"Created at",accessor:"createdAt",width:"10%",Cell:e=>{let{cell:t}=e;return G()(t?.row?.original?.createdAt).format("YYYY-MM-DD HH:mm")}},{Header:"",accessor:"buttons",width:"15%",Cell:e=>{let{cell:t}=e;return a.createElement(Kn,{variation:t?.row?.original,setVariationIdPopup:d,showExperimentPopup:w})}}]}])});var l,r,o,s,c}),a.createElement(wt,{submitButtonText:T.t("yesDeleteButtonText"),closeOnBackdropPress:!0,closeOnEsc:!0,isVisible:!!s,onClose:()=>d(null),title:T.t("deleteVariationButton"),onClickSubmitButton:()=>(async e=>{try{P.trackEvent("trying to delete variation",{variationId:e}),await(async e=>(async e=>{const{data:t}=await te.delete(`/api/v1/variations/${e}`);return t})(e))(e),P.trackEvent("deleting variation - successful",{variationId:e}),c(),d(null)}catch{P.trackEvent("deleting variation - failed",{variationId:e})}})(s),onClickCloseButton:()=>d(null),closeButtonText:T.t("genericBackButtonText")},a.createElement("view",null,T.t("deleteVariationText"))),a.createElement(wt,{submitButtonText:T.t("yesDeleteButtonText"),closeOnBackdropPress:!0,closeOnEsc:!0,isVisible:!!n,onClose:()=>i(null),title:T.t("deleteExperimentButton"),onClickSubmitButton:()=>(async e=>{try{P.trackEvent("trying to delete experiment",{experimentId:e}),await ne(e),P.trackEvent("delete experiment - successful",{experimentId:e}),i(null)}catch{P.trackEvent("deleting experiment - failed",{experimentId:e})}})(n),onClickCloseButton:()=>i(null),closeButtonText:T.t("genericBackButtonText")},a.createElement("div",null,T.t("deleteExperimentText"))),a.createElement(wt,{isVisible:u,onClose:()=>m(!1),title:T.t("cloneToAnotherExperiment.title"),onClickSubmitButton:async()=>{ce({readOnly:!1,isDraft:!1,isCloned:!0,variation:{...h||{},experimentId:f},navigate:v}),m(!1)},submitButtonText:T.t("cloneToAnotherExperiment.clone"),closeButtonText:T.t("cloneToAnotherExperiment.close"),onClickCloseButton:()=>m(!1),isCritical:!1},a.createElement("div",{style:{marginBottom:20}},T.t("cloneToAnotherExperiment.description")),a.createElement(sa,{handleChange:e=>{y(e)},options:x,value:x?.find(e=>e.value===f)})))};function ca(){return ca=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t=null,...n}=e;return a.createElement(pa,{className:t},a.createElement(ma,ca({type:"search"},n)),a.createElement(ua,null))};var ga=function(e){return a.createElement("svg",e,a.createElement("g",{opacity:".6"},a.createElement("path",{d:"m186.629 85.444.245-.916-27.202-7.368 2.529-10.233 24.644 7.233.264-.91-24.666-7.234 12.542-44.48-.91-.256-12.537 44.475-10.852-3.167.156-.525c3.93-13.158 4.571-15.435 4.82-16.318l-.923-.203c-.25.879-.835 2.97-4.806 16.266l-.155.517-16.385-4.782 9.625-31.057-.904-.277-9.632 31.08-29.611-4.326 1.313-10.176-.939-.112-1.309 10.152-9.4-1.371.472-6.467-.944-.067-1.207 16.535-17.305-3.393-21.282 8.617v1.103l21.338-8.714 4.898.931-5.11 15.456-8.304-2.133-.234.918 14.459 3.718-3.5 12.068 12.414 2.526-1.416 8.411-14.717-3.434-3.764 11.866-.505-.142a3063.71 3063.71 0 0 0-15.495-4.254v.541l-.087.397c.983.254 41.498 11.69 41.498 11.69l-8.513 27.177.902.285 8.52-27.208 18.654 5.301-6.047 21.924.912.25 4.261-15.368 15.778 4.431-.42 1.533.905.271.404-1.477.274-.916 1.677-5.603 23.389 6.656-2.28 7.72.907.27 10.317-34.936 23.244 6.422.245-.915-26.027-7.172 8.024-25.654 17.758 4.824Zm-36.215-21.952 10.877 3.177-2.529 10.225-11.439-3.055 3.091-10.347Zm-49.633 35.244.447-1.708 17.751 5.312-2.014 7.395-11.136-3.109c.01-.161.024-.319.024-.481a7.96 7.96 0 0 0-5.072-7.409Zm-9.939 7.406a7.12 7.12 0 0 1 2.078-5.02 7.083 7.083 0 0 1 5.007-2.082 7.082 7.082 0 0 1 5.006 2.082 7.124 7.124 0 0 1 2.078 5.02 7.122 7.122 0 0 1-2.078 5.019 7.084 7.084 0 0 1-5.007 2.083 7.084 7.084 0 0 1-5.006-2.083 7.118 7.118 0 0 1-2.078-5.019Zm33.489-18.79 11.48 3.389 4.979-17.678 5.349 1.442-7.696 25.74-16.665-4.494 2.553-8.398Zm-3.469 8.16-4.337-1.09 2.659-8.589 4.241 1.252-2.563 8.427Zm14.295-5.949-10.554-3.115 4.99-16.4 10.284 2.77-4.72 16.745Zm-11.463-3.383-4.235-1.25 5.052-16.325 4.166 1.188-4.983 16.387Zm-5.143-1.52-8.646-2.562 5.139-16.243 8.557 2.49-5.05 16.315Zm-.28.907-2.669 8.626-8.844-2.224 2.826-8.966 8.687 2.564Zm-12.432 6.173-15.957-4.012.187-2.569 18.535-2.184-2.765 8.765Zm14.751 4.668-1.367 5.02-17.761-5.315 1.106-4.234 18.022 4.53Zm.908.188 16.662 4.487-4.009 13.461-16.281-4.552 3.628-13.396Zm17.577 4.789 11.455 3.089-4.097 13.502-11.371-3.178 4.013-13.413Zm.27-.908 7.696-25.74 11.459 3.09-7.699 25.74-11.456-3.09Zm-6.234-42.028 16.529 4.84-3.191 10.276-16.588-4.433 3.25-10.683Zm-.915-.243-3.246 10.676-4.161-1.185 3.13-10.114 4.277.623Zm-5.224-.762-3.094 9.993-3.392-.966 3.139-9.515 3.347.488ZM92.465 52.41l13.413 1.956-1.066 9.879-13.165-.676.818-11.159Zm-.886 12.1 14.076.723 1.16-10.734 15.859 2.313-3.097 9.397-5.225-1.488-5.44 17.257-18.775 2.214 1.442-19.681ZM74.312 75.7l5.125-15.51 11.345 2.225-1.258 17.191-15.212-3.907Zm2.698 13.626 3.223-11.122 9.224 2.366-.607 8.332-.46 2.727-11.38-2.303Zm12.828-.647 11.812 2.97-1.776 6.802a7.874 7.874 0 0 0-1.956-.254 7.904 7.904 0 0 0-3.864 1.017 7.926 7.926 0 0 0-2.879 2.778l-3.446-.815 2.109-12.498Zm-5.822 25.204c-7.115-2.017-10.334-2.985-14.24-4.085l-.54-.151 3.49-10.997 13.922 3.245-2.05 12.153-.582-.165Zm10.002 2.84-8.505-2.414 2.058-12.193 3.143.744a7.901 7.901 0 0 0 .66 7.756 7.941 7.941 0 0 0 3.645 2.919l-1.001 3.188Zm.91.258.99-3.154a7.882 7.882 0 0 0 2.004.27 7.921 7.921 0 0 0 5.069-1.846 7.962 7.962 0 0 0 2.722-4.668l10.998 3.075-3.159 11.608-18.624-5.285Zm33.544 16.544-15.802-4.443 1.535-5.633 15.927 4.53-1.66 5.546Zm1.934-6.46-15.949-4.536 3.165-11.619 16.258 4.544-3.474 11.611Zm.908.259 3.475-11.614 11.368 3.177-3.536 11.655-11.307-3.218Zm23.385 6.658-11.169-3.178 3.538-11.662 11.098 3.103-3.467 11.737Zm7.765-26.285-4.028 13.638-11.091-3.101 4.098-13.512 11.021 2.975Zm-2.54-1.667-8.207-2.214 7.7-25.738 8.531 2.298-8.024 25.654Z",fill:"#C1C1C1"}),a.createElement("path",{d:"m111.918 130.173-8.369 30.272M40.264 71.823l-11.571 4.609",stroke:"#C1C1C1",strokeWidth:"1.25",strokeMiterlimit:"10"}),a.createElement("path",{d:"m224.738 84.5-26.217-7.53Z",fill:"#fff"}),a.createElement("path",{d:"m224.738 84.5-26.217-7.53",stroke:"#C1C1C1",strokeWidth:"1.25"}),a.createElement("path",{d:"m210.28 91.52-11.759-3.38Z",fill:"#fff"}),a.createElement("path",{d:"m210.28 91.52-11.759-3.38",stroke:"#C1C1C1",strokeWidth:"1.25"}),a.createElement("path",{d:"M40.264 102.015 23.23 97.251M214.67 120.918l-16.149-4.118",stroke:"#C1C1C1",strokeWidth:"1.25",strokeMiterlimit:"10"}),a.createElement("path",{d:"M186.42 145.369V39.232M52.58 145.369V39.232",stroke:"#C1C1C1",strokeMiterlimit:"10"}),a.createElement("path",{d:"M194.475 38.446H44.31a4.05 4.05 0 0 0-4.045 4.056v98.811a4.051 4.051 0 0 0 4.045 4.056h150.165a4.05 4.05 0 0 0 4.046-4.056V42.502a4.05 4.05 0 0 0-4.046-4.056Z",stroke:"#C1C1C1",strokeWidth:"2.22",strokeMiterlimit:"10"}),a.createElement("path",{d:"M156.555 87.983a2.7 2.7 0 0 0 2.697-2.704 2.7 2.7 0 0 0-2.697-2.704 2.7 2.7 0 0 0-2.697 2.704 2.7 2.7 0 0 0 2.697 2.704Z",fill:"url(#a)",stroke:"#F5F5F7",strokeWidth:"1.25"}),a.createElement("path",{d:"M114.075 87.077a2.7 2.7 0 0 0 2.697-2.704 2.7 2.7 0 0 0-2.697-2.704 2.7 2.7 0 0 0-2.697 2.704 2.7 2.7 0 0 0 2.697 2.704Z",fill:"url(#b)",stroke:"#F5F5F7",strokeWidth:"1.25"}),a.createElement("path",{d:"M141.046 62.741a2.7 2.7 0 0 0 2.697-2.704 2.7 2.7 0 0 0-2.697-2.704 2.7 2.7 0 0 0-2.697 2.704 2.7 2.7 0 0 0 2.697 2.704Z",fill:"url(#c)",stroke:"#F5F5F7",strokeWidth:"1.25"}),a.createElement("path",{d:"M156.555 131.693a2.7 2.7 0 0 0 2.697-2.704 2.7 2.7 0 0 0-2.697-2.704 2.7 2.7 0 0 0-2.697 2.704 2.7 2.7 0 0 0 2.697 2.704Z",fill:"url(#d)",stroke:"#F5F5F7",strokeWidth:"1.25"}),a.createElement("path",{d:"M74.967 114.793a2.7 2.7 0 0 0 2.697-2.704 2.7 2.7 0 0 0-2.697-2.704 2.7 2.7 0 0 0-2.698 2.704 2.7 2.7 0 0 0 2.698 2.704Z",fill:"url(#e)",stroke:"#F5F5F7",strokeWidth:"1.25"}),a.createElement("path",{d:"M84.407 81.669a2.7 2.7 0 0 0 2.697-2.704 2.7 2.7 0 0 0-2.697-2.704 2.7 2.7 0 0 0-2.697 2.704 2.7 2.7 0 0 0 2.697 2.704Z",fill:"url(#f)",stroke:"#F5F5F7",strokeWidth:"1.25",strokeMiterlimit:"10"}),a.createElement("path",{d:"M72.944 61.389a2.7 2.7 0 0 0 2.697-2.704 2.7 2.7 0 0 0-2.697-2.704 2.7 2.7 0 0 0-2.697 2.704 2.7 2.7 0 0 0 2.697 2.704Z",fill:"url(#g)",stroke:"#F5F5F7",strokeWidth:"1.25"}),a.createElement("path",{d:"M134.978 73.557a2.7 2.7 0 0 0 2.697-2.704 2.7 2.7 0 0 0-2.697-2.704 2.7 2.7 0 0 0-2.697 2.704 2.7 2.7 0 0 0 2.697 2.704Z",fill:"url(#h)",stroke:"#F5F5F7",strokeWidth:"1.25"}),a.createElement("path",{d:"M146.441 121.553a2.701 2.701 0 0 0 2.697-2.704 2.701 2.701 0 0 0-2.697-2.704 2.7 2.7 0 0 0-2.697 2.704 2.7 2.7 0 0 0 2.697 2.704Z",fill:"url(#i)",stroke:"#F5F5F7",strokeWidth:"1.25"}),a.createElement("path",{d:"M119.469 104.653a2.7 2.7 0 0 0 2.697-2.704 2.7 2.7 0 0 0-2.697-2.704 2.7 2.7 0 0 0-2.697 2.704 2.701 2.701 0 0 0 2.697 2.704Z",fill:"url(#j)",stroke:"#F5F5F7",strokeWidth:"1.25"}),a.createElement("path",{d:"m46.218 87.077-.058 9.042",stroke:"#C1C1C1",strokeWidth:"1.25",strokeMiterlimit:"10",strokeLinecap:"round"}),a.createElement("path",{d:"M138.002 108.632c4.187 0 7.581-3.403 7.581-7.601s-3.394-7.601-7.581-7.601c-4.188 0-7.582 3.403-7.582 7.601s3.394 7.601 7.582 7.601Z",fill:"#333",stroke:"#F5F5F7"}),a.createElement("path",{d:"m139.235 96.957-3.76 4.555h2.286l-1.083 3.589 3.852-4.615h-2.377l1.082-3.53Z",fill:"url(#k)"}),a.createElement("path",{d:"m139.235 96.959-3.761 4.555h2.287l-1.083 3.589 3.851-4.615h-2.377l1.083-3.53Z",fill:"url(#l)"}),a.createElement("path",{d:"M100.916 81.619c4.187 0 7.581-3.403 7.581-7.601s-3.394-7.601-7.581-7.601c-4.188 0-7.582 3.403-7.582 7.6 0 4.199 3.394 7.602 7.582 7.602Z",fill:"#333",stroke:"#F5F5F7"}),a.createElement("path",{d:"m102.15 69.944-3.76 4.555h2.286l-1.083 3.59 3.851-4.616h-2.377l1.083-3.53Z",fill:"url(#m)"}),a.createElement("path",{d:"m102.149 69.946-3.76 4.555h2.286l-1.083 3.59 3.852-4.616h-2.377l1.082-3.53Z",fill:"url(#n)"}),a.createElement("path",{d:"M170.367 127.929c4.187 0 7.581-3.403 7.581-7.601s-3.394-7.601-7.581-7.601-7.582 3.403-7.582 7.601 3.395 7.601 7.582 7.601Z",fill:"#333",stroke:"#F5F5F7"}),a.createElement("path",{d:"m171.601 116.261-3.761 4.554h2.287l-1.083 3.591 3.851-4.615h-2.376l1.082-3.53Z",fill:"url(#o)"}),a.createElement("path",{d:"m171.6 116.256-3.76 4.555h2.286l-1.083 3.589 3.852-4.615h-2.377l1.082-3.529Z",fill:"url(#p)"}),a.createElement("path",{d:"M81.362 131.985c4.187 0 7.581-3.403 7.581-7.601s-3.394-7.601-7.581-7.601c-4.188 0-7.582 3.403-7.582 7.601s3.394 7.601 7.582 7.601Z",fill:"#333",stroke:"#F5F5F7"}),a.createElement("path",{d:"m82.596 120.317-3.761 4.554h2.287l-1.083 3.591 3.851-4.615h-2.377l1.083-3.53Z",fill:"url(#q)"}),a.createElement("path",{d:"m82.594 120.312-3.76 4.555h2.287l-1.084 3.589 3.852-4.615h-2.377l1.082-3.529Z",fill:"url(#r)"}),a.createElement("path",{d:"M89.947 131.326 79.48 165.577M40.264 67.397 6.492 58.73",stroke:"#C1C1C1",strokeWidth:"1.25",strokeMiterlimit:"10"})),a.createElement("defs",null,a.createElement("linearGradient",{id:"a",x1:"153.858",y1:"85.279",x2:"159.252",y2:"85.279",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"})),a.createElement("linearGradient",{id:"b",x1:"111.378",y1:"84.373",x2:"116.772",y2:"84.373",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"})),a.createElement("linearGradient",{id:"c",x1:"138.349",y1:"60.037",x2:"143.743",y2:"60.037",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"})),a.createElement("linearGradient",{id:"d",x1:"153.858",y1:"128.989",x2:"159.252",y2:"128.989",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"})),a.createElement("linearGradient",{id:"e",x1:"72.269",y1:"112.089",x2:"77.664",y2:"112.089",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"})),a.createElement("linearGradient",{id:"f",x1:"-1231.68",y1:"2440.39",x2:"-1231.01",y2:"2440.39",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EEFB3"}),a.createElement("stop",{offset:".85",stopColor:"#55BDFF"})),a.createElement("linearGradient",{id:"g",x1:"70.247",y1:"58.685",x2:"75.641",y2:"58.685",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"})),a.createElement("linearGradient",{id:"h",x1:"132.281",y1:"70.853",x2:"137.675",y2:"70.853",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"})),a.createElement("linearGradient",{id:"i",x1:"143.744",y1:"118.849",x2:"149.138",y2:"118.849",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"})),a.createElement("linearGradient",{id:"j",x1:"116.772",y1:"101.949",x2:"122.166",y2:"101.949",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"})),a.createElement("linearGradient",{id:"k",x1:"-1219.88",y1:"2370.51",x2:"-1219.2",y2:"2370.51",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"})),a.createElement("linearGradient",{id:"l",x1:"135.474",y1:"101.031",x2:"140.529",y2:"101.031",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"})),a.createElement("linearGradient",{id:"m",x1:"-1219.88",y1:"2370.52",x2:"-1219.2",y2:"2370.52",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"})),a.createElement("linearGradient",{id:"n",x1:"98.389",y1:"74.018",x2:"103.444",y2:"74.018",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"})),a.createElement("linearGradient",{id:"o",x1:"-1219.87",y1:"2370.51",x2:"-1219.2",y2:"2370.51",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"})),a.createElement("linearGradient",{id:"p",x1:"167.84",y1:"120.328",x2:"172.895",y2:"120.328",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"})),a.createElement("linearGradient",{id:"q",x1:"-1219.87",y1:"2370.51",x2:"-1219.2",y2:"2370.51",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"})),a.createElement("linearGradient",{id:"r",x1:"78.834",y1:"124.384",x2:"83.889",y2:"124.384",gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#1EF5B9"}),a.createElement("stop",{offset:".85",stopColor:"#55C3FF"}))))};ga.defaultProps={width:"236",height:"169",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const fa=o.default.div.withConfig({displayName:"styled__EmptyPage",componentId:"sc-1h0wejj-0"})(["height:100%;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;"]),ya=o.default.div.withConfig({displayName:"styled__Title",componentId:"sc-1h0wejj-1"})(["color:'#333333';font-weight:500;padding:5px;"]),va=o.default.div.withConfig({displayName:"styled__Body",componentId:"sc-1h0wejj-2"})(["color:'#5C5C5C';padding:5px;"]),wa=(0,o.default)(ga).withConfig({displayName:"styled__EmptyImage",componentId:"sc-1h0wejj-3"})(["padding:5px;"]),xa=()=>a.createElement(fa,null,a.createElement(wa,null),a.createElement(ya,null,T.t("experimentsEmptyState.title")),a.createElement(va,null,T.t("experimentsEmptyState.body"))),Ea=()=>{const e=(0,r.Zp)(),{handlePageChange:t,handleSearchKeywordChanged:n,count:i,page:l,searchKeyWord:o}=(0,a.useContext)(oe);return a.createElement(We,{showBottomBar:!0,footerContent:a.createElement(he.A,{page:l,onChange:(e,n)=>(e=>{t(e)})(n),count:Math.ceil(i/50),showFirstButton:!0,showLastButton:!0}),sidePanelContent:a.createElement(st,{onClickReports:()=>{const t=Y.A.getUri({url:"/reports",params:{fleetId:J(),simType:Se}});e(t)},onClickExperiments:()=>{}})},a.createElement(ze,null,a.createElement(ve,null),a.createElement(ha,{onChange:e=>n(e.target.value),value:o}),i<=0?a.createElement(xa,null):a.createElement(da,null)))};var ba=n(66577),Ca=function(e){return a.createElement("svg",e,a.createElement("path",{fill:"none",d:"M5.396 9.212a.897.897 0 0 1-1.321 0L.772 5.701a1.037 1.037 0 0 1 0-1.404L4.075.785a.895.895 0 0 1 1.321 0"}))};Ca.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"6.5",height:"10.5"};const _a=o.default.div.withConfig({displayName:"styled__StyledBackButton",componentId:"sc-1w7if73-0"})(["cursor:pointer;color:",";font-size:",";margin-top:auto;font-weight:300;padding-bottom:5px;display:flex;align-items:center;",""],w,c,e=>{let{marginBottom:t}=e;return t&&`margin-bottom: ${t}px`}),ka=(0,o.default)(Ca).attrs({stroke:w}).withConfig({displayName:"styled__BackArrow",componentId:"sc-1w7if73-1"})(["transform:scale(.8);margin-right:5px;"]),Sa=e=>{let{marginBottom:t}=e;const n=(0,r.Zp)();return a.createElement(_a,{marginBottom:t,onClick:()=>de(n),"data-test-id":"backBtn"},a.createElement(ka,null),T.t("addExperimentWizard.backButton"))};var Aa=function(e){return a.createElement("svg",e,a.createElement("path",{d:"m1196-561 3 3 5-5",transform:"translate(-1195.47 563.53)",style:{fill:"none",stroke:"#fff",strokeWidth:"1.5px"}}))};Aa.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"9.061",height:"6.591"};var Ta=function(e){return a.createElement("svg",e,a.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),a.createElement("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}))};Ta.defaultProps={xmlns:"http://www.w3.org/2000/svg",height:"24",width:"24",fill:"#F03A5F"};const Ia=o.default.div.withConfig({displayName:"styled__WizardContainer",componentId:"sc-unpxgq-0"})(["display:flex;flex-direction:row;width:100%;height:100%;min-height:700px;"]),Na=o.default.div.withConfig({displayName:"styled__StepsContainer",componentId:"sc-unpxgq-1"})(["width:15%;min-width:250px;padding:2em;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background-color:#f5f5f7;border-right:1px solid rgb(223,223,223);height:100%;"]),Ma=o.default.div.withConfig({displayName:"styled__StepContentContainer",componentId:"sc-unpxgq-2"})(["padding:2em 0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:85%;overflow-y:auto;height:90%;"]),Da=o.default.div.withConfig({displayName:"styled__Title",componentId:"sc-unpxgq-3"})(["font-weight:600;color:#333;font-size:18px;margin-right:20px;"]),La=o.default.div.withConfig({displayName:"styled__StepTitle",componentId:"sc-unpxgq-4"})([""," cursor:pointer;display:flex;margin:0.2em 0 0.2em 0;transition:all 0.2s;position:relative;",""],e=>{let{selectedIndex:t,index:n}=e;return t>=n&&`\n color: ${h};\n font-weight: 600;\n`},e=>{let{isNavigationDisabled:t}=e;return t&&"\ncursor: default;\nopacity: 0.5;\n"}),Ba=o.default.div.withConfig({displayName:"styled__StepTitleContainer",componentId:"sc-unpxgq-5"})(["&:after{"," border-left:","4d;margin-left:0.5em;padding:1em;line-height:3em;transition:all 0.2s;}"],e=>{let{isLastStep:t}=e;return!t&&"content: '';"},e=>{let{selectedIndex:t,index:n}=e;return t>n?`2px solid ${h}`:`1px solid ${g}`}),Ra=o.default.div.withConfig({displayName:"styled__Circle",componentId:"sc-unpxgq-6"})(["width:1em;min-width:1em;min-height:1em;height:1em;border:0.1rem solid ",";"," border-radius:50%;margin-right:1em;transition:all 0.2s;",""],e=>{let{selectedIndex:t,index:n,isCompleted:a}=e;return t>=n||a?h:g},e=>{let{isCompleted:t}=e;return t&&`background-color: ${h}fd;`},e=>{let{isCompleted:t,signalIncomplete:n}=e;return!t&&n&&`border-color: ${y};`}),Fa=o.default.div.withConfig({displayName:"styled__StepsProgressContainer",componentId:"sc-unpxgq-7"})(["color:",";font-size:",";"],g,p),Oa=(0,o.default)(Aa).withConfig({displayName:"styled__CheckMark",componentId:"sc-unpxgq-8"})(["position:absolute;z-index:99;top:5px;left:4px;"]),Pa=(0,o.default)(Ta).withConfig({displayName:"styled__RequiredMark",componentId:"sc-unpxgq-9"})(["position:absolute;z-index:99;top:-3px;left:-3.5px;transform:scale(.9);"]),za=o.default.div.withConfig({displayName:"styled__TitleContainer",componentId:"sc-unpxgq-10"})(["display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:center;"]),ja=o.default.div.withConfig({displayName:"styled__ViewStateText",componentId:"sc-unpxgq-11"})(["font-weight:400;font-size:",";padding:5px 8px;background:#e7f2ff;border-radius:5px;color:",";"],c,h),Wa=o.default.div.withConfig({displayName:"ActionButtons__ActionButtonsContainer",componentId:"sc-1xrza75-0"})(["position:fixed;bottom:40px;right:40px;display:flex;"]),$a=o.default.div.withConfig({displayName:"ActionButtons__SubmitText",componentId:"sc-1xrza75-1"})(["padding:0em 1.5em;font-size:14px;"]),Va=e=>{let{isLastStep:t,onClick:n,isLoading:i,isReadOnly:l,onClickSave:r,showClickSaveOverride:o}=e;return a.createElement(Wa,null,(!l||o)&&a.createElement(fe,{id:"saveAndExit",onClick:i?()=>null:r,disabled:i,backgroundColor:"transparent"},a.createElement($a,null,i?T.t("addExperimentWizard.saving"):T.t("addExperimentWizard.saveAndExit"))),(!l||!t)&&a.createElement(fe,{id:t?"launchSimulation":"nextStep",onClick:i?()=>null:n,disabled:i||l&&t,backgroundColor:h},a.createElement($a,null,i&&t?T.t("addExperimentWizard.validating"):i?T.t("addExperimentWizard.processing"):T.t("addExperimentWizard."+(t?"launchSimulation":"nextStep")))))},Ga=o.default.div.withConfig({displayName:"styled__Title",componentId:"sc-14g9frn-0"})(["font-weight:600;color:#333;font-size:18px;margin-bottom:1em;"]),Ua=o.default.div.withConfig({displayName:"styled__Description",componentId:"sc-14g9frn-1"})(["color:",";font-size:",";width:85%;line-height:20px;"],w,c),Za=o.default.div.withConfig({displayName:"styled__HeaderContainer",componentId:"sc-14g9frn-2"})(["padding-left:4em;margin-bottom:1em;"]),Ha=o.default.div.withConfig({displayName:"styled__ContentContainer",componentId:"sc-14g9frn-3"})(["height:72%;overflow:visible;padding-left:4em;",";"],e=>{let{readOnly:t}=e;return t&&"pointer-events: none"}),qa=e=>{const t=(0,a.useRef)(null);return(0,a.useEffect)(()=>{const e=t.current,n=e?.parentElement;if(!n||!e||0===e.clientHeight)return;n.style.paddingTop=0;const a=n.children[1];a&&(a.style.marginTop="10px");const i=()=>{const t=n?.getBoundingClientRect(),a=e?.getBoundingClientRect();t&&e&&a&&(t.top<=a.height?(e.style.position="sticky",e.style.top="0",e.style.left="0",e.style.zIndex="5"):e.style.position="static")};return n?.addEventListener("scroll",i),()=>window.removeEventListener("scroll",i)},[]),a.createElement("div",{ref:t},e.children)},Ka=e=>{let{step:t,updateStepData:n,updateMultipleStepData:i,stepData:l,wizardData:r,showErrors:o,readOnly:s,setIsNavigationDisabled:d,setSelectedStepIndexById:c}=e;return a.createElement(Ma,null,t.topStickyComponent&&a.createElement(qa,null,t.topStickyComponent({wizardData:r})),a.createElement(Za,null,a.createElement(Ga,null,t.title),a.createElement(Ua,null,t.description)),a.createElement(Ha,{readOnly:s},a.createElement(t.component,{readOnly:s,updateStepData:n,updateMultipleStepData:i,stepData:l,wizardData:r,showErrors:o,setIsNavigationDisabled:d,setSelectedStepIndexById:c})))},Ja=n.p+"c3a35542c7a6c3788fcd830f5b5230f6.png",Xa=o.default.img.withConfig({displayName:"Car__StyledCarIcon",componentId:"sc-1qfqqv3-0"})(["height:3.5em;position:relative;left:","em;transition:all 0.2s;top:","em;transform:rotate(","deg);z-index:200;"],e=>{let{x:t}=e;return t-.4},e=>{let{selectedStepIndex:t,y:n}=e;return n+3+4.7*t},e=>{let{direction:t}=e;return t}),Ya=e=>{let{selectedStepIndex:t}=e;const[n,i]=(0,a.useState)(0),[l,r]=(0,a.useState)(0),[o,s]=(0,a.useState)(0),[d,c]=(0,a.useState)(!1);(0,a.useEffect)(()=>{if(d){const e=setInterval(()=>h(-1*Math.sin(p.current*Math.PI/180)+u.current.x,Math.cos(p.current*Math.PI/180)+u.current.y),100);return()=>clearInterval(e)}},[d]);const p=(0,a.useRef)(o),u=(0,a.useRef)({x:n,y:l}),m=e=>{p.current=e,s(e)},h=(e,t)=>{u.current={x:e,y:t},i(e),r(t)},g=e=>{if(document.activeElement===document.body)switch(e.code){case"ArrowUp":c(!0);break;case"ArrowLeft":m(p.current-30);break;case"ArrowRight":m(p.current+30);break;case"ArrowDown":c(!1)}};return(0,a.useEffect)(()=>{c(!1),m(0),h(0,0)},[t]),(0,a.useEffect)(()=>(document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}),[]),a.createElement(Xa,{x:n,y:l,direction:o,src:Ja,selectedStepIndex:t})},Qa=JSON.parse('{"validationStrings":{"positiveFloat":"^[+]?([.]\\\\d+|\\\\d+[.]?\\\\d*)$","positiveFloatGreaterThanZero":"^([0-9]*[1-9][0-9]*(\\\\.[0-9]+)?|[0]+\\\\.[0-9]*[1-9][0-9]*)$","floatGreaterThanOne":"^[+]?([1,2,3,4,5,6,7,8,9]\\\\d*|[1,2,3,4,5,6,7,8,9]\\\\d*[.]?[0,1,2,3,4,5,6,7,8,9]\\\\d*)$","intGreaterThanZero":"^[+]?([1,2,3,4,5,6,7,8,9]\\\\d*)$","nonNegativeInt":"^[+]?([0,1,2,3,4,5,6,7,8,9]\\\\d*)$","int":"^[-+]?([0,1,2,3,4,5,6,7,8,9]\\\\d*)$","allowNull":"^$|","intBetweenOneAndHundred":"^[1-9][0-9]?$","intBetweenZeroAndNintyNine":"^[0-9][0-9]?$","isCloudStorageUri":"(((gs:|s3:)//)[A-Za-z0-9]{2})|^$","intBetweenZeroAndHundred":"^[0-9][0-9]?$","intBetweenTwoAndFifty":"^[2-4][0-9]?$|^50?$|^[2-9]$|^1[0-9]$","intGreaterThanTwenty":"^([2-9]\\\\d{1}\\\\d*|\\\\d{3}\\\\d*)$","string":"^.{5,}$"},"types":["enum","boolean","number","string","enumDropdown","table","staticText"],"entries":[{"key":"maxStopPointsOnVehicle","type":"number","allowNull":false,"validation":"intBetweenTwoAndFifty"},{"key":"refuelThreshold","type":"number","allowNull":false,"validation":"intBetweenZeroAndHundred","unit":"percentage"},{"key":"placement","type":"json","container":"row","fields":[{},{"key":"active","type":"boolean"},{"key":"placementNewLine","type":"lineBreak","shouldShowFuncName":"isPlacementStagingOrNone"},{"key":"mode","type":"enumDropdown","allowNull":false,"options":["staging","territoryWide","demandStaging"],"shouldDisableFuncName":"isPlacementOff"},{"key":"maxMoves","type":"number","allowNull":false,"validation":"intGreaterThanZero","unit":"placementMoves","shouldShowFuncName":"isPlacementTerritoryWide"},{"key":"maxPlacementOverClosestKm","type":"number","allowNull":false,"validation":"positiveFloat","unit":"demandStagingMaxDistance","shouldShowFuncName":"isPlacementDemandStaging"}]},{"key":"idleType","type":"json","container":"row","descriptionList":["inPlace","circling"],"fields":[{},{"key":"mode","type":"enumDropdown","allowNull":false,"options":["inPlace","circling"]},{"key":"circlingNewLine","type":"lineBreak","internal":true},{"key":"circlingDistance","type":"number","allowNull":false,"unit":"meters","internal":true}]},{"key":"router","type":"json","internal":true,"container":"column","fields":[{"key":"type","type":"enumDropdown","options":["osrm","gmaps","linear"]},{"key":"gmapsApiKey","type":"string","allowNull":false,"validation":"string","shownOn":"gmaps","title":"Google maps API key","margin":"10px 0"}]},{"key":"secondaryRouter","type":"enumDropdown","allowNull":true,"validation":"string","options":[{"key":"gmaps","value":"gmaps"}],"title":"Adjust ETA using to Google Maps","margin":"10px 0"},{"key":"rideRefuelThreshold","type":"number","allowNull":false,"validation":"intBetweenZeroAndHundred","unit":"percentage","shouldDisableFuncName":"isFieldServicingVariation"},{"key":"timeToParkVehicleBeforeShiftEnd","type":"number","allowNull":true,"internal":true,"unit":"minutes"},{"key":"driftFactor","type":"number","allowNull":true,"validation":"intGreaterThanZero","unit":"percentage","internal":true},{"key":"driftConstant","type":"number","allowNull":true,"validation":"intGreaterThanZero","unit":"minutes","internal":true},{"key":"durationCoefficient","type":"number","allowNull":false,"validation":"positiveFloatGreaterThanZero"},{"key":"distanceCoefficient","type":"number","allowNull":false,"validation":"positiveFloatGreaterThanZero"},{"key":"maxStationsToCheckForBestCharger","type":"number","allowNull":true,"validation":"intGreaterThanZero","internal":true},{"key":"evChargingRates","type":"json","container":"column","validation":"func","fields":[{"shouldShowFuncName":"isNotAdvanced"},{"key":"hourlyRates","type":"table","subtype":"hoursNumber","unit":"currency","internal":true,"label":true},{"key":"defaultRate","type":"number","unit":"currency","label":true}]},{"key":"gasPrice","type":"number","validation":"positiveFloat","allowNull":true,"unit":"currency"},{"key":"maxChargeLevelSettings","type":"json","container":"row","fields":[{},{"key":"mode","type":"enumDropdown","options":["fixed","demandSensitive"]},{"shouldShowFuncName":"isMaxChargeLevelFixed"},{"key":"maxChargeLevel","type":"number","allowNull":false,"validation":"intBetweenOneAndHundred","unit":"percentage","shouldShowFuncName":"isMaxChargeLevelFixed"},{"key":"demandTimeWindow","type":"number","validation":"nonNegativeInt","unit":"demandChargingTimeWindow","shouldShowFuncName":"isMaxChargeLevelDemandSensitive"},{"key":"demandSensitiveChargingFile","type":"uploadFile","compactMode":true,"allowNull":true,"validation":"string","fileTypes":[".csv"],"fileKey":"DEMAND_SENSITIVE_MAX_CHARGING","title":true,"shouldShowFuncName":"isMaxChargeLevelDemandSensitive"}]},{"key":"startingChargeLevel","type":"json","container":"row","unit":"percentage","fields":[{"key":"min","type":"number","unit":"percentage","allowNull":false,"validation":"intBetweenOneAndHundred","label":true},{"key":"max","type":"number","unit":"percentage","allowNull":false,"validation":"intBetweenOneAndHundred","label":true}]},{"key":"pooling","internal":true,"type":"enumDropdown","options":["active","passive","no"],"optionsOnCondition":{"conditionFuncName":"hasLargeDemandData","options":["no"]},"shouldDisableFuncName":"hasLargeDemandData"},{"key":"accelerated","isVirtual":true,"type":"boolean"},{"key":"chargeOnTheWay","type":"json","container":"row","fields":[{},{"key":"active","type":"boolean"}],"fieldsBelow":[{"key":"threshold","type":"number","allowNull":false,"validation":"intBetweenOneAndHundred","unit":"percentage","title":true,"description":true,"row":true,"shouldDisableFuncName":"isChargeOnTheWayDisabled"},{"key":"maxTimeInMinutes","type":"number","allowNull":false,"validation":"nonNegativeInt","unit":"minutes","title":true,"description":true,"row":true,"shouldDisableFuncName":"isChargeOnTheWayDisabled"},{"key":"demandSensitive","type":"boolean","title":true,"description":true,"row":true,"shouldDisableFuncName":"isChargeOnTheWayDisabled"},{"key":"ridePerVehicleRatio","type":"number","allowNull":false,"title":true,"description":true,"row":true,"validation":"positiveFloatGreaterThanZero","shouldDisableFuncName":"isChargeOnTheWayDemandDisabled"},{"key":"demandWindowEnd","type":"number","allowNull":false,"title":true,"description":true,"row":true,"validation":"intGreaterThanZero","unit":"minutes","shouldDisableFuncName":"isChargeOnTheWayDemandDisabled"}]},{"key":"routePlanConcurrency","type":"number","internal":true,"validation":"intGreaterThanZero","allowNull":true},{"key":"matchingEngine","type":"enumDropdown","internal":true,"options":["autofleet","greedy"],"allowedFleets":["e59d2ef6-7304-4f4d-b74a-787e3388ea9c","e440173c-ee30-470d-b944-1012165dfe64","ec8655a4-b37b-4015-8de1-dfa88556a7ac"],"allowNull":true,"fleetDefaultValues":{"ec8655a4-b37b-4015-8de1-dfa88556a7ac":"autofleet","5b5d81ac-e90a-48cf-9633-4451aa9ff18b":"autofleet","5141d46a-7029-4f24-8757-32d870104f8f":"autofleet"}},{"key":"chargerSelectionStrategy","type":"json","container":"row","fields":[{},{"key":"chargerSelectionStrategyValue","type":"enumDropdown","allowNull":false,"options":["first_to_leave","first_to_arrive"]}],"descriptionList":["firstToLeave","firstToArrive"],"fieldsBelow":[{"key":"enableChargerPowerPrioritization","type":"boolean","title":true,"row":true,"shouldShowFuncName":"isChargerSelectionFirstToLeave"},{"key":"firstToLeavePrametersExplanation","title":true,"type":"staticText","shouldShowFuncName":"isChargerPowerPrioritizationEnabled"},{"key":"powerMismatchAlpha","type":"number","allowNull":false,"validation":"positiveFloat","title":true,"row":true,"shouldShowFuncName":"isChargerPowerPrioritizationEnabled"},{"key":"powerMismatchBeta","type":"number","allowNull":false,"validation":"positiveFloat","title":true,"row":true,"shouldShowFuncName":"isChargerPowerPrioritizationEnabled"}]},{"key":"advancedRouting","type":"boolean","internal":true},{"key":"logLevel","type":"enumDropdown","internal":true,"options":["debug","info","warning","error","critical"],"allowNull":true},{"key":"logTypes","type":"string","internal":true,"allowNull":true},{"key":"exportPath","type":"string","internal":true,"validation":"isCloudStorageUri","allowedFleets":["e59d2ef6-7304-4f4d-b74a-787e3388ea9c","e440173c-ee30-470d-b944-1012165dfe64","ec8655a4-b37b-4015-8de1-dfa88556a7ac","5b5d81ac-e90a-48cf-9633-4451aa9ff18b"],"allowNull":true},{"key":"raasSimulatorBranch","type":"string","internal":true,"allowNull":false},{"key":"measurePerformance","type":"boolean","internal":true,"allowNull":false},{"key":"allowRemoteDebugging","type":"boolean","internal":true,"allowNull":false},{"key":"remoteDebugWaitForClient","type":"boolean","internal":true,"allowNull":false},{"key":"generalSeed","type":"number","internal":true,"allowNull":false},{"key":"critical","type":"boolean","internal":true,"allowNull":false},{"key":"minimalChargingLevelAtEndOfShift","type":"number","allowNull":false,"validation":"intBetweenZeroAndNintyNine","unit":"percentage"},{"key":"vehiclePostRefuelWaitTime","type":"number","allowNull":false,"validation":"nonNegativeInt","internal":false},{"key":"chargerPostRefuelWaitTime","type":"number","allowNull":false,"validation":"intGreaterThanTwenty","internal":false},{"key":"matchToBestNVehicles","type":"number","allowNull":false,"validation":"nonNegativeInt","internal":true},{"key":"retriesOnMatching","type":"number","allowNull":true,"validation":"nonNegativeInt","internal":true},{"key":"demandFileUrl","type":"string","internal":true,"allowNull":true},{"key":"snapshotFileUrl","type":"string","internal":true,"allowNull":true},{"key":"osrmServer","type":"enumDropdown","options":[{"key":"osrm","value":"https://osrm.autofleet.io"},{"key":"noDriverNorthCalifornia","value":"http://no-driver-north-california"}],"allowedFleets":["e59d2ef6-7304-4f4d-b74a-787e3388ea9c","e440173c-ee30-470d-b944-1012165dfe64","ec8655a4-b37b-4015-8de1-dfa88556a7ac"],"internal":true,"allowNull":false},{"key":"mapsMaxDeviation","type":"number","allowNull":true,"validation":"nonNegativeInt","internal":true},{"key":"indefleet","type":"json","container":"row","fields":[{},{"key":"active","type":"boolean"}],"fieldsBelow":[{"key":"replaceChargingVehicles","type":"boolean","title":true,"label":true,"shouldDisableFuncName":"isIndefeleetDisabled","row":true},{"key":"timeBasedVehicleAvailability","type":"uploadFile","allowNull":true,"validation":"json,csv","sampleFileName":"Example_indefleet_predefined_policy.json","fileTypes":[".csv",".json"],"fileKey":"TIME_BASED_VEHICLE_AVAILABILITY","title":true,"shouldDisableFuncName":"isIndefeleetDisabled"},{"key":"indefleetDemandBased","type":"json","container":"row","title":true,"fields":[{"key":"maxFuelRangeForRefuel","type":"number","allowNull":true,"label":true,"internal":true,"row":true,"shouldDisableFuncName":"isIndefeleetDisabled"},{"key":"ridePerVehicleRatio","type":"number","validation":"positiveFloatGreaterThanZero","label":true,"hover":true,"row":true,"shouldDisableFuncName":"isTimeBasedVehicleAvailability"},{"key":"minInfleetedVehicles","type":"number","unit":"vehicles","allowNull":true,"validation":"nonNegativeInt","label":true,"hover":true,"row":true,"shouldDisableFuncName":"isTimeBasedVehicleAvailability"},{"key":"scheduleInterval","type":"number","unit":"minutes","allowNull":true,"validation":"intGreaterThanZero","label":true,"hover":true,"row":true,"shouldDisableFuncName":"isTimeBasedVehicleAvailability"},{"key":"demandWindowEnd","type":"number","unit":"minutes","allowNull":true,"validation":"intGreaterThanZero","label":true,"hover":true,"row":true,"shouldDisableFuncName":"isTimeBasedVehicleAvailability"}]}]}]}'),ei=e=>{if(!e)return Number(e);const[t]=e.split(":");return Number(t)},ti=(e,t,n)=>{const a="".concat(t?Qa.validationStrings.allowNull:"",Qa.validationStrings[n]);let i=e;return e&&"object"==typeof e&&(i=Object.values(e)[1]),!n||t&&null===i||String(i).match(a)},ni=e=>null==e||""===e,ai={evChargingRates:e=>{let t={};const n=(((e,t)=>{if(!e)return null;const n=Array(t.length).fill(void 0),a=Array(e.length).fill(void 0);return e.forEach((t,i)=>{const l=ei(t.start),r=ei(t.end);if(r<=l)return void(a[i]={...a[i],start:!0,end:!0});let o;o=t.start?t.end?(0,Pn.range)(ei(t.start),ei(t.end)):[l]:[r],o.forEach(o=>{if(void 0===n[o])n[o]=i;else{const s=n[o],d=e[s],c=ei(d.start),p=ei(d.end);null!=t.end&&(l<=c||r<=p)&&(a[i]={...a[i],end:!0},a[s]={...a[s],start:!0}),null!=t.start&&(p<=r||c<=l)&&(a[i]={...a[i],start:!0},a[s]={...a[s],end:!0})}})}),a})(e?.hourlyRates,Array(24))||[]).map(e=>({start:null!=e?.start?!e?.start:null,end:null!=e?.end?!e?.end:null}));return t={...t,hourlyRates:n},e?.hourlyRates?.forEach((e,n)=>{t.hourlyRates[n]={...t.hourlyRates[n],rate:!(e.start&&e.end&&!e.rate)&&(ni(e.rate)||Number(e.rate)>0),hasValue:{start:!!e.start,end:!!e.end}}}),t.defaultRate=ni(e?.defaultRate)?ni(e?.hourlyRates?.[0]?.rate):Number(e?.defaultRate)>0,t.defaultRate||Object.values(e?.hourlyRates||{}).some(e=>e.start||e.end||e.rate)?{result:t,isValid:t.defaultRate&&Number(t.defaultRate)>0&&(!t.hourlyRates||t.hourlyRates.every(e=>(null==e.start||e.start)&&(null==e.end||e.end)&&(null==e.rate||e.rate)&&e.hasValue.start&&e.hasValue.end))}:{result:null,isValid:!0}}},ii=[e=>e.refuelThreshold>=e.maxChargeLevel?"FillingThresholdGreaterThanMaxChargeLevel":null,e=>e.rideRefuelThreshold>e.refuelThreshold?"RideFillingThresholdGreaterThanFillingThreshold":null],li=e=>{const t=[];return ii.forEach(n=>{const a=n(e);a&&t.push(a)}),t},ri="modelName",oi="cost",si="batteryCapacityKWH",di="idleConsumptionKwh",ci="chargingCurve",pi="labels",ui="chargeRateKWH",mi="isCustomValue",hi=[oi,mi,si,pi,ui,di,ci],gi=(e,t)=>T.t(`${e}${t}`),fi=e=>gi("addExperimentWizard.steps.vehicles.options.power.",e),yi={IC:{value:"IC",label:fi("ice")},EV:{value:"EV",label:fi("electric")}},vi="electric",wi="public_electric",xi="ice",Ei=vi,bi=wi,Ci=xi,_i=vi,ki="-",Si={[Ei]:30,[bi]:30,[Ci]:5},Ai={[Ei]:"EV",[Ci]:"ICE"},Ti={[Ei]:{charging:"Filling EV",parkingAndCharging:"Filling EV & Parking"},[bi]:{charging:"Filling EV",parkingAndCharging:"Filling EV & Parking"},[Ci]:{charging:"Filling ICE",parkingAndCharging:"Filling ICE & Parking"}},Ii="addExperimentWizard.steps.fillingStations.newStationConfiguration",Ni={[Ei]:`${Ii}.chargersLabel`,[bi]:`${Ii}.chargersLabel`,[Ci]:`${Ii}.slotsLabel`},Mi={[Ei]:`${Ii}.chargersRequiredError`,[bi]:`${Ii}.chargersRequiredError`,[Ci]:`${Ii}.slotsRequiredError`},Di={[Ei]:`${Ii}.chargersRangeError`,[bi]:`${Ii}.chargersRangeError`,[Ci]:`${Ii}.slotsRangeError`},Li={[Ei]:"KW",[bi]:"KW",[Ci]:"min"},Bi="during shift",Ri="end of shift",Fi=[Bi],Oi={PARKING_AND_CHARGING_STATION:"parking_and_charging",CHARGING_STATION:"charging",PARKING_STATION:"parking",MAINTENANCE_STATION:"maintenance"},Pi={[Oi.PARKING_AND_CHARGING_STATION]:5,[Oi.PARKING_STATION]:5,[Oi.MAINTENANCE_STATION]:2},zi=[Oi.PARKING_AND_CHARGING_STATION,Oi.PARKING_STATION],ji=[Oi.PARKING_AND_CHARGING_STATION,Oi.CHARGING_STATION],Wi=[Oi.MAINTENANCE_STATION],$i=e=>new Set(e),Vi=$i(zi),Gi=$i(ji),Ui=$i(Wi);let Zi=function(e){return e.STAGING="staging",e.PARKING="parking",e.BOTH="parking_and_staging",e}({});const Hi=[Zi.PARKING],qi={PARKING_STATION:Zi.PARKING,BOTH:Zi.BOTH,STAGING_STATION:Zi.STAGING},Ki={[Zi.PARKING]:[qi.PARKING_STATION],[Zi.STAGING]:[qi.STAGING_STATION],[Zi.BOTH]:[qi.PARKING_STATION,qi.STAGING_STATION]},Ji={DEMAND_STAGING:"demandStaging",STAGING:"staging",TERRITORY_WIDE:"territoryWide"},Xi=["e440173c-ee30-470d-b944-1012165dfe64","f5458b19-1720-2840-a4fc-9254c74afc60"],Yi={1:"monday",2:"tuesday",3:"wednesday",4:"thursday",5:"friday",6:"saturday",7:"sunday"},Qi=e=>Vi.has(e),el=e=>Gi.has(e),tl=e=>Ui.has(e),nl=e=>null!=e.stationType&&(Gi.has(e.stationType)||Vi.has(e.stationType)),al=e=>null!=e.stationType&&Ui.has(e.stationType),il=e=>({id:e.station_id,lat:e.lat,lng:e.lng,address:e.address,capacity:e.capacity,jobs:e.jobs,timeLimitations:e.timeLimitations}),ll=e=>({rate:e.rate,slots:e.slots,lat:e.lat,lng:e.lng,type:e.type,labels:e.labels,id:e.id,address:e.address,stationType:e.stationType,idleConsumption:e.idleConsumption,timeLimitations:e.chargingTimeLimitations||e.timeLimitations,numOfHandles:e.connectorsPerCharger??e.numOfHandles,powerAllocationUnit:e.powerAllocationUnit,chargerPostRefuelWaitTime:e.chargerPostRefuelWaitTime}),rl=e=>({capacity:e.capacity,lat:e.lat,lng:e.lng,id:e.id,address:e.address,stationType:e.stationType,idleConsumption:e.idleConsumption,capabilities:e.capabilities,timeLimitations:e.parkingTimeLimitations||e.timeLimitations,parkingSuccessLikelihood:e.parkingSuccessLikelihood}),ol=e=>{const t="string"==typeof e?e.split(","):[],n=Object.values(qi),a=t.filter(e=>n.includes(e));return a.length?a:null},sl=e=>e.split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "),dl=(e,t)=>{if(0===e.length)return[];const n=(e=>{const t=new Set;return e.filter(e=>tl(e.stationType)).forEach(e=>{e.jobs&&Object.keys(e.jobs).forEach(e=>t.add(ul(e))),e.timeLimitations&&e.timeLimitations.forEach(e=>{e.jobs&&Object.keys(e.jobs).forEach(e=>t.add(ul(e)))})}),t})(t);return e.filter(e=>!n.has(ul(e)))},cl=(e,t)=>{if(0===e.length)return[];const n=(e=>{const t=new Set;return e?(e.forEach(e=>{e.labels&&t.add(e.labels)}),t):t})(t);return e.filter(e=>!n.has(e))},pl=e=>{const t=e?.demandData?.file?.metrics,n=e?.tasks?.file?.metrics,a=[t?.startDate,t?.endDate,n?.startDate,n?.endDate].filter(Boolean).map(e=>G()(e));if(a.length<2)return!1;const i=G().min(a);return G().max(a).diff(i,"days")+1>40},ul=e=>e.toLowerCase().replace(/\s+/g,"_");var ml=n(33829);const hl=(e,t,n)=>{const a=t||G().tz.guess(),i=n||G().tz.guess(),l=[...e?.hourlyRates||[]],r=[];return gl(l),l.forEach(e=>{const[t,n]=e.start.split(":"),[l,o]=e.end.split(":"),s=G()().tz(a).set({hour:t,minute:n}).tz(i),d=G()().tz(a).set({hour:l,minute:o}).tz(i);0!==d.hour()&&d.hour(){const t=e.find(e=>"00:00"===e.start),n=e.find(e=>"24:00"===e.end);if(t&&n&&t.rate===n.rate){const a={start:n.start,end:t.end,rate:t.rate};e.splice(e.indexOf(t),1),e.splice(e.indexOf(n),1),e.push(a)}},fl=1.609,yl=(e,t)=>{let n=t;return e===W?n/=fl:e===j&&(n*=fl),n},vl={TLV:{lat:32.06881,lng:34.7728}},wl="DEMAND_DATA",xl="VEHICLES_AND_ROUTES",El="DEMAND_PREDICTION",bl="TASKS",Cl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=e;if(t&&(a=e.concat(t)),Array.isArray(n)&&n.length>0){const e=n.map(e=>({...e,stationType:"maintenance"}));a=a.concat(e)}const i=a.map(e=>({...e,id:e.id||`${e.stationType||"station"}-${(0,ml.A)()}`}));return Object.values(i.reduce((e,t)=>({...e,[t.id]:{...e[t.id]?e[t.id]:{},...t}}),{}))};class _l extends Error{constructor(){super(...arguments),this.statusCode=400}}const kl=async e=>(async e=>{const{data:t}=await te.get("/api/v1/files",{params:e});return t})({urls:e}),Sl=(0,n(25727).Ay)(),Al={[Ae]:["details","territory","fillingStations","vehiclesAndRoutes","settings","review"],[Se]:["details","territory","parkingStations","fillingStations","vehicleGroups","shifts","driverGroups","demandData","tasks","settings","review"]},Tl=e=>{let{steps:t,title:n,onSubmit:i,variationId:l,isReadOnly:o,throttleOnSubmit:s}=e;const d=(0,r.Zp)(),[c,p]=(0,a.useState)(),u=ue(),[m,h]=(0,a.useState)(0),[g,f]=(0,a.useState)({}),[y,v]=(0,a.useState)(!1),[w,x]=(0,a.useState)(!1),[E,b]=(0,a.useState)(null),[C,_]=(0,a.useState)(!1),[k,S]=(0,a.useState)(!1),[A,I]=(0,a.useState)(!1),N=((e,t)=>t?e.filter(e=>Al[t].includes(e.id)):e)(t,c?.details.simType),M=N[m].id,D=()=>{const e=N.reduce((e,t)=>({...e,...(!g||!L(t.id))&&{[t.id]:!0}}),{});return f(e),e};(0,a.useEffect)(()=>{c?(L(M)?g[M]=!1:g[M]=!0,f(g)):(()=>{l?(async()=>{try{P.trackEvent("trying to get variation data",{variationId:l});const e=await Dn(l);P.trackEvent("getting variation data - successful",{variationId:l});const t=[e.vehiclesAndRoutesFileUrl,e.demandFileUrl,e.tasksFileUrl,e.demandPredictionFileUrl||e.settings.demandPredictionFileUrl].filter(e=>e);t.length&&(e.files=await kl(t.filter(e=>!!e))),l&&!o&&(e.name=n);const a=await(async(e,t)=>{let n;return t===W?n=(e.vehicleGroups||[]).map(e=>{const t=e;return t.range=yl(W,t.range),t}):({vehicleGroups:n}=e),{details:{name:e.name,details:e.description,tags:e.tags,simType:e.type},territory:{file:null,polygon:e.territory?e.territory.coordinates[0]:null,center:(()=>{if(!e.territory)return vl.TLV;const t=ba.polygon([e.territory.coordinates[0]]),n=ba.centroid(t),[a,i]=n.geometry.coordinates;return{lng:a,lat:i}})()},parkingStations:e.parkingStations,fillingStations:Cl(e.fillingStations,e.parkingStations,e.maintenanceStations),vehicleGroups:n,shifts:e.shifts||[],driverGroups:e.driverGroups,demandData:{url:e.demandFileUrl,file:e.files?.filter(e=>e.key===wl)[0],demandPredictionFileUrl:e.settings.demandPredictionFileUrl||e.demandPredictionFileUrl,predictionFile:e.files?.filter(e=>e.key===El)[0]},tasks:{url:e.tasksFileUrl,file:e.files?.filter(e=>e.key===bl)[0]},settings:{gasPrice:null,...e.settings,...e.settings&&"number"==typeof e.settings?.maxChargeLevel&&!e.settings?.maxChargeLevelSettings&&{maxChargeLevelSettings:{mode:"fixed",maxChargeLevel:e.settings.maxChargeLevel,demandTimeWindow:30,demandSensitiveChargingFile:null}},router:{...e.settings.router,type:e.settings.accelerated?"linear":e.settings.router.type},secondaryRouter:e.settings.secondaryRouter&&"off"!==e.settings.secondaryRouter?e.settings.secondaryRouter:null,evChargingRates:{defaultRate:null,...hl(e.settings.evChargingRates,"utc",null)},...e.settings.chargerSelectionStrategy&&(()=>{const t=e.settings.chargerSelectionStrategy,n="string"==typeof t?{chargerSelectionStrategyValue:t,powerMismatchAlpha:0,powerMismatchBeta:0}:t;return{chargerSelectionStrategy:{...n,enableChargerPowerPrioritization:0!==(n.powerMismatchAlpha??0)||0!==(n.powerMismatchBeta??0)}}})()},vehiclesAndRoutes:{data:e.vehiclesAndRoutes,url:e.vehiclesAndRoutesFileUrl,file:e.files?.filter(e=>e.key===xl)[0]},variationMetaData:{experimentId:e.experimentId,id:e.id,status:e.status}}})(e,u.distanceSystem);p(a)}catch(e){P.trackEvent("getting variation data - failed",{variationId:l}),Sl.error(`Failed to get variation data for variation ${l}`),de(d)}})():p((e=>e.reduce((e,t)=>({...e,[t.id]:t.initialDataGetter()}),{}))(N));const e=N.reduce((e,t)=>({...e,[t.id]:!0}),{});f(e)})()},[c]),(0,a.useEffect)(()=>{c&&A&&(()=>{const e=D();f(e)})()},[c?.details.simType]),(0,a.useEffect)(()=>{g&&l&&c&&!A&&(D(),I(!0))},[g,c]),(0,a.useEffect)(()=>{"review"===M&&c&&(async()=>{const e=[];if(c.demandData?.url&&e.push(c.demandData.url),c.tasks?.url&&e.push(c.tasks.url),c.vehiclesAndRoutes?.url&&e.push(c.vehiclesAndRoutes.url),0!==e.length)try{const t=await kl(e),n={...c};t.forEach(e=>{c.demandData?.url===e.url&&(n.demandData={...c.demandData,file:e}),c.tasks?.url===e.url&&(n.tasks={...c.tasks,file:e}),c.vehiclesAndRoutes?.url===e.url&&(n.vehiclesAndRoutes={...c.vehiclesAndRoutes,file:e})}),p(n)}catch(e){Sl.error("Failed to refresh file metrics",e)}})()},[m,M]);const L=e=>((e,t,n)=>({details:()=>(e=>!!e.name)(t),territory:()=>(e=>e.polygon?.length>0)(t),parkingStations:()=>((e,t)=>!!(e=>(e?.fillingStations||[]).some(e=>el(e.stationType)||Qi(e.stationType))&&!!e?.demandData?.url)(t)||e?.length>0)(t,n),fillingStations:()=>(e=>e?.length>0)(t),vehicleGroups:()=>(e=>{if(!e)return!1;for(let t=0;t{e[t][a]||hi.includes(a)||(n=!1)}),!n)return!1}return!0})(t),vehiclesAndRoutes:()=>(e=>!!e.data)(t),shifts:()=>!0,driverGroups:()=>(e=>{if(!e)return!1;for(let t=0;t{e[t][a]||""===e[t][a]||(n=!1)}),!n)return!1}return!0})(t),demandData:()=>((e,t)=>!!(e=>(e?.fillingStations||[]).some(e=>tl(e.stationType))&&!!e?.tasks?.url)(t)||!!e.url)(t,n),tasks:()=>!0,settings:()=>(e=>{const t=Object.keys(e).some(t=>{const[n,a]=((e,t)=>{const n=Qa.entries.find(t=>t.key===e),a=n?.fields,i=a&&a[1]?.shownOn;return[n?.allowNull||a&&a?.[1]?.allowNull||i&&i!==t.type,n?.validation||a&&a?.[1]?.validation||""]})(t,e[t]);return"func"===a?!ai[t](e[t]).isValid:!ti(e[t],n,a)}),n=li(e);return!t&&0===n.length})(t),review:()=>(e=>{if(e?.demandData?.file?.metrics?.isLoading||e?.tasks?.file?.metrics?.isLoading)return!1;if(pl(e))return!1;if(!e?.tasks?.url)return!0;const t=e?.fillingStations||[];return!(!t.some(e=>tl(e.stationType))||dl(e?.tasks?.file?.metrics?.taskTypes||[],t).length>0||cl(e?.tasks?.file?.metrics?.vehicleGroups||[],e?.vehicleGroups||[]).length>0)})(n)}[e]()))(e,c[e],c),B=c?.variationMetaData?.status===z.PENDING,R=m===N.length-1;return a.createElement(a.Fragment,null,a.createElement(Ia,null,c&&a.createElement(a.Fragment,null,a.createElement(Na,null,a.createElement(za,null,a.createElement(Da,null,n),o&&a.createElement(ja,null,T.t("addExperimentWizard.wizardViewStates.readOnly"))),a.createElement(Fa,null,a.createElement(Ya,{selectedStepIndex:m}),N.map((e,t)=>(e=>{let{selectedIndex:t,index:n,title:i,onClick:l,isLastStep:r,isCompleted:o,signalIncomplete:s,isNavigationDisabled:d}=e;return a.createElement(Ba,{key:i,index:n,selectedIndex:t,isLastStep:r},a.createElement(La,{index:n,selectedIndex:t,onClick:l,isNavigationDisabled:d,"data-test-id":`${i}-tab`},a.createElement(Ra,{index:n,selectedIndex:t,isCompleted:o,signalIncomplete:s}),o&&a.createElement(Oa,null),s&&!o&&a.createElement(Pa,null),i))})({isNavigationDisabled:k,selectedIndex:m,index:t,title:e.title,onClick:()=>!k&&h(t),isLastStep:t===N.length-1,isCompleted:!g[e.id],signalIncomplete:y&&g[e.id]})))),a.createElement(Ka,{step:N[m],stepData:c[M],updateStepData:e=>(async e=>{const t={...c,[M]:e};await p(t),await s(t,!0,!1,!1)})(e),updateMultipleStepData:async e=>{const t={...c,...e};await p(t),await s(t,!0,!1,!1)},wizardData:c,showErrors:y,readOnly:o,setIsNavigationDisabled:S,setSelectedStepIndexById:e=>h((e=>N.findIndex(t=>t.id===e))(e))}),a.createElement(Va,{onClickSave:async()=>{if(!c?.details?.name)return v(!0),void f(e=>({...e,details:!0}));_(!0);try{await i(c,!0)}catch(e){console.error(e),b(e?.message||null),x(!0)}_(!1)},showClickSaveOverride:B,isLoading:C||k,onClick:()=>R?(async()=>{const e=D();if(v(!0),(0,Pn.isEmpty)(e)){_(!0);try{s&&"function"==typeof s.flush&&await s.flush(),await i(c,!1,!0)}catch(e){console.error(e),b(e?.message||null),x(!0)}_(!1)}})():h(m+1),isLastStep:R,isReadOnly:o}))),a.createElement(wt,{submitButtonText:"Back",isVisible:w,onClose:()=>{x(!1),b(null),_(!1)},title:T.t("addExperimentWizard.steps.territory.popupErrorTitle"),onClickSubmitButton:()=>{x(!1),b(null),_(!1)}},a.createElement(On,{errorMessage:E||T.t("genericServerError")})))};var Il=n(61769),Nl=n(40068);const Ml=(0,Nl.us)({isDarkMode:!1}),Dl=o.default.text.withConfig({displayName:"styled__ErrorText",componentId:"sc-1dotdqo-0"})(["color:",";font-weight:500;display:block;font-size:",";margin:10px 0;"],y,c),Ll=o.default.div.withConfig({displayName:"styled__Space",componentId:"sc-1dotdqo-1"})(["height:8em;"]),Bl=o.default.text.withConfig({displayName:"styled__StyledRequiredText",componentId:"sc-1dotdqo-2"})(["color:",";font-weight:500;display:block;font-size:",";height:12px;line-height:12px;margin-left:5px;position:relative;"],y,s),Rl=o.default.div.withConfig({displayName:"styled__FieldTitle",componentId:"sc-1dotdqo-3"})(["font-weight:500;color:#333;font-size:",";margin-bottom:0.5em;margin-top:1em;"],p),Fl=o.default.div.withConfig({displayName:"styled__SpacedContainer",componentId:"sc-1dotdqo-4"})(["width:95%;height:",";"],e=>{let{height:t}=e;return t||"100%"}),Ol=o.default.div.withConfig({displayName:"styled__FlexContainer",componentId:"sc-1dotdqo-5"})(["display:flex;flex-direction:",";justify-content:space-between;min-width:600px;",";",";"],e=>{let{flexDirection:t}=e;return t||"row"},e=>{let{paddingLeft:t}=e;return t&&`padding-left: ${t}`},e=>{let{paddingRight:t}=e;return t&&`padding-right: ${t}`}),Pl=o.default.div.withConfig({displayName:"styled__FlexItem",componentId:"sc-1dotdqo-6"})(["width:",";margin-bottom:50px;"],e=>{let{width:t}=e;return t}),zl=o.default.div.withConfig({displayName:"styled__MapWidgetContainer",componentId:"sc-1dotdqo-7"})(["display:flex;width:100%;height:95%;border:1px solid rgb(223,223,223);border-radius:5px;overflow-x:auto;align-items:stretch;",""],e=>{let{withTopBanner:t}=e;return t&&"\n border-top-right-radius: 0px;\n border-top-left-radius: 0px;\n"}),jl=(o.default.div.withConfig({displayName:"styled__MapPanelContainer",componentId:"sc-1dotdqo-8"})(["display:flex 1 1 auto;padding:",";flex-direction:column;align-items:flex-start;gap:",";border-radius:",";background:",";"],Ml.spacings["2XL"],Ml.spacings.NONE,Ml.borderRadius.NONE,Ml.colors["bg-primary"]),o.default.div.withConfig({displayName:"styled__MapWrapper",componentId:"sc-1dotdqo-9"})(["display:flex;width:100%;padding:"," "," "," ",";flex-direction:column;align-items:flex-start;flex-grow:1;gap:",";background:",";"],Ml.spacings["2XL"],Ml.spacings["2XL"],Ml.spacings["2XL"],Ml.spacings.NONE,Ml.spacings.LG,Ml.colors["bg-primary"])),Wl=(0,o.default)(Il.tS).attrs(e=>({options:{fillColor:`${h}`,strokeColor:`${h}`,...e.options}})).withConfig({displayName:"styled__StyledPolygon",componentId:"sc-1dotdqo-10"})([""]),$l=(o.default.div.withConfig({displayName:"styled__FileLabelContainer",componentId:"sc-1dotdqo-11"})(["display:flex;align-items:center;margin-bottom:16px;gap:10px;"]),()=>a.createElement(Bl,null,T.t("general.required"))),Vl=o.default.div.withConfig({displayName:"styled__InputContainerWithoutBorder",componentId:"sc-1nugm1i-0"})(["display:flex;position:relative;"]),Gl=o.default.div.withConfig({displayName:"styled__InputContainer",componentId:"sc-1nugm1i-1"})(["border:",";border-radius:3px;display:flex;position:relative;"],e=>{let{error:t}=e;return t?`2px solid ${y}`:`1px solid ${f}`}),Ul=o.default.text.withConfig({displayName:"styled__Unit",componentId:"sc-1nugm1i-2"})(["position:absolute;right:25px;font-size:",";top:55%;transform:translate(0,-50%);color:#a1a1a1;"],s);function Zl(){return Zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{isInvalid:t}=e;return t&&`color: ${y}`},e=>{let{disabled:t}=e;return t&&`color: ${f}`},h),ql=e=>{let{title:t,type:n,value:i,showErrors:l,maxLength:r,unit:o,isCopy:s,...d}=e;const c=(0,a.useRef)(null),p=l&&!i;return(0,a.useEffect)(()=>{s&&c&&c?.current.select()},[c]),a.createElement(a.Fragment,null,t,a.createElement(Gl,{error:p},a.createElement(Hl,Zl({autoFocus:s,maxLength:r,onInput:e=>{const{target:t}=e;r&&t.value.length>t.maxLength&&(t.value=t.value.slice(0,t.maxLength))},ref:c,value:i,type:n},d)),o&&a.createElement(Ul,null,o)),p&&a.createElement($l,null))};function Kl(){return Kl=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{isInvalid:t}=e;return t&&`color: ${y}`},h),Xl=e=>{let{title:t,value:n,...i}=e;return a.createElement(a.Fragment,null,t,a.createElement(Gl,null,a.createElement(Jl,Kl({value:n},i))))};function Yl(){return Yl=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{width:t}=e;return t},e=>{let{height:t}=e;return t},e=>{let{color:t}=e;return t||"#bbb"},h),tr=e=>{let{onClick:t,...n}=e;return a.createElement(er,Yl({},n,{onClick:t}))},nr=o.default.div.withConfig({displayName:"styled__TagInputContainer",componentId:"sc-1n1duh1-0"})(["border:1px solid ",";border-radius:4px;display:flex;padding:10px 6px;overflow-y:scroll;flex-wrap:wrap;height:",";align-content:flex-start;width:",";cursor:text;:focus-within{outline:auto;outline-color:",";}"],f,e=>{let{height:t}=e;return t||"108px"},e=>{let{width:t}=e;return t||"100%"},h),ar=o.default.div.withConfig({displayName:"styled__Tag",componentId:"sc-1n1duh1-1"})(["background-color:blue;z-index:999;height:22px;margin:0 5px;background-color:#fff;display:flex;flex-direction:row;border-radius:2px;"]),ir=o.default.text.withConfig({displayName:"styled__TagText",componentId:"sc-1n1duh1-2"})(["color:",";font-family:Montserrat;font-size:",";line-height:22px;padding:0 4px;"],h,s),lr=o.default.input.withConfig({displayName:"styled__TagTextInput",componentId:"sc-1n1duh1-3"})(["font-size:",";transition:all 0.2s ease-in-out;",";background-color:transparent;border:0;outline:none;font-family:Montserrat;",";min-width:30px;"],p,e=>{let{isInvalid:t}=e;return t&&`color: ${y}`},e=>{let{width:t}=e;return t&&`width: ${t}`}),rr=o.default.div.withConfig({displayName:"styled__CloseIconContainer",componentId:"sc-1n1duh1-4"})(["margin:auto 5px;height:100%;"]);function or(){return or=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{removeTag:t,handleAddTag:n,title:i,value:l,width:r,height:o,tags:s,...d}=e;const c=(0,a.useRef)(null);return a.createElement(a.Fragment,null,i,a.createElement(nr,{height:o,width:r,onClick:()=>c.current?.focus()},s?.map(e=>a.createElement(ar,{key:e},a.createElement(ir,null,e),a.createElement(rr,{"data-test-id":`closeTagIcon-${e}`},a.createElement(tr,{width:"7px",height:"7px",color:h,onClick:()=>t(e)})))),a.createElement(lr,or({value:l},d,{ref:c,onKeyDown:e=>{8===e.keyCode&&""===l?t(s[s.length-1]):13===e.keyCode&&""!==l&&n()},maxLength:50,width:s?.length>0?`${l.length+3}ch`:`${d.placeholder.length}ch`}))))},dr="name",cr="details",pr="tags",ur="currentTag",mr="simType",hr=e=>{let{stepData:t,updateStepData:n,showErrors:i,wizardData:l}=e;const{experimentId:o}=(0,r.g)(),{search:s}=(0,r.zy)(),d=new URLSearchParams(s),c="true"===d.get("readOnly"),p="true"===d.get("cloned"),{experiments:u}=(0,a.useContext)(oe),m=l?.variationMetaData?.status===z.PENDING,h=u?.filter(e=>o===e.id)[0],{name:g,details:f,tags:y,simType:v}=t,[w,x]=(0,a.useState)(!1),[E,b]=(0,a.useState)(""),C=(e,t)=>{const a={[ur]:()=>(e=>{x(!1),b(e)})(t),[pr]:()=>(e=>{const t=y||[],a=e.trim().replaceAll(" ","_");t?.includes(a)?x(!0):(t.push(a),b(""),n({name:g,details:f,tags:t,simType:v}))})(t)};e in a?a[e]():n({name:g,details:f,tags:y,simType:v,[e]:t})};return a.createElement("div",{style:m?{pointerEvents:"all"}:{}},a.createElement(Fl,null,a.createElement(Pl,{width:"40%"},a.createElement(ql,{onChange:e=>C(dr,e.target.value),placeholder:T.t("addExperimentWizard.steps.details.placeHolders.name"),showErrors:i,type:"text",isCopy:p,value:g,id:dr,title:a.createElement(Rl,null,T.t("inputLabels.name"))})),a.createElement(Pl,{width:"70%"},a.createElement(Ie,{value:v,disabled:c,enabledType:h?.type,onChange:e=>C(mr,e),title:a.createElement(Rl,null,T.t("inputLabels.simType"))})),a.createElement(Ol,{flexDirection:"row"},a.createElement(Pl,{width:"40%"},a.createElement(Xl,{onChange:e=>C(cr,e.target.value),placeholder:T.t("addExperimentWizard.steps.details.placeHolders.details"),value:f,id:cr,rows:6,title:a.createElement(Rl,null,T.t("inputLabels.details"))})),a.createElement(Pl,{width:"50%"},a.createElement(sr,{onChange:e=>C(ur,e.target.value),handleAddTag:e=>C(pr,E),placeholder:t.tags?.length>0?"":T.t("addExperimentWizard.steps.details.placeHolders.tags"),value:E,tags:y,id:pr,isInvalid:w,removeTag:e=>{const t=y.filter(t=>t!==e);n({name:g,details:f,tags:t,simType:v})},title:a.createElement(Rl,null,T.t("inputLabels.tags"))})))))};var gr=n(75497),fr=n(4213),yr=n.n(fr);const vr=o.default.div.withConfig({displayName:"styled__Container",componentId:"sc-1typ1va-0"})(["display:flex;flex-direction:column;height:100%;max-width:100%;width:100%;flex-grow:1;"]),wr=o.default.div.withConfig({displayName:"styled__DropzoneContainer",componentId:"sc-1typ1va-1"})(["background-color:",";border-width:2px;border-style:dotted;border-color:",";border-radius:6px;maxWidth:100%;width:100%;flex-grow:1;opacity:",";cursor:",";transition:all 0.2s;height:100%;"],e=>{let{isLoading:t}=e;return t?"rgba(235, 236, 240, 0.1)":"rgba(235, 236, 240, 0.5)"},e=>(e=>e.isDragActive||e.isDragReject||e.isDragAccept?"#2196f3":"#eeeeee")(e),e=>{let{isLoading:t}=e;return t?"0.5":"1"},e=>{let{isLoading:t}=e;return t?"default":"pointer"}),xr=o.default.div.withConfig({displayName:"styled__InnerDropZoneContainer",componentId:"sc-1typ1va-2"})(["display:flex;flex-direction:column;align-items:center;height:100%;justify-content:center;"]),Er=o.default.div.withConfig({displayName:"styled__DropzoneText",componentId:"sc-1typ1va-3"})([""," font-size:",";font-weight:300;margin-bottom:4px;"],e=>{let{color:t}=e;return t&&`color: ${t};`},c),br=o.default.div.withConfig({displayName:"styled__FileDescriptionLabel",componentId:"sc-1typ1va-4"})(["font-weight:500;font-size:",";display:flex;color:",";"],u,w),Cr=o.default.div.withConfig({displayName:"styled__CloseIconContainer",componentId:"sc-1typ1va-5"})(["margin-left:auto;padding-left:10px;"]),_r=o.default.div.withConfig({displayName:"styled__FileSizeLabel",componentId:"sc-1typ1va-6"})(["font-size:",";margin-top:0.5em;font-weight:400;color:",";"],p,w),kr=(o.default.div.withConfig({displayName:"styled__DeleteFile",componentId:"sc-1typ1va-7"})(["margin-left:auto;font-weight:200;cursor:pointer;"]),o.default.div.withConfig({displayName:"styled__LabelContainer",componentId:"sc-1typ1va-8"})(["width:",";border:1px solid ",";border-radius:3px;padding:.5em;margin-top:.5em;box-shadow:0 3px 6px 0 rgba(0,0,0,0.16);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;"],e=>{let{width:t}=e;return t||"100%"},f)),Sr=o.default.div.withConfig({displayName:"styled__SupportedText",componentId:"sc-1typ1va-9"})(["color:",";font-size:",";font-weight:300;margin-top:4px;"],g,p);var Ar=n(37353);function Tr(){return Tr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{transitionState:t}=e;return Ir.includes(t)?"1":"0"},e=>{let{transitionTime:t}=e;return t}),Mr=e=>{let{children:t,transitionProps:n={},shouldRender:i,...l}=e;return a.createElement(Ar.Ay,Tr({in:i,timeout:100,unmountOnExit:!0},l),e=>a.createElement(Nr,{transitionState:e,transitionTime:(l?.timeout?l.timeout:100)/1e3},t))};function Dr(){return Dr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{width:t}=e;return t},e=>{let{height:t}=e;return t},e=>{let{color:t}=e;return t||"#bbb"},h),Rr=e=>{let{onClick:t,...n}=e;return a.createElement(Br,Dr({},n,{onClick:t}))},Fr=(e,t)=>(async(e,t)=>{const n=new FormData;n.append("file",e),n.append("key",t);const a=await(async e=>{try{return await te.post("/api/v1/files/upload",e,{timeout:6e6})}catch(e){return e.response}})(n);return a.status&&200!==a.status&&(e=>{let t,n;const a=e?.data?.errors;try{const e=JSON.parse(a);[t]=Object.values(e),[n]=Object.keys(e)}finally{const i={400:()=>{throw new _l(t?T.t(`fileUploader.${n}`)+t:a[0]||"")},500:()=>{throw new Error(`${T.t("fileUploader.genericErrorText")}`)},401:()=>{throw new Error(`${e}`)},504:()=>{throw new Error(`${T.t("fileUploader.genericErrorText")}`)}};(i[e.status]||i[500])()}})(a),a.data})(e,t);var Or=n(73049);const Pr=JSON.parse('{"v":"5.1.6","fr":25,"ip":0,"op":21,"w":85,"h":25,"nm":"autofleet_loader","ddd":0,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.12,"y":1},"o":{"x":0.303,"y":0},"n":"0p12_1_0p303_0","t":20,"s":[13,12.5,0],"e":[42.25,12.5,0],"to":[4.875,0,0],"ti":[-4.875,0,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":35,"s":[42.25,12.5,0],"e":[42.25,12.5,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.12,"y":1},"o":{"x":0.303,"y":0},"n":"0p12_1_0p303_0","t":40,"s":[42.25,12.5,0],"e":[71.25,12.5,0],"to":[4.83333349227905,0,0],"ti":[-4.83333349227905,0,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":55,"s":[71.25,12.5,0],"e":[71.25,12.5,0],"to":[0,0,0],"ti":[0,0,0]},{"t":60}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0,0,0.667],"y":[1,1,1]},"o":{"x":[0.031,0.031,0.167],"y":[0.45,0.45,25]},"n":["0_1_0p031_0p45","0_1_0p031_0p45","0p667_1_0p167_25"],"t":5,"s":[0,0,100],"e":[100,100,100]},{"i":{"x":[0,0,0.667],"y":[1,1,1]},"o":{"x":[0.167,0.167,0.167],"y":[0,0,0]},"n":["0_1_0p167_0","0_1_0p167_0","0p667_1_0p167_0"],"t":20,"s":[100,100,100],"e":[100,100,100]},{"i":{"x":[0.973,0.973,0.833],"y":[0.518,0.518,1]},"o":{"x":[0.494,0.494,0.333],"y":[0,0,0]},"n":["0p973_0p518_0p494_0","0p973_0p518_0p494_0","0p833_1_0p333_0"],"t":55,"s":[100,100,100],"e":[0,0,100]},{"t":70}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[20,20],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.360784313725,0.360784313725,0.360784313725,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0.25,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":71,"st":10,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"one","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[42.5,12.5,0],"ix":2},"a":{"a":0,"k":[42.5,12.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":85,"h":25,"ip":44,"op":44.2525252525253,"st":44,"bm":0},{"ddd":0,"ind":2,"ty":0,"nm":"one","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[42.5,12.5,0],"ix":2},"a":{"a":0,"k":[42.5,12.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":85,"h":25,"ip":24,"op":24.2525252525252,"st":24,"bm":0},{"ddd":0,"ind":3,"ty":0,"nm":"one","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[42.5,12.5,0],"ix":2},"a":{"a":0,"k":[42.5,12.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":85,"h":25,"ip":4,"op":21,"st":4,"bm":0},{"ddd":0,"ind":4,"ty":0,"nm":"one","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[42.5,12.5,0],"ix":2},"a":{"a":0,"k":[42.5,12.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":85,"h":25,"ip":0,"op":21,"st":-16,"bm":0},{"ddd":0,"ind":5,"ty":0,"nm":"one","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[42.5,12.5,0],"ix":2},"a":{"a":0,"k":[42.5,12.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":85,"h":25,"ip":0,"op":21,"st":-36,"bm":0},{"ddd":0,"ind":6,"ty":0,"nm":"one","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[42.5,12.5,0],"ix":2},"a":{"a":0,"k":[42.5,12.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"tm":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":-56,"s":[0],"e":[2.84]},{"t":15}],"ix":2},"w":85,"h":25,"ip":0,"op":21,"st":-56,"bm":0}],"markers":[]}'),zr=JSON.parse('{"v":"5.1.6","fr":25,"ip":0,"op":21,"w":85,"h":25,"nm":"autofleet_loader","ddd":0,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.12,"y":1},"o":{"x":0.303,"y":0},"n":"0p12_1_0p303_0","t":20,"s":[13,12.5,0],"e":[42.25,12.5,0],"to":[4.875,0,0],"ti":[-4.875,0,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":35,"s":[42.25,12.5,0],"e":[42.25,12.5,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.12,"y":1},"o":{"x":0.303,"y":0},"n":"0p12_1_0p303_0","t":40,"s":[42.25,12.5,0],"e":[71.25,12.5,0],"to":[4.83333349227905,0,0],"ti":[-4.83333349227905,0,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"n":"0p667_0p667_0p333_0p333","t":55,"s":[71.25,12.5,0],"e":[71.25,12.5,0],"to":[0,0,0],"ti":[0,0,0]},{"t":60}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0,0,0.667],"y":[1,1,1]},"o":{"x":[0.031,0.031,0.167],"y":[0.45,0.45,25]},"n":["0_1_0p031_0p45","0_1_0p031_0p45","0p667_1_0p167_25"],"t":5,"s":[0,0,100],"e":[100,100,100]},{"i":{"x":[0,0,0.667],"y":[1,1,1]},"o":{"x":[0.167,0.167,0.167],"y":[0,0,0]},"n":["0_1_0p167_0","0_1_0p167_0","0p667_1_0p167_0"],"t":20,"s":[100,100,100],"e":[100,100,100]},{"i":{"x":[0.973,0.973,0.833],"y":[0.518,0.518,1]},"o":{"x":[0.494,0.494,0.333],"y":[0,0,0]},"n":["0p973_0p518_0p494_0","0p973_0p518_0p494_0","0p833_1_0p333_0"],"t":55,"s":[100,100,100],"e":[0,0,100]},{"t":70}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[20,20],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"fl","c":{"a":0,"k":[0.22745098039215686,0.8627450980392157,0.8627450980392157,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0.25,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":71,"st":10,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"one","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[42.5,12.5,0],"ix":2},"a":{"a":0,"k":[42.5,12.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":85,"h":25,"ip":44,"op":44.2525252525253,"st":44,"bm":0},{"ddd":0,"ind":2,"ty":0,"nm":"one","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[42.5,12.5,0],"ix":2},"a":{"a":0,"k":[42.5,12.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":85,"h":25,"ip":24,"op":24.2525252525252,"st":24,"bm":0},{"ddd":0,"ind":3,"ty":0,"nm":"one","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[42.5,12.5,0],"ix":2},"a":{"a":0,"k":[42.5,12.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":85,"h":25,"ip":4,"op":21,"st":4,"bm":0},{"ddd":0,"ind":4,"ty":0,"nm":"one","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[42.5,12.5,0],"ix":2},"a":{"a":0,"k":[42.5,12.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":85,"h":25,"ip":0,"op":21,"st":-16,"bm":0},{"ddd":0,"ind":5,"ty":0,"nm":"one","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[42.5,12.5,0],"ix":2},"a":{"a":0,"k":[42.5,12.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":85,"h":25,"ip":0,"op":21,"st":-36,"bm":0},{"ddd":0,"ind":6,"ty":0,"nm":"one","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[42.5,12.5,0],"ix":2},"a":{"a":0,"k":[42.5,12.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"tm":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":-56,"s":[0],"e":[2.84]},{"t":15}],"ix":2},"w":85,"h":25,"ip":0,"op":21,"st":-56,"bm":0}],"markers":[]}');function jr(){return jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t({loop:!0,autoplay:!0,animationData:e?zr:Pr,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}),$r=e=>{let{isDark:t=!1,...n}=e;return a.createElement(Or.A,jr({options:Wr(t),height:15,width:52},n))};$r.defaultProps={isDark:!1};const Vr=$r,Gr=o.default.div.withConfig({displayName:"styled__ExampleFileDownload",componentId:"sc-mci1se-0"})(["font-size:",";color:",";cursor:pointer;text-decoration:none;"],d,h),Ur=n.p+"06a0f51ed4eefc32849332a9e370dc11.xlsx",Zr=JSON.parse('[{"modelName":"Tesla Model 3","bodyType":"Coupe","capacity":5,"range":400,"lat":32.0741,"lng":34.7753,"powerTrain":"EV","batteryCapacityKWH":50,"chargeRateKWH":30,"route":[{"lat":32.0741,"lng":34.7753,"timeInStopPoint":900},{"lat":32.0607,"lng":34.7739,"timeInStopPoint":900},{"lat":32.0652,"lng":34.7867,"timeInStopPoint":900}]}]'),Hr=n.p+"bca03f255f8940a33327c8bf4e3ea6fd.csv",qr=JSON.parse('[{"lat":32.084689,"lng":34.83244,"address":"Hafes Haim 2-4, Bnei Brak","charging":{"type":"electric","chargers":6,"fillRateKw":35}},{"lat":32.091655,"lng":34.78494,"address":"Honi HaMe\'agel 11-1, Tel Aviv-Yafo","charging":{"type":"ice","slots":5,"fillRateKw":5,"numOfHandles":1,"chargerPostRefuelWaitTime":300}},{"lat":32.055854,"lng":34.79939,"address":"Haggibbor Ha\'Almoni 19-15, Tel Aviv-Yafo","parking":{"capacity":20,"capabilities":["staging"]}},{"lat":32.055545,"lng":34.82988,"address":"Ramat Gan","charging":{"type":"electric","fillRateKw":40,"chargers":3,"connectorsPerCharger":2},"parking":{"capacity":15,"capabilities":["parking"]}},{"lat":32.055545,"lng":34.82988,"address":"Ramat Gan","charging":{"type":"electric","fillRateKw":40,"chargers":3,"timeLimitations":[{"dayOfWeek":"sunday","startTime":"10:00","endTime":"13:00","chargers":0,"chargerPostRefuelWaitTime":600},{"dayOfWeek":"monday","startTime":"07:00","endTime":"14:00","chargers":2}]},"parking":{"capacity":15,"idleConsumption":5,"capabilities":["parking","staging"],"timeLimitations":[{"dayOfWeek":"sunday","startTime":"10:00","endTime":"13:00","slots":0},{"dayOfWeek":"monday","startTime":"07:00","endTime":"14:00","slots":2,"idleConsumption":1}]}}]'),Kr=n.p+"2fd3a9a0b6c0eabc73b65a096ca8723b.csv",Jr=JSON.parse('{"type":"FeatureCollection","features":[{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[34.774818420410156,32.095372898256436],[34.75954055786133,32.05930026106166],[34.748897552490234,32.051298352918195],[34.77773666381836,32.04169513945539],[34.78837966918945,32.04780639187685],[34.79438781738281,32.04198616072748],[34.8130989074707,32.04635136878546],[34.83060836791992,32.052753297359864],[34.8405647277832,32.07312009026311],[34.842281341552734,32.0958091736601],[34.806060791015625,32.088246771740806],[34.7969627380371,32.09464576795364],[34.774818420410156,32.095372898256436]]]}}]}'),Xr=JSON.parse('{"timeLimitations":[{"dayOfWeek":"tuesday","startTime":"13:00","endTime":"15:00","numberOfActiveVehicles":50},{"dayOfWeek":"monday","startTime":"18:00","endTime":"20:00","numberOfActiveVehicles":70}]}'),Yr=n.p+"4631ef4fcebad11bf9af5ca7e138a58f.csv",Qr=n.p+"784e8b16c0c6ab0f85fd7d63753b6172.csv",eo=JSON.parse('[{"lat":32.0853,"lng":34.7818,"address":"Tel Aviv Central","capacity":2,"jobs":{"oil_change":{"duration":30},"tire_rotation":{"duration":45},"brake_inspection":{"duration":60}},"timeLimitations":[{"dayOfWeek":"saturday","startTime":"08:00","endTime":"14:00","capacity":1,"jobs":{"oil_change":{"duration":45}}}]},{"lat":32.794,"lng":34.9896,"address":"Haifa Port","capacity":3,"jobs":{"oil_change":{"duration":25},"tire_rotation":{"duration":40},"full_service":{"duration":120}},"timeLimitations":[]},{"lat":32.065,"lng":34.79,"address":"Ramat Gan Industrial","capacity":4,"jobs":{"oil_change":{"duration":35},"battery_replacement":{"duration":50},"full_service":{"duration":90}},"timeLimitations":[]},{"lat":32.075,"lng":34.82,"address":"Tel Aviv East","capacity":2,"jobs":{"tire_rotation":{"duration":40},"brake_inspection":{"duration":55}},"timeLimitations":[]}]'),to=JSON.parse('{"vehicle_groups":[{"label":"Tesla","number_of_vehicles":5,"model_name":"Model 3","body_type":"Sedan","fuel_type":"EV","battery_capacity_kwh":58,"fuel_range_km":380,"capacity":3,"cost_per_km":0,"idle_consumption_kwh_per_hour":2.5,"charging_settings":{"charging_rate":{"type":"curve","points":[{"state_of_charge":1,"kw":90},{"state_of_charge":30,"kw":80},{"state_of_charge":50,"kw":70},{"state_of_charge":80,"kw":60},{"state_of_charge":100,"kw":40}]}}},{"label":"Kia","number_of_vehicles":3,"model_name":"EV6","body_type":"SUV","fuel_type":"EV","battery_capacity_kwh":77,"fuel_range_km":500,"capacity":4,"cost_per_km":0,"idle_consumption_kwh_per_hour":2,"charging_settings":{"charging_rate":{"type":"constant","value":50}}},{"label":"Hyundai","number_of_vehicles":2,"model_name":"Ioniq 5","body_type":"SUV","fuel_type":"EV","battery_capacity_kwh":72,"fuel_range_km":450,"capacity":4,"cost_per_km":0,"idle_consumption_kwh_per_hour":1.8,"charging_settings":{"charging_rate":{"type":"constant","value":45}}}]}'),no="Example_Demand_Data.xlsx",ao="example_field_servicing_vehicles_file.json",io="Example_filling_stations.csv",lo="Example_filling_stations.json",ro="Example_parking_stations.csv",oo="Example_Territory_File.json",so="Example_indefleet_predefined_policy.json",co="Example_demand_prediction.csv",po="Example_tasks.csv",uo="Example_maintenance_stations.json",mo="Example_vehicle_groups.json",ho=e=>{let{filename:t,title:n}=e;return a.createElement(Gr,{onClick:e=>(e.stopPropagation(),(()=>{let e;({[no]:()=>{e=Ur},[ao]:()=>{e=new Blob([JSON.stringify(Zr)],{type:"text/plain;charset=utf-8"})},[io]:()=>{e=Hr},[lo]:()=>{e=new Blob([JSON.stringify(qr)],{type:"text/plain;charset=utf-8"})},[ro]:()=>{e=Kr},[oo]:()=>{e=new Blob([JSON.stringify(Jr)],{type:"text/plain;charset=utf-8"})},[so]:()=>{e=new Blob([JSON.stringify(Xr)],{type:"text/plain;charset=utf-8"})},[co]:()=>{e=Yr},[po]:()=>{e=Qr},[uo]:()=>{e=new Blob([JSON.stringify(eo)],{type:"text/plain;charset=utf-8"})},[mo]:()=>{e=new Blob([JSON.stringify(to,null,2)],{type:"text/plain;charset=utf-8"})}})[t](),yr().saveAs(e,t)})())},n)},go=ho;function fo(){return fo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{uploadFileCb:t,children:n,onDismissFile:i,fileLabelWidth:l,fileType:r,currentFile:o,error:s,shouldShowFileSection:d=!0,hideDropZone:c=!1,setIsNavigationDisabled:p=()=>null,sampleFileName:u,disabled:m=!1,compactMode:h=!1}=e;const[g,y]=(0,a.useState)(!1),[v,w]=(0,a.useState)(o),[x,E]=(0,a.useState)(!1),b=()=>{w(null),i()};(0,a.useEffect)(()=>{v&&x&&C(v),x||E(!0)},[v]),(0,a.useEffect)(()=>{s&&b()},[s]);const C=async e=>{y(!0),p(!0);const n=await t(e);return y(!1),p(!1),n},{getRootProps:_,getInputProps:k,isDragActive:S,isDragAccept:A,isDragReject:I}=(0,gr.VB)({accept:r,onDrop:e=>{w(e[0])},multiple:!1,disabled:g||m}),N=(0,a.useMemo)(()=>g||m?{}:_({isDragActive:S,isDragAccept:A,isDragReject:I}),[g,m,S,A,I]);return a.createElement(vr,null,!c&&(h?a.createElement("div",fo({},N,{style:{display:"inline-flex",alignItems:"center",gap:8,padding:"6px 10px",borderRadius:6,border:"1px dashed #C7C7C7",cursor:g||m?"not-allowed":"pointer",background:m?"#f5f5f5":"transparent",opacity:m?.6:1,userSelect:"none"},"aria-disabled":g||m}),!g&&!m&&a.createElement("input",k()),a.createElement(yo,{width:"18",height:"18",stroke:m?f:"#727272"}),a.createElement("span",{style:{fontSize:12,color:m?f:"#727272"}},T.t("fileUploader.browseText"))):a.createElement(wr,fo({},N,{isLoading:g||m}),!g&&a.createElement("input",k()),a.createElement(xr,{style:{zIndex:100}},a.createElement(yo,{style:{marginBottom:"16px"},width:"54",height:"54",stroke:m?f:"#727272"}),a.createElement(Er,{color:m?f:""},T.t("fileUploader.text")),a.createElement(Er,{color:m?f:"rgb(20,130,253)"},T.t("fileUploader.browseText")),a.createElement("div",null,u&&""!==u&&a.createElement(go,{filename:u})),n))),a.createElement(Mr,{shouldRender:!(!v||!d),timeout:200},a.createElement(kr,{width:l},g?a.createElement(Vr,{width:h?24:50}):a.createElement(br,{style:h?{fontSize:12,padding:"4px 6px"}:{}},a.createElement("span",{style:h?{maxWidth:240,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",verticalAlign:"middle"}:{}},v?.name||v?.path),a.createElement(Cr,{"data-test-id":"closeIcon"},v?.gcsName&&a.createElement(Rr,{onClick:async()=>{P.trackEvent("trying to download file",{url:v?.url});try{const t=await(e=v?.url,(async e=>ae(e))(e)),n=new Blob([t],{type:"text/csv;charset=utf-8;"});yr().saveAs(n,v.name),P.trackEvent("download file - successful",{url:v?.url})}catch(e){P.trackEvent("download file - failed",{url:v?.url})}var e},width:h?"20px":"30px",height:h?"16px":"20px"}),a.createElement(tr,{onClick:b,width:h?"10px":"13px",height:h?"10px":"13px"}))),v?.size&&a.createElement(_r,{style:h?{fontSize:11}:{}},(v?.size/1024).toFixed(2)," KB"))))};var wo=function(e){return a.createElement("svg",e,a.createElement("path",{fill:"none",d:"M5.396 9.212a.897.897 0 0 1-1.321 0L.772 5.701a1.037 1.037 0 0 1 0-1.404L4.075.785a.895.895 0 0 1 1.321 0"}))};wo.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"6.5",height:"10.5"};const xo=(0,Nl.us)({isDarkMode:!1}),Eo=o.default.div.withConfig({displayName:"styled__SearchContainer",componentId:"sc-1c6zwac-0"})(["flex-grow:1;margin-right:8px;"]),bo=o.default.div.withConfig({displayName:"styled__ListContainer",componentId:"sc-1c6zwac-1"})(["display:flex;flex-direction:column;height:100%;max-width:100%;"]),Co=o.default.div.withConfig({displayName:"styled__ListSummary",componentId:"sc-1c6zwac-2"})(["display:flex;padding-bottom:",";align-items:flex-start;justify-content:space-between;gap:",";align-self:stretch;width:100%;background:",";"],xo.spacings["2XL"],xo.spacings["2XL"],xo.colors["bg-primary"]),_o=o.default.div.withConfig({displayName:"styled__ListSummaryText",componentId:"sc-1c6zwac-3"})(["flex:1 0 0;color:",";",""],xo.colors["neutral-dark"],xo.fonts.desktop.bodyStrong),ko=o.default.span.withConfig({displayName:"styled__RemoveAllLink",componentId:"sc-1c6zwac-4"})(["color:",";"," margin-left:auto;cursor:pointer;pointer-events:auto;&:hover{text-decoration:underline;}"],xo.colors["primary-btn"],xo.fonts.desktop.body),So=o.default.div.withConfig({displayName:"styled__StationsContainer",componentId:"sc-1c6zwac-5"})(["overflow-y:scroll;-ms-overflow-style:none;::-webkit-scrollbar{display:none;};flex-grow:1;padding:3px;pointer-events:all;"]),Ao=o.default.div.withConfig({displayName:"styled__StyledCard",componentId:"sc-1c6zwac-6"})(["display:flex;flex-direction:row;border-radius:4px;box-shadow:0 1px 3px 0 rgba(157,165,180,0.7);margin-bottom:",";padding:",";outline-color:",";",";outline-width:2px;"," cursor:pointer;justify-content:space-between;"],xo.spacings.LG,xo.spacings["2XL"],xo.colors.info,e=>{let{readOnly:t}=e;return t&&"pointer-events: none;"},e=>{let{isHighlighted:t}=e;return t&&"\noutline-style: solid;"}),To=(0,o.default)(Ao).withConfig({displayName:"styled__ColumnStyledCard",componentId:"sc-1c6zwac-7"})(["flex-direction:row;font-size:",";color:",";"],u,g),Io=o.default.div.withConfig({displayName:"styled__Row",componentId:"sc-1c6zwac-8"})(["display:flex;flex-direction:row;font-size:",";gap:2px;"],e=>{let{fontSize:t}=e;return t||c}),No=o.default.div.withConfig({displayName:"styled__Column",componentId:"sc-1c6zwac-9"})(["display:flex;flex-direction:column;width:90%;flex-grow:1;"]),Mo=o.default.span.withConfig({displayName:"styled__CardText",componentId:"sc-1c6zwac-10"})(["color:",";font-size:",";font-weight:500;flex:1.6;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:16px;"],x,p),Do=o.default.button.withConfig({displayName:"styled__CloseIconContainer",componentId:"sc-1c6zwac-11"})(["display:flex;width:24px;height:24px;padding:",";margin-left:",";justify-content:center;align-items:center;border-radius:",";border:1px solid ",";background:transparent;cursor:pointer;transition:all 0.2s ease;color:",";&:hover,&:active{background:",";border-color:",";color:",";}"],xo.spacings.NONE,xo.spacings.LG,xo.borderRadius.SM,xo.colors["divider-neutral"],xo.colors["neutral-dark"],xo.colors["error-opa-01"],xo.colors["divider-neutral"],xo.colors.error),Lo=(0,o.default)(wo).attrs({stroke:h}).withConfig({displayName:"styled__BackArrow",componentId:"sc-1c6zwac-12"})(["margin-right:5px;"]),Bo=o.default.span.withConfig({displayName:"styled__BackButton",componentId:"sc-1c6zwac-13"})(["font-size:",";color:",";cursor:pointer;text-decoration:none;"],d,h),Ro=(o.default.div.withConfig({displayName:"styled__UploaderContainer",componentId:"sc-1c6zwac-14"})(["display:-webkit-inline-box;width:70px;"]),o.default.div.withConfig({displayName:"styled__BackButtonContainer",componentId:"sc-1c6zwac-15"})(["display:flex;align-items:center;"])),Fo=(o.default.div.withConfig({displayName:"styled__AlignCenterContainer",componentId:"sc-1c6zwac-16"})(["align-items:center;display:flex;padding:",";margin-top:3px;",""],e=>{let{padding:t}=e;return t||"0px"},e=>{let{isLabelLeft:t}=e;return t&&"flex-direction: row-reverse;"}),o.default.div.withConfig({displayName:"styled__PositionRelativeContainer",componentId:"sc-1c6zwac-17"})(["position:relative;"]),o.default.div.withConfig({displayName:"styled__BooleanLabel",componentId:"sc-1c6zwac-18"})(["margin-right:",";font-size:",";color:",";"],e=>{let{marginRight:t}=e;return t||"15px"},e=>{let{fontSize:t}=e;return t||c},e=>{let{color:t}=e;return t||"#313131"}),o.default.span.withConfig({displayName:"styled__StationsCounterText",componentId:"sc-1c6zwac-19"})(["flex:1;color:",";",""],xo.colors["neutral-dark"],xo.fonts.desktop.bodyStrong)),Oo=(o.default.div.withConfig({displayName:"styled__StationCardIconContainer",componentId:"sc-1c6zwac-20"})(["padding-right:",";"],xo.spacings.LG),(0,Nl.us)({isDarkMode:!1})),Po=(0,o.default)(Rr).withConfig({displayName:"styled__StyledDownloadIcon",componentId:"sc-lw3d6i-0"})(["width:30px;height:20px;"]),zo=o.default.div.withConfig({displayName:"styled__StationOptionsContainer",componentId:"sc-lw3d6i-1"})(["display:flex;gap:5px;"]),jo=o.default.div.withConfig({displayName:"styled__FieldContainer",componentId:"sc-lw3d6i-2"})(["align-items:center;flex:1;"]),Wo=o.default.div.withConfig({displayName:"styled__Label",componentId:"sc-lw3d6i-3"})(["display:flex;flex-direction:column;margin-bottom:0.2em;font-size:",";color:",";height:30px;justify-content:center;"],c,g),$o=o.default.div.withConfig({displayName:"styled__StationLabelsContainer",componentId:"sc-lw3d6i-4"})(["display:flex;flex-direction:column;width:100%;gap:",";"],Oo.spacings.LG),Vo=(o.default.text.withConfig({displayName:"styled__Bullet",componentId:"sc-lw3d6i-5"})(["font-size:20px;line-height:18px;font-weight:600;margin:0 5px;color:black;"]),o.default.div.withConfig({displayName:"styled__FileLabelContainer",componentId:"sc-lw3d6i-6"})(["display:flex;align-items:center;margin-bottom:16px;gap:10px;"]),o.default.div.withConfig({displayName:"styled__StationTextContainer",componentId:"sc-lw3d6i-7"})(["align-items:center;display:flex;gap:",";margin-right:",";"],Oo.spacings.SM,Oo.spacings.LG)),Go=(o.default.span.withConfig({displayName:"styled__StationText",componentId:"sc-lw3d6i-8"})(["font-size:",";color:",";"],d,"#666975"),o.default.div.withConfig({displayName:"styled__UploadColumn",componentId:"sc-lw3d6i-9"})(["display:flex;flex-direction:column;flex:0 0 1;gap:",";"],Oo.spacings.LG)),Uo=o.default.div.withConfig({displayName:"styled__UploadHeaderRow",componentId:"sc-lw3d6i-10"})(["display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:",";width:100%;"],Oo.spacings.XL),Zo=o.default.div.withConfig({displayName:"styled__UploadHeaderTitle",componentId:"sc-lw3d6i-11"})(["font-size:14px;font-weight:600;color:",";white-space:nowrap;margin:0;"],Oo.colors["neutral-charcoal"]),Ho=o.default.div.withConfig({displayName:"styled__UploaderContainer",componentId:"sc-lw3d6i-12"})(["display:flex;align-items:center;width:auto;"]),qo=o.default.div.withConfig({displayName:"styled__UploadSectionRow",componentId:"sc-lw3d6i-13"})(["display:flex;padding-bottom:",";flex-direction:row;align-items:flex-start;gap:",";align-self:stretch;"],Oo.spacings["3XL"],Oo.spacings.XL),Ko=o.default.div.withConfig({displayName:"styled__ClearAllLabel",componentId:"sc-lw3d6i-14"})(["font-size:",";color:",";cursor:pointer;text-decoration:none;white-space:nowrap;"],d,y),Jo=((0,o.default)(Io).withConfig({displayName:"styled__StationMetaRow",componentId:"sc-lw3d6i-15"})(["margin-top:9px;margin-bottom:5px;"]),o.default.div.withConfig({displayName:"styled__SidePanel",componentId:"sc-lw3d6i-16"})(["display:flex;aspect-ratio:480 / 624;height:auto;padding:",";flex-direction:column;align-items:flex-start;gap:",";border-radius:",";background:",";"],Oo.spacings["2XL"],Oo.spacings.NONE,Oo.borderRadius.NONE,Oo.colors["bg-primary"])),Xo=o.default.div.withConfig({displayName:"styled__EmptyState",componentId:"sc-lw3d6i-17"})(["display:flex;padding:",";flex-direction:column;justify-content:center;align-items:center;gap:",";flex:1 0 0;align-self:stretch;border-radius:",";border:1px dashed ",";"],Oo.spacings["4XL"],Oo.spacings["2XL"],Oo.borderRadius.LG,Oo.colors["divider-neutral"]),Yo=o.default.div.withConfig({displayName:"styled__EmptyStateIconWrapper",componentId:"sc-lw3d6i-18"})(["display:flex;width:88px;height:88px;padding:",";justify-content:center;align-items:center;"],Oo.spacings.LG),Qo=o.default.div.withConfig({displayName:"styled__EmptyStateTextContainer",componentId:"sc-lw3d6i-19"})(["display:flex;flex-direction:column;align-items:center;gap:",";max-width:296px;align-self:center;"],Oo.spacings.LG),es=o.default.span.withConfig({displayName:"styled__EmptyStateTitle",componentId:"sc-lw3d6i-20"})(["color:",";text-align:center;",""],Oo.colors["neutral-dark"],Oo.fonts.desktop.smallTitle),ts=o.default.span.withConfig({displayName:"styled__EmptyStateText",componentId:"sc-lw3d6i-21"})(["color:",";text-align:center;",""],Oo.colors["neutral-charcoal"],Oo.fonts.desktop.body),ns=o.default.div.withConfig({displayName:"styled__ConfigurationContainer",componentId:"sc-lw3d6i-22"})(["width:100%;height:100%;display:flex;flex-direction:column;flex:1;"]),as=o.default.div.withConfig({displayName:"styled__ConfigurationHeader",componentId:"sc-lw3d6i-23"})(["display:flex;padding-bottom:",";flex-direction:column;align-items:flex-start;gap:",";align-self:stretch;background:",";"],Oo.spacings["2XL"],Oo.spacings.NONE,Oo.colors["bg-primary"]),is=(o.default.div.withConfig({displayName:"styled__ConfigurationSections",componentId:"sc-lw3d6i-24"})(["display:flex;padding:"," ",";flex-direction:column;align-items:flex-start;gap:",";flex:1 0 0;align-self:stretch;"],Oo.spacings.NONE,Oo.spacings["2XL"],Oo.spacings["3XL"]),o.default.button.withConfig({displayName:"styled__CancelConfigurationButton",componentId:"sc-lw3d6i-25"})(["display:flex;height:32px;padding:"," ",";justify-content:center;align-items:center;border-radius:",";border:1px solid ",";background:transparent;cursor:pointer;"],Oo.spacings.NONE,Oo.spacings.LG,Oo.borderRadius.MD,Oo.colors["divider-neutral"])),ls=o.default.button.withConfig({displayName:"styled__AddStationConfigurationButton",componentId:"sc-lw3d6i-26"})(["display:flex;height:32px;padding:"," ",";justify-content:center;align-items:center;border-radius:",";background:",";color:#FFF;border:none;cursor:pointer;&:disabled{cursor:not-allowed;opacity:0.5;}"],Oo.spacings.NONE,Oo.spacings.LG,Oo.borderRadius.MD,Oo.colors["primary-btn-hover"]),rs=o.default.div.withConfig({displayName:"styled__ConfigurationTitle",componentId:"sc-lw3d6i-27"})(["color:",";"," white-space:nowrap;"],Oo.colors["neutral-dark"],Oo.fonts.desktop.smallTitle),os=o.default.div.withConfig({displayName:"styled__StationTypeSelectionWrapper",componentId:"sc-lw3d6i-28"})(["display:flex;padding:",";padding-top:",";flex-direction:column;align-items:stretch;gap:",";align-self:stretch;width:100%;position:relative;& *{box-sizing:border-box;}div[role='listbox'],& > div > div > div,& div > div > div{max-height:none;overflow-y:visible;}"],Oo.spacings.NONE,Oo.spacings.LG,Oo.spacings.SM),ss=o.default.div.withConfig({displayName:"styled__ConfigurationFooter",componentId:"sc-lw3d6i-29"})(["display:flex;flex-direction:column;align-items:stretch;gap:",";background:",";margin-top:auto;align-self:stretch;"],Oo.spacings.LG,Oo.colors["bg-primary"]),ds=o.default.div.withConfig({displayName:"styled__FooterActions",componentId:"sc-lw3d6i-30"})(["display:flex;justify-content:flex-end;align-items:center;gap:",";"],Oo.spacings.LG),cs=o.default.button.withConfig({displayName:"styled__AddTaskButton",componentId:"sc-lw3d6i-31"})(["display:flex;height:32px;width:122px;padding:"," ",";justify-content:center;align-items:center;gap:",";border-radius:",";background:transparent;border:1px solid ",";color:",";cursor:pointer;transition:all 0.2s ease;&:hover,&:active{background:",";}"],Oo.spacings.NONE,Oo.spacings.LG,Oo.spacings.SM,Oo.borderRadius.MD,Oo.colors["divider-neutral"],Oo.colors["neutral-dark"],Oo.colors["other-opa-01"]),ps=o.default.div.withConfig({displayName:"styled__TaskButtonWrapper",componentId:"sc-lw3d6i-32"})(["padding-top:",";"],Oo.spacings["2XL"]),us=o.default.div.withConfig({displayName:"styled__NumericFieldLightWrapper",componentId:"sc-lw3d6i-33"})(["input[type=number]::-webkit-outer-spin-button,input[type=number]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}& *{box-sizing:border-box;align-items:center;}input[type=number]{-moz-appearance:textfield;}"]),ms=(0,o.default)(us).withConfig({displayName:"styled__NumericFieldWrapper",componentId:"sc-lw3d6i-34"})(["padding-top:",";"],Oo.spacings.LG),hs=o.default.div.withConfig({displayName:"styled__TasksContainer",componentId:"sc-lw3d6i-35"})(["display:flex;flex-direction:column;margin-top:",";overflow-y:auto;overflow-x:visible;padding-left:",";"],Oo.spacings["3XL"],Oo.spacings.XS),gs=o.default.h3.withConfig({displayName:"styled__TasksTitle",componentId:"sc-lw3d6i-36"})(["align-self:stretch;color:",";font-size:14px;font-style:normal;font-weight:700;line-height:20px;margin-top:",";margin-bottom:",";"],Oo.colors["neutral-dark"],Oo.spacings.NONE,Oo.spacings.LG),fs=o.default.div.withConfig({displayName:"styled__TaskRow",componentId:"sc-lw3d6i-37"})(["display:flex;gap:",";width:100%;margin-bottom:",";& *{box-sizing:border-box;}"],Oo.spacings.XL,Oo.spacings["2XL"]),ys=o.default.div.withConfig({displayName:"styled__TaskTypeField",componentId:"sc-lw3d6i-38"})(["flex:1;min-width:0;display:flex;flex-direction:column;gap:",";"],Oo.spacings.LG),vs=o.default.div.withConfig({displayName:"styled__TaskDurationField",componentId:"sc-lw3d6i-39"})(["flex-shrink:0;"]),ws=o.default.div.withConfig({displayName:"styled__TrashButtonContainer",componentId:"sc-lw3d6i-40"})(["display:flex;height:44px;padding:",";padding-top:28px;justify-content:center;align-self:top;gap:",";"],Oo.spacings.NONE,Oo.spacings.NONE),xs=o.default.button.withConfig({displayName:"styled__TrashButton",componentId:"sc-lw3d6i-41"})(["display:flex;width:32px;height:32px;padding:",";justify-content:center;align-items:center;border-radius:",";border:1px solid ",";background:transparent;cursor:pointer;transition:all 0.2s ease;&:hover,&:active{background:",";border-color:",";color:",";}"],Oo.spacings.NONE,Oo.borderRadius.MD,Oo.colors["divider-neutral"],Oo.colors["error-opa-01"],Oo.colors["divider-neutral"],Oo.colors.error),Es=o.default.div.withConfig({displayName:"styled__ExampleDownloadContainer",componentId:"sc-1ri6x92-0"})(["margin-bottom:16px;"]),bs=o.default.div.withConfig({displayName:"styled__FileUploadContainer",componentId:"sc-1ri6x92-1"})(["height:90%;"]);var Cs=n(55263),_s=n(21844);const ks={zIndex:100,top:0,display:"flex",flexDirection:"column",justifyContent:"start",background:"white",height:30,margin:"0 auto",padding:"0 12px",borderRadius:"3px",boxShadow:"0 2px 6px rgba(0, 0, 0, 0.3)",outline:"none",textOverflow:"ellipses",border:0},Ss=e=>{let{maps:t,onPlacesChanged:n,placeholder:i}=e;const l=(0,a.useRef)(null),r=(0,a.useRef)(null),o=(0,a.useCallback)(()=>{n&&r&&r.current&&n(r.current.getPlaces())},[n,r]);return(0,a.useEffect)(()=>(!r.current&&t&&(r.current=new t.places.SearchBox(l.current),r.current?.addListener("places_changed",o)),()=>{t&&(r.current=null,t.event.clearInstanceListeners(r))}),[t,o]),a.createElement("input",{style:ks,ref:l,type:"text",placeholder:i})};var As=n(58246),Ts=n(31540);const Is=o.default.div.withConfig({displayName:"styled__ButtonContainer",componentId:"sc-uojkqh-0"})(["position:absolute;top:8px;right:8px;max-width:calc(50% - 266px);min-width:200px;button{width:100%;span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}}"]),Ns=o.default.div.withConfig({displayName:"styled__PublicStationsFormContainer",componentId:"sc-uojkqh-1"})(["padding:20px;overflow-y:auto;box-sizing:border-box;display:flex;flex-direction:column;width:100%;height:100%;.public-stations-select__control{min-height:36px;font-size:13px;}.public-stations-select__placeholder{font-size:13px;}.public-stations-select__indicator-container{padding:6px;}.public-stations-select__menu{font-size:13px;}.public-stations-select__menu-list{max-height:200px;}.public-stations-select__multi-value{font-size:12px;}.public-stations-select__multi-value__label{font-size:12px;}"]),Ms=o.default.span.withConfig({displayName:"styled__TitleContainer",componentId:"sc-uojkqh-2"})(["font-size:13px;color:",";padding-right:8px;margin-right:0;flex-direction:row;display:flex;align-items:center;font-weight:500;"],w),Ds=o.default.span.withConfig({displayName:"styled__NumberContainer",componentId:"sc-uojkqh-3"})(["font-size:13px;color:",";background-color:",";padding:3px 8px;margin-left:6px;flex-direction:row;display:flex;border-radius:3px;"],w,f),Ls=(0,o.default)(Ts.Ay).withConfig({displayName:"styled__StyledSlider",componentId:"sc-uojkqh-4"})(["color:red;"]),Bs=o.default.div.withConfig({displayName:"styled__FilterContainer",componentId:"sc-uojkqh-5"})(["display:flex;flex-direction:column;margin-bottom:16px;width:100%;"]),Rs=(0,o.default)(Ms).withConfig({displayName:"styled__FilterTitle",componentId:"sc-uojkqh-6"})(["padding-right:0;margin-bottom:8px;margin-right:0;font-size:13px;"]),Fs=o.default.div.withConfig({displayName:"styled__DropdownWrapper",componentId:"sc-uojkqh-7"})(["width:100%;"]),Os=o.default.div.withConfig({displayName:"styled__SliderWrapper",componentId:"sc-uojkqh-8"})(["width:97%;padding-left:8px;padding-right:8px;"]),Ps=o.default.div.withConfig({displayName:"styled__LabelsWrapper",componentId:"sc-uojkqh-9"})(["width:100%;margin-bottom:12px;"]),zs=(0,o.default)(Ms).withConfig({displayName:"styled__ResultsTitle",componentId:"sc-uojkqh-10"})(["font-size:13px;margin-bottom:12px;"]),js=o.default.div.withConfig({displayName:"styled__FooterContainer",componentId:"sc-uojkqh-11"})(["display:flex;gap:12px;margin-top:auto;padding-top:16px;border-top:1px solid #E5E7EB;"]),Ws=(0,o.default)(As.$).withConfig({displayName:"styled__FlexButton",componentId:"sc-uojkqh-12"})(["flex:1;"]),$s=e=>(t,n)=>{const i=(0,a.useRef)(t);return(0,a.useEffect)(()=>{i.current=t}),(0,a.useMemo)(()=>e(function(){return i.current(...arguments)},n),[n])},Vs=$s(Pn.debounce),Gs=$s(Pn.throttle),Us=["lat","lng"],Zs=(e,t)=>Us.includes(e)?{[e]:Number(t[e])}:{[e]:t[e]};var Hs=n(27643);const qs=(0,Nl.us)({isDarkMode:!1}),Ks=o.default.div.withConfig({displayName:"StationLabels__Row",componentId:"sc-i9utu9-0"})(["display:flex;flex-direction:column;width:100%;gap:",";"],qs.spacings.LG),Js=o.default.div.withConfig({displayName:"StationLabels__ToggleWrapper",componentId:"sc-i9utu9-1"})(["display:flex;padding:",";align-items:flex-start;align-content:flex-start;gap:",";align-self:stretch;flex-wrap:wrap;& > *{flex-shrink:0;min-width:fit-content;}"],qs.spacings.NONE,qs.spacings.LG),Xs=e=>{let{labels:t=[],onChange:n}=e;const i=(0,a.useCallback)(e=>(t||[]).includes(e),[t]),[l,r]=(0,a.useState)(()=>i(Bi)),[o,s]=(0,a.useState)(()=>i(Ri));(0,a.useEffect)(()=>{r(i(Bi)),s(i(Ri))},[t,i]);const d=(0,a.useCallback)((e,t)=>{const n=[];return e&&n.push(Bi),t&&n.push(Ri),n},[]),c=(0,a.useCallback)(e=>{if("during"===e){const e=!l;r(e),n?.(d(e,o))}else{const e=!o;s(e),n?.(d(l,e))}},[l,o,n,d]);return a.createElement(Ks,null,a.createElement(Js,null,a.createElement(Hs.l,{checked:l,onChange:()=>c("during"),mainLabel:T.t("addExperimentWizard.steps.fillingStations.duringShiftChargingLabel"),"aria-label":T.t("addExperimentWizard.steps.fillingStations.duringShiftChargingLabel")})),a.createElement(Js,null,a.createElement(Hs.l,{checked:o,onChange:()=>c("endOf"),mainLabel:T.t("addExperimentWizard.steps.fillingStations.endOfShiftChargingLabel"),"aria-label":T.t("addExperimentWizard.steps.fillingStations.endOfShiftChargingLabel")})))},Ys={value:1,label:"1"},Qs=e=>Math.round(e**2),ed=e=>{let{title:t,tags:n,handleTagsChanged:i}=e;const[l,r]=(0,a.useState)([]),o=e=>({label:e,value:e,name:e});return a.createElement(Bs,null,a.createElement(Rs,null,t),a.createElement(Fs,null,a.createElement(sa,{id:`public-stations-filter-${t.toLowerCase().replace(/\s+/g,"-")}`,menuPlacement:"bottom",error:!1,backgroundColor:"#fafafb",options:Object.keys(n).map(o),isMulti:!0,handleChange:e=>{const t=e.map(e=>"string"==typeof e?e:e.value);r(t),i(t)},value:l.map(o),noHeight:!0,classNamePrefix:"public-stations-select"})))},td=["id","lat","lng"];let nd=Y.A.CancelToken.source();const ad=e=>{let{updateStepData:t,polygon:n,onCancel:i}=e;const[l,r]=(0,a.useState)({}),[o,s]=(0,a.useState)({}),[d,c]=(0,a.useState)(Fi),[p,u]=(0,a.useState)(!1),[m,h]=(0,a.useState)(null),g={polygon:n,operators:[],powerSupply:[],kw:[Ys.value,400]},[f,y]=(0,a.useState)(g);(0,a.useEffect)(()=>(nd=Y.A.CancelToken.source(),n&&(u(!0),v()),()=>{nd.cancel("Landing Component got unmounted")}),[]);const v=Gs(async()=>{nd=Y.A.CancelToken.source();try{const e=await(async(e,t)=>{let{kw:n,operators:a,polygon:i,powerSupply:l}=e;if(!i)throw new Error("no poly");const{data:r}=await te.post("/api/v1/filling-stations/query",{include:[{model:"slots",required:!0,where:{powerInKw:{$gte:n[0],$lte:n[1]},...l&&l.length?{supportedPowerTypes:{$overlap:l}}:{}}}],territory:i?{type:"Polygon",coordinates:[i]}:void 0,query:a&&a.length?{operatorName:a}:void 0},{cancelToken:t});return r})(f,nd.token);await(async e=>{const t={...l},n={...o};await Promise.all(e.map(async e=>{let{operatorName:a,slots:i}=e;t[a]=!0,i&&i.length&&i.map(e=>{let{supportedPowerTypes:t}=e;return t.map(async e=>{n[e]=!0})})})),r(t),s(n)})(e),h(e||[]),await u(!1)}catch(e){if(!(e instanceof Y.A.Cancel))throw await u(!1),e}},1e3),w=async(e,t)=>{nd.cancel("Component handleFieldChanged"),await y(n=>({...n,[e]:t})),await u(!0),await v()};return a.createElement(Ns,{id:"public-stations-form"},a.createElement(ed,{title:T.t("addExperimentWizard.steps.fillingStations.operators"),tags:l,handleTagsChanged:e=>w("operators",e)}),a.createElement(ed,{title:T.t("addExperimentWizard.steps.fillingStations.powerSupply"),tags:o,handleTagsChanged:e=>w("powerSupply",e)}),a.createElement(Bs,null,a.createElement(Rs,null,T.t("addExperimentWizard.steps.fillingStations.kW")),a.createElement(Os,null,a.createElement(Ls,{size:"small",defaultValue:f.kw,marks:[Ys,{value:20,label:"400"}],scale:Qs,max:20,min:1,step:.1,getAriaLabel:e=>0===e?"Minimum":"Maximum",onChangeCommitted:(e,t)=>w("kw",Array.isArray(t)&&t.map(Qs))}))),a.createElement(Bs,null,a.createElement(Ps,null,a.createElement(Xs,{labels:d,onChange:e=>c(e)})),p||m?a.createElement(zs,null,T.t("addExperimentWizard.steps.fillingStations.stationsFound")," ",p?a.createElement(a.Fragment,null,a.createElement(Vr,{height:11,width:35})):a.createElement(a.Fragment,null,m?a.createElement(Ds,null,m.length,m.length>=3e3?"+":void 0):void 0)):void 0),a.createElement(js,null,a.createElement(Ws,{variant:"secondary",onClick:i},"Cancel"),a.createElement(Ws,{variant:"primary",disabled:p||!(m&&m.length),onClick:()=>{t(((e,t)=>{let{labels:n}=t;return e?.map(e=>{const{slots:t}=e;return{slots:e.slots&&e.slots.length,address:e.displayAddress,rate:Number(t&&t.length&&t[0].powerInKw)||1,type:wi,labels:n,stationType:Oi.CHARGING_STATION,...(a=e,i=td,Object.keys(a).reduce((e,t)=>({...e,...i.includes(t)?Zs(t,a):{}}),{}))};var a,i})})(m,{labels:d})),i&&i()}},T.t("addExperimentWizard.steps.fillingStations.import"))))},id=e=>{let{onClick:t}=e;return a.createElement(Is,null,a.createElement(As.$,{variant:"primary",onClick:t},T.t("addExperimentWizard.steps.fillingStations.importPublicChargingStations")))};function ld(){return ld=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const[t,n]=(0,a.useState)(null),i=(0,a.useCallback)(t=>{if(e.polygon?.length){const n=new window.google.maps.LatLngBounds;e.polygon.forEach(e=>{let[t,a]=e;n.extend(new window.google.maps.LatLng(a,t))}),t.fitBounds(n)}n(t)},[e.polygon]);return a.createElement(Il.u6,ld({options:{streetViewControl:!1,styles:rd.map,disableDefaultUI:!0,zoomControl:!0,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_BOTTOM}},mapContainerStyle:rd.mapContainer,center:e.center,onLoad:i},e),t&&e.withSearch&&a.createElement(Ss,{placeholder:e.searchPlaceholder??e.placeholder??T.t("map.searchPlaceholder"),maps:window.google.maps,onPlacesChanged:e=>{const n=Array.isArray(e)?e[0]:void 0,a=n?.geometry?.viewport;if(a)return void t.fitBounds(a);const i=n?.geometry?.location;i?.lat&&i?.lng&&(t.panTo({lat:i.lat(),lng:i.lng()}),t.setZoom(14))}}),e.withPublicStationsButton&&e.onPublicStationsClick&&a.createElement(id,{onClick:e.onPublicStationsClick}),e.children)};od.defaultProps={zoom:14};const sd=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,Cs.Zz)((0,Cs.IN)({googleMapURL:`https://maps.googleapis.com/maps/api/js?key=${k.GMAPS_API_KEY}&v=3.exp&libraries=geometry,drawing,places`,loadingElement:a.createElement("div",null),...t}),_s.Fq,...e)},dd=sd()(od),cd=(0,Nl.us)({isDarkMode:!1}),pd=o.default.div.withConfig({displayName:"styled__Container",componentId:"sc-1b978dr-0"})(["width:",";height:",";min-width:",";border-radius:8px;overflow:hidden;position:relative;"],e=>e.width||"70%",e=>e.height||"100%",e=>e.minWidth||"300px"),ud=o.default.div.withConfig({displayName:"styled__TopBannerContainer",componentId:"sc-1b978dr-1"})(["display:flex;width:931px;height:108px;padding-bottom:",";flex-direction:column;align-items:center;gap:",";position:absolute;top:",";left:50%;transform:translateX(-50%);box-sizing:border-box;pointer-events:none;*{pointer-events:auto;}"],cd.spacings["3XL"],cd.spacings.LG,cd.spacings.NONE),md=o.default.div.withConfig({displayName:"styled__TopBannerContent",componentId:"sc-1b978dr-2"})(["display:flex;padding:"," "," "," ",";flex-direction:column;align-items:center;gap:",";border-radius:"," "," "," ",";background:",";box-shadow:0 0 16px 0 rgba(33,34,41,0.16);"],cd.spacings.NONE,cd.spacings["2XL"],cd.spacings["2XL"],cd.spacings["2XL"],cd.spacings["2XL"],cd.borderRadius.NONE,cd.borderRadius.NONE,cd.borderRadius.XL,cd.borderRadius.XL,cd.colors["bg-primary"]),hd=o.default.div.withConfig({displayName:"styled__TopBannerTitle",componentId:"sc-1b978dr-3"})(["color:",";font-size:14px;font-style:normal;font-weight:700;line-height:20px;text-align:center;"],cd.colors["neutral-dark"]),gd=o.default.div.withConfig({displayName:"styled__TopBannerRow",componentId:"sc-1b978dr-4"})(["display:flex;align-items:center;gap:12px;width:100%;& > button:first-child{flex-shrink:0;}& > div{flex:1;min-width:0;}"]),fd=o.default.div.withConfig({displayName:"styled__SearchFieldWrapper",componentId:"sc-1b978dr-5"})(["& *{box-sizing:border-box;}"]);var yd=n(32347),vd=function(e){return a.createElement("svg",e,a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 7a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0-1a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z",fill:"#fff"}),a.createElement("path",{d:"M6.044 11h-.087.087Z",fill:"#fff"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11 5.2c0 2.103-1.602 4.633-4.313 7.571-.222.24-.45.483-.687.729a49.022 49.022 0 0 1-.687-.729C2.603 9.833 1 7.303 1 5.2 1 2.328 3.239 0 6 0s5 2.328 5 5.2Zm-1 0c0 .872-.364 1.947-1.178 3.257-.676 1.09-1.626 2.284-2.822 3.584-1.196-1.3-2.146-2.495-2.822-3.584C2.364 7.147 2 6.072 2 5.2 2 2.843 3.827 1 6 1s4 1.843 4 4.2Z",fill:"#fff"}),a.createElement("path",{d:"M11 13.5c0 .055-.077.434-1.04.85-.886.382-2.241.65-3.96.65-1.72 0-3.074-.268-3.96-.65-.963-.416-1.04-.795-1.04-.85 0-.055.077-.434 1.04-.85.202-.087.428-.168.677-.241l-.672-.834C.75 12.034 0 12.725 0 13.5 0 14.88 2.385 16 6 16s6-1.12 6-2.5c0-.755-.714-1.433-1.953-1.891l-.627.842c.196.062.375.129.54.2.963.415 1.04.794 1.04.849Z",fill:"#fff"}))};vd.defaultProps={width:"12",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const wd=e=>{let{title:t=T.t("map.topBanner.title"),onAddStationClick:n,searchValue:i,onSearchChange:l,onSearchClear:r,onPlaceChanged:o,onAutocompleteLoad:s}=e;return a.createElement(ud,null,a.createElement(md,null,a.createElement(hd,null,t),a.createElement(gd,null,a.createElement(As.$,{onClick:n},a.createElement(vd,{width:"16",height:"16"}),a.createElement("span",{style:{marginLeft:"8px"}},T.t("map.topBanner.addStationButton"))),a.createElement(Il.jT,{onPlaceChanged:o,onLoad:s},a.createElement(fd,null,a.createElement(yd.L,{value:i,onChange:e=>l(e.target.value),placeholder:T.t("map.topBanner.searchPlaceholder"),onClear:r}))))))},xd=e=>{const t=window.google;return t?.maps?.drawing?"polygon"===e?t.maps.drawing.OverlayType.POLYGON:"marker"===e?t.maps.drawing.OverlayType.MARKER:null:null},Ed=e=>{let{stations:t,polygon:n,addStation:i,center:l,chooseStation:r,chosenStation:o,MarkerComponent:s,onNewPolygonDrawn:d,drawingMode:c,withSearch:p,searchPlaceholder:u,withPublicStationsButton:m,onPublicStationsClick:h,uploadFileCb:g,updateStepData:f,height:y,width:v,drawingControl:w=!0,showTopBanner:x=!1,onAddStationClick:E,activateDrawing:b=!1,temporaryMarker:C,TemporaryMarkerComponent:_,onLocationSearch:k}=e;const S=(0,a.useRef)(null),[A,T]=(0,a.useState)(""),[I,N]=(0,a.useState)(null),M=xd(c),D=(0,a.useMemo)(()=>({drawingControl:w,drawingControlOptions:{drawingModes:M?[M]:[]},polygonOptions:{editable:!0,draggable:!1}}),[w,M]);return(0,a.useEffect)(()=>{const e=S.current;e&&M&&(e.setOptions(D),(e=>{e.setDrawingMode(b&&M?M:null)})(e))},[D,b,M]),a.createElement(pd,{height:y,width:v},a.createElement(dd,{center:l,polygon:n,searchPlaceholder:u,withSearch:p,withPublicStationsButton:m,onPublicStationsClick:h,uploadFileCb:g,updateStepData:f},n&&a.createElement(Wl,{path:n.map(e=>({lng:e[0],lat:e[1]}))}),s&&t?.filter(e=>e&&e.id).map(e=>a.createElement(s,{key:e.id,type:e.type,stationType:e.stationType,position:e,isHighlighted:o?.id===e.id,onClick:()=>r?.(e)})),C&&_&&a.createElement(_,{key:"temporary-marker",position:C,stationType:C.stationType,type:C.type,isHighlighted:!0}),a.createElement(Il.Ky,{onLoad:e=>{S.current=e;const t=xd(c),n=t?[t]:[];e.setOptions({drawingControl:w,drawingControlOptions:{drawingModes:n},polygonOptions:{editable:!0,draggable:!1}}),e.setDrawingMode(b&&t?t:null)},onPolygonComplete:d,onMarkerComplete:i,options:D})),x&&a.createElement(wd,{onAddStationClick:E,searchValue:A,onSearchChange:T,onSearchClear:()=>T(""),onPlaceChanged:()=>{if(!I||!k)return;const e=I.getPlace();if(!e?.geometry?.location)return;const t={lat:e.geometry.location.lat(),lng:e.geometry.location.lng(),address:e.formatted_address||""};T(t.address),k(t)},onAutocompleteLoad:e=>N(e)}))};new(n(66849).Client);const bd=()=>({file:null,polygon:null,center:vl.TLV}),Cd=e=>{let{stepData:t,updateStepData:n,showErrors:i}=e;const[l,r]=(0,a.useState)(!1),o=t.polygon,s=e=>{const t=ba.polygon([e]);return ba.centroid(t)};return a.createElement(Fl,null,i&&(!o||0===o.length)&&a.createElement(Dl,null,Sf("territory.incompleteErrorText")),a.createElement(Es,null,a.createElement(go,{filename:oo})),a.createElement(zl,null,a.createElement(Jo,null,a.createElement(vo,{error:l,currentFile:t.file,uploadFileCb:async e=>{const t=new FileReader;t.addEventListener("load",t=>{try{const a=(e=>{const{type:t}=e;switch(t){case"Polygon":return e;case"Feature":return e.geometry;case"FeatureCollection":return e.features&&e.features[0]?.geometry;default:throw new Error("cannot parse polygon from object")}})(JSON.parse(t?.target?.result)).coordinates[0],i=s(a);n({file:e,polygon:a,center:{lng:i.geometry.coordinates[0],lat:i.geometry.coordinates[1]}})}catch{r(!0)}}),t.addEventListener("error",()=>{r(!0)}),await t.readAsText(e)},onDismissFile:()=>n(bd())},a.createElement(Sr,null,T.t("fileUploader.supported.geo")))),a.createElement(jl,null,a.createElement(Ed,{width:"100%",height:"100%","flex-grow":"1",withSearch:!0,drawingMode:"polygon",activateDrawing:!0,onNewPolygonDrawn:e=>{e.setMap(null);const t=[];for(let n=0;nr(!1),title:T.t("addExperimentWizard.steps.territory.popupErrorTitle"),onClickSubmitButton:()=>r(!1)},a.createElement(On,{errorMessage:T.t("addExperimentWizard.steps.territory.popupErrorText")})))};var _d=n(95834);const kd="driverShifts",Sd={amount:1,groupName:T.t("addExperimentWizard.untitledGroup"),[kd]:[],vehicleLabel:""},Ad=()=>null,Td=e=>{let{stepData:t,updateStepData:n,showErrors:i,wizardData:l}=e;const r=[{title:T.t("addExperimentWizard.steps.drivers.tableColumns.amount"),width:"8%",type:"input",inputType:"number",constraint:"number",accessor:"amount"},{title:T.t("addExperimentWizard.steps.drivers.tableColumns.groupName"),width:"15%",type:"input",inputType:"text",accessor:"groupName"},{title:T.t("addExperimentWizard.steps.drivers.tableColumns.driverShifts"),width:"52%",type:"tag input",options:(s=l.shifts,s?.map(e=>({label:e.name,value:e.id,name:e.name}))),accessor:kd},{title:T.t("addExperimentWizard.steps.drivers.tableColumns.vehicleLabel"),width:"20%",accessor:"vehicleLabel",type:"dropdown",options:(o=l.vehicleGroups,Object.fromEntries([["",{label:"ANY",value:""}],...o?.map(e=>e.labels&&[e.labels,{label:e.labels,value:e.labels}]).filter(Boolean)||[]]))}];var o,s;return a.createElement(Fl,{id:"addDriverGroup"},a.createElement(Jd,{addRowText:T.t("addExperimentWizard.steps.drivers.addGroup"),showErrors:i,stepName:"drivers",tableData:t,updateTableData:e=>{n(e.map(e=>({amount:e.amount,driverShifts:e.driverShifts,groupName:e.groupName,vehicleLabel:e.vehicleLabel})))},fields:r,initialRowData:Sd}))};var Id=function(e){return a.createElement("svg",e,a.createElement("defs",null,a.createElement("style",null,".cls-delete","{","fill:transparent;stroke:current;stroke-width:1.5px;fill-rule:evenodd","}")),a.createElement("g",{id:"_-e-delete",transform:"translate(-1281.25 -317.25)"},a.createElement("path",{id:"Path_91",className:"cls-delete",d:"M5120 677h6a2 2 0 0 1 2 2l-1 7a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2l-1-7a2 2 0 0 1 2-2z",transform:"translate(-3835 -356)"}),a.createElement("path",{id:"Path_92",className:"cls-delete",d:"M5120 677v-2a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2",transform:"translate(-3835 -356)"}),a.createElement("path",{id:"Rectangle_164",transform:"translate(1282 321)",style:{fill:"transparent",stroke:"current",strokeWidth:"1.5px"},d:"M0 0h12v1H0z"})))};Id.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"13.5",height:"15.5"};var Nd=function(e){return a.createElement("svg",e,a.createElement("defs",null,a.createElement("style",null,".cls-clone,.cls-clone2","{","fill:current;stroke:current;stroke-width:1.5px","}",".cls-clone","{","stroke-linejoin:round","}")),a.createElement("g",{id:"Group_4096",transform:"translate(-1271.25 -437.734)"},a.createElement("path",{id:"Rectangle_2496",className:"cls-clone",transform:"translate(1275 441.484)",d:"M0 0h12v12H0z"}),a.createElement("path",{id:"Path_649",className:"cls-clone",d:"M.5 12.5V.5h12",transform:"translate(1271.5 437.984)"}),a.createElement("path",{id:"Line_106",className:"cls-clone2",transform:"translate(1281 444.484)",d:"M0 0v6"}),a.createElement("path",{id:"Line_107",className:"cls-clone2",transform:"rotate(90 418.258 865.742)",d:"M0 0v6"})))};Nd.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"16.5",height:"16.5"};const Md=o.default.div.withConfig({displayName:"styled__FieldHeader",componentId:"sc-1xrloys-0"})(["opacity:0.5;font-family:Montserrat;font-size:",";text-align:left;color:#5c5c5c;margin:22px 0 7px 0;",";",";"],d,e=>{let{width:t}=e;return t&&`width: ${t}`},e=>{let{minWidth:t}=e;return t&&`min-width: ${t}`}),Dd=o.default.div.withConfig({displayName:"styled__RowsContainer",componentId:"sc-1xrloys-1"})(["max-height:80%;min-width:700px;",";width:100%;-ms-overflow-style:none;::-webkit-scrollbar{display:none;}"],e=>{let{scroll:t}=e;return t&&"overflow-y: scroll"}),Ld=o.default.div.withConfig({displayName:"styled__RowContainer",componentId:"sc-1xrloys-2"})(["display:flex;flex:row nowrap;justify-content:space-between;align-items:center;background-color:#f5f5f7;height:100%;flex-grow:1;"]),Bd=o.default.div.withConfig({displayName:"styled__RowNumber",componentId:"sc-1xrloys-3"})(["margin:auto;font-size:",";line-height:100%;text-align:center;color:#313131;width:30px;"],d),Rd=o.default.input.withConfig({displayName:"styled__TextInput",componentId:"sc-1xrloys-4"})(["transition:all 0.2s ease-in-out;min-width:50px;color:",";background-color:#fafafb;outline-color:",";opacity:0.9;font-family:Montserrat;font-size:",";width:100%;height:30px;border-radius:3px;border:",";padding:0 6px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;:focus{background-color:white;}"],e=>{let{disabled:t}=e;return t?f:w},h,c,e=>{let{error:t}=e;return t?`solid 1px ${y}`:`solid 1px ${f}`}),Fd=o.default.div.withConfig({displayName:"styled__VehiclesFlexContainer",componentId:"sc-1xrloys-5"})(["display:flex;flex-direction:row;justify-content:space-between;background-color:#f5f5f7;height:60px;width:100%;border-radius:4px;margin:5px 0;"]),Od=o.default.div.withConfig({displayName:"styled__EndRowContainer",componentId:"sc-1xrloys-6"})(["display:flex;flex:row;justify-content:space-between;align-items:center;height:100%;width:37px;padding-left:25px;padding-right:18px;min-width:37px;"]),Pd=(0,o.default)(Id).withConfig({displayName:"styled__TrashIcon",componentId:"sc-1xrloys-7"})(["fill:transparent;stroke:",";cursor:pointer;:hover{stroke:",";}"],g,h),zd=(0,o.default)(Nd).withConfig({displayName:"styled__CloneIcon",componentId:"sc-1xrloys-8"})(["fill:transparent;stroke:",";cursor:pointer;:hover{stroke:",";}"],g,h),jd=o.default.div.withConfig({displayName:"styled__Cell",componentId:"sc-1xrloys-9"})(["width:",";min-width:",";height:30px;"],e=>{let{width:t}=e;return t},e=>{let{minWidth:t}=e;return t}),Wd=o.default.div.withConfig({displayName:"styled__CurveBox",componentId:"sc-1xrloys-10"})(["min-width:50px;background-color:#fafafb;opacity:0.9;font-family:Montserrat;font-size:",";width:100%;height:30px;border-radius:3px;border:",";padding:4px 4px 4px 12px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:flex;justify-content:space-between;align-items:center;}"],c,e=>{let{error:t}=e;return t?`solid 1px ${y}`:`solid 1px ${f}`}),$d=o.default.div.withConfig({displayName:"styled__CurveBoxContent",componentId:"sc-1xrloys-11"})(["display:flex;align-items:center;gap:12px;color:#11A4FF;flex:1 0 0;"]),Vd=o.default.input.withConfig({displayName:"styled__CurveBoxValueInput",componentId:"sc-1xrloys-12"})(["border:none;background-color:transparent;font-size:12px;font-family:Montserrat;color:#313131;width:100%;outline:none;"]),Gd=o.default.span.withConfig({displayName:"styled__ErrorMessage",componentId:"sc-1xrloys-13"})(["color:",";font-size:12px;font-family:Montserrat;margin-top:5px;"],y),Ud=e=>T.t(`addExperimentWizard.steps.vehicles.tableColumns.chargingCurve.${e}`);var Zd=function(e){return e.NUMBER="number",e.CURVE="curve",e.NULL="",e}(Zd||{});const Hd=["state_of_charge","kw"],qd=e=>{let{value:t,onChange:n,disabled:i}=e;const[l,r]=(0,a.useState)(Zd.NULL),[o,s]=(0,a.useState)(""),[d,c]=(0,a.useState)("0"),p=(0,a.useRef)(null),[u,m]=(0,a.useState)(""),[h,g]=(0,a.useState)("");(0,a.useEffect)(()=>()=>{o&&URL.revokeObjectURL(o)},[o]),(0,a.useEffect)(()=>{"number"==typeof t?(r(Zd.NUMBER),c(t)):Array.isArray(t)&&(r(Zd.CURVE),f(t))},[t]);const f=e=>{const t=[Hd,...e].map(e=>e.join(",")).join("\n"),n=new Blob([t],{type:"text/csv"}),a=URL.createObjectURL(n);s(a),m("")},y=()=>{i||(r(Zd.NULL),s(""),m(""),g(""),n(null),p.current&&(p.current.value=""))};return a.createElement(a.Fragment,null,l===Zd.NUMBER&&a.createElement(Wd,{error:""!==u},a.createElement(Vd,{id:"chargeRateKWH",value:d.toString(),onChange:e=>{const t=Number(e.target.value);if(c(e.target.value),Number.isNaN(t)||t<0)return m(Number.isNaN(t)?Ud("invalidNumber"):Ud("numberGreaterThanZero")),void n(null);m(""),n(t)},disabled:i}),a.createElement(tr,{width:"12px",height:"12px",onClick:y})),l===Zd.CURVE&&o&&a.createElement(Wd,{error:""!==u},a.createElement("a",{href:o,download:"curve.csv"},a.createElement($d,null,a.createElement("span",null,Ud("curve")),a.createElement(Rr,{width:"25px",height:"25px",onClick:()=>{}}))),a.createElement(tr,{width:"12px",height:"12px",onClick:y})),l===Zd.NULL&&a.createElement("div",null,a.createElement(sa,{id:"chargingRateDropdown",disabled:i,handleChange:e=>{return t=e,m(""),void(t===Zd.NUMBER?(n(0),c("0")):t===Zd.CURVE?p.current?.click():n(null));var t},options:[{value:Zd.NUMBER,label:oa({title:Ud("numberOption.title"),subtitle:Ud("numberOption.subtitle"),titleId:"constant"})},{value:Zd.CURVE,label:oa({title:Ud("curveOption.title"),subtitle:Ud("curveOption.subtitle"),titleId:"curve"})}],value:l})),a.createElement("input",{type:"file",ref:p,onChange:async e=>{try{if(e.target.files&&e.target.files[0]){const t=e.target.files[0],a=(await Fr(t,"VEHICLE_CHARGING_CURVE")).jsonData;n(a),f(a),r(Zd.CURVE)}}catch(e){g((e=>{switch(e){case"The state of charge percentage must monotonically increase":return Ud("errors.monotonicallyIncrease");case"The last entry must have state of charge of 100":return Ud("errors.lastEntryStateOfCharge");default:return Ud("errors.invalidFileError")}})(e.message)),m(Ud("invalidFile")),r(Zd.NULL)}},style:{display:"none"},accept:".csv","data-test-id":"uploadChargingCurveCsv"}),u&&a.createElement(Gd,null,u),a.createElement(wt,{onClose:y,onClickSubmitButton:y,submitButtonText:Ud("errors.close"),isVisible:h,title:Ud("errors.header")},h))},Kd=[kd,...hi],Jd=e=>{let{tableData:t,updateTableData:n,fields:i,initialRowData:l,showErrors:r,stepName:o,addRowText:s}=e;const d=JSON.parse(JSON.stringify(t||[])),c=(0,a.useRef)(null),p=(e,t,a)=>{const i=a===ri;if(i&&e&&e.id){const{modelName:n,bodyType:a,labels:i,capacity:l,powerTrain:r,range:o,kwh:s,rate:c,brand:p}=e;d[t]={...d[t],modelName:n,labels:i,bodyType:a,capacity:l,powerTrain:r,range:o,batteryCapacityKWH:s,chargeRateKWH:c,brand:p}}else d[t]={...d[t],[a]:e,[mi]:i||d[t][mi]};i&&!e&&delete d[t]?.brand,d[t].powerTrain===yi.IC.value&&(delete d[t]?.batteryCapacityKWH,delete d[t]?.chargeRateKWH,delete d[t]?.idleConsumptionKWH),n(d)},u=(e,t)=>a.createElement(a.Fragment,null,e,t&&a.createElement($l,null)),m=(e,t)=>!!r&&(t?0===e?.length:!e),h=(e,t)=>t?.filter(t=>e.includes(t.value));return a.createElement(a.Fragment,null,a.createElement(Ol,{flexDirection:"row",paddingLeft:"30px",paddingRight:"80px"},i.map(e=>a.createElement(Md,{key:e.title,width:e.width,minWidth:e.minWidth},e.title))),r&&(!d||0===d.length)&&a.createElement(Dl,null,Sf(`${o}.incompleteErrorText`)),a.createElement(Dd,{scroll:d?.length>5},d?.map((e,t)=>a.createElement(_d.A,{key:t,in:!0},a.createElement(Fd,null,a.createElement(Bd,null,t+1),a.createElement(Ld,null,i.map(n=>{const i=e[n.accessor],l=m(i),o=e=>p(e,t,n.accessor),s=r&&((e,t)=>e.validation?!e.validation(t):""===t)(n,e[n.accessor]),c=n.isCustomAvailable&&(e[mi]||i&&n.options&&!n.options[i]),g=r&&0===e[n.accessor]?.length&&!Kd.includes(n.accessor),f="batteryCapacityKWH"===n.accessor&&e.powerTrain===yi.IC.value||"chargeRateKWH"===n.accessor&&e.powerTrain===yi.IC.value||n.accessor===di&&e.powerTrain!==yi.EV.value,y=d.length>4&&t>d.length-4?"top":"bottom";return a.createElement(jd,{key:n.title,width:n.width,minWidth:n.minWidth},(()=>{switch(c?"input":n.type){case"input":{const e=n.validation&&null!=i&&""!==i&&!n.validation(i);return u(a.createElement(Vl,null,a.createElement(Rd,{autoFocus:n.isCustomAvailable&&!i,disabled:f,error:e||l&&!Kd.includes(n.accessor),id:n.accessor,type:n.inputType,min:1,onChange:e=>o("number"===n.inputType&&e.target.value?+e.target.value:e.target.value),value:i??""}),n.unit&&a.createElement(Ul,null,n.unit)),s||e)}case"dropdown":return u(a.createElement(sa,{id:n.accessor,menuPlacement:y,error:l,backgroundColor:"#fafafb",handleChange:e=>o(e),options:Object.values(n.options).sort((e,t)=>"Other"===t.label?1:e.label.localeCompare(t.label)),value:n.options[i]||n.options[i?.toUpperCase()]||n.options[i?.charAt(0)?.toUpperCase()+i?.slice(1)]||null}),s);case"tag input":return u(a.createElement(sa,{id:n.accessor,menuPlacement:y,error:m(i,!0)&&!Kd.includes(n.accessor),backgroundColor:"#fafafb",options:n.options,isMulti:!0,handleChange:e=>o(e.map(e=>e.value||e)),value:h(i,n.options)}),g);case"chargeRate":{const e=e=>{const a="number"==typeof e?e:null,i=Array.isArray(e)?e:null;p(a,t,n.accessor),p(i,t,ci)};return a.createElement(qd,{value:i??d[t].chargingCurve??null,onChange:e,disabled:f})}default:return null}})())})),a.createElement(Od,null,a.createElement(zd,{id:"clone",onClick:()=>(async e=>{d.push(d[e]),n(d),setTimeout(()=>{c.current?.scrollIntoView({behavior:"smooth"})},0)})(t)}),a.createElement(Pd,{id:"delete",onClick:()=>{return e=t,d.splice(e,1),void n(d);var e}}))))),a.createElement("div",{ref:c})),a.createElement(Tt,{onClick:async()=>{d.push(l),n(d),setTimeout(()=>{c.current?.scrollIntoView({behavior:"smooth"})},0)}},s))},Xd=(0,a.createContext)({vehicleModels:[]}),Yd=e=>{let{children:t}=e;const[n,i]=(0,a.useState)(null);return(0,a.useEffect)(()=>{(async()=>{const e=await(async()=>{const{data:e}=await te.get("/api/v1/vehicle-models");return e})();i(e)})()},[]),a.createElement(Xd.Provider,{value:{vehicleModels:n}},t)},Qd=o.default.span.withConfig({displayName:"styled__Label",componentId:"sc-1fh5kfi-0"})(["font-size:",";color:",";cursor:pointer;text-decoration:none;"],d,h),ec=o.default.div.withConfig({displayName:"styled__Container",componentId:"sc-1fh5kfi-1"})(["display:flex;gap:3px;cursor:pointer;"]);var tc=function(e){return a.createElement("svg",e,a.createElement("g",{style:{strokeWidth:"2px",fill:"none"}},a.createElement("circle",{cx:"27",cy:"27",r:"27",style:{stroke:"none"}}),a.createElement("circle",{cx:"27",cy:"27",r:"26",style:{fill:"none"}})),a.createElement("path",{d:"m5596.13 1815.365-11-10-11 10",transform:"translate(-5558.131 -1789.365)",style:{strokeLinejoin:"round",fillRule:"evenodd",strokeWidth:"2px",fill:"none"}}),a.createElement("path",{transform:"translate(27 17)",style:{strokeWidth:"2px",fill:"none"},d:"M0 0v22"}))};tc.defaultProps={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 54 54"};const nc=e=>{let{onClick:t}=e;return a.createElement(ec,{onClick:t},a.createElement(Qd,{id:"uploadFileButton"},T.t("upload")),a.createElement(tc,{stroke:h,width:"15px",height:"15px"}))},ac=e=>Number.isInteger(e)&&e>0,ic=e=>"number"==typeof e&&e>0,lc=e=>"number"==typeof e&&e>=0,rc=e=>"number"==typeof e&&e>=1&&e<=100,oc=e=>"number"==typeof e&&e>=0&&e<=100;var sc=function(e){return a.createElement("svg",e,a.createElement("defs",null,a.createElement("style",null,".cls-delete","{","fill:transparent;stroke:current;stroke-width:1.5px;fill-rule:evenodd","}")),a.createElement("g",{id:"_-e-delete",transform:"translate(-1281.25 -317.25)"},a.createElement("path",{id:"Path_91",className:"cls-delete",d:"M5120 677h6a2 2 0 0 1 2 2l-1 7a2 2 0 0 1-2 2h-4a2 2 0 0 1-2-2l-1-7a2 2 0 0 1 2-2z",transform:"translate(-3835 -356)"}),a.createElement("path",{id:"Path_92",className:"cls-delete",d:"M5120 677v-2a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2",transform:"translate(-3835 -356)"}),a.createElement("path",{id:"Rectangle_164",transform:"translate(1282 321)",style:{fill:"transparent",stroke:"current",strokeWidth:"1.5px"},d:"M0 0h12v1H0z"})))};sc.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"13.5",height:"15.5"};const dc=o.default.div.withConfig({displayName:"styled__DEFAULT_MARGIN",componentId:"sc-12pyced-0"})(["margin:0px 40px 5px 0px;"]),cc=o.default.div.withConfig({displayName:"styled__Card",componentId:"sc-12pyced-1"})(["background-color:#ffffff;border-radius:4px;display:flex;flex-direction:row;justify-content:space-between;padding-top:25px;padding-bottom:25px;padding-left:30px;padding-right:40px;margin-top:10px;margin-bottom:10px;box-shadow:0px 1px 3px 0px rgba(157,165,180,0.5);transition:all 0.2s ease-in-out;"]),pc=o.default.div.withConfig({displayName:"styled__ColumnContainer",componentId:"sc-12pyced-2"})(["flex:1;width:100%;position:relative;display:",";margin:",";&:not(:first-child){margin-left:10px;}"],e=>{let{hidden:t}=e;return t?"none":"block"},e=>{let{margin:t}=e;return t}),uc=o.default.div.withConfig({displayName:"styled__RowContainer",componentId:"sc-12pyced-3"})(["position:relative;display:flex;flex-direction:row;align-items:flex-end;padding-top:12px;"]),mc=o.default.div.withConfig({displayName:"styled__TitleText",componentId:"sc-12pyced-4"})(["font-family:Montserrat;font-weight:600;color:#333333;padding-bottom:3px;padding-top:3px;"]),hc=(o.default.div.withConfig({displayName:"styled__SemiTitleText",componentId:"sc-12pyced-5"})(["font-family:Montserrat;font-weight:600;color:#333333;font-size:",";"],p),o.default.div.withConfig({displayName:"styled__DescriptionText",componentId:"sc-12pyced-6"})(["font-family:Montserrat;font-size:",";color:#333333;margin:",";white-space:pre-line;"],p,e=>{let{margin:t}=e;return t||dc.margin})),gc=o.default.div.withConfig({displayName:"styled__FlexEndContainer",componentId:"sc-12pyced-7"})(["justify-content:flex-end;align-items:center;display:flex;"]),fc=o.default.div.withConfig({displayName:"styled__InputContainer",componentId:"sc-12pyced-8"})(["min-width:110px;height:40px;border:2px solid ",";border-radius:4px;display:flex;max-width:235px;"],f),yc=o.default.div.withConfig({displayName:"styled__Label",componentId:"sc-12pyced-9"})(["font-family:Montserrat;font-style:normal;font-size:15px;color:#858585;padding-bottom:4px;"]),vc=o.default.input.attrs(()=>({type:"number"})).withConfig({displayName:"styled__NumberInput",componentId:"sc-12pyced-10"})(["width:100px;font-size:",";font-family:'Montserrat';text-align:center;transition:0.2s;border:none;",""],d,e=>{let{isInvalid:t}=e;return t&&`color: ${y}`}),wc=o.default.input.attrs(()=>({type:"text"})).withConfig({displayName:"styled__TextInput",componentId:"sc-12pyced-11"})(["min-width:200px;font-size:",";font-family:'Montserrat';transition:0.2s;border:none;padding:10px;",""],d,e=>{let{isInvalid:t}=e;return t&&`color: ${y}`}),xc=(o.default.input.attrs(()=>({type:"text"})).withConfig({displayName:"styled__WideTextInput",componentId:"sc-12pyced-12"})(["width:100%;font-size:",";font-family:'Montserrat';transition:0.2s;",";text-indent:10px;"],d,e=>{let{isInvalid:t}=e;return t&&`color: ${y}`}),o.default.div.withConfig({displayName:"styled__UnitContainer",componentId:"sc-12pyced-13"})(["font-family:'Montserrat';font-size:",";background-color:rgba(186,186,186,0.15);height:100%;align-items:center;display:flex;text-align:center;width:100%;justify-content:center;"],d)),Ec=o.default.div.withConfig({displayName:"styled__UnitText",componentId:"sc-12pyced-14"})(["padding:9px;transition:0.2s;color:",";"],e=>{let{isInvalid:t}=e;return t?`${y}`:`${h}`}),bc=(o.default.div.withConfig({displayName:"styled__RadioInputContainer",componentId:"sc-12pyced-15"})(["display:flex;flex-direction:row;margin-top:20px;cursor:pointer;"]),o.default.div.withConfig({displayName:"styled__RadioSelectContainer",componentId:"sc-12pyced-16"})(["margin-top:20px;"]),o.default.div.withConfig({displayName:"styled__RadioCircle",componentId:"sc-12pyced-17"})(["width:14px;height:14px;border-radius:11px;border:solid 1px #b2b2b2;margin-right:15px;display:flex;"]),o.default.div.withConfig({displayName:"styled__RadioInnerCircle",componentId:"sc-12pyced-18"})(["width:8px;height:8px;margin:auto;border-radius:7px;transition:0.2s;",""],e=>{let{checked:t}=e;return t&&`background-color: ${h}`}),o.default.div.withConfig({displayName:"styled__ValidationLabelText",componentId:"sc-12pyced-19"})(["font-size:",";color:",";transition:all 0.2s ease-in-out;visibility:",";opacity:",";max-width:",";width:235px;position:absolute;display:flex;top:50;flex-direction:row-reverse;right:0;"],s,y,e=>{let{isInvalid:t}=e;return t?"initial":"hidden"},e=>{let{isInvalid:t}=e;return t?"1":"0"},e=>{let{maxWidth:t}=e;return t||"235px"})),Cc=(0,o.default)(bc).withConfig({displayName:"styled__LargeValidationLabelText",componentId:"sc-12pyced-20"})(["font-size:",";width:95%;position:relative;margin-top:10px;"],u),_c=(0,o.default)(bc).withConfig({displayName:"styled__LeftValidationLabelText",componentId:"sc-12pyced-21"})(["right:'null';left:0;flex-direction:row;"]),kc=o.default.div.withConfig({displayName:"styled__FlexRowContainer",componentId:"sc-12pyced-22"})(["display:flex;flex-direction:row;margin-bottom:5px;gap:6px;"]),Sc=(0,o.default)(aa.Ay).withConfig({displayName:"styled__StyledSelect",componentId:"sc-12pyced-23"})(["min-width:200px;font-size:",";font-family:'Montserrat';border:1px solid ",";border:1px solid ",";"],d,f,e=>{let{isInvalid:t}=e;return t?y:f}),Ac=(0,o.default)(sc).withConfig({displayName:"styled__TrashIcon",componentId:"sc-12pyced-24"})(["display:flex;flex-direction:column;fill:transparent;stroke:",";cursor:pointer;:hover{stroke:",";}margin:10px;"],g,h),Tc=o.default.div.withConfig({displayName:"styled__TableRowSeperator",componentId:"sc-12pyced-25"})(["display:flex;min-width:20px;min-height:44px;justify-content:center;align-items:center;"]),Ic=(0,o.default)(aa.Ay).withConfig({displayName:"styled__TableDropdown",componentId:"sc-12pyced-26"})(["min-width:200px;font-size:",";font-family:'Montserrat';border:1px solid ",";border-radius:4px;min-width:100px;max-width:100px;min-height:44px;transition:'none';.tableDD__control{min-height:42px;transition:'none'}.tableDD__menu{font-size:12px;}"],d,e=>{let{isInvalid:t}=e;return t?y:f}),Nc=o.default.button.withConfig({displayName:"styled__TableAddLineButton",componentId:"sc-12pyced-27"})(["background-color:transparent;height:40px;color:",";border:0;outline:'none';box-shadow:'none';cursor:pointer;font-family:Montserrat;font-style:normal;font-size:15px;"],h),Mc=o.default.div.withConfig({displayName:"styled__TableValidationLabelText",componentId:"sc-12pyced-28"})(["font-size:",";color:",";transition:all 0.2s ease-in-out;visibility:initial;opacity:1;margin-top:20px;"],s,y),Dc=(0,o.default)(Mc).withConfig({displayName:"styled__MultiInputValidationLabelText",componentId:"sc-12pyced-29"})(["text-align:right;grid-column:1 / span 2;grid-row:3;"]),Lc=e=>{let{value:t,onChanged:n,unitText:i,isInvalid:l,validation:r,disabled:o,label:s,hover:d}=e;return a.createElement(pc,null,a.createElement(Dt,{show:d,placement:"top",overlay:a.createElement("span",null,d)},s?a.createElement(yc,null,s):a.createElement(a.Fragment,null)),a.createElement(fc,null,a.createElement(vc,{disabled:o,isInvalid:l,type:"number",value:null===t?"":t,onChange:e=>n((e=>{const t=parseFloat(e);return isNaN(t)?e:t})(e.target.value))}),a.createElement(xc,null,a.createElement(Ec,{isInvalid:l},i))),a.createElement(bc,{isInvalid:l,maxWidth:"-webkit-fill-available"},T.t(`addExperimentWizard.steps.settings.validationLabels.${r}`)))},Bc={value:null,label:T.t("addExperimentWizard.steps.settings.entries.nullOption")},Rc=e=>{let{content:t,onChanged:n,entryKey:i,disabled:l,value:r}=e;const{stepData:o,handleSettingChanged:s}=(0,a.useContext)(cp),d=t.allowNull||!1,c=e=>{n?n(e,t.key):s(t.key,e)};1!==t.options.length||o[t.key]===t.options[0]||d||c(t.options[0]),i=i||t.key;const p=t.options.find(e=>e?.value===o[i])?.key||(o[i]&&o[i][t.key]?o[i][t.key]:o[i]),u=r||o[t.key]?.value||o[t.key];return a.createElement(a.Fragment,null,a.createElement(gc,null,a.createElement(Sc,{isDisabled:l,value:u?{value:o[t.key]?.value||o[t.key],label:o[i]?T.t(`addExperimentWizard.steps.settings.entries.${i}.options.${p||o[i]}.title`):""}:Bc,onChange:e=>c(e?.value),options:[d?Bc:null,...t.options.map(e=>({value:e?.value||e,label:T.t(`addExperimentWizard.steps.settings.entries.${i}.options.${e?.key||e}.title`)}))].filter(Boolean)})))},Fc=(o.default.div.withConfig({displayName:"styled__InputContainerWithValidation",componentId:"sc-1d5hey3-0"})(["flex-direction:column;flex:1;"]),o.default.div.withConfig({displayName:"styled__ObjectGridContainer",componentId:"sc-1d5hey3-1"})(["display:grid;width:100%;grid-template-columns:1fr 1fr;gap:10px;flex-wrap:wrap;align-items:",";"],e=>{let{flexDirection:t}=e;return"column"===t?"flex-end":"center"})),Oc=o.default.div.withConfig({displayName:"styled__MultiInputContainer",componentId:"sc-1d5hey3-2"})(["display:grid;grid-template-columns:50% 50%;grid-column-gap:10px;grid-row-gap:10px;flex-wrap:wrap;width:100%;max-width:500px;margin:0 0 0 auto;flex-direction:",";align-items:",";"],e=>{let{flexDirection:t}=e;return t},e=>{let{flexDirection:t}=e;return"column"===t?"flex-end":"center"}),Pc=o.default.div.withConfig({displayName:"styled__MultiInputTitleArea",componentId:"sc-1d5hey3-3"})(["grid-column:1;grid-row:1;height:100%;"]),zc=o.default.div.withConfig({displayName:"styled__MultiInputTitleRowObjectsArea",componentId:"sc-1d5hey3-4"})(["grid-column:2;grid-row:1;display:flex;justify-content:flex-end;"]),jc=o.default.div.withConfig({displayName:"styled__MultiInputOtherObjectsArea",componentId:"sc-1d5hey3-5"})(["grid-column:1 / span 2;grid-row:2;display:flex;flex-direction:column;align-items:flex-start;"]),Wc=o.default.div.withConfig({displayName:"styled__MultiInputObjectRow",componentId:"sc-1d5hey3-6"})(["display:flex;flex-direction:",";align-items:",";width:100%;"],e=>{let{flexDirection:t}=e;return"row"===t?"row":"column"},e=>{let{flexDirection:t}=e;return"row"===t?"center":"flex-start"}),$c=o.default.div.withConfig({displayName:"styled__SubMultiComponentContainer",componentId:"sc-1d5hey3-7"})(["display:flex;flex-direction:",";width:100%;gap:10px;flex-wrap:wrap;"],e=>{let{flexDirection:t}=e;return"row"===t?"row":"column"}),Vc=(o.default.div.withConfig({displayName:"styled__SingleInputContainer",componentId:"sc-1d5hey3-8"})(["display:flex;flex-direction:column;margin-right:35px;margin-top:5px;"]),o.default.div.withConfig({displayName:"styled__FieldTitleText",componentId:"sc-1d5hey3-9"})(["font-size:13px;margin-bottom:8px;color:#a2a2a3;font-weight:500;"])),Gc=(o.default.div.withConfig({displayName:"styled__InteractiveDescriptionContainer",componentId:"sc-1d5hey3-10"})(["background-color:rgba(235,236,240,0.5);width:50%;border-radius:4px;padding:40px;color:#333333;font-size:14px;margin:auto;"]),o.default.div.withConfig({displayName:"styled__InteractiveDescriptionValue",componentId:"sc-1d5hey3-11"})(["display:inline-block;margin:5px;padding:5px;background-color:rgba(20,130,253,0.1);color:#1482fd;font-weight:500;border-radius:4px;padding-left:8px;padding-right:8px;"]),o.default.div.withConfig({displayName:"styled__SubComponentContainer",componentId:"sc-1d5hey3-12"})(["flex-wrap:wrap;justify-content:space-evenly;justify-items:stretch;width:",";"],e=>{let{flexDirection:t}=e;return"row"===t?"auto":"100%"})),Uc=[{label:"00:00",value:"00:00"},{label:"01:00",value:"01:00"},{label:"02:00",value:"02:00"},{label:"03:00",value:"03:00"},{label:"04:00",value:"04:00"},{label:"05:00",value:"05:00"},{label:"06:00",value:"06:00"},{label:"07:00",value:"07:00"},{label:"08:00",value:"08:00"},{label:"09:00",value:"09:00"},{label:"10:00",value:"10:00"},{label:"11:00",value:"11:00"},{label:"12:00",value:"12:00"},{label:"13:00",value:"13:00"},{label:"14:00",value:"14:00"},{label:"15:00",value:"15:00"},{label:"16:00",value:"16:00"},{label:"17:00",value:"17:00"},{label:"18:00",value:"18:00"},{label:"19:00",value:"19:00"},{label:"20:00",value:"20:00"},{label:"21:00",value:"21:00"},{label:"22:00",value:"22:00"},{label:"23:00",value:"23:00"},{label:"24:00",value:"24:00"}],Zc={hoursNumber:e=>{let{rowData:t,invalidData:n,updateTableData:i,removeFunc:l,fieldKey:r,tableInvalid:o}=e;const s=t?.start,d=t?.end,c=t?.rate,[p,u]=(0,a.useState)(s),[m,h]=(0,a.useState)(d),[g,f]=(0,a.useState)(c),[y,v]=(0,a.useState)(Uc.slice(1)),[w,x]=(0,a.useState)(Uc.slice(0,-1)),[E,b]=(0,a.useState)(!1),[C,_]=(0,a.useState)(!1),k=null!=n?.start&&!n.start,S=null!=n?.end&&!n.end,A=null!=n?.rate&&!n.rate,I=!n?.hasValue.start,N=!n?.hasValue.end;o(k||S),(0,a.useEffect)(()=>{u(s),h(d),f(c)},[s,d,c]),(0,a.useEffect)(()=>{i({start:p,end:m,rate:g})},[p,m,g]);const M=e=>Uc.find(t=>t.value===e);return a.createElement(uc,null,a.createElement(Tc,null,a.createElement(Ac,{onClick:l})),a.createElement(pc,null,a.createElement(Ic,{classNamePrefix:"tableDD",options:w,value:M(p)||null,onChange:e=>u(e.value),isInvalid:k,onBlur:()=>b(!0)}),a.createElement(_c,{isInvalid:I&&E},T.t("addExperimentWizard.steps.settings.validationLabels.required"))),a.createElement(Tc,null,"-"),a.createElement(pc,null,a.createElement(Ic,{classNamePrefix:"tableDD",options:y,value:M(m)||null,onChange:e=>h(e.value),isInvalid:S,onBlur:()=>_(!0)}),a.createElement(_c,{isInvalid:N&&C},T.t("addExperimentWizard.steps.settings.validationLabels.required"))),a.createElement(Tc,null),a.createElement(Lc,{value:g,onChanged:f,unitText:"$",isInvalid:A,validation:`${r}_number`,label:T.t(`addExperimentWizard.steps.settings.entries.${r}.label`)}))}},Hc=e=>{let{onChanged:t,fieldKey:n,validation:i,value:l,tableRowType:r}=e;const[o,s]=(0,a.useState)(l||[]),[d,c]=(0,a.useState)(!1),p=Zc[r];return a.createElement(a.Fragment,null,o.map((e,l)=>a.createElement(p,{key:`tableRow#${l}`,rowData:e,fieldKey:n,componentKey:r,invalidData:i?.[l],tableInvalid:c,updateTableData:e=>((e,n)=>{const a=[...o];a[e]=n,s(a),t(a)})(l,e),removeFunc:()=>(e=>{const n=[...o];n.splice(e,1),s(n),t(n)})(l)})),d&&a.createElement(Mc,null,T.t(`addExperimentWizard.steps.settings.validationLabels.${n}`)),a.createElement(Nc,{onClick:()=>{s([...o,{}])}},T.t(`addExperimentWizard.steps.settings.entries.${n}.newLine`)))},qc=e=>{let{value:t,onChanged:n,isInvalid:i,validation:l,isHidden:r,margin:o,title:s,showError:d}=e;return a.createElement(pc,{hidden:r,margin:o},o&&a.createElement(Vc,null,s),a.createElement(fc,null,a.createElement(wc,{isInvalid:i,type:"text",value:null===t?"":t,onChange:e=>n(e.target.value)})),a.createElement(bc,{isInvalid:i&&null!==t||!!d&&i},T.t(`addExperimentWizard.steps.settings.validationLabels.${l}`)))},Kc=e=>{let{value:t,onChanged:n,label:i,hover:l,fileTypes:r,fileKey:o,sampleFileName:s,disabled:d=!1,compactMode:c=!1}=e;const[p,u]=(0,a.useState)(),[m,h]=(0,a.useState)(""),[g,f]=(0,a.useState)(!1),y=(0,a.useMemo)(()=>{const e=t?.split("/");return e?.[e.length-1]},[t]);return a.createElement(a.Fragment,null,a.createElement(pc,null,a.createElement(Dt,{show:l,placement:"top",overlay:a.createElement("span",null,l)},i?a.createElement(yc,null,i):a.createElement(a.Fragment,null)),a.createElement(vo,{uploadFileCb:e=>(async e=>{try{const{url:t}=await Fr(e,o);n(t)}catch(e){400===e.statusCode&&u(T.t("fileUploader.fileErrorText")),h(e.message),f(!0)}})(e),onDismissFile:()=>n(null),currentFile:{name:y},fileLabelWidth:"fit-content",fileType:r,hideDropZone:!!y,sampleFileName:s,error:!!m,disabled:d,compactMode:c,shouldShowFileSection:!!y})),a.createElement(wt,{submitButtonText:T.t("genericBackButtonText"),isVisible:g,onClose:()=>f(!1),title:T.t("fileUploader.genericErrorText"),onClickSubmitButton:()=>f(!1)},p&&a.createElement(On,{errorMessage:m,errorIssue:p})))};var Jc=n(64146);n(71659);const Xc=e=>{let{text:t}=e;return a.createElement(hc,null,(e=>{const t=[];let n=e,i=0;for(;n.length>0;){const e=n.match(/^\$\$([\s\S]+?)\$\$/);if(e){t.push(a.createElement(Jc.BlockMath,{key:i++,math:e[1]})),n=n.slice(e[0].length);continue}const l=n.match(/^\\\[([\s\S]+?)\\\]/);if(l){t.push(a.createElement(Jc.BlockMath,{key:i++,math:l[1]})),n=n.slice(l[0].length);continue}const r=n.match(/^\$([^\$\n]+?)\$/);if(r){t.push(a.createElement(Jc.InlineMath,{key:i++,math:r[1]})),n=n.slice(r[0].length);continue}const o=n.match(/^\\\(([^)]+?)\\\)/);if(o){t.push(a.createElement(Jc.InlineMath,{key:i++,math:o[1]})),n=n.slice(o[0].length);continue}const s=n.search(/\$|\\\[|\\\(/);if(-1===s){t.push(a.createElement("span",{key:i++},n));break}s>0?(t.push(a.createElement("span",{key:i++},n.slice(0,s))),n=n.slice(s)):(t.push(a.createElement("span",{key:i++},n[0])),n=n.slice(1))}return t})(t))},Yc=e=>"first_to_leave"===e?.settings?.chargerSelectionStrategy?.chargerSelectionStrategyValue,Qc=e=>!1===e?.settings?.placement?.active,ep={hasLargeDemandData:e=>(e?.demandData?.numberOfRowsInFile||0)>1500&&!D(),isFieldServicingVariation:e=>e?.details?.simType===Ae,isPlacementStagingOrNone:e=>e?.settings?.placement?.mode===Ji.STAGING||!e?.settings?.placement?.mode||Qc(e),isPlacementOff:Qc,isIndefeleetDisabled:e=>!e?.settings?.indefleet?.active,isTimeBasedVehicleAvailability:e=>!e?.settings?.indefleet?.active||!!e?.settings?.indefleet?.timeBasedVehicleAvailability,isPlacementDemandStaging:e=>e?.settings?.placement?.mode===Ji.DEMAND_STAGING&&!Qc(e),isPlacementTerritoryWide:e=>e?.settings?.placement?.mode===Ji.TERRITORY_WIDE&&!Qc(e),isNotAdvanced:()=>!D(),isChargeOnTheWayDisabled:e=>!e?.settings?.chargeOnTheWay?.active,isChargeOnTheWayDemandDisabled:e=>!e?.settings?.chargeOnTheWay?.active||!e?.settings?.chargeOnTheWay?.demandSensitive,isMaxChargeLevelFixed:e=>"fixed"===e?.settings?.maxChargeLevelSettings?.mode,isMaxChargeLevelDemandSensitive:e=>"demandSensitive"===e?.settings?.maxChargeLevelSettings?.mode,isChargerSelectionFirstToLeave:Yc,isChargerPowerPrioritizationEnabled:e=>Yc(e)&&!0===e?.settings?.chargerSelectionStrategy?.enableChargerPowerPrioritization};var tp=function(e){return a.createElement("svg",e,a.createElement("path",{d:"m15.5 7-.672-1.828L13 4.5l1.828-.672L15.5 2l.672 1.828L18 4.5l-1.828.672L15.5 7Z",fill:"#11A4FF"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.256 7.744 7.5 3 5.744 7.744 1 9.5l4.744 1.756L7.5 16l1.756-4.744L14 9.5 9.256 7.744ZM11.118 9.5l-2.64-.977L7.5 5.882l-.977 2.64-2.641.978 2.64.977.978 2.641.977-2.64 2.641-.978ZM16.445 13.555 15.5 11l-.945 2.555L12 14.5l2.555.945L15.5 18l.945-2.555L19 14.5l-2.555-.945Zm-.326.945-.452-.167-.167-.451-.167.451-.451.167.451.167.167.451.167-.451.452-.167Z",fill:"#11A4FF"}))};tp.defaultProps={width:"20",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const np=o.default.div.withConfig({displayName:"NewBadge__Badge",componentId:"sc-184j6vy-0"})(["background-color:rgba(17,164,255,0.1);color:rgba(17,164,255,1);border-radius:4px;padding:4px;display:flex;align-items:center;gap:4px;"]),ap=()=>a.createElement(np,null,a.createElement(tp,null),T.t("new")),ip=e=>e?.row?"row":"column";function lp(){return lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{content:t,disabled:n}=e;const[i,l]=(0,a.useState)(!1),{handleSettingChanged:r,stepData:o}=(0,a.useContext)(cp);return(0,a.useEffect)(()=>{l(!r(t.key,o[t.key]))},[]),a.createElement(gc,null,a.createElement(Lc,{disabled:n,value:o[t.key],onChanged:e=>{l(!r(t.key,e))},unitText:T.t(`addExperimentWizard.steps.settings.unit.${t.unit||"number"}`),isInvalid:i,validation:t.key}))},enumDropdown:Rc,json:e=>{let{content:t,showErrors:n,disabled:i,wizardData:l}=e;const{handleSettingChanged:r,stepData:o}=(0,a.useContext)(cp),[s,d]=(0,a.useState)({}),[c,p]=(0,a.useState)({}),u=o[t.key];(0,a.useEffect)(()=>{const e=((e,t,n)=>t.filter(e=>e.key).map(e=>e.key).reduce((t,a)=>{const{entries:i}=Qa,l=i.find(t=>t.key===e),r=l?.fields?.find(e=>e.key===a),o=ti(n[e]?.[a],r?.allowNull,r?.validation),s=null!=o?.[a]?!o[a]:!o;return t[a]=s,t},{}))(t.key,[...t.fields||[],...t.fieldsBelow||[]],o);p(e)},[]);const m=(e,n)=>{let a={...u,[n]:e};if("chargerSelectionStrategy"===t.key&&("powerMismatchAlpha"===n||"powerMismatchBeta"===n)){const t="powerMismatchAlpha"===n?e:a.powerMismatchAlpha??0,i="powerMismatchBeta"===n?e:a.powerMismatchBeta??0;0===t&&0===i||(a={...a,enableChargerPowerPrioritization:!0})}const i=r(t.key,a);d(i),p(e=>{const t=null!=i?.[n]?!i[n]:!i;return{...e,[n]:t}})},h=e=>(!e.internal||D())&&(!e.shouldShowFuncName||ep[e.shouldShowFuncName](l)),g=(e,i,r)=>{let d=u?.[e.key],p=!1;return e.shouldDisableFuncName&&(p=ep[e.shouldDisableFuncName](l)),{json:a.createElement($c,{flexDirection:e.container},e.fields?.map(e=>a.createElement(Gc,{key:e.key,flexDirection:e.row?"row":"column"},g(e,e.shownOn!==o?.[t.key]?.[t.fields?.[0].key],!(null==s?.[e.key]||s?.[e.key]))))),uploadFile:a.createElement(Kc,{value:d,onChanged:t=>m(t,e.key),fileTypes:e.fileTypes||[".json"],fileKey:e.fileKey,sampleFileName:e.sampleFileName,disabled:p,compactMode:e.compactMode||!1}),number:a.createElement(a.Fragment,null,a.createElement(Lc,{value:d,disabled:!!u?.active&&!u.active||p,onChanged:t=>m(t,e.key),unitText:T.t(`addExperimentWizard.steps.settings.unit.${e.unit||"number"}`),isInvalid:r||c[e.key],validation:e.key,label:e.label&&T.t(`addExperimentWizard.steps.settings.entries.${t.key}.${e.key}.label`),hover:e.hover&&T.t(`addExperimentWizard.steps.settings.entries.${t.key}.${e.key}.hover`)})),boolean:a.createElement(gc,null,a.createElement(Hs.l,{labelPosition:"left",size:"large",disabled:p,checked:d,onChange:()=>m(!d,e.key),mainLabel:T.t(`addExperimentWizard.steps.settings.entries.${t.key}.${e.key}.${!!d}`)})),enumDropdown:a.createElement(Rc,{disabled:p,content:e,entryKey:t.key,onChanged:t=>m(t,e.key),value:d}),string:a.createElement(qc,{isHidden:i,value:d,onChanged:t=>m(t,e.key),isInvalid:c[e.key],validation:e.key,margin:e.margin,title:e.title,showError:n}),table:a.createElement(Hc,{onChanged:t=>m(t,e.key),value:d,fieldKey:e.key,validation:s?.[e.key],tableRowType:e.subtype}),lineBreak:a.createElement("div",{style:{flexBasis:"100%"}}),staticText:a.createElement(Xc,{text:T.t(`addExperimentWizard.steps.settings.entries.${t.key}.${e.key}.text`)})}[e.type]};return a.createElement(Fc,{flexDirection:t.container},a.createElement(Pc,null,a.createElement(pc,{style:{marginRight:"24px"}},a.createElement(kc,null,a.createElement(mc,null,T.t(`addExperimentWizard.steps.settings.entries.${t.key}.title`)),(e=>!!e.showNewBadgeUntil&&(!0===e.showNewBadgeUntil||G()(e.showNewBadgeUntil).isAfter(G()())))(t)&&a.createElement(ap,null)),a.createElement(hc,null,T.t(`addExperimentWizard.steps.settings.entries.${t.key}.description`)),t.descriptionList&&a.createElement("ul",null,t.descriptionList.map(e=>a.createElement("li",{key:e},a.createElement(hc,null," ",T.t(`addExperimentWizard.steps.settings.entries.${t.key}.descriptionList.${e}`))))))),t.fields&&a.createElement(zc,null,a.createElement(Oc,{flexDirection:t.container},t.fields?.map(e=>h(e)?a.createElement(Gc,{key:e.key,flexDirection:ip(e)},g(e,e.shownOn!==o?.[t.key]?.[t.fields?.[0].key],!(null==s?.[e.key]||s?.[e.key]))):null))),t.fieldsBelow&&a.createElement(jc,null,t.fieldsBelow.map(e=>h(e)?a.createElement(Wc,{key:e.key,flexDirection:e.row?"row":"column"},a.createElement("div",{style:{width:"100%"}},e.title&&a.createElement(mc,{style:{marginTop:30,marginBottom:10}},T.t(`addExperimentWizard.steps.settings.entries.${t.key}.${e.key}.title`)),(e.description||e.label)&&a.createElement(hc,null,T.t(`addExperimentWizard.steps.settings.entries.${t.key}.${e.key}.description`))),a.createElement(Gc,{key:e.key,flexDirection:ip(e)},g(e,e.shownOn!==o?.[t.key]?.[t.fields?.[0].key],!(null==s?.[e.key]||s?.[e.key])))):null)),((e,t)=>"startingChargeLevel"===t&&e?.min>e?.max)(u,t.key)&&a.createElement(Dc,null,T.t(`addExperimentWizard.steps.settings.validationLabels.${t.key}`)))},string:e=>{let{content:t}=e;const[n,i]=(0,a.useState)(!1),{handleSettingChanged:l,stepData:r}=(0,a.useContext)(cp);return(0,a.useEffect)(()=>{i(!l(t.key,r[t.key]))},[]),a.createElement(gc,null,a.createElement(qc,{value:r[t.key],onChanged:e=>{i(!l(t.key,e))},isInvalid:n,validation:t.key}))},boolean:e=>{let{content:t}=e;const{handleSettingChanged:n,stepData:i}=(0,a.useContext)(cp),l=i[t.key];return a.createElement(a.Fragment,null,a.createElement(pc,null),a.createElement(uc,null,a.createElement(Hs.l,{size:"large",labelPosition:"left",checked:l,onChange:()=>n(t.key,!l),mainLabel:T.t(`addExperimentWizard.steps.settings.entries.${t.key}.active.${l}`)})))},uploadFile:e=>{let{content:t,fileTypes:n,fileKey:i,compactMode:l}=e;const[r,o]=(0,a.useState)(!1),{handleSettingChanged:s,stepData:d}=(0,a.useContext)(cp);return(0,a.useEffect)(()=>{o(!s(t.key,d[t.key]))},[]),a.createElement(gc,null,a.createElement(Kc,{value:d[t.key],onChanged:e=>{o(!s(t.key,e))},fileTypes:n,fileKey:i,compactMode:l}))}},op=e=>{let{setting:t,showErrors:n,disabled:i,wizardData:l}=e;const r=rp[t.type],o={content:{...t},fileTypes:t.fileTypes,fileKey:t.fileKey,compactMode:t.compactMode};return a.createElement(cc,{"data-test-id":t.key,style:{direction:t.direction||"row"}},"json"!==t.type&&a.createElement(pc,{style:{marginRight:"24px"}},a.createElement(kc,null,a.createElement(mc,null,T.t(`addExperimentWizard.steps.settings.entries.${t.key}.title`)),(e=>!!e.showNewBadgeUntil&&(!0===e.showNewBadgeUntil||G()(e.showNewBadgeUntil).isAfter(G()())))(t)&&a.createElement(ap,null)),a.createElement(hc,null,T.t(`addExperimentWizard.steps.settings.entries.${t.key}.description`)),t.descriptionList&&a.createElement("ul",null,t.descriptionList.map(e=>a.createElement("li",{key:e},a.createElement(hc,null," ",T.t(`addExperimentWizard.steps.settings.entries.${t.key}.descriptionList.${e}`)))))),a.createElement(r,lp({},o,{disabled:i,showErrors:n,wizardData:l})))},sp={accelerated:!1,refuelThreshold:25,rideRefuelThreshold:15,maxStopPointsOnVehicle:2,placement:{active:!0,mode:"territoryWide",maxMoves:1e3,maxPlacementOverClosestKm:5},idleType:{mode:"inPlace",circlingDistance:1e3},router:{type:"osrm",gmapsApiKey:null},timeToParkVehicleBeforeShiftEnd:0,driftFactor:null,driftConstant:null,durationCoefficient:1,distanceCoefficient:1,secondaryRouter:null,maxStationsToCheckForBestCharger:15,indefleet:{active:!1,minInfleetedVehicles:0,scheduleInterval:60,demandWindowEnd:90,ridePerVehicleRatio:1,maxFuelRangeForRefuel:null,timeBasedVehicleAvailability:null,replaceChargingVehicles:!1},evChargingRates:{defaultRate:null},gasPrice:null,maxChargeLevel:80,maxChargeLevelSettings:{mode:"fixed",maxChargeLevel:80,demandTimeWindow:30,demandSensitiveChargingFile:null},vehiclePostRefuelWaitTime:0,chargerPostRefuelWaitTime:20,matchToBestNVehicles:10,retriesOnMatching:1,demandFileUrl:null,snapshotFileUrl:null,startingChargeLevel:{min:60,max:80},chargeOnTheWay:{active:!1,threshold:40,maxTimeInMinutes:5,demandSensitive:!0,ridePerVehicleRatio:.5,demandWindowEnd:30},chargerSelectionStrategy:{chargerSelectionStrategyValue:"first_to_leave",enableChargerPowerPrioritization:!1,powerMismatchAlpha:0,powerMismatchBeta:0},advancedRouting:!1,minimalChargingLevelAtEndOfShift:0,pooling:"no",routePlanConcurrency:1e5,matchingEngine:"autofleet",raasSimulatorBranch:"staging"===n(65606).env.ENV_NAME?"dev":"master",measurePerformance:!1,allowRemoteDebugging:!1,remoteDebugWaitForClient:!1,generalSeed:null,logLevel:"info",logTypes:"general",exportPath:null,critical:!1,osrmServer:"https://osrm.autofleet.io",mapsMaxDeviation:500},dp=()=>{const e=J();return{...sp,generalSeed:Math.floor(1e6*Math.random()),...Qa?.entries?.reduce((t,n)=>({...t,...n?.fleetDefaultValues?.[e]&&{[n.key]:n.fleetDefaultValues[e]}}),{})}},cp=(0,a.createContext)({handleSettingChanged:(e,t)=>!1,stepData:dp(),wizardData:{}}),pp=e=>{let{stepData:t,updateStepData:n,showErrors:i,wizardData:l}=e;const[r,o]=(0,a.useState)([]),s=J(),{entries:d}=Qa;return a.createElement(cp.Provider,{value:{handleSettingChanged:(e,a)=>{const i=d.find(t=>t.key===e);let l=a;"string"==typeof a&&(l=l.trim());const r={...t,[e]:""===l?null:l};if(n(r),o(li(r)),"func"===i?.validation)return ai[e](a).result;const s=e=>{let t,n;return e.fields&&(t=e.fields.map(e=>s(e)).flat()),e.fieldsBelow&&(n=e.fieldsBelow.map(e=>s(e)).flat()),t||n?[...t||[],...n||[]]:e};return"json"===i?.type?s(i)?.every(e=>ti(a[e.key],e?.allowNull,e?.validation)):ti(a,i?.allowNull,i?.validation)},stepData:t,wizardData:l}},a.createElement("div",{style:{width:"95%",height:"100%",minWidth:700}},Qa.entries.map(e=>{let t=!1;e.shouldDisableFuncName&&(t=ep[e.shouldDisableFuncName](l));const n=e.optionsOnCondition&&ep[e.optionsOnCondition.conditionFuncName](l)?{...e,options:e.optionsOnCondition.options}:e;return(!n.internal||D()||n.allowedFleets?.includes(s))&&a.createElement(op,{key:n.key,disabled:t,setting:n,showErrors:i,wizardData:l})}),a.createElement(pc,null,r.map(e=>a.createElement(Cc,{isInvalid:!0,maxWidth:"95%"},T.t(`addExperimentWizard.steps.settings.validationLabels.${e}`)))),a.createElement(Ll,null)))};var up=n(58807);const mp=o.default.div.withConfig({displayName:"VehicleJsonEditor__EditorContainer",componentId:"sc-cvx0x1-0"})(["border:1px solid #e0e0e0;border-radius:4px;overflow:hidden;"]),hp=e=>{let{jsonString:t,onChange:n}=e;return a.createElement(mp,null,a.createElement(up.Ay,{height:"500px",language:"json",value:t,onChange:e=>n(e||""),options:{minimap:{enabled:!1},fontSize:13,lineNumbers:"on",scrollBeyondLastLine:!1,automaticLayout:!0,tabSize:2,formatOnPaste:!0}}))},gp={amount:1,modelName:"",bodyType:"",capacity:1,range:400,powerTrain:"",cost:null},fp=()=>null,yp=e=>gi("addExperimentWizard.steps.vehicles.options.bodyType.",e),vp=e=>gi("addExperimentWizard.steps.vehicles.tableColumns.",e),wp={Hatchback:{value:"Hatchback",label:yp("hatchback")},Sedan:{value:"Sedan",label:yp("sedan")},Coupe:{value:"Coupe",label:yp("coupe")},Estate:{value:"Estate",label:yp("estate")},Minivan:{value:"Minivan",label:yp("minivan")},Van:{value:"Van",label:yp("van")},Truck:{value:"Truck",label:yp("truck")},Convertible:{value:"Convertible",label:yp("convertible")},Shuttle:{value:"Shuttle",label:yp("shuttle")},SUV:{value:"SUV",label:yp("suv")},Bike:{value:"Bike",label:yp("bike")},Motorcycle:{value:"Motorcycle",label:yp("motorcycle")}},xp=e=>{const t={other:{value:"",label:gi("addExperimentWizard.steps.vehicles.options.model.","other")}};return e?.map(e=>{t[e.modelName]={value:e,label:`${e.brand} - ${e.modelName}`}}),t},Ep=(e,t)=>[{title:vp("amount"),width:"6%",type:"input",inputType:"number",accessor:"amount",minWidth:"25px",validation:e=>Number.isInteger(e)&&e>0},{title:vp("modelName"),width:"11%",type:"dropdown",options:xp(t),accessor:ri,isCustomAvailable:!0,minWidth:"90px"},{title:vp(pi),width:"6%",type:"input",inputType:"text",accessor:pi,validation:e=>!0,minWidth:"55px"},{title:vp("bodyType"),width:"11%",type:"dropdown",options:wp,accessor:"bodyType",minWidth:"90px"},{title:vp("capacity"),width:"8%",type:"input",inputType:"number",accessor:"capacity",minWidth:"70px",validation:e=>Number.isInteger(e)&&e>0},{title:vp("powerTrain"),width:"10%",type:"dropdown",options:yi,accessor:"powerTrain",minWidth:"95px"},{title:vp(`range.${e.distanceSystem}`),width:"10%",type:"input",inputType:"number",accessor:"range",minWidth:"60px",validation:e=>null==e||"number"==typeof e&&!isNaN(e)&&e>=0},{title:vp("batteryCapacity"),width:"8%",type:"input",inputType:"number",accessor:si,validation:e=>null==e||"number"==typeof e&&!isNaN(e)&&e>=0,minWidth:"70px"},{title:vp("idleConsumption"),width:"10%",type:"input",inputType:"number",accessor:di,minWidth:"100px",validation:e=>null==e||"number"==typeof e&&!isNaN(e)&&e>=0},{title:vp(ui),width:"10%",type:"chargeRate",inputType:"number",accessor:ui,validation:e=>!0,minWidth:"60px"},{title:vp(`cost.${e.distanceSystem}`),width:"9%",type:"input",inputType:"number",unit:"$",accessor:oi,minWidth:"60px"}],bp=o.default.div.withConfig({displayName:"Vehicles__ViewToggle",componentId:"sc-b4jvv2-0"})(["display:flex;border:1px solid #e0e0e0;border-radius:4px;overflow:hidden;margin-left:auto;"]),Cp=o.default.button.withConfig({displayName:"Vehicles__ToggleButton",componentId:"sc-b4jvv2-1"})(["padding:4px 12px;font-size:12px;font-weight:500;border:none;cursor:pointer;background:",";color:",";transition:background 0.15s,color 0.15s;&:hover{background:",";}"],e=>{let{$active:t}=e;return t?"#0084D6":"transparent"},e=>{let{$active:t}=e;return t?"#fff":"#555"},e=>{let{$active:t}=e;return t?"#0084D6":"#f0f0f0"}),_p=e=>{if(!e.vehicle_groups||!Array.isArray(e.vehicle_groups))return T.t("addExperimentWizard.steps.vehicles.uploadJsonError");const t=(e=>{const t=(e,t,n)=>T.t(`addExperimentWizard.steps.vehicles.${e}`,{label:t,...n}),n=["label","number_of_vehicles","model_name","body_type","fuel_type","battery_capacity_kwh","fuel_range_km","capacity","cost_per_km","idle_consumption_kwh_per_hour"];for(const a of e){const e=a.label||"?",i=n.filter(e=>null==a[e]);if(i.length>0)return t("uploadJsonMissingFields",e,{fields:i.join(", ")});if(!ac(a.number_of_vehicles))return t("uploadJsonInvalidNumberOfVehicles",e);if(!ac(a.capacity))return t("uploadJsonInvalidCapacity",e);if(!ic(a.battery_capacity_kwh))return t("uploadJsonInvalidBatteryCapacity",e);if(!ic(a.fuel_range_km))return t("uploadJsonInvalidFuelRange",e);if(!lc(a.cost_per_km))return t("uploadJsonInvalidCostPerKm",e);if(!lc(a.idle_consumption_kwh_per_hour))return t("uploadJsonInvalidIdleConsumption",e);if("IC"!==a.fuel_type&&"EV"!==a.fuel_type)return t("uploadJsonInvalidFuelType",e);const l=a.charging_settings?.charging_rate;if(null!=l){if("constant"!==l.type&&"curve"!==l.type)return t("uploadJsonChargingRateType",e);if("constant"===l.type&&!ic(l.value))return t("uploadJsonChargingRateConstantValue",e);if("curve"===l.type){if(!Array.isArray(l.points)||0===l.points.length)return t("uploadJsonChargingRateCurvePoints",e);for(const n of l.points){if(!rc(n.state_of_charge))return t("uploadJsonChargingRateCurveSoc",e);if(!ic(n.kw))return t("uploadJsonChargingRateCurveKw",e)}}}const r=a.charging_settings?.starting_soc;if(r){if(null==r.min_soc||null==r.max_soc)return t("uploadJsonSocMissing",e);if(!rc(r.min_soc)||!rc(r.max_soc))return t("uploadJsonSocRange",e);if(r.min_soc>r.max_soc)return t("uploadJsonSocMinMax",e)}if(null!=a.charging_settings?.refuel_threshold&&!oc(a.charging_settings.refuel_threshold))return t("uploadJsonRefuelThreshold",e);if(null!=a.charging_settings?.ride_refuel_threshold&&!oc(a.charging_settings.ride_refuel_threshold))return t("uploadJsonRideRefuelThreshold",e);const o=a.charging_settings?.minimal_level_at_end_of_shift;if(null!=o&&(!lc(o)||o>100))return t("uploadJsonMinLevelEndShift",e);if(null!=a.charging_settings?.vehicle_post_refuel_wait_time_sec&&!lc(a.charging_settings.vehicle_post_refuel_wait_time_sec))return t("uploadJsonPostRefuelWait",e);const s=a.charging_settings?.opportunistic_charging;if(null!=s){if("boolean"!=typeof s.active)return t("uploadJsonOppChargingActive",e);if(null!=s.threshold_percent&&!oc(s.threshold_percent))return t("uploadJsonOppChargingThreshold",e);if(null!=s.max_driving_time_minutes&&!ac(s.max_driving_time_minutes))return t("uploadJsonOppChargingMaxDriving",e);const n=s.demand_sensitive;if(null!=n){if("boolean"!=typeof n.active)return t("uploadJsonOppChargingDemandActive",e);if(null!=n.rides_per_vehicle_ratio&&!ic(n.rides_per_vehicle_ratio))return t("uploadJsonOppChargingDemandRatio",e)}}const d=a.charging_settings?.max_charge_level;if(null!=d){if("fixed"!==d.type&&"demand_sensitive"!==d.type)return t("uploadJsonMaxChargeLevelType",e);if("fixed"===d.type&&!rc(d.value))return t("uploadJsonMaxChargeLevelFixedValue",e);if("demand_sensitive"===d.type){if(!Array.isArray(d.values)||0===d.values.length)return t("uploadJsonMaxChargeLevelDemandValues",e);for(const n of d.values){if(!lc(n.rpv))return t("uploadJsonMaxChargeLevelDemandRpv",e);if(!rc(n.target_soc))return t("uploadJsonMaxChargeLevelDemandSoc",e)}}}}return null})(e.vehicle_groups);return t||(null==e.max_charge_level_demand_window_minutes||ac(e.max_charge_level_demand_window_minutes)?null==e.opportunistic_charging_demand_window_minutes||ac(e.opportunistic_charging_demand_window_minutes)?e.vehicle_groups.some(e=>"demand_sensitive"===e.charging_settings?.max_charge_level?.type)&&null==e.max_charge_level_demand_window_minutes?T.t("addExperimentWizard.steps.vehicles.uploadJsonRequiredDemandSensitiveWindow"):e.vehicle_groups.some(e=>e.charging_settings?.opportunistic_charging?.active&&e.charging_settings?.opportunistic_charging?.demand_sensitive?.active)&&null==e.opportunistic_charging_demand_window_minutes?T.t("addExperimentWizard.steps.vehicles.uploadJsonRequiredChargeOnTheWayWindow"):null:T.t("addExperimentWizard.steps.vehicles.uploadJsonInvalidChargeOnTheWayWindow"):T.t("addExperimentWizard.steps.vehicles.uploadJsonInvalidDemandSensitiveWindow"))},kp=(e,t,n,a)=>{const{tableRows:i,settingsUpdates:l}=(e=>{const t=e.vehicle_groups.map(e=>{const t=e.charging_settings?.charging_rate;let n=null,a=null;return t&&("curve"===t.type&&Array.isArray(t.points)?a=t.points.map(e=>[e.state_of_charge,e.kw]):"constant"===t.type&&null!=t.value&&(n=t.value)),{amount:e.number_of_vehicles,modelName:e.model_name,labels:e.label,bodyType:e.body_type,capacity:e.capacity,powerTrain:e.fuel_type,range:e.fuel_range_km,batteryCapacityKWH:e.battery_capacity_kwh,idleConsumptionKwh:e.idle_consumption_kwh_per_hour,chargeRateKWH:n,chargingCurve:a,cost:e.cost_per_km,chargingSettings:e.charging_settings?{maxChargeLevel:e.charging_settings.max_charge_level?{type:e.charging_settings.max_charge_level.type,value:e.charging_settings.max_charge_level.value,values:e.charging_settings.max_charge_level.values}:void 0,startingSoc:e.charging_settings.starting_soc?{min:e.charging_settings.starting_soc.min_soc,max:e.charging_settings.starting_soc.max_soc}:void 0,refuelThreshold:e.charging_settings.refuel_threshold,rideRefuelThreshold:e.charging_settings.ride_refuel_threshold,opportunisticCharging:e.charging_settings.opportunistic_charging?{active:e.charging_settings.opportunistic_charging.active,thresholdPercent:e.charging_settings.opportunistic_charging.threshold_percent,maxDrivingTimeMinutes:e.charging_settings.opportunistic_charging.max_driving_time_minutes,demandSensitive:e.charging_settings.opportunistic_charging.demand_sensitive?{active:e.charging_settings.opportunistic_charging.demand_sensitive.active,ridesPerVehicleRatio:e.charging_settings.opportunistic_charging.demand_sensitive.rides_per_vehicle_ratio}:void 0}:void 0,minimalLevelAtEndOfShift:e.charging_settings.minimal_level_at_end_of_shift,vehiclePostRefuelWaitTimeSec:e.charging_settings.vehicle_post_refuel_wait_time_sec}:void 0}}),n={};return null!=e.max_charge_level_demand_window_minutes&&(n.maxChargeLevelDemandWindow=e.max_charge_level_demand_window_minutes),null!=e.opportunistic_charging_demand_window_minutes&&(n.opportunisticChargingDemandWindow=e.opportunistic_charging_demand_window_minutes),{tableRows:t,settingsUpdates:n}})(e),r=t?.settings||{},o={};null!=l.maxChargeLevelDemandWindow&&(o.maxChargeLevelSettings={...r.maxChargeLevelSettings,demandTimeWindow:l.maxChargeLevelDemandWindow}),null!=l.opportunisticChargingDemandWindow&&(o.chargeOnTheWay={...r.chargeOnTheWay,demandWindowEnd:l.opportunisticChargingDemandWindow}),a&&Object.keys(o).length>0?a({vehicleGroups:i,settings:{...r,...o}}):n(i)},Sp=e=>{let{stepData:t,updateStepData:n,updateMultipleStepData:i,showErrors:l,wizardData:r}=e;const o=ue(),{vehicleModels:s}=(0,a.useContext)(Xd),d=(0,a.useRef)(null),[c,p]=(0,a.useState)(!1),[u,m]=(0,a.useState)(""),[h,g]=(0,a.useState)("table"),[f,y]=(0,a.useState)(""),v=(0,a.useCallback)(()=>{d.current?.click()},[]),w=(0,a.useCallback)(()=>{const e=((e,t)=>{const n={vehicle_groups:(e||[]).map(e=>{const t={label:e.labels||"",number_of_vehicles:e.amount,model_name:"object"==typeof e.modelName?e.modelName?.modelName||"":e.modelName||"",body_type:e.bodyType||"",fuel_type:e.powerTrain||"",battery_capacity_kwh:e.batteryCapacityKWH??0,fuel_range_km:e.range??0,capacity:e.capacity,cost_per_km:e.cost??0,idle_consumption_kwh_per_hour:e.idleConsumptionKwh??0},n={};let a=!1;if(e.chargingCurve&&Array.isArray(e.chargingCurve)&&e.chargingCurve.length>0?(n.charging_rate={type:"curve",points:e.chargingCurve.map(e=>({state_of_charge:e[0],kw:e[1]}))},a=!0):null!=e.chargeRateKWH&&(n.charging_rate={type:"constant",value:e.chargeRateKWH},a=!0),e.chargingSettings){const t=e.chargingSettings;t.maxChargeLevel&&(n.max_charge_level={type:t.maxChargeLevel.type,value:t.maxChargeLevel.value,values:t.maxChargeLevel.values},a=!0),t.startingSoc&&(n.starting_soc={min_soc:t.startingSoc.min,max_soc:t.startingSoc.max},a=!0),null!=t.refuelThreshold&&(n.refuel_threshold=t.refuelThreshold,a=!0),null!=t.rideRefuelThreshold&&(n.ride_refuel_threshold=t.rideRefuelThreshold,a=!0),t.opportunisticCharging&&(n.opportunistic_charging={active:t.opportunisticCharging.active,threshold_percent:t.opportunisticCharging.thresholdPercent,max_driving_time_minutes:t.opportunisticCharging.maxDrivingTimeMinutes,demand_sensitive:t.opportunisticCharging.demandSensitive?{active:t.opportunisticCharging.demandSensitive.active,rides_per_vehicle_ratio:t.opportunisticCharging.demandSensitive.ridesPerVehicleRatio}:void 0},a=!0),null!=t.minimalLevelAtEndOfShift&&(n.minimal_level_at_end_of_shift=t.minimalLevelAtEndOfShift,a=!0),null!=t.vehiclePostRefuelWaitTimeSec&&(n.vehicle_post_refuel_wait_time_sec=t.vehiclePostRefuelWaitTimeSec,a=!0)}return a&&(t.charging_settings=n),t})},a=t?.settings;return null!=a?.maxChargeLevelSettings?.demandTimeWindow&&(n.max_charge_level_demand_window_minutes=a.maxChargeLevelSettings.demandTimeWindow),null!=a?.chargeOnTheWay?.demandWindowEnd&&(n.opportunistic_charging_demand_window_minutes=a.chargeOnTheWay.demandWindowEnd),n})(t||[],r);y(JSON.stringify(e,null,2)),g("json")},[t,r]),x=(0,a.useCallback)(()=>{let e;try{e=JSON.parse(f)}catch{return m(T.t("addExperimentWizard.steps.vehicles.uploadJsonParseError")),void p(!0)}const t=_p(e);if(t)return m(t),void p(!0);kp(e,r,n,i),g("table")},[f,r,n,i]),E=(0,a.useCallback)(e=>{const t=e.target.files?.[0];if(!t)return;if(e.target.value="",!t.name.endsWith(".json"))return m(T.t("addExperimentWizard.steps.vehicles.uploadJsonError")),void p(!0);const a=new FileReader;a.onerror=()=>{m(T.t("addExperimentWizard.steps.vehicles.uploadJsonParseError")),p(!0)},a.onload=()=>{try{const e=JSON.parse(a.result),t=_p(e);if(t)return m(t),void p(!0);"json"===h?y(JSON.stringify(e,null,2)):kp(e,r,n,i)}catch{m(T.t("addExperimentWizard.steps.vehicles.uploadJsonParseError")),p(!0)}},a.readAsText(t)},[n,i,r,h]),b=(0,a.useCallback)(()=>{"json"===h&&y(JSON.stringify({vehicle_groups:[]},null,2));const e=r?.settings;i&&e?i({vehicleGroups:[],settings:{...e,maxChargeLevelSettings:{...e.maxChargeLevelSettings,demandTimeWindow:sp.maxChargeLevelSettings.demandTimeWindow},chargeOnTheWay:{...e.chargeOnTheWay,demandWindowEnd:sp.chargeOnTheWay.demandWindowEnd}}}):n([])},[h,r,i,n]);return a.createElement(Fl,{id:"addVehiclesGroup"},a.createElement(qo,null,a.createElement(Uo,null,a.createElement(Zo,null,T.t("addExperimentWizard.steps.vehicles.uploadJson")),a.createElement(Ho,null,a.createElement(nc,{onClick:v}),a.createElement("input",{ref:d,type:"file",accept:".json",style:{display:"none"},onChange:E})),a.createElement(go,{filename:mo,title:T.t("addExperimentWizard.steps.fillingStations.uploadSection.downloadExample")}),a.createElement(Ko,{onClick:b},T.t("addExperimentWizard.steps.vehicles.clearAll")),a.createElement(bp,null,a.createElement(Cp,{$active:"table"===h,onClick:"json"===h?x:void 0},"Table"),a.createElement(Cp,{$active:"json"===h,onClick:"table"===h?w:void 0},"JSON")))),"table"===h?a.createElement(Jd,{addRowText:T.t("addExperimentWizard.steps.vehicles.addGroup"),showErrors:l,stepName:"vehicles",tableData:t,updateTableData:n,fields:Ep(o,s),initialRowData:gp}):a.createElement(hp,{jsonString:f,onChange:y}),a.createElement(wt,{submitButtonText:T.t("genericBackButtonText"),isVisible:c,onClose:()=>p(!1),title:T.t("fileUploader.genericErrorText"),onClickSubmitButton:()=>p(!1)},a.createElement(On,{errorMessage:u})))};var Ap=n(22618),Tp=function(e){return a.createElement("svg",e,a.createElement("path",{d:"m4 20 4-7.5-8-1L12 0h2l-4 7.5 8 1L6 20H4Z",fill:"#fff"}))};Tp.defaultProps={width:"11",height:"17",viewBox:"0 0 18 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var Ip=function(e){return a.createElement("svg",e,a.createElement("path",{d:"M0 18V2C0 1.45.196.98.588.587A1.926 1.926 0 0 1 2 0h6c.55 0 1.02.196 1.412.588C9.804.979 10 1.45 10 2v7h1c.55 0 1.02.196 1.412.588.392.391.588.862.588 1.412v4.5c0 .283.096.52.287.712.192.192.43.288.713.288s.52-.096.713-.288A.968.968 0 0 0 15 15.5V8.3c-.15.083-.308.137-.475.162A3.539 3.539 0 0 1 14 8.5c-.7 0-1.292-.242-1.775-.725C11.742 7.292 11.5 6.7 11.5 6c0-.533.146-1.013.438-1.438.291-.425.679-.729 1.162-.912L11 1.55 12.05.5l3.7 3.6c.25.25.438.542.563.875.125.333.187.675.187 1.025v9.5c0 .7-.242 1.292-.725 1.775C15.292 17.758 14.7 18 14 18s-1.292-.242-1.775-.725c-.483-.483-.725-1.075-.725-1.775v-5H10V18H0ZM2 7h6V2H2v5Zm12 0c.283 0 .52-.096.713-.287A.967.967 0 0 0 15 6a.967.967 0 0 0-.287-.713A.968.968 0 0 0 14 5a.968.968 0 0 0-.713.287A.967.967 0 0 0 13 6c0 .283.096.52.287.713.192.191.43.287.713.287Z",fill:"#fff"}))};Ip.defaultProps={width:"15",height:"16",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var Np=function(e){return a.createElement("svg",e,a.createElement("path",{d:"M13.817 10H9l7-10-.817 7H20l-7 10 .817-7ZM.803 25v-4.9h2.121c.439 0 .817.072 1.134.217.317.14.563.343.735.609.173.266.26.583.26.952 0 .364-.087.679-.26.945a1.683 1.683 0 0 1-.735.616c-.317.14-.695.21-1.134.21h-1.49l.503-.511V25H.803Zm1.134-1.736-.504-.539h1.428c.35 0 .611-.075.784-.224.173-.15.26-.357.26-.623 0-.27-.087-.48-.26-.63-.172-.15-.434-.224-.784-.224H1.433l.504-.539v2.779Zm6.074 1.82c-.695 0-1.239-.194-1.63-.581-.393-.387-.589-.94-.589-1.659V20.1h1.134v2.702c0 .467.096.803.287 1.008.192.205.46.308.805.308.346 0 .614-.103.805-.308.192-.205.287-.541.287-1.008V20.1h1.12v2.744c0 .719-.196 1.272-.588 1.659-.392.387-.935.581-1.63.581Zm3.34-.084v-4.9h2.394c.616 0 1.078.117 1.386.35.313.233.469.541.469.924 0 .257-.063.48-.189.672a1.247 1.247 0 0 1-.518.434c-.22.103-.471.154-.756.154l.133-.287c.308 0 .581.051.819.154.238.098.422.245.553.441.135.196.203.436.203.721 0 .42-.166.749-.497.987-.331.233-.819.35-1.463.35h-2.534Zm1.127-.854h1.323c.294 0 .516-.047.665-.14.154-.098.231-.252.231-.462 0-.205-.077-.357-.231-.455-.15-.103-.371-.154-.665-.154h-1.407v-.826h1.211c.275 0 .485-.047.63-.14a.492.492 0 0 0 .224-.441.469.469 0 0 0-.224-.427c-.145-.098-.355-.147-.63-.147h-1.127v3.192Zm4.226.854v-4.9h1.134v3.976h2.457V25h-3.591Zm4.224 0v-4.9h1.134V25h-1.134Zm4.642.084c-.378 0-.73-.06-1.057-.182a2.5 2.5 0 0 1-1.4-1.337 2.574 2.574 0 0 1-.196-1.015c0-.369.065-.707.196-1.015a2.5 2.5 0 0 1 .56-.805c.243-.229.525-.404.847-.525a2.877 2.877 0 0 1 1.057-.189c.425 0 .807.075 1.148.224.345.145.635.36.868.644l-.728.672a1.66 1.66 0 0 0-.56-.427 1.54 1.54 0 0 0-.672-.147c-.229 0-.439.037-.63.112a1.429 1.429 0 0 0-.497.322c-.14.14-.25.306-.329.497a1.74 1.74 0 0 0-.112.637c0 .233.037.446.112.637.08.191.189.357.329.497s.306.247.497.322c.191.075.401.112.63.112.243 0 .467-.047.672-.14.205-.098.392-.245.56-.441l.728.672a2.268 2.268 0 0 1-.868.651 2.85 2.85 0 0 1-1.155.224Z"}))};Np.defaultProps={viewBox:"0 0 28 27",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var Mp=function(e){return a.createElement("svg",e,a.createElement("path",{d:"M0 18V0h7c1.667 0 3.083.583 4.25 1.75C12.417 2.917 13 4.333 13 6c0 1.667-.583 3.083-1.75 4.25C10.083 11.417 8.667 12 7 12H4v6H0ZM4 8h3.2c.55 0 1.02-.196 1.413-.588C9.004 7.021 9.2 6.55 9.2 6c0-.55-.196-1.02-.587-1.412A1.926 1.926 0 0 0 7.2 4H4v4Z",fill:"#fff"}))};Mp.defaultProps={width:"13",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var Dp=function(e){return a.createElement("svg",e,a.createElement("path",{d:"M14.15 17.7 8.1 11.6c-.333.133-.67.233-1.012.3A5.67 5.67 0 0 1 6 12c-1.667 0-3.083-.583-4.25-1.75C.583 9.083 0 7.667 0 6c0-.6.083-1.17.25-1.713.167-.541.4-1.054.7-1.537L4.6 6.4l1.8-1.8L2.75.95c.483-.3.996-.533 1.537-.7A5.79 5.79 0 0 1 6 0c1.667 0 3.083.583 4.25 1.75C11.417 2.917 12 4.333 12 6c0 .383-.033.746-.1 1.088-.067.341-.167.679-.3 1.012l6.1 6.05c.2.2.3.442.3.725s-.1.525-.3.725l-2.1 2.1c-.2.2-.442.3-.725.3a.988.988 0 0 1-.725-.3Z",fill:"#fff"}))};Dp.defaultProps={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const Lp=(0,Nl.us)({isDarkMode:!1}),Bp=e=>T.t(`addExperimentWizard.steps.fillingStations.stationOptions.${e}`),Rp={electric:{value:vi,label:Bp("electric")},ice:{value:xi,label:Bp("ice")}},Fp=o.default.div.withConfig({displayName:"StationIcon__StyledIconContainer",componentId:"sc-1q3rn6p-0"})(["width:32px;height:32px;background-color:",";border-radius:",";padding:",";display:flex;align-items:center;justify-content:center;",""],e=>{let{isHighlighted:t}=e;return t?Lp.colors.info:Lp.colors["neutral-dark"]},Lp.borderRadius.LG,Lp.spacings.NONE,e=>{let{showShadow:t}=e;return t&&"box-shadow: 0 3px 8px 0 rgba(33, 34, 41, 0.32);"}),Op=`\n display: block;\n margin: ${Lp.spacings.NONE};\n width: 20px;\n height: 20px;\n fill: white;\n`,Pp=(0,o.default)(Tp).withConfig({displayName:"StationIcon__StyledElectricIcon",componentId:"sc-1q3rn6p-1"})([" "," "],Op),zp=(0,o.default)(Ip).withConfig({displayName:"StationIcon__StyledFuelIcon",componentId:"sc-1q3rn6p-2"})([" ",""],Op),jp=(0,o.default)(Np).withConfig({displayName:"StationIcon__StyledPublicIcon",componentId:"sc-1q3rn6p-3"})([" "," "],Op),Wp=(0,o.default)(Mp).withConfig({displayName:"StationIcon__StyledParkingIcon",componentId:"sc-1q3rn6p-4"})([" "," padding-top:5px;padding-left:9px;"],Op),$p=(0,o.default)(Dp).withConfig({displayName:"StationIcon__StyledRepairIcon",componentId:"sc-1q3rn6p-5"})([" ",""],Op),Vp=a.createElement(Pp,null),Gp=a.createElement(zp,null),Up=a.createElement(jp,null),Zp=a.createElement(Wp,null),Hp=a.createElement($p,null),qp={[Rp.electric.value]:Vp,[Rp.ice.value]:Gp,[wi]:Up,[Oi.PARKING_STATION]:Zp,[Oi.MAINTENANCE_STATION]:Hp},Kp=e=>{let{isHighlighted:t=!1,onClick:n,stationType:i,type:l,showShadow:r=!1}=e;const o=(0,a.useMemo)(()=>tl(i)?Oi.MAINTENANCE_STATION:i===Oi.PARKING_STATION?Oi.PARKING_STATION:el(i)?l||_i:Qi(i)?Oi.PARKING_STATION:l||_i,[i,l]),s=(e=>e&&qp[e]||qp[Rp.ice.value]||null)(o);return s?a.createElement(Fp,{isHighlighted:t,showShadow:r,onClick:n,role:"button","aria-label":"station-icon",tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||n&&n(e)}},(0,a.cloneElement)(s,{key:o})):null};function Jp(){return Jp=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{station:t,onClick:n,onRemoveClick:i,isHighlighted:l}=e;const r=T.t("addressPlaceholder");return a.createElement(Ao,{isHighlighted:l,onClick:n},a.createElement(Mo,null,t.address||r),a.createElement(Do,null,a.createElement(tr,{onClick:i,width:"13px",height:"13px"})))},Yp=e=>{let{stations:t,highlightedStationId:n,onStationClicked:i,onRemoveStationClicked:l,onStationAdded:r,StationItem:o,addLocation:s,locationRequired:d,onRemoveAllClicked:c,readOnly:p,onStationChanged:u}=e;const m=e=>o?a.createElement(o,Jp({key:o.id},e)):a.createElement(Xp,e);return a.createElement(bo,null,a.createElement(Io,null,a.createElement(Co,null,a.createElement(Fo,null,t?.length||0," ",T.t("addExperimentWizard.steps.parkingStations.stations")),c?a.createElement(a.Fragment,null,a.createElement(ko,{onClick:c,"data-test-id":"removeAll"},T.t("addExperimentWizard.steps.fillingStations.removeAll"))):void 0)),a.createElement(So,null,a.createElement(Ap.A,null,t?.map((e,t)=>a.createElement(Mr,{key:e.id,shouldRender:!0,timeout:200},a.createElement(m,{readOnly:p,isHighlighted:n===e.id,station:e,onClick:()=>i(e),onChange:e=>u&&u(e),isIceStation:e.type===Rp.ice.value,onRemoveClick:()=>l(e.id),"data-test-id":`stationItem-${t}`,rowIndex:t}))))))};var Qp=n(40961),eu=n(34745);class tu extends Il.i3{draw(){const{mapPaneName:e}=this.props;e||console.log("OverlayView requires either props.mapPaneName or props.defaultMapPaneName but got");const t=this.state[eu.OVERLAY_VIEW].getPanes();t&&this.containerElement&&(t[e].appendChild(this.containerElement),Qp.unstable_renderSubtreeIntoContainer(this,a.Children.only(this.props.children),this.containerElement,this.onPositionElement))}}const nu=(0,Nl.us)({isDarkMode:!1}),au=e=>T.t(`addExperimentWizard.steps.fillingStations.stationOptions.${e}`),iu=(au("electric"),au("ice"),o.default.div.withConfig({displayName:"FillingStationMarker__StyledIconContainer",componentId:"sc-r9eecy-0"})(["display:flex;width:32px;height:32px;padding:",";justify-content:center;align-items:center;border-radius:",";background-color:",";"],nu.spacings.NONE,nu.borderRadius.LG,e=>{let{isHighlighted:t}=e;return t?nu.colors.info:nu.colors["neutral-dark"]})),lu=e=>{let{isHighlighted:t=!1,position:n,onClick:i,stationType:l,type:r}=e;const o=(0,a.useMemo)(()=>(e=>{if(!e)return{lat:0,lng:0};const t="string"==typeof e.lat?parseFloat(e.lat):e.lat,n="string"==typeof e.lng?parseFloat(e.lng):e.lng;return{lat:Number.isFinite(t)?t:0,lng:Number.isFinite(n)?n:0}})(n),[n]);return a.createElement(tu,{mapPaneName:tu.FLOAT_PANE,position:o},a.createElement(iu,{isHighlighted:t,onClick:i},a.createElement(Kp,{isHighlighted:t,onClick:i,stationType:l,type:r,showShadow:!0})))};var ru=function(e){return a.createElement("svg",e,a.createElement("defs",null,a.createElement("style",null,".cls-plus","{","fill:none;stroke:#fff;stroke-width:2px","}")),a.createElement("path",{className:"cls-plus",d:"M0 7.5h15M7.5 0v15"}))};ru.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15"};const ou=o.default.button.withConfig({displayName:"styled__Button",componentId:"sc-zyrm0j-0"})(["background-color:",";height:40px;aspect-ratio:1 / 1;border-radius:3px;border:0;outline:'none';box-shadow:'none';cursor:pointer;"],h),su=(0,o.default)(ru).withConfig({displayName:"styled__Plus",componentId:"sc-zyrm0j-1"})(["transform:scale(1.3);margin-top:5px;margin-left:1px;"]),du=e=>{let{onClick:t}=e;return a.createElement(ou,{onClick:t},a.createElement(su,null))},cu=sd()(e=>{let{onOptionSelected:t,locationRequired:n}=e;const[i,l]=(0,a.useState)(null),[r,o]=(0,a.useState)(""),s=new google.maps.places.PlacesService(document.createElement("div"));return a.createElement(Eo,null,a.createElement(Il.jT,{onPlaceChanged:async()=>{const e=i.getPlace(),n=new Promise((t,n)=>{s.getDetails({placeId:"",reference:e?.reference},(e,n)=>{t({address:e?.formatted_address,lat:e?.geometry?.location?.lat(),lng:e?.geometry?.location?.lng()})})}),a=await n;o(a.address),t(a)},onLoad:e=>{l(e)}},a.createElement(ql,{placeholder:T.t("searchLocationPlaceholder"),showErrors:n,onChange:e=>o(e.target.value),value:r})))}),pu=o.default.div.withConfig({displayName:"styled__Container",componentId:"sc-immo2p-0"})(["flex-direction:column;display:flex;justify-content:space-between;flex:",";",""],e=>{let{flex:t}=e;return t},e=>{let{marginRight:t}=e;return t&&"margin-right: 24px;"}),uu=o.default.span.withConfig({displayName:"styled__Label",componentId:"sc-immo2p-1"})(["font-weight:500;color:",";font-size:",";"],x,p),mu=o.default.div.withConfig({displayName:"styled__ChildrenContainer",componentId:"sc-immo2p-2"})(["display:flex;"]),hu=e=>{let{children:t,label:n,flex:i,marginRight:l=!1}=e;return a.createElement(pu,{flex:i,marginRight:l},a.createElement(uu,null,n),a.createElement(mu,null,t))},gu=o.default.div.withConfig({displayName:"styled__StyledTopBanner",componentId:"sc-1f3v6d2-0"})(["border:1px solid rgb(223,223,223);border-radius:5px;width:calc(100% - 30px);padding:15px;display:flex;"]),fu=o.default.div.withConfig({displayName:"styled__DropdownContainer",componentId:"sc-1f3v6d2-1"})(["width:100%;"]),yu=e=>e||null,vu=Object.values(Oi).map(e=>({value:e,label:T.t(`addExperimentWizard.steps.fillingStations.stationTypeOptions.${e}`)})),wu=e=>{let{fillingStationsProps:t,setFillingStationProps:n,incompleteFields:i,isIceStation:l,addLocation:r}=e;const o=e=>n({location:e}),s=(0,a.useCallback)(()=>{const e=(0,a.useMemo)(()=>el(t.stationType),[t.stationType]),r=(0,a.useMemo)(()=>Qi(t.stationType),[t.stationType]),o=(0,a.useMemo)(()=>tl(t.stationType),[t.stationType]);return a.createElement(hu,{flex:1,label:T.t("addExperimentWizard.steps.fillingStations.stationDetails"),marginRight:!0},a.createElement(zo,null,e?a.createElement(a.Fragment,null,a.createElement(jo,null,a.createElement(Wo,null,T.t("addExperimentWizard.steps.fillingStations.stationTypeLabel")," "),a.createElement(sa,{options:Object.values(Rp),value:Rp[t.type],handleChange:e=>n({type:e}),height:40})),a.createElement(jo,null,a.createElement(Wo,null,T.t("addExperimentWizard.steps.fillingStations.stationRateLabel")," "),a.createElement(ql,{maxLength:5,showErrors:i.includes("rate"),unit:l?"min":"Kw",disabled:l,min:1,value:yu(t.rate),onChange:e=>n({rate:+e.target.value}),type:"number"})),a.createElement(jo,null,a.createElement(Wo,null,T.t(Ni[t.type||_i])," "),a.createElement(ql,{showErrors:i.includes("slots"),min:1,value:yu(t.slots),onChange:e=>n({slots:+e.target.value}),type:"number"}))):a.createElement(a.Fragment,null),r?a.createElement(jo,null,a.createElement(Wo,null,T.t("addExperimentWizard.steps.fillingStations.parkingSpotsLabel")," "),a.createElement(ql,{showErrors:i.includes("capacity"),min:1,value:yu(t.capacity),onChange:e=>n({capacity:+e.target.value}),type:"number"})):a.createElement(a.Fragment,null),o?a.createElement(jo,null,a.createElement(Wo,null,T.t("addExperimentWizard.steps.fillingStations.maintenanceCapacityLabel")," "),a.createElement(ql,{showErrors:i.includes("capacity"),min:1,value:yu(t.capacity),onChange:e=>n({capacity:+e.target.value}),type:"number"})):a.createElement(a.Fragment,null)))},[l,t]),d=(0,a.useCallback)(()=>a.createElement(hu,{flex:.8,label:T.t("addExperimentWizard.steps.fillingStations.stationLocation")},a.createElement(cu,{onOptionSelected:o,locationRequired:i.includes("location")}),r&&a.createElement(du,{onClick:r})),[t]),c=(0,a.useCallback)(()=>a.createElement(hu,{flex:.35,label:T.t("addExperimentWizard.steps.fillingStations.stationType"),marginRight:!0},a.createElement(fu,null,a.createElement(sa,{options:vu,value:{value:t.stationType,label:T.t(`addExperimentWizard.steps.fillingStations.stationTypeOptions.${t.stationType}`)},handleChange:e=>n({stationType:e}),height:40}))),[t.stationType]);return a.createElement(gu,null,c(),s(),d())},xu=Object.values(qi).map(e=>({value:e,label:T.t(`addExperimentWizard.steps.fillingStations.capabilities.${e}`)})),Eu=e=>{const t=Cu(e);return xu.find(e=>e.value===t)},bu=T.t("addExperimentWizard.steps.fillingStations.capabilitiesLabel"),Cu=e=>{if(!e)return qi.PARKING_STATION;const t=e?.includes(qi.PARKING_STATION),n=e?.includes(qi.STAGING_STATION);return t&&n||e?.includes(qi.BOTH)?qi.BOTH:t?qi.PARKING_STATION:n?qi.STAGING_STATION:qi.PARKING_STATION},_u=e=>{let{handleChange:t=e=>null,displayLabel:n=!0,labelText:i=bu,value:l}=e;const r=()=>n?a.createElement(Wo,null,i):null;return a.createElement(jo,null,a.createElement(r,null),a.createElement(sa,{options:Object.values(xu),value:Eu(l),handleChange:e=>{t(Ki[e])},height:40}))};var ku=function(e){return a.createElement("svg",e,a.createElement("path",{d:"M5 1V0h4v1H5ZM8 11V5h1v6H8ZM5 5v6h1V5H5Z",fill:"#212229"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m1.583 3 .764 9.166A2 2 0 0 0 4.34 14h5.32a2 2 0 0 0 1.993-1.834L12.417 3H14V2H0v1h1.583Zm1.004 0 .757 9.083A1 1 0 0 0 4.34 13h5.32a1 1 0 0 0 .996-.917L11.413 3H2.587Z",fill:"#212229"}))};ku.defaultProps={width:"14",height:"14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var Su=function(e){return a.createElement("svg",e,a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.105 6.79C7.577 5.845 9 6.18 9 7.235V8h.883a1 1 0 0 1 .893 1.447L8.91 13.184c-.473.945-1.898.605-1.894-.452L7.017 12h-.899a1 1 0 0 1-.894-1.447l1.881-3.764ZM6.118 11H8.02l-.005 1.735L9.882 9H8V7.236L6.118 11Z",fill:"#666975"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.204 3.01A2 2 0 0 1 13 5v11h1v1H2v-1h1V5a2 2 0 0 1 1.796-1.99L5 3h6l.204.01ZM5 4a1 1 0 0 0-.995.897L4 5v11h8V5a1 1 0 0 0-1-1H5ZM15 5h1V4h1v3.5c0 .653-.418 1.206-1 1.412V12a2 2 0 0 1-2 2v-1a1 1 0 0 0 1-1V8.912c-.582-.206-1-.76-1-1.412V4h1v1Zm0 2.5a.5.5 0 0 0 1 0V6h-1v1.5Z",fill:"#666975"}))};Su.defaultProps={width:"20",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var Au=function(e){return a.createElement("svg",e,a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.102 5.005A1 1 0 0 1 11 6v4l-.005.102a1 1 0 0 1-.893.893L10 11H6a1 1 0 0 1-.995-.898L5 10V6a1 1 0 0 1 1-1h4l.102.005ZM6 10h4V6H6v4Z",fill:"#666975"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.204 3.01A2 2 0 0 1 13 5v11h1v1H2v-1h1V5a2 2 0 0 1 1.796-1.99L5 3h6l.204.01ZM5 4a1 1 0 0 0-.995.897L4 5v11h8V5a1 1 0 0 0-1-1H5ZM16.839 5.932 17 6.08V8c0 .653-.418 1.206-1 1.412V12a2 2 0 0 1-2 2v-1a1 1 0 0 0 1-1V9.412c-.582-.206-1-.76-1-1.412V6.941l.968-1.37-1.307-1.203.678-.736 2.5 2.3ZM15 7.258V8a.5.5 0 0 0 1 0V6.52l-.29-.267L15 7.258Z",fill:"#666975"}))};Au.defaultProps={width:"20",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var Tu=function(e){return a.createElement("svg",e,a.createElement("path",{d:"M16 3h-1v12H3v1h12a1 1 0 0 0 1-1V3Z",fill:"#666975"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6 5h3.5a2.5 2.5 0 0 1 0 5H7v3H6V5Zm1 4h2.5a1.5 1.5 0 0 0 0-3H7v3Z",fill:"#666975"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0 2a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2Zm2-1h14a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1Z",fill:"#666975"}))};Tu.defaultProps={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var Iu=function(e){return a.createElement("svg",e,a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m12.57 14.423-.57.271V18h1v-2.674A7 7 0 0 0 12 2.29V8a2 2 0 1 1-4 0V2.29a7 7 0 0 0-1 13.037V18h1v-3.306l-.57-.27A6 6 0 0 1 7 3.801V8a3 3 0 0 0 6 0V3.802a6 6 0 0 1-.43 10.62Z",fill:"#666975"}))};Iu.defaultProps={width:"18",height:"18",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const Nu=(0,Nl.us)({isDarkMode:!1}),Mu={[xi]:a.createElement(Au,{"aria-hidden":"true"}),[vi]:a.createElement(Su,{"aria-hidden":"true"})},Du=o.default.div.withConfig({displayName:"StationCard__AddressWrapper",componentId:"sc-17q9op4-0"})(["display:flex;flex-direction:column;flex:1;min-width:0;margin-right:16px;"]),Lu=o.default.div.withConfig({displayName:"StationCard__AddressText",componentId:"sc-17q9op4-1"})(["display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;align-self:stretch;overflow:hidden;color:",";text-overflow:ellipsis;font-size:14px;font-style:normal;font-weight:400;line-height:20px;"],Nu.colors["neutral-dark"]),Bu=o.default.span.withConfig({displayName:"StationCard__TypeText",componentId:"sc-17q9op4-2"})(["display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1;align-self:stretch;overflow:hidden;color:",";text-overflow:ellipsis;font-size:12px;font-style:normal;font-weight:600;line-height:18px;letter-spacing:0.5px;text-transform:uppercase;"],Nu.colors["neutral-charcoal"]),Ru=(0,o.default)(Io).withConfig({displayName:"StationCard__InfoRow",componentId:"sc-17q9op4-3"})(["margin-top:12px;gap:16px;flex-wrap:wrap;"]),Fu=o.default.span.withConfig({displayName:"StationCard__StationText14",componentId:"sc-17q9op4-4"})(["font-size:14px;line-height:20px;color:",";"],Nu.colors["neutral-dark"]),Ou=(0,o.default)(Fu).withConfig({displayName:"StationCard__StationTextJob",componentId:"sc-17q9op4-5"})(["text-transform:capitalize;"]),Pu=o.default.div.withConfig({displayName:"StationCard__CapabilitiesWrapper",componentId:"sc-17q9op4-6"})(["margin-top:9px;"]),zu=(0,o.default)(Io).withConfig({displayName:"StationCard__LabelsRow",componentId:"sc-17q9op4-7"})(["margin-top:9px;"]),ju=e=>{let{station:t,getMaintenanceJobs:n}=e;return a.createElement(a.Fragment,null,a.createElement(Vo,null,a.createElement(Tu,{"aria-hidden":"true"}),a.createElement(Fu,{"data-test-id":"maintenanceCapacity"},t.capacity??ki," Spots")),n&&n(t).map(e=>a.createElement(Vo,{key:`${t.id}-job-${e}`},a.createElement(Iu,{"aria-hidden":"true"}),a.createElement(Ou,null,sl(e)))))},Wu=e=>{let{station:t}=e;return a.createElement(a.Fragment,null,a.createElement(Vo,null,a.createElement(Tu,{"aria-hidden":"true"}),a.createElement(Fu,{"data-test-id":"parkingSpots"},t.capacity??ki," Spots")),a.createElement(Vo,null,Mu[t.type||_i],a.createElement(Fu,{"data-test-id":"fillingRate"},t.rate??ki," ",Li[t.type||_i]),a.createElement(Fu,{"data-test-id":"stationsSlots"},t.slots??ki," ",T.t(Ni[t.type||_i]))))},$u=e=>{let{station:t}=e;return a.createElement(Vo,null,Mu[t.type||_i],a.createElement(Fu,{"data-test-id":"fillingRate"},t.rate??ki," ",Li[t.type||_i]),a.createElement(Fu,{"data-test-id":"stationsSlots"},t.slots??ki," ",T.t(Ni[t.type||_i])))},Vu=e=>{let{station:t}=e;return a.createElement(Vo,null,a.createElement(Tu,{"aria-hidden":"true"}),a.createElement(Fu,{"data-test-id":"parkingSpots"},t.capacity??ki," Spots"))},Gu=e=>{let{station:t,getMaintenanceJobs:n}=e;return tl(t.stationType)?a.createElement(ju,{station:t,getMaintenanceJobs:n}):t.stationType===Oi.PARKING_AND_CHARGING_STATION?a.createElement(Wu,{station:t}):t.stationType===Oi.CHARGING_STATION?a.createElement($u,{station:t}):t.stationType===Oi.PARKING_STATION?a.createElement(Vu,{station:t}):null},Uu=(0,a.memo)(e=>{let{station:t,index:n,isHighlighted:i,addressPlaceholder:l,onStationClicked:r,onRemoveStation:o,getStationTypeLabel:s,getMaintenanceJobs:d,labelsChangeCallback:c,capabilitiesChangeCallback:p}=e;return a.createElement(To,{isHighlighted:i,readOnly:!1,onClick:()=>r&&r(t),"data-station-id":t.id},a.createElement(No,null,a.createElement(Io,null,a.createElement(Vo,null,a.createElement(Kp,{isHighlighted:i,stationType:t.stationType,type:t.type})),a.createElement(Du,null,a.createElement(Lu,null,t.address||l),a.createElement(Bu,null,s(t))),a.createElement(Do,{onClick:e=>{e.stopPropagation(),o(t.id)},role:"button","aria-label":`remove-station-${n}`,tabIndex:0,onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.stopPropagation(),o(t.id))}},a.createElement(ku,{width:"14px",height:"14px","data-test-id":`removeStationSvg-${n}`,"aria-hidden":"true"}))),a.createElement(Ru,null,a.createElement(Gu,{station:t,getMaintenanceJobs:d})),t.stationType&&Qi(t.stationType)&&p&&a.createElement(Pu,{onClick:e=>e.stopPropagation()},a.createElement(_u,{value:t.capabilities||[],handleChange:p})),t.stationType&&el(t.stationType)&&c&&a.createElement(zu,null,a.createElement($o,null,a.createElement(Xs,{labels:t.labels||[],onChange:c})))))});Uu.displayName="StationCard";const Zu=Uu,Hu=(o.default.div.withConfig({displayName:"StationsList__StationCardWrapper",componentId:"sc-1twv9ja-0"})(["opacity:1;transition:opacity 200ms ease-in-out;&.card-enter{opacity:0;}&.card-enter-active{opacity:1;}&.card-exit{opacity:1;}&.card-exit-active{opacity:0;}"]),e=>{let{stations:t=[],onRemoveStation:n,onRemoveAll:i,highlightedStationId:l,onStationClicked:r,onStationChanged:o}=e;const s=T.t("addressPlaceholder"),d=(0,a.useRef)(null);!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"data-station-id";(0,a.useEffect)(()=>{if(e&&t.current){const a=t.current.querySelector(`[${n}="${e}"]`);a?.scrollIntoView({block:"nearest",behavior:"smooth"})}},[e,t,n])}(l,d);const c=e=>{const t=new Set;return e.jobs&&"object"==typeof e.jobs&&Object.keys(e.jobs).forEach(e=>t.add(e)),e.timeLimitations&&Array.isArray(e.timeLimitations)&&e.timeLimitations.forEach(e=>{e.jobs&&"object"==typeof e.jobs&&Object.keys(e.jobs).forEach(e=>t.add(e))}),Array.from(t).slice(0,5)},p=e=>{const{stationType:t,type:n}=e,a=n||_i;return tl(t)?"Maintenance":"parking_and_charging"===t?Ti[a].parkingAndCharging:"charging"===t?Ti[a].charging:"parking"===t?"Parking":""},u=(0,a.useCallback)((e,n)=>{const a=t.find(t=>t.id===e);a&&o&&o({...a,capabilities:n})},[t,o]),m=(0,a.useCallback)((e,n)=>{const a=t.find(t=>t.id===e);a&&o&&o({...a,labels:n})},[t,o]),h=(0,a.useMemo)(()=>{const e={};return t?.forEach(t=>{e[t.id]=e=>m(t.id,e)}),e},[t,m]),g=(0,a.useMemo)(()=>{const e={};return t?.forEach(t=>{e[t.id]=e=>u(t.id,e)}),e},[t,u]);return a.createElement(bo,null,a.createElement(Io,null,a.createElement(Co,null,a.createElement(_o,null,t.length," ",T.t("addExperimentWizard.steps.parkingStations.stations")),i&&t.length>0&&a.createElement(ko,{onClick:i,"data-test-id":"removeAll"},T.t("addExperimentWizard.steps.fillingStations.removeAll")))),a.createElement(So,{ref:d},t.filter(e=>e&&e.id).map((e,t)=>a.createElement(Zu,{key:e.id,station:e,index:t,isHighlighted:l===e.id,addressPlaceholder:s,onStationClicked:r,onRemoveStation:n,getStationTypeLabel:p,getMaintenanceJobs:c,labelsChangeCallback:h[e.id],capabilitiesChangeCallback:g[e.id]}))))}),qu=(0,a.memo)(Hu),Ku=e=>{let{selector:t}=e;const[n,i]=(0,a.useState)(""),[l,r]=(0,a.useState)(!1),[o,s]=(0,a.useState)(-1),[d,c]=(0,a.useState)(!1),p=(0,a.useRef)(null),u=(0,a.useRef)(null);var m,h;return m=l,h=p,(0,a.useEffect)(()=>{m&&h.current&&h.current.focus()},[m,h]),((e,t,n)=>{(0,a.useEffect)(()=>{if(e>=0&&t.current){const a=t.current.querySelectorAll(n)[e];a?.scrollIntoView({block:"nearest",behavior:"smooth"})}},[e,t,n])})(o,u,t),{searchValue:n,isSearchMode:l,highlightedIndex:o,isDropdownOpen:d,searchFieldRef:p,listRef:u,setSearchValue:i,setIsSearchMode:r,setHighlightedIndex:s,setIsDropdownOpen:c,resetSearch:()=>{i(""),r(!1),s(-1)}}};var Ju=n(29592);const Xu=[{value:Oi.CHARGING_STATION,label:T.t("addExperimentWizard.steps.fillingStations.stationTypeOptions.charging")},{value:Oi.PARKING_AND_CHARGING_STATION,label:T.t("addExperimentWizard.steps.fillingStations.stationTypeOptions.parking_and_charging")},{value:Oi.MAINTENANCE_STATION,label:T.t("addExperimentWizard.steps.fillingStations.stationTypeOptions.maintenance")},{value:Oi.PARKING_STATION,label:T.t("addExperimentWizard.steps.fillingStations.stationTypeOptions.parking")}],Yu=e=>{let{selectedStationType:t,isDropdownOpen:n,onDropdownOpenChange:i,onTypeSelect:l,alert:r}=e;return a.createElement(os,null,a.createElement(Ju.l,{label:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.stationTypeLabel"),placeholder:n?T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.searchPlaceholder"):T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.addPlaceholder"),selected:t,options:Xu,onChange:e=>l(Xu.find(t=>t.value===e)),onOpenChange:i,disallowClear:!0,supportingContentText:Boolean(r)?r:void 0,disallowCancel:!0,layout:"vertical",selectWidth:"dynamic",size:"small",appendMenuTo:"parent",hasError:Boolean(r)}))};var Qu=n(13670);const em=e=>{let{selectedSubType:t,selectedSubTypeLabel:n,fillRate:i,stationSlots:l,fillRateUnit:r,isSubTypeDropdownOpen:o,onSubTypeDropdownOpenChange:s,onSubTypeSelect:d,onFillRateChange:c,onStationSlotsChange:p}=e;const u=T.t(Ni[t]);return a.createElement(a.Fragment,null,a.createElement(os,null,a.createElement(Ju.l,{label:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.subTypeLabel"),placeholder:o?T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.searchPlaceholder"):n,selected:t,options:Object.entries(Ai).map(e=>{let[t,n]=e;return{value:t,label:n}}),onChange:e=>d(e),onOpenChange:s,disallowClear:!0,disallowCancel:!0,layout:"vertical",selectWidth:"dynamic"})),a.createElement(ms,null,a.createElement(Qu.u,{label:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.fillRateLabel"),value:i,onChange:c,min:1,max:1e6,variant:"withControls",formatLabel:r,requiredError:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.fillRateRequiredError"),rangeError:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.fillRateRangeError"),invalidFormatError:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.invalidFormatError"),layout:"vertical"})),a.createElement(ms,null,a.createElement(Qu.u,{label:u,value:l,onChange:p,min:1,max:1e6,variant:"withControls",requiredError:T.t(Mi[t]),rangeError:T.t(Di[t]),invalidFormatError:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.invalidFormatError"),layout:"vertical"})))},tm=e=>{let{parkingSpots:t,onParkingSpotsChange:n}=e;return a.createElement(ms,null,a.createElement(Qu.u,{label:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.parkingSpotsLabel"),value:t,onChange:n,min:1,max:1e6,variant:"withControls",requiredError:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.parkingSpotsRequiredError"),rangeError:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.parkingSpotsRangeError"),invalidFormatError:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.invalidFormatError"),layout:"vertical"}))};var nm=n(7755),am=n(33240),im=function(e){return a.createElement("svg",e,a.createElement("path",{d:"M6 7v6h1V7h6V6H7V0H6v6H0v1h6Z",fill:"#212229"}))};im.defaultProps={width:"13",height:"13",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var lm=function(e){return a.createElement("svg",e,a.createElement("path",{d:"M5 1V0h4v1H5ZM8 11V5h1v6H8ZM5 5v6h1V5H5Z",fill:"#212229"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m1.583 3 .764 9.166A2 2 0 0 0 4.34 14h5.32a2 2 0 0 0 1.993-1.834L12.417 3H14V2H0v1h1.583Zm1.004 0 .757 9.083A1 1 0 0 0 4.34 13h5.32a1 1 0 0 0 .996-.917L11.413 3H2.587Z",fill:"#212229"}))};lm.defaultProps={width:"14",height:"14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const rm=e=>{let{maintenanceDefaultCapacity:t,tasks:n,tasksMissingAlert:i,hasEmptyTaskType:l,onMaintenanceDefaultCapacityChange:r,onAddTask:o,onRemoveTask:s,onTaskTypeChange:d,onTaskDurationChange:c,onClearEmptyTaskType:p}=e;return a.createElement(a.Fragment,null,a.createElement(ms,null,a.createElement(Qu.u,{label:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.stationCapacityLabel"),value:t,onChange:r,min:0,max:1e6,variant:"withControls",requiredError:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.stationCapacityRequiredError"),rangeError:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.stationCapacityRangeError"),invalidFormatError:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.invalidFormatError"),layout:"vertical"})),a.createElement(hs,null,a.createElement(gs,null,T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.availableTasksLabel")),i&&a.createElement(nm.F,{text:i,flavor:"error",icon:"warning",size:"small"}),n.map(e=>a.createElement(fs,{key:e.id},a.createElement(ys,null,a.createElement(am.A,{label:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.taskTypeLabel"),value:e.type,onChange:t=>{d(e.id,t),p()},layout:"vertical",isValid:t=>{if(l&&!t?.trim())return T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.requiredError");const a=t?.trim().toLowerCase();if(a){const t=n.some(t=>t.id!==e.id&&t.type.trim().toLowerCase()===a);if(t)return T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.duplicateTaskError")}}})),a.createElement(vs,null,a.createElement(us,null,a.createElement(Qu.u,{label:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.taskDurationLabel"),value:e.duration,onChange:t=>c(e.id,t),min:1,max:1e6,variant:"withControls",formatLabel:"min",requiredError:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.durationRequiredError"),rangeError:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.durationRangeError"),invalidFormatError:T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.invalidFormatError"),layout:"vertical"}))),a.createElement(ws,null,a.createElement(xs,{onClick:()=>s(e.id)},a.createElement(lm,null))))),a.createElement(ps,null,a.createElement(cs,{onClick:o},a.createElement(im,{width:"13",height:"13"}),a.createElement("span",null,T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.addTaskButton"))))))},om=e=>{let{station:t,onCancel:n,onStationChange:i,onAddStation:l}=e;const r=Ku({selector:"[data-station-type-item]"}),o=Ku({selector:"[data-sub-type-item]"}),[s,d]=(0,a.useState)(vi),[c,p]=(0,a.useState)(Si[s]),[u,m]=(0,a.useState)(2),[h,g]=(0,a.useState)(Pi.PARKING_STATION),[f,y]=(0,a.useState)(Pi.MAINTENANCE_STATION),[v,w]=(0,a.useState)([]),[x,E]=(0,a.useState)(""),[b,C]=(0,a.useState)(""),[_,k]=(0,a.useState)({}),[S,A]=(0,a.useState)(null),[I,N]=(0,a.useState)(!1);(0,a.useEffect)(()=>{r.setHighlightedIndex(-1)},[r.searchValue]),(0,a.useEffect)(()=>{o.setHighlightedIndex(-1)},[o.searchValue]);const M=e=>{const n={...t||{},...e},a=n.stationType,l=el(a),r=Qi(a),o=a===Oi.MAINTENANCE_STATION;l||(delete n.subType,delete n.rate,delete n.stationSlots),r||delete n.parkingCapacity,o||delete n.maintenanceDefaultCapacity,i(n)},D=e=>{const t={};return e.forEach(e=>{e.type.trim()&&(t[e.type]={duration:e.duration})}),t},L=(0,a.useMemo)(()=>!!t?.stationType&&el(t.stationType),[t?.stationType]),B=(0,a.useMemo)(()=>!!t?.stationType&&Qi(t.stationType),[t?.stationType]),R=(0,a.useMemo)(()=>!!t?.stationType&&tl(t.stationType),[t?.stationType]),F=Ai[s]||"EV",O=Li[s];return a.createElement(ns,null,a.createElement(as,null,a.createElement(rs,null,T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.title"))),a.createElement(Yu,{selectedStationType:t?.stationType,isDropdownOpen:r.isDropdownOpen,onDropdownOpenChange:r.setIsDropdownOpen,onTypeSelect:e=>{r.resetSearch(),E("");const t=el(e.value),n={stationType:e.value};if(t&&(n.subType=s??vi,n.rate=c??Si[s??vi],n.stationSlots=u??2),Qi(e.value)){const t=h??Pi[e.value];n.parkingCapacity=t,g(t)}if(tl(e.value)){const t=f??Pi[e.value];n.maintenanceDefaultCapacity=t,y(t)}M(n)},alert:x}),L&&a.createElement(em,{selectedSubType:s,selectedSubTypeLabel:F,fillRate:c,stationSlots:u,fillRateUnit:O,isSubTypeDropdownOpen:o.isDropdownOpen,onSubTypeDropdownOpenChange:o.setIsDropdownOpen,onSubTypeSelect:e=>{d(e),o.resetSearch();const t=Si[e];p(t),M({subType:e,rate:t})},onFillRateChange:e=>{const t=e??Si[s];p(t),M({rate:t})},onStationSlotsChange:e=>{const t=e??2;m(t),M({stationSlots:t})}}),B&&a.createElement(tm,{parkingSpots:h,onParkingSpotsChange:e=>{const t=e??Pi.PARKING_STATION;g(t),M({parkingCapacity:t})}}),R&&a.createElement(rm,{maintenanceDefaultCapacity:f,tasks:v,tasksMissingAlert:b,hasEmptyTaskType:I,onMaintenanceDefaultCapacityChange:e=>{const t=e??Pi.MAINTENANCE_STATION;y(t),M({maintenanceDefaultCapacity:t})},onAddTask:()=>{const e={id:(0,ml.A)(),type:"",duration:30},t=[...v,e];w(t),C("")},onRemoveTask:e=>{const t=v.filter(t=>t.id!==e);w(t),S===e&&A(null);const n={..._};delete n[e],t.forEach(e=>{const a=e.type.trim().toLowerCase(),i=a&&t.some(t=>t.id!==e.id&&t.type.trim().toLowerCase()===a);i?n[e.id]="Value already in use. Try different one.":delete n[e.id]}),k(n),M({jobs:D(t)})},onTaskTypeChange:(e,n)=>{const a=v.map(t=>t.id===e?{...t,type:n}:t);A(e);const l={};a.forEach(e=>{const t=e.type.trim().toLowerCase();if(t){const n=a.some(n=>n.id!==e.id&&n.type.trim().toLowerCase()===t);n&&(l[e.id]="Value already in use. Try different one.")}}),w(a),k(l),C(""),t&&i({...t,jobs:D(a)})},onTaskDurationChange:(e,n)=>{const a=n??30,l=v.map(t=>t.id===e?{...t,duration:a}:t);w(l),t&&i({...t,jobs:D(l)})},onClearEmptyTaskType:()=>N(!1)}),a.createElement(ss,null,a.createElement(ds,null,a.createElement(is,{onClick:n},T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.cancelButton")),a.createElement(ls,{onClick:()=>{if(E(""),C(""),t?.stationType){if(t.stationType===Oi.MAINTENANCE_STATION){if(0===v.length)return void C(T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.taskMissingError"));const e=v.some(e=>!e.type.trim());if(e)return void N(!0);if(Object.keys(_).length>0)return}l(),n()}else E(T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.requiredError"))}},T.t("addExperimentWizard.steps.fillingStations.newStationConfiguration.addStationButton")))))};var sm=function(e){return a.createElement("svg",e,a.createElement("path",{d:"m13.25 14.65-4.3-4.3v-5.4h2v4.6l3.7 3.7-1.4 1.4ZM.8 14.025a9.403 9.403 0 0 1-.525-1.5A10.047 10.047 0 0 1 0 10.95h2.025c.05.35.12.7.212 1.05.092.35.205.692.338 1.025l-1.775 1ZM0 8.95c.05-.533.142-1.062.275-1.587.133-.526.317-1.03.55-1.513l1.75 1a8.676 8.676 0 0 0-.338 1.025c-.091.35-.162.708-.212 1.075H0Zm4.125 9.15c-.45-.333-.867-.696-1.25-1.088A12.095 12.095 0 0 1 1.8 15.75l1.75-1c.233.3.48.58.737.838.259.258.538.504.838.737l-1 1.775Zm-.55-12.975-1.775-1c.333-.45.692-.867 1.075-1.25s.8-.742 1.25-1.075l1 1.775a11.372 11.372 0 0 0-1.55 1.55ZM8.95 19.9a10.378 10.378 0 0 1-1.587-.275 7.998 7.998 0 0 1-1.513-.55l1-1.75c.333.133.675.246 1.025.338.35.091.708.162 1.075.212V19.9ZM6.85 2.575l-1-1.75a7.998 7.998 0 0 1 1.513-.55A10.374 10.374 0 0 1 8.95 0v2.025a8.676 8.676 0 0 0-2.1.55Zm4.1 17.325v-2.025a8.685 8.685 0 0 0 2.1-.55l1 1.75a7.998 7.998 0 0 1-1.513.55c-.525.133-1.054.225-1.587.275Zm2.1-17.325a8.674 8.674 0 0 0-1.025-.338 9.08 9.08 0 0 0-1.075-.212V0c.533.05 1.063.142 1.588.275.524.133 1.029.317 1.512.55l-1 1.75ZM15.775 18.1l-1-1.775a11.372 11.372 0 0 0 1.55-1.55l1.775 1c-.333.45-.692.87-1.075 1.263a8.96 8.96 0 0 1-1.25 1.062Zm.55-12.975a11.372 11.372 0 0 0-1.55-1.55l1-1.775a9.474 9.474 0 0 1 2.3 2.3l-1.75 1.025Zm1.55 3.825a9.076 9.076 0 0 0-.212-1.075 8.687 8.687 0 0 0-.338-1.025l1.75-1.025c.217.5.396 1.013.538 1.537.141.526.237 1.055.287 1.588h-2.025Zm1.2 5.1-1.75-1c.133-.333.246-.675.338-1.025.091-.35.162-.708.212-1.075H19.9c-.05.533-.142 1.063-.275 1.588a7.998 7.998 0 0 1-.55 1.512Z",fill:"#fff"}))};sm.defaultProps={width:"20",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const dm=(0,Nl.us)({isDarkMode:!1}),cm=o.default.div.withConfig({displayName:"UndefinedStationMarker__StyledIconContainer",componentId:"sc-c9kcoi-0"})(["width:32px;height:32px;display:flex;padding:",";justify-content:center;align-items:center;border-radius:",";background:",";box-shadow:0 3px 8px 0 rgba(33,34,41,0.32);"],dm.spacings.NONE,dm.borderRadius.LG,dm.colors["neutral-light"]),pm=(0,o.default)(sm).withConfig({displayName:"UndefinedStationMarker__StyledIcon",componentId:"sc-c9kcoi-1"})(["display:block;width:20px;height:20px;flex-shrink:0;aspect-ratio:1/1;fill:",";"],dm.colors["neutral-invert"]),um=e=>{let{position:t}=e;return a.createElement(tu,{mapPaneName:tu.FLOAT_PANE,position:{lat:parseFloat(t.lat),lng:parseFloat(t.lng)}},a.createElement(cm,null,a.createElement(pm,null)))},mm=e=>{let{onClick:t}=e;return a.createElement(Ro,{onClick:t},a.createElement(Lo,null),a.createElement(Bo,null,T.t("genericBackButtonText")))},hm={0:"sunday",1:"monday",2:"tuesday",3:"wednesday",4:"thursday",5:"friday",6:"saturday"},gm=e=>{if("string"!=typeof e)throw new Error(T.t("fileUploader.timeLimitationValidation.invalidTime",{time:String(e)}));const t=/^([01]\d|2[0-3]):([0-5]\d)$/.exec(e);if(!t)throw new Error(T.t("fileUploader.timeLimitationValidation.invalidTime",{time:e}));return 60*Number(t[1])+Number(t[2])},fm=Object.fromEntries(Object.entries(hm).map(e=>{let[t,n]=e;return[n,Number(t)]})),ym=e=>{const t=e.day??e.dayOfWeek;if(null==t)throw new Error(T.t("fileUploader.timeLimitationValidation.missingDay",{start:e.startTime,end:e.endTime}));const n=(e=>{if("string"==typeof e){const t=fm[e.toLowerCase()];if(void 0!==t)return t;const n=Number(e);return Number.isNaN(n)?NaN:n}return Number(e)})(t);if(!Number.isInteger(n)||n<0||n>7)throw new Error(T.t("fileUploader.timeLimitationValidation.invalidDay",{day:t,start:e.startTime,end:e.endTime}));return 7===n?0:n},vm=(e,t,n)=>{let a;try{a=(e=>{if(!e||0===e.length)return[];const t=new Map;for(const n of e){const e=ym(n),a=gm(n.startTime),i=gm(n.endTime);if(i<=a){const e=i{const a=[];for(let t=0;t0&&n.push({day:t,conflictingRanges:a})}),n})(t)}catch(t){const a=T.t("fileUploader.timeLimitationValidation.stationPrefix",{address:e}),i=t instanceof Error?t.message:"Unknown error";throw new Error(n?`${a} (${n}): ${i}`:`${a}: ${i}`)}if(a.length>0)throw new Error(((e,t,n)=>{const a=t.map(e=>{var t;return`${t=e.day,hm[t]?T.t(`general.days.${hm[t]}`):`Day ${t}`}: ${e.conflictingRanges.map(e=>{let{range1:t,range2:n}=e;return T.t("fileUploader.timeLimitationValidation.overlapDetail",{start1:t.startTime,end1:t.endTime,start2:n.startTime,end2:n.endTime})}).join("; ")}`}),i=T.t("fileUploader.timeLimitationValidation.overlappingHeader",{address:e});return`${n?`${i} (${n})`:i}\n${a.join("\n")}`})(e,a,n))},wm=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).map(e=>{const t={};return Object.entries(e).forEach(e=>{let[n,a]=e;const i=n.replace(/([-_][a-z])/g,e=>e.toUpperCase().replace(/[-_]/g,""));t[i]=a}),t})},xm=e=>Gi.has(e.stationType),Em=e=>({dayOfWeek:Yi[e.dayOfWeek??e.day]??e.dayOfWeek,startTime:e.startTime,endTime:e.endTime,slots:e.slots,...null!=e.idleConsumption&&{idleConsumption:e.idleConsumption},...null!=e.parkingSuccessLikelihood&&{parkingSuccessLikelihood:e.parkingSuccessLikelihood}}),bm=e=>{const t=e.type===xi,n=(e=>e.chargingTimeLimitations?.length?e.chargingTimeLimitations:xm(e)&&e.timeLimitations?.length?e.timeLimitations:null)(e),a=(e=>e.parkingTimeLimitations?.length?e.parkingTimeLimitations:null)(e);return{lat:e.lat,lng:e.lng,address:e.address,...xm(e)&&{charging:{type:e.type,...t?{slots:e.slots,...null!=e.numOfHandles&&{numOfHandles:e.numOfHandles}}:{chargers:e.slots,...null!=e.numOfHandles&&{connectorsPerCharger:e.numOfHandles}},fillRateKw:e.rate,...null!=e.powerAllocationUnit&&{powerAllocationUnit:e.powerAllocationUnit},...null!=e.chargerPostRefuelWaitTime&&{chargerPostRefuelWaitTime:e.chargerPostRefuelWaitTime},...n&&{timeLimitations:n.map(e=>((e,t)=>({dayOfWeek:Yi[e.dayOfWeek??e.day]??e.dayOfWeek,startTime:e.startTime,endTime:e.endTime,...t?{slots:e.slots}:{chargers:e.slots},...null!=e.chargerPostRefuelWaitTime&&{chargerPostRefuelWaitTime:e.chargerPostRefuelWaitTime}}))(e,t))}}},...(i=e,Vi.has(i.stationType)&&{parking:{capacity:e.capacity,...e.capabilities&&{capabilities:Array.isArray(e.capabilities)?e.capabilities:[e.capabilities]},...null!=e.idleConsumption&&{idleConsumption:e.idleConsumption},...null!=e.parkingSuccessLikelihood&&{parkingSuccessLikelihood:e.parkingSuccessLikelihood},...a&&{timeLimitations:a.map(Em)}}})};var i},Cm=e=>({...e.id&&{id:e.id},lat:e.lat,lng:e.lng,address:e.address,capacity:e.capacity,jobs:e.jobs,...e.timeLimitations?.length&&{timeLimitations:e.timeLimitations.map(e=>({dayOfWeek:Yi[e.dayOfWeek??e.day]??e.dayOfWeek,startTime:e.startTime,endTime:e.endTime,capacity:e.slots??e.capacity,...e.jobs&&{jobs:e.jobs}}))}}),_m=e=>{let{title:t,isUploaderVisible:n,onShowUploader:i,onHideUploader:l,sampleFile:r,exampleTitle:o,renderBackButton:s}=e;return a.createElement(Go,null,a.createElement(Uo,null,a.createElement(Zo,null,t),a.createElement(Ho,null,n?s(l):a.createElement(nc,{onClick:i})),a.createElement(go,{filename:r,title:o})))};function km(){return km=Object.assign?Object.assign.bind():function(e){for(var t=1;tnull,Tm=e=>{const{stepData:t,updateStepData:n,wizardData:i,showErrors:l,readOnly:r,highlightedStation:o,setHighlightedStation:s,fillingStationsProps:d,setFillingStationProps:c,incompleteFields:p,showUploader:u,setShowUploader:m,showMaintenanceUploader:h,setShowMaintenanceUploader:g,showError:f,setShowError:y,errorMessage:v,setErrorMessage:w,errorIssue:x,setErrorIssue:E,center:b,setCenter:C,isIceStation:_,shouldShowPublicChargingImport:k,onNewMarkerDrawn:S,hideList:A=!1,hideTopBanner:I=!1,CustomListComponent:N=null,hideDrawingControls:M=!1,showMapTopBanner:L=!1,onAddStationClick:B=null,activateDrawing:R=!1,temporaryMarker:F=null,TemporaryMarkerComponent:O=null,onLocationSearch:P=null,onPublicStationsClick:z=null}=e,{uploadStations:j,uploadMaintenanceStations:W}=(e=>{let{setShowError:t,setErrorMessage:n,setErrorIssue:a,setShowUploader:i,setShowMaintenanceUploader:l}=e;return{uploadStations:async e=>{try{a(null),i(!1);const{jsonData:t}=await Fr(e,"FILLING_STATIONS");return t.map(e=>{const t=e.station_type||Oi.CHARGING_STATION,n=wm(e.timeLimitations),a=wm(e.parkingTimeLimitations),i=wm(e.chargingTimeLimitations);return vm(e.address,n,"timeLimitations"),vm(e.address,a,"parkingTimeLimitations"),vm(e.address,i,"chargingTimeLimitations"),{id:(0,ml.A)(),slots:Number(e.slots),address:e.address,lat:Number(e.lat),lng:Number(e.lng),rate:Number(e.fill_rate),type:e.type,labels:e.labels||Fi,stationType:t,numOfHandles:e.connectors_per_charger??e.num_of_handles,powerAllocationUnit:e.power_allocation_unit,chargerPostRefuelWaitTime:e.charger_post_refuel_wait_time,capacity:e.capacity,capabilities:(Array.isArray(e.capabilities)?e.capabilities:null)||ol(e.capabilities)||(zi.includes(t)?Hi:null),idleConsumption:e.idleConsumption,timeLimitations:n,parkingTimeLimitations:a,chargingTimeLimitations:i,parkingSuccessLikelihood:e.parking_success_likelihood}})}catch(e){return 400===e?.statusCode&&a(T.t("fileUploader.fileErrorText")),n(e?.message??""),t(!0),null}},uploadMaintenanceStations:async e=>{try{a(null),l(!1);const{jsonData:t}=await Fr(e,"MAINTENANCE_STATIONS");return t.map(e=>{const t=wm(e.timeLimitations);return vm(e.address??"(unknown address)",t),{id:e.id||`maintenance-${(0,ml.A)()}`,lat:Number(e.lat),lng:Number(e.lng),address:e.address,capacity:Number(e.capacity),jobs:e.jobs,timeLimitations:t,stationType:Oi.MAINTENANCE_STATION}})}catch(e){return 400===e?.statusCode&&a(T.t("fileUploader.fileErrorText")),n(e?.message??""),t(!0),null}}}})({setShowError:y,setErrorMessage:w,setErrorIssue:E,setShowUploader:m,setShowMaintenanceUploader:g}),$=e=>async a=>{const i=await e(a);return i?(n([...t||[],...i]),null):null},V=(0,a.useCallback)(e=>s(e),[s]),G=(0,a.useCallback)(e=>n((t||[]).filter(t=>t.id!==e)),[n,t]),U=(0,a.useCallback)(()=>n([]),[n]),Z=(0,a.useCallback)(e=>{const a=(t||[]).map(t=>t.id===e.id?e:t);n(a)},[t,n]),H=(0,a.useCallback)(e=>{const a=(t||[]).map(e=>e?.address),i=e.filter(e=>!a.includes(e.address));n([...t||[],...i])},[t,n]),q=(0,a.useCallback)(()=>{m(!0),g(!1)},[m,g,e.closeOtherPanels]),K=(0,a.useCallback)(()=>{g(!0),m(!1),e.closeOtherPanels&&e.closeOtherPanels()},[g,m,e]),J=(e,t,n)=>a.createElement(vo,{error:f,uploadFileCb:n,onDismissFile:()=>{},fileLabelWidth:"fit-content",fileType:e},a.createElement(Sr,null,t)),X=(0,a.useCallback)((e,n,a)=>{((e,t,n)=>{const a=n?e.map(n):e,i=new Blob([JSON.stringify(a,null,2)],{type:"application/json"}),l=URL.createObjectURL(i),r=document.createElement("a");r.href=l,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(l)})(t.filter(e),n,a)},[t]),Y=(e,t,n)=>a.createElement(kr,{width:"fit-content"},a.createElement(br,null,e,a.createElement(Cr,null,a.createElement(Po,{onClick:()=>X(t,e,n)})))),Q=e=>a.createElement(mm,{onClick:e});return a.createElement(a.Fragment,null,a.createElement(Fl,null,l&&(!t||0===t.length)&&a.createElement(Dl,null,Sf("fillingStations.incompleteErrorText")),a.createElement(qo,null,a.createElement(_m,{title:T.t("addExperimentWizard.steps.fillingStations.uploadSection.stationsUploadTitle"),isUploaderVisible:u,onShowUploader:q,onHideUploader:()=>m(!1),sampleFile:lo,exampleTitle:T.t("addExperimentWizard.steps.fillingStations.uploadSection.downloadExample"),renderBackButton:Q}),a.createElement(_m,{title:T.t("addExperimentWizard.steps.fillingStations.uploadSection.maintenanceStationsUploadTitle"),isUploaderVisible:h,onShowUploader:K,onHideUploader:()=>g(!1),sampleFile:uo,exampleTitle:T.t("addExperimentWizard.steps.fillingStations.uploadSection.downloadExampleFile"),renderBackButton:Q})),D()&&t&&t.length>0&&a.createElement(qo,null,t.some(nl)&&Y("stations.json",nl,bm),t.some(al)&&Y("maintenance_stations.json",al,Cm)),!I&&a.createElement(wu,{fillingStationsProps:d,setFillingStationProps:c,incompleteFields:p,isIceStation:_}),a.createElement(zl,{withTopBanner:!1},!A&&a.createElement(Jo,null,u?J([".csv",".json"],T.t("fileUploader.supported.csvAndJson"),$(j)):a.createElement(Yp,{readOnly:r,stations:t,highlightedStationId:o?.id,onStationClicked:V,onRemoveStationClicked:G,onRemoveAllClicked:U,onStationChanged:Z})),A&&a.createElement(Jo,null,u?J([".csv",".json"],T.t("fileUploader.supported.csvAndJson"),$(j)):h?J([".json"],T.t("fileUploader.supported.json"),$(W)):e.showPublicImport?a.createElement(ad,{updateStepData:e.onPublicImportComplete,polygon:i?.territory.polygon,onCancel:e.onPublicImportCancel}):e.isAddingStation?a.createElement(om,{station:e.newStation,onCancel:e.onCancelNewStation,onStationChange:e.onNewStationChange,onAddStation:e.onAddStation}):t&&t.length>0?a.createElement(qu,{stations:t,onRemoveStation:e.handleRemoveStation,onRemoveAll:e.handleRemoveAll,highlightedStationId:o?.id,onStationClicked:s,onStationChanged:e.handleStationChanged}):a.createElement(Xo,null,a.createElement(Yo,null,a.createElement(Sm,{width:"72px",height:"72px"})),a.createElement(Qo,null,a.createElement(es,null,T.t("addExperimentWizard.steps.fillingStations.emptyState.noStationAdded")),a.createElement(ts,null,T.t("addExperimentWizard.steps.fillingStations.emptyState.addStationsInstruction"))))),a.createElement(jl,null,a.createElement(Ed,{width:"100%",height:"100%",withSearch:!1,drawingMode:M?void 0:"marker",drawingControl:!M,showTopBanner:L,onAddStationClick:B,activateDrawing:R,temporaryMarker:F,TemporaryMarkerComponent:O,onLocationSearch:P,stations:t,MarkerComponent:lu,polygon:i?.territory.polygon,center:b,addStation:S,chooseStation:s,chosenStation:o,withPublicStationsButton:k,onPublicStationsClick:z,uploadFileCb:$(j),updateStepData:H})))),a.createElement(wt,{submitButtonText:T.t("genericBackButtonText"),isVisible:f,onClose:()=>y(!1),title:T.t("fileUploader.genericErrorText"),onClickSubmitButton:()=>y(!1)},a.createElement(a.Fragment,null,a.createElement(On,{errorMessage:v,errorIssue:x}))))},Im=sd()(e=>{const{wizardData:t,updateStepData:n}=e,[i,l]=(0,a.useState)(null),[r,o]=(0,a.useState)(!1),[s,d]=(0,a.useState)(!1),[c,p]=(0,a.useState)(!1),[u,m]=(0,a.useState)(""),[h,g]=(0,a.useState)(null),[f,y]=(0,a.useState)(t?.territory.center),v=J(),w=t?.territory?.polygon&&t.territory.polygon.length>0,x=Xi.includes(v)&&w,E=t?.fillingStations||[],b=e=>n(e),{isAddingStation:C,isPinningMode:_,newStation:k,showPublicImport:S,onAddStationClick:A,onNewMarkerDrawn:T,onCancelNewStation:I,onNewStationChange:N,onLocationSearch:M,onAddStation:D,onPublicImportClick:L,onPublicImportCancel:B,onPublicImportComplete:R,shouldShowTypedMarker:F,temporaryMarkerWithLocation:O}=(e=>{let{stepData:t,handleUpdateStepData:n,setCenter:i,setShowUploader:l,setShowMaintenanceUploader:r,setHighlightedStation:o}=e;const[s,d]=(0,a.useState)(!1),[c,p]=(0,a.useState)(!1),[u,m]=(0,a.useState)(null),[h,g]=(0,a.useState)(!1),f=(0,a.useMemo)(()=>{const e=u?.stationType;return!!e&&(tl(e)||Qi(e)||el(e))},[u?.stationType]),y=(0,a.useMemo)(()=>u?.lat&&u?.lng?{...u,type:u.subType}:null,[u]);return{isAddingStation:s,isPinningMode:c,newStation:u,showPublicImport:h,onAddStationClick:()=>{p(!0),l(!1),r(!1),o(null)},onNewMarkerDrawn:async e=>{e.setMap(null);const t=e.getPosition().lat(),n=e.getPosition().lng(),a=await(async(e,t)=>{const n=new google.maps.Geocoder,a=new google.maps.LatLng({lat:e,lng:t}),i=await n.geocode({location:a});return i?.results[0]?.formatted_address})(t,n);m(u&&s?{...u,lat:t,lng:n,address:a}:{lat:t,lng:n,address:a}),d(!0),p(!0),o(null)},onCancelNewStation:()=>{d(!1),p(!1),m(null)},onNewStationChange:e=>{m(e)},onLocationSearch:async e=>{m(u&&s?{...u,lat:e.lat,lng:e.lng,address:e.address}:{lat:e.lat,lng:e.lng,address:e.address}),d(!0),p(!0),l(!1),r(!1),i({lat:e.lat,lng:e.lng})},onAddStation:()=>{if(!u)return;if(!u.lat||!u.lng)return;const e={id:(0,ml.A)(),lat:u.lat,lng:u.lng,address:u.address,stationType:u.stationType};Qi(u.stationType)&&(e.capacity=u.parkingCapacity||Pi[u.stationType]),tl(u.stationType)&&(e.capacity=u.maintenanceDefaultCapacity||Pi[u.stationType]),el(u.stationType)&&(e.slots=u.stationSlots||2,e.rate=u.rate,e.labels=Fi,e.type=u.subType),Qi(u.stationType)&&(e.capabilities=u.capabilities||Hi),tl(u.stationType)&&(u.jobs&&Object.keys(u.jobs).length>0&&(e.jobs=u.jobs),e.timeLimitations=[]),n([...t||[],e]);const a={stationType:u.stationType,subType:u.subType,rate:u.rate,stationSlots:u.stationSlots,parkingCapacity:u.parkingCapacity,maintenanceDefaultCapacity:u.maintenanceDefaultCapacity,jobs:u.jobs};m(a),d(!0),p(!0)},onPublicImportClick:()=>{g(!0),d(!1),p(!1),l(!1),r(!1)},onPublicImportCancel:()=>{g(!1)},onPublicImportComplete:e=>{n([...t||[],...e||[]]),g(!1)},shouldShowTypedMarker:f,temporaryMarkerWithLocation:y}})({stepData:E,handleUpdateStepData:b,setCenter:y,setShowUploader:o,setShowMaintenanceUploader:d,setHighlightedStation:l});(0,a.useEffect)(()=>{i&&y({lat:i.lat,lng:i.lng})},[i]);const P=F?lu:um;return a.createElement(Tm,km({},e,{stepData:E,updateStepData:b,highlightedStation:i,setHighlightedStation:l,showUploader:r,setShowUploader:o,showMaintenanceUploader:s,setShowMaintenanceUploader:d,showError:c,setShowError:p,errorMessage:u,setErrorMessage:m,errorIssue:h,setErrorIssue:g,center:f,setCenter:y,isIceStation:!1,shouldShowPublicChargingImport:x,onNewMarkerDrawn:T,hideList:!0,hideTopBanner:!0,hideDrawingControls:!_,showMapTopBanner:!(C||S||r||s),onAddStationClick:A,activateDrawing:_,temporaryMarker:O,TemporaryMarkerComponent:P,onLocationSearch:M,onPublicStationsClick:!x||C||S||r||s?void 0:L,closeOtherPanels:()=>{I(),B()},isAddingStation:C,showPublicImport:S,newStation:k,onCancelNewStation:I,onNewStationChange:N,onAddStation:D,onPublicImportComplete:R,onPublicImportCancel:B,handleRemoveStation:e=>{const t=E.filter(t=>t.id!==e);b(t)},handleRemoveAll:()=>{b([])},handleStationChanged:e=>{const t=E.map(t=>t.id===e.id?e:t);b(t)}}))});var Nm=n(10021),Mm=(n(10766),n(15941)),Dm=n(26801);function Lm(){return Lm=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{height:t}=e;return t||Fm},Pm="0 0 3px 3px",zm=e=>{let{classNamePrefix:t}=e;return t},jm=e=>{let{optionsColor:t}=e;return Bm[t]||Bm.black},Wm=e=>{let{themeColor:t}=e;return Bm[t]||Bm.grey},$m=e=>{let{hoverColor:t}=e;return Bm[t]||Wm},Vm=(0,o.default)(aa.Ay).withConfig({displayName:"dropdown__StyledSelect",componentId:"sc-zb3pyj-0"})([".","__control--is-focused{border-color:",";}.","__single-value{color:",";font-weight:500;}.","__option{height:",";}.","__menu-list{padding-bottom:0px;border-radius:",";padding-top:7px;}.","__menu{margin-top:-3px;border:1px solid;border-radius:",";border-color:",";box-shadow:0 0 0 0,0 4px 11px hsla(0,0%,0%,0.1);border-top:0;font-size:",";}.","__control{&:hover{border-color:",";","}min-height:",";height:",";"," font-size:",";box-shadow:none;border-color:",";","}.","__control--is-focused{border-color:",";","}.","__indicator{&:hover{color:","}color:","}.","__indicator-separator{display:none;}.","__indicators{height:",";}.","__multi-value__label{color:white;font-size:100%;}.","__multi-value{padding:calc("," / 13.333);background-color:",";color:white;}"],zm,Wm,zm,jm,zm,e=>{let{optionHeight:t}=e;return t||Fm},zm,Pm,zm,Pm,Wm,Rm,zm,$m,e=>{let{error:t,borderErrorColor:n}=e;return t&&n&&`border-color: ${y}`},Om,Om,e=>{let{width:t}=e;return t?`width: ${t};`:""},Rm,Wm,e=>{let{error:t,borderErrorColor:n}=e;return t&&n&&`border-color: ${y}`},zm,Wm,e=>{let{error:t,borderErrorColor:n}=e;return t&&n&&`border-color: ${y}`},zm,$m,jm,zm,zm,Om,zm,zm,Om,h);function Gm(){return Gm=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{classNamePrefix:t}=e;return t},Zm=(0,o.default)(e=>a.createElement(Vm,Lm({classNamePrefix:"afDD"},e,{onChange:t=>{if(e.onChange)return e.onChange(t)},onMenuOpen:t=>{if(e.onMenuOpen)return e.onMenuOpen(t)}}))).attrs({width:"49px",height:"20px"}).withConfig({displayName:"timeSelectDropDown__SelectDropDownInner",componentId:"sc-1h72asa-0"})([".","__input{padding:0;margin:0;width:0;}.","__value-container{padding:0;margin:0;width:100%;}.","__single-value{font-size:",";border-radius:0;border-bottom:1px solid #808080;width:100%;padding:0;margin:0 0 0 5px;}.","__control{vertical-align:bottom;display:flex;flex-direction:row;align-items:center;padding-bottom:2px;align-content:center;border:0;}.","__indicator{display:none;width:0;}.","__menu{margin-top:-75px;width:65px;max-height:128px;border-radius:5px;box-shadow:0px 0px 7px 3px rgba(157,165,180,0.5);}.","__option{padding-left:2px;}.","__menu-list{max-height:126px;}"],Um,Um,Um,p,Um,Um,Um,Um,Um),Hm=e=>a.createElement(Zm,Gm({classNamePrefix:"afSD"},e));Hm.defaultProps={onChange:()=>null};const qm=(0,o.default)(Nm.A).attrs({AlignContent:"center"}).withConfig({displayName:"styled__EditOptionsButtonContainer",componentId:"sc-7q8ac0-0"})(["align-items:center;justify-content:center;"]),Km=(0,o.default)(Nm.A).attrs({column:!0}).withConfig({displayName:"styled__EditableShiftContainer",componentId:"sc-7q8ac0-1"})(["background-color:rgb(255,255,255);border-radius:4px;box-shadow:0 3px 6px 0 rgba(0,0,0,0.16);padding:10px;margin:8px 10px;"]),Jm=o.default.input.withConfig({displayName:"styled__ShiftNameInput",componentId:"sc-7q8ac0-2"})(["height:30px;padding:5px;border-radius:5px;font-family:'Montserrat',sans-serif;font-size:",";background:transparent;&::placeholder{color:rgba(92,92,92,0.5);}&:focus::placeholder{color:rgba(92,92,92,0.7);}",""],c,e=>{let{error:t}=e;return t?`\n border: 1px solid ${y};\n `:`\n border: 1px solid #619CF7;\n\n :focus{\n border: 1px solid ${h};\n }\n `}),Xm=(0,o.default)(Nm.A).attrs({column:!0}).withConfig({displayName:"styled__ShiftName",componentId:"sc-7q8ac0-3"})([""]),Ym=(0,o.default)(Nm.A).withConfig({displayName:"styled__ShiftValues",componentId:"sc-7q8ac0-4"})(["font-weight:500;padding:5px 0;justify-content:space-around;gap:10px;"]),Qm=(0,o.default)("div").withConfig({displayName:"styled__ShiftLineContainer",componentId:"sc-7q8ac0-5"})(["display:flex;gap:2px;flex-direction:column;padding:0 0 10px 0;"]),eh=o.default.div.withConfig({displayName:"styled__ShiftInputLabel",componentId:"sc-7q8ac0-6"})(["font-size:",";font-weight:500;"],c),th=o.default.div.withConfig({displayName:"styled__ErrorMsg",componentId:"sc-7q8ac0-7"})(["color:",";font-size:",";display:inline-block;height:13px;"],y,s),nh=((0,o.default)(Nm.A).withConfig({displayName:"styled__ShiftTimeNextDay",componentId:"sc-7q8ac0-8"})(["color:#7D7D7D;font-size:8px;text-transform:uppercase;"]),(0,o.default)(e=>a.createElement(fe,(0,Pn.omit)(e,["redButtons"]))).withConfig({displayName:"styled__StyledButton",componentId:"sc-7q8ac0-9"})(["font-weight:500;font-size:.95625rem;"])),ah=(0,o.default)(Dm.D0).withConfig({displayName:"styled__LatLngField",componentId:"sc-7q8ac0-10"})(["width:70px;"]),ih=o.default.div.withConfig({displayName:"styled__CancelButton",componentId:"sc-7q8ac0-11"})(["font-family:Montserrat;font-size:",";font-weight:300;color:#464646;width:57px;cursor:pointer;"],p),lh=(0,o.default)(nh).withConfig({displayName:"styled__SaveButton",componentId:"sc-7q8ac0-12"})(["flex:1;height:28px;border-radius:4px;background-color:",";padding:0 10px;font-family:Montserrat;font-size:",";color:#ffffff;&:disabled{opacity:0.3;color:rgba(51,51,51,0.7);}"],e=>{let{redButtons:t}=e;return t?`${y}`:"#23a0fe"},p),rh=(0,o.default)(Nm.A).attrs({hAlignContent:"center"}).withConfig({displayName:"styled__SaveButtonContainer",componentId:"sc-7q8ac0-13"})(["margin-left:5px;"]),oh=(0,o.default)(Nm.A).attrs({hAlignContent:"center"}).withConfig({displayName:"styled__CancelButtonContainer",componentId:"sc-7q8ac0-14"})([""]),sh=o.default.div.withConfig({displayName:"styled__ShiftContainer",componentId:"sc-nc2uqu-0"})(["min-width:125px;"]),dh=(0,o.default)(Nm.A).attrs({column:!0}).withConfig({displayName:"styled__ShiftFlexContainer",componentId:"sc-nc2uqu-1"})(["background-color:rgb(255,255,255);border-radius:4px;box-shadow:rgba(157,165,180,0.42) 0px 1px 3px 0px;padding:10px;margin:8px 10px;#OptionsButton{opacity:0;}:hover{box-shadow:0px 2px 5px 0 rgba(157,165,180,0.5);#OptionsButton{opacity:1;}}"]),ch=(0,o.default)(Nm.A).attrs({vAlignContent:"top"}).withConfig({displayName:"styled__OptionsButtonContainer",componentId:"sc-nc2uqu-2"})(["margin-left:auto;height:14px;"]),ph=(0,o.default)(Nm.A).attrs({vAlignContent:"top"}).withConfig({displayName:"styled__ShiftHeader",componentId:"sc-nc2uqu-3"})(["padding-bottom:5px;"]),uh=(0,o.default)(Nm.A).withConfig({displayName:"styled__ShiftTimeNextDay",componentId:"sc-nc2uqu-4"})(["color:#7D7D7D;font-size:10px;text-transform:uppercase;"]),mh=(0,o.default)(Nm.A).withConfig({displayName:"styled__ShiftName",componentId:"sc-nc2uqu-5"})(["font-size:",";font-weight:500;max-width:90%"],c),hh=(0,o.default)(Nm.A).withConfig({displayName:"styled__ShiftTime",componentId:"sc-nc2uqu-6"})(["font-size:",";"],c),gh=(0,o.default)(Nm.A).attrs({column:!0}).withConfig({displayName:"styled__ShiftCardLatLngContainer",componentId:"sc-nc2uqu-7"})(["margin:10px 0;"]),fh=o.default.span.withConfig({displayName:"styled__ShiftCardLatLngTitle",componentId:"sc-nc2uqu-8"})(["font-weight:500;font-size:",";margin-right:5px;"],d),yh=o.default.span.withConfig({displayName:"styled__ShiftCardLatLngContentNumber",componentId:"sc-nc2uqu-9"})(["font-size:",";"],d),vh=(0,o.default)(yh).withConfig({displayName:"styled__ShiftCardLatLngContent",componentId:"sc-nc2uqu-10"})(["color:#7D7D7D;"]),wh=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=[];let n,a,i=0;for(let a=0;i<1440;a+=1){const l=i%60,r=`${`0${Math.floor(i/60)}`.slice(-2)}:${`0${l}`.slice(-2)}`;r===e&&(n=a),i+=30,t[a]={value:r,label:r}}return a=e?[...t,...t].slice(n+1,t.length+n+1):t,a},xh=e=>{let{onClose:t,values:n,errors:i,setFieldValue:l,displayLoader:r,handleSubmit:o}=e;const[s,d]=(0,a.useState)([]);(0,a.useEffect)(()=>{(async()=>{const e=n.start&&wh(n.start)||[];if(d(e),!n.end){const t=e[0].value;l("end",t)}})()},[]);const c=n.start&&n.end&&`${n.start.split(":")[0]}.${n.start.split(":")[1]}`-`${n.end.split(":")[0]}.${n.end.split(":")[1]}`>=0,p=wh();return a.createElement(Dm.lV,{name:"newShiftForm",style:{height:"100%"},onKeyDown:e=>{"Enter"===e.key&&(o(),e.preventDefault())}},a.createElement(Km,null,a.createElement(Qm,null,a.createElement(eh,null,T.t("addExperimentWizard.steps.shifts.name")),a.createElement(Xm,null,a.createElement(Dm.D0,{id:"shiftName",name:"name",component:Jm,maxlength:"56",type:"text",value:n.name,error:i.name,placeholder:T.t("addExperimentWizard.steps.shifts.name"),onChange:e=>{const t=e.currentTarget.value;l("name",t),e.preventDefault()}}),a.createElement(th,null,i.name))),a.createElement(Qm,null,a.createElement(eh,null,T.t("addExperimentWizard.steps.shifts.time")),a.createElement(Ym,null,a.createElement(Nm.A,null,a.createElement(Dm.D0,{id:"shiftStartTime",name:"start",value:{value:n.start,label:n.start||""},component:Hm,onChange:e=>{let{value:t}=e;setTimeout(()=>{const e=wh(t);d(e),l("end",e[0].value)}),l("start",t)},options:p})),a.createElement(Nm.A,null,"-"),a.createElement(Nm.A,null,a.createElement(Dm.D0,{id:"shiftEndTime",name:"end",value:{value:n.end,label:n.end||""},component:Hm,placeholder:"",onChange:e=>{let{value:t}=e;l("end",t)},options:s})),c&&a.createElement(uh,null,"+1"))),a.createElement(Qm,null,a.createElement(eh,null,T.t("addExperimentWizard.steps.shifts.initialLocation.title")),a.createElement(Ym,null,a.createElement(ah,{id:"shiftLocationLat",name:"location",component:Jm,type:"text",value:n.initialLocations&&n.initialLocations[0]&&n.initialLocations[0].lat,error:i.location,placeholder:T.t("addExperimentWizard.steps.shifts.initialLocation.lat"),onChange:e=>{const t=e.currentTarget.value;""!==t&&Number.isNaN(parseFloat(t))||l('initialLocations[0]["lat"]',""===t?"":parseFloat(t))}}),a.createElement(ah,{id:"shiftLocationLon",name:"location",component:Jm,type:"text",value:n.initialLocations&&n.initialLocations[0]&&n.initialLocations[0].lng,error:i.location,placeholder:T.t("addExperimentWizard.steps.shifts.initialLocation.lng"),onChange:e=>{const t=e.currentTarget.value;""!==t&&Number.isNaN(parseFloat(t))||l('initialLocations[0]["lng"]',""===t?"":parseFloat(t))}}))),a.createElement(qm,null,a.createElement(oh,null,a.createElement(Nm.A,null,a.createElement(ih,{onClick:t,disabled:r},T.t("addExperimentWizard.steps.shifts.cancel")))),a.createElement(rh,null,a.createElement(Nm.A,null,a.createElement(lh,{id:"saveShift",backgroundColor:h,type:"submit",title:r?"...":T.t("addExperimentWizard.steps.shifts.save"),disabled:r}))))))};function Eh(){return Eh=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{onBackAction:t,shiftData:n,day:i,shifts:l,handleAddShift:r,handleEditShift:o,handleCheckIsShiftValid:s,handleRemoveShift:d}=e;const[c,p]=(0,a.useState)(null),[u,m]=(0,a.useState)(!1),h=!(n&&n.id);return(0,a.useEffect)(()=>{(async()=>{p(h?{day:i,start:"07:00"}:{...n})})()},[]),a.createElement(a.Fragment,null,c&&a.createElement(Dm.l1,{validateOnBlur:!1,validateOnChange:!1,initialValues:{...c},validationSchema:Mm.Ik().shape({name:Mm.Yj().max(56,bh).required(_h).test("unique",Ch,e=>s(e,n?.id)),start:Mm.Yj().required(),end:Mm.Yj().required()}),onSubmit:async(e,n)=>{let a;n.setSubmitting(!0),m(!0),a=h?await(e=>{r({...e,id:(0,ml.A)()})})(e):await(async e=>{o({label:e.name,value:e})})(e),n.setSubmitting(!1),m(!1),a?setPopupError({message:a}):t()}},e=>a.createElement(xh,Eh({},e,{onClose:()=>t(),displayLoader:u}))))});kh.defaultProps={shiftData:null};class Sh extends a.Component{constructor(){super(),this.buttonData=[{title:T.t("addExperimentWizard.steps.shifts.buttonMenu.edit"),icon:"edit",onClick:()=>this.props.onEdit(),testId:"editOption"},{title:T.t("addExperimentWizard.steps.shifts.buttonMenu.delete"),icon:"delete",onClick:()=>this.props.onDelete(),testId:"deleteOption"}],this.handleClick=e=>{this.setState({anchorEl:e.currentTarget})},this.handleClose=()=>{this.setState({anchorEl:null})},this.state={anchorEl:null}}render(){return a.createElement(Un,null,a.createElement(Zn,{id:"OptionsButton","aria-controls":"simple-menu","aria-haspopup":"true",onClick:this.handleClick},a.createElement(fn,{dropDownData:this.buttonData})))}}Sh.defaultProps={onEdit:()=>{},onDelete:()=>{}};const Ah=Sh,Th=(T.t("management.shifts.error.unableToSubmitDataErrorMsg"),e=>{let{shift:t,handleAddShift:n,handleEditShift:i,handleCheckIsShiftValid:l,handleRemoveShift:r}=e;const[o,s]=(0,a.useState)(null),[d,c]=(0,a.useState)(null),[p,u]=(0,a.useState)(null),[m,h]=(0,a.useState)(!1),g=t.start&&t.end&&`${t.start.split(":")[0]}.${t.start.split(":")[1]}`-`${t.end.split(":")[0]}.${t.end.split(":")[1]}`>=0;return m?a.createElement(kh,{shifts:[t],handleCheckIsShiftValid:l,handleAddShift:n,handleEditShift:i,handleRemoveShift:r,day:t.day,shiftData:t,onBackAction:()=>{h(!1)}}):a.createElement(sh,null,a.createElement(dh,null,a.createElement(ph,null,a.createElement(mh,null,t.name),a.createElement(ch,null,a.createElement(Ah,{onEdit:()=>h(!0),onDelete:()=>r(t)}))),a.createElement(hh,null,a.createElement(fh,null,T.t("addExperimentWizard.steps.shifts.time"),":"),a.createElement(Nm.A,null,t.start),a.createElement(Nm.A,null,"-"),a.createElement(Nm.A,null,t.end),g&&a.createElement(uh,null,"+1")),t.initialLocations&&t.initialLocations.length>0&&a.createElement(gh,null,a.createElement(fh,null,T.t("addExperimentWizard.steps.shifts.location"),": "),a.createElement("span",null,a.createElement(yh,null,t.initialLocations[0].lat)," ",a.createElement(vh,null,"(lat)")),a.createElement("span",null,a.createElement(yh,null,t.initialLocations[0].lng)," ",a.createElement(vh,null,"(lng)")))))}),Ih=o.default.div.withConfig({displayName:"styled__DayContainer",componentId:"sc-a41k94-0"})(["min-width:150px;min-height:400px;width:calc(100% / 7);",";"],e=>{let{day:t}=e;return t?`#AddShiftLinkMask${t} {\n display: none;\n }\n :hover {\n #AddShiftLinkMask${t} {\n display: unset;\n }\n }\n `:""}),Nh=(0,o.default)(Nm.A).attrs({column:!0}).withConfig({displayName:"styled__DayFlexContainer",componentId:"sc-a41k94-1"})([""]),Mh=(0,o.default)(Nm.A).attrs({vAlignContent:"bottom"}).withConfig({displayName:"styled__DayHeader",componentId:"sc-a41k94-2"})(["padding:10px 15px;border-bottom:1px #DCDCDC solid;"]),Dh=(0,o.default)(Nm.A).withConfig({displayName:"styled__DayTitle",componentId:"sc-a41k94-3"})(["font-weight:500;font-size:",";color:#5c5c5c;"],p),Lh=(0,o.default)(Nm.A).attrs({marginLeft:"auto"}).withConfig({displayName:"styled__DayCount",componentId:"sc-a41k94-4"})(["font-weight:300;font-size:10px;"]),Bh=(0,o.default)(Nm.A).attrs({hAlignContent:"center",vAlignContent:"top"}).withConfig({displayName:"styled__AddShiftLink",componentId:"sc-a41k94-5"})(["font-weight:500;font-size:",";color:#619CF7;cursor:pointer;padding:10px;margin:8px 10px;:hover{color:",";}"],p,h),Rh=o.default.div.withConfig({displayName:"styled__ContentWrapper",componentId:"sc-a41k94-6"})(["display:flex;flex:1;min-height:0px;"]),Fh=o.default.div.withConfig({displayName:"styled__OverflowContainer",componentId:"sc-a41k94-7"})(["flex:1;overflow:visible"]),Oh=o.default.div.withConfig({displayName:"styled__NewShiftContainer",componentId:"sc-a41k94-8"})([""]),Ph=(0,o.default)(Nm.A).attrs({column:!0}).withConfig({displayName:"styled__ShiftsListContainer",componentId:"sc-a41k94-9"})([""]),zh=e=>{let{day:t,dayKey:n,updateStepData:i,shifts:l,handleEditShift:r,handleCheckIsShiftValid:o,handleRemoveShift:s}=e;const[d,c]=(0,a.useState)(!1);return a.createElement(Ih,{"data-test-id":`shift${t}`,day:t},a.createElement(Nh,null,a.createElement(Mh,null,a.createElement(Dh,null,T.t(`general.days.${t}`)),a.createElement(Lh,null)),a.createElement(Rh,null,a.createElement(Fh,null,a.createElement(Ph,null,l?.map(e=>a.createElement(Th,{key:`${t}_shift${e.id}`,shift:e,handleAddShift:i,handleRemoveShift:s,handleEditShift:r,handleCheckIsShiftValid:o})),a.createElement(Oh,null,d?a.createElement(kh,{shifts:l,handleAddShift:i,handleRemoveShift:s,handleEditShift:r,handleCheckIsShiftValid:o,day:n,onBackAction:()=>{c(!1)}}):a.createElement("div",{id:`AddShiftLinkMask${t}`},a.createElement(Bh,{onClick:()=>{c(!0)}},T.t("addExperimentWizard.steps.shifts.addShift")))))))))},jh=(0,o.default)(Nm.A).withConfig({displayName:"styled__ShiftsTableContainer",componentId:"sc-a3eu5s-0"})(["height:100%;"]),Wh=o.default.div.withConfig({displayName:"styled__Root",componentId:"sc-a3eu5s-1"})(["display:flex;flex-direction:column;max-width:calc(100vw - 110px);overflow:visible;"]),$h=()=>null,Vh=[{name:"monday",key:1,order:0},{name:"tuesday",key:2,order:1},{name:"wednesday",key:3,order:2},{name:"thursday",key:4,order:3},{name:"friday",key:5,order:4},{name:"saturday",key:6,order:5},{name:"sunday",key:7,order:6}],Gh=e=>{let{stepData:t,updateStepData:n,showErrors:i,...l}=e;return a.createElement(Fl,null,a.createElement(Wh,null,a.createElement(jh,null,Vh.sort((e,t)=>e.order-t.order).map(e=>a.createElement(zh,{shifts:t?.filter(t=>t.day===e.key),updateStepData:e=>n([...t||[],e]),handleEditShift:e=>n(t.map(t=>t.id===e.value.id?e.value:t)),handleCheckIsShiftValid:(e,n)=>!t?.some(t=>t.name===e&&t.id!==n),handleRemoveShift:e=>n(t.filter(t=>t.id!==e.id)),key:e.key,day:e.name,dayKey:e.key})))))};n(85138);var Uh=n(99571),Zh=function(e){return a.createElement("svg",e,a.createElement("g",{transform:"translate(-573 -625.5)"},a.createElement("circle",{cx:"13",cy:"13",r:"13",fill:"#fff",transform:"translate(573 625.5)"}),a.createElement("path",{fill:"none",stroke:"#1482fd",strokeWidth:"2",d:"m580.5 638 4 4 7-8"})))};Zh.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"26",height:"26"};const Hh={toast:{backgroundColor:"#1482fd",color:"#ffffff",borderRadius:"10px",fontFamily:"Montserrat",fontSize:"14px",fontWeight:600}},qh=o.default.div.withConfig({displayName:"Toast__Container",componentId:"sc-llp6e0-0"})(["display:flex;align-items:center;"]),Kh=(0,o.default)(Zh).withConfig({displayName:"Toast__Icon",componentId:"sc-llp6e0-1"})(["margin-right:5px;transform:scale(.9);"]),Jh=()=>a.createElement(Uh.N9,{position:"bottom-center",autoClose:5e4,hideProgressBar:!0,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,transition:Uh.q7}),Xh=e=>{let{setIsNavigationDisabled:t=()=>null,showErrors:n,dataFile:i,dataUrl:l,updateData:r,initialData:o,exampleFileName:s,supportedFileType:d,incompleteErrorText:c,uploadFolder:p,shouldSaveDataAsJson:u,shouldShowFileSection:m=!0,hideDropZone:h=!1,isOptional:g=!1}=e;const[f,y]=(0,a.useState)(""),[v,w]=(0,a.useState)(!1),[x,E]=(0,a.useState)(null);return a.createElement(a.Fragment,null,a.createElement(Fl,null,n&&!l&&!g&&a.createElement(Dl,null,c),a.createElement(Es,null,a.createElement(go,{filename:s})),a.createElement(bs,null,a.createElement(vo,{currentFile:i,setIsNavigationDisabled:t,error:v,hideDropZone:h,uploadFileCb:async e=>{P.trackEvent("trying to upload file",{fileType:p,fileSize:e.size});try{E(null),P.trackEvent("file upload - successful",{fileType:p});const t=new FileReader;let n={};t.addEventListener("load",t=>{try{if(u){const a=JSON.parse(t.target.result);return n={file:e,data:a},r(n)}{const a=t.target.result.split("\n").length;return n={numberOfRowsInFile:a,file:e,rawData:t?.target?.result},r(n)}}catch{w(!0)}}),t.addEventListener("error",()=>{w(!0)}),await t.readAsText(e);const i=await Fr(e,p);r({...n,url:i.url,file:{...e,id:i.id,metrics:i.metrics}}),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>null;Uh.oR.info((e=>()=>a.createElement(qh,null,a.createElement(Kh,null),e))(e),{position:"bottom-center",icon:!1,autoClose:3e3,closeOnClick:!0,draggable:!0,progress:void 0,style:Hh.toast,onClose:e=>t()})}(T.t("fileUploader.successMessage"))}catch(e){return P.trackEvent("file upload - failed",{fileType:p}),400===e.statusCode&&E(T.t("fileUploader.fileErrorText")),y(e.message),w(!0),e}},onDismissFile:()=>r(o),fileLabelWidth:"fit-content",fileType:d,shouldShowFileSection:m},a.createElement(Sr,null,T.t(`fileUploader.supported${d}`))))),a.createElement(Jh,null),a.createElement(wt,{submitButtonText:T.t("genericBackButtonText"),isVisible:v,onClose:()=>w(!1),title:T.t("fileUploader.genericErrorText"),onClickSubmitButton:()=>w(!1)},x&&a.createElement(On,{errorMessage:f,errorIssue:x})))};var Yh=n(69733),Qh=n(82960),eg=n(2382),tg=n.n(eg),ng=n(78078),ag=n(91544),ig=n(73015),lg=n(13370),rg=n(80320),og=n.n(rg);const sg=(0,Qh.combineReducers)({keplerGl:tg()}),dg={visState:{layers:[{id:"pdijfd",type:"heatmap",config:{dataId:"dvoizqq76",label:"pickup",color:[255,203,153],highlightColor:[252,242,26,255],columns:{lat:"pickup_lat",lng:"pickup_lng"},isVisible:!0,visConfig:{opacity:.8,colorRange:{name:"Global Warming",type:"sequential",category:"Uber",colors:["#5A1846","#900C3F","#C70039","#E3611C","#F1920E","#FFC300"]},radius:10},hidden:!1,textLabel:[{field:null,color:[255,255,255],size:18,offset:[0,0],anchor:"start",alignment:"center"}]},visualChannels:{weightField:null,weightScale:"linear"}},{id:"3fb9qps",type:"point",config:{dataId:"dvoizqq76",label:"dropoff",color:[255,153,31],highlightColor:[252,242,26,255],columns:{lat:"dropoff_lat",lng:"dropoff_lng",altitude:null},isVisible:!1,visConfig:{radius:10,fixedRadius:!1,opacity:.8,outline:!1,thickness:2,strokeColor:null,colorRange:{name:"Global Warming",type:"sequential",category:"Uber",colors:["#5A1846","#900C3F","#C70039","#E3611C","#F1920E","#FFC300"]},strokeColorRange:{name:"Global Warming",type:"sequential",category:"Uber",colors:["#5A1846","#900C3F","#C70039","#E3611C","#F1920E","#FFC300"]},radiusRange:[0,50],filled:!0},hidden:!1,textLabel:[{field:null,color:[255,255,255],size:18,offset:[0,0],anchor:"start",alignment:"center"}]},visualChannels:{colorField:{name:"pickup_wait_time",type:"integer"},colorScale:"quantile",strokeColorField:null,strokeColorScale:"quantile",sizeField:null,sizeScale:"linear"}},{id:"lltle2",type:"arc",config:{dataId:"dvoizqq76",label:"pickup -> dropoff arc",color:[146,38,198],highlightColor:[252,242,26,255],columns:{lat0:"pickup_lat",lng0:"pickup_lng",lat1:"dropoff_lat",lng1:"dropoff_lng"},isVisible:!1,visConfig:{opacity:.8,thickness:2,colorRange:{name:"Global Warming",type:"sequential",category:"Uber",colors:["#5A1846","#900C3F","#C70039","#E3611C","#F1920E","#FFC300"]},sizeRange:[0,10],targetColor:null},hidden:!1,textLabel:[{field:null,color:[255,255,255],size:18,offset:[0,0],anchor:"start",alignment:"center"}]},visualChannels:{colorField:null,colorScale:"quantile",sizeField:null,sizeScale:"linear"}},{id:"tfxp82",type:"line",config:{dataId:"dvoizqq76",label:"pickup -> dropoff line",color:[248,149,112],highlightColor:[252,242,26,255],columns:{lat0:"pickup_lat",lng0:"pickup_lng",alt0:null,lat1:"dropoff_lat",lng1:"dropoff_lng",alt1:null},isVisible:!1,visConfig:{opacity:.8,thickness:2,colorRange:{name:"Global Warming",type:"sequential",category:"Uber",colors:["#5A1846","#900C3F","#C70039","#E3611C","#F1920E","#FFC300"]},sizeRange:[0,10],targetColor:null,elevationScale:1},hidden:!1,textLabel:[{field:null,color:[255,255,255],size:18,offset:[0,0],anchor:"start",alignment:"center"}]},visualChannels:{colorField:null,colorScale:"quantile",sizeField:null,sizeScale:"linear"}}],layerBlending:"normal",splitMaps:[],animationConfig:{currentTime:null,speed:1}},mapStyle:{styleType:"light",topLayerGroups:{},visibleLayerGroups:{},threeDBuildingColor:[3.7245996603793508,6.518049405663864,13.036098811327728],mapStyles:{}}},cg=(0,Qh.legacy_createStore)(sg,{},(0,Qh.applyMiddleware)(lg.taskMiddleware)),pg=(0,Yh.Ng)(()=>({}),()=>({}))(e=>{let{datasets:t,height:n,width:i}=e;return(0,a.useEffect)(()=>{(async e=>{const t=e.filter(e=>e).map(e=>({...e,data:{...ng.default.processCsvData(e.data),allData:ng.default.processCsvData(e.data).rows},version:"v1"})),n=ig.default.load(t,{version:"v1",config:dg}),a=(0,ag.addDataToMap)(n);cg.dispatch(a)})(t)},[t]),a.createElement(og(),{id:"Main",store:cg,height:n,width:i,mapboxApiAccessToken:"pk.eyJ1IjoiZG9yc2hheSIsImEiOiJjam55cXY2emEyZXJuM3JwcnBxMDMzZ2M5In0.DT4S5POHNzC431RlPWEGxg"})}),ug=e=>a.createElement(Yh.Kq,{store:cg},a.createElement(pg,e)),mg=o.default.div.withConfig({displayName:"styled__DemandFileDropDownContainer",componentId:"sc-locdo3-0"})(["width:50%;"]),hg=o.default.div.withConfig({displayName:"styled__DemandContainer",componentId:"sc-locdo3-1"})(["height:50%;minHeight:600px;"]),gg=o.default.div.withConfig({displayName:"styled__DemandPredictionContainer",componentId:"sc-locdo3-2"})(["height:50%;"]),fg=o.default.div.withConfig({displayName:"styled__DemandPredictionInnerContainer",componentId:"sc-locdo3-3"})(["display:flex;gap:1em;align-items:center;"]),yg="list",vg=["e440173c-ee30-470d-b944-1012165dfe64","ec8655a4-b37b-4015-8de1-dfa88556a7ac"],wg=()=>({url:null,file:null}),xg=e=>{let{stepData:t,updateStepData:n,showErrors:i,setIsNavigationDisabled:l}=e;const r={label:"None",value:null},[o,s]=(0,a.useState)([r]),[d,c]=(0,a.useState)({data:null}),[p,u]=(0,a.useState)([]),[m,h]=(0,a.useState)(!1),[g,f]=(0,a.useState)(Boolean(t.demandPredictionFileUrl));(0,a.useEffect)(()=>{(async()=>{const e=(await(async()=>{const{data:e}=await te.get("/api/v1/demand-data",{params:{fleetId:J()}});return e})()).map(e=>({label:e.replace(/^.*[\\/]/,"").replace(/\.[^/.]+$/,""),value:e}));e.unshift(r),s(e)})()},[]),(0,a.useEffect)(()=>{t.url&&(async()=>{h(!0);const e=await ae(t.url);c({data:e}),h(!1)})()},[t.url]),(0,a.useEffect)(()=>{t.rawData&&c({data:t.rawData})},[t.rawData]),(0,a.useEffect)(()=>{d.data&&(async e=>{e&&!e.error&&u([{info:{label:"Demand Data",id:"demand_data"},venison:"v1",data:e}])})(d.data)},[d.data]);const y=Boolean(t.url||t.rawData);return a.createElement(a.Fragment,null,a.createElement(hg,null,y&&!m?a.createElement(ug,{datasets:p,height:500,width:1e3}):null,a.createElement(Xh,{setIsNavigationDisabled:l,showErrors:i,dataFile:t.source===yg?null:t.file,dataUrl:t.source===yg?null:t.url,updateData:e=>{let{file:a,url:i}=e;n({...t,file:a,url:i,source:"upload"})},shouldShowFileSection:t.source!==yg,initialData:{url:null,file:null},exampleFileName:no,supportedFileType:".csv",incompleteErrorText:Sf("demandData.incompleteErrorText"),uploadFolder:wl,hideDropZone:y})),a.createElement(gg,null,a.createElement(fg,null,a.createElement("h4",null,T.t("addExperimentWizard.steps.demandData.demandPrediction.title")),a.createElement(Hs.l,{size:"large",value:g,onChange:()=>{g&&n({...t,predictionFile:null,demandPredictionFileUrl:null}),f(!g)}})),a.createElement(Ua,null,T.t("addExperimentWizard.steps.demandData.demandPrediction.description")),g&&a.createElement(Xh,{setIsNavigationDisabled:l,showErrors:i,dataFile:t.predictionFile,dataUrl:t.demandPredictionFileUrl,updateData:e=>{let{file:a,url:i}=e;n({...t,predictionFile:a,demandPredictionFileUrl:i})},initialData:{url:null,file:null},exampleFileName:co,supportedFileType:".csv",incompleteErrorText:Sf("demandData.incompleteErrorText"),uploadFolder:El,hideDropZone:t.demandPredictionFileUrl})),!vg.includes(J())&&a.createElement(mg,null,a.createElement(Wo,null,T.t("addExperimentWizard.steps.demandData.chooseFileFromListHeader")),a.createElement(sa,{placeholder:T.t("addExperimentWizard.steps.demandData.chooseFileFromListPlaceholder"),options:o,menuHeight:400,menuPlacement:"top",value:"None"!==o.find(e=>e.value===t.url)?.label?o.find(e=>e.value===t.url):null,handleChange:e=>n({url:e,source:yg})})))},Eg=o.default.div.withConfig({displayName:"styled__TasksContainer",componentId:"sc-y2y02j-0"})(["height:50%;minHeight:600px;"]),bg=()=>({url:null,file:null}),Cg=e=>(e?.fillingStations||[]).some(e=>el(e.stationType)||Qi(e.stationType))&&!!e?.demandData?.url,_g=e=>{let{stepData:t,updateStepData:n,showErrors:i,setIsNavigationDisabled:l,wizardData:r}=e;return a.createElement(Eg,null,a.createElement(Xh,{setIsNavigationDisabled:l,showErrors:i,dataFile:t.file,dataUrl:t.url,updateData:e=>{let{file:a,url:i}=e;n({...t,file:a,url:i})},initialData:{url:null,file:null},exampleFileName:po,supportedFileType:".csv",incompleteErrorText:Sf("tasks.incompleteErrorText"),uploadFolder:bl,isOptional:Cg(r)}))},kg=o.default.div.withConfig({displayName:"styled__StyledStepBox",componentId:"sc-1eiuwu5-0"})(["border:1px solid rgba(125,139,172,0.32);border-radius:4px;padding:24px;display:flex;flex-direction:column;width:95%;box-shadow:0px 2px 4px 0px rgba(0,0,0,0.08);margin-bottom:32px;gap:16px;"]),Sg=o.default.div.withConfig({displayName:"styled__StepBoxHeaderRow",componentId:"sc-1eiuwu5-1"})(["display:flex;justify-content:space-between;align-items:center;"]),Ag=o.default.div.withConfig({displayName:"styled__StepBoxTextContainer",componentId:"sc-1eiuwu5-2"})(["display:flex;flex-direction:column;"]),Tg=o.default.div.withConfig({displayName:"styled__StepBoxTextHeaderContainer",componentId:"sc-1eiuwu5-3"})(["display:flex;align-items:center;gap:8px;align-self:stretch;"]),Ig=o.default.div.withConfig({displayName:"styled__StepBoxTextSubTextContainer",componentId:"sc-1eiuwu5-4"})(["overflow:hidden;color:#666975;text-overflow:ellipsis;font-size:14px;font-style:normal;font-weight:500;line-height:20px;"]),Ng=o.default.span.withConfig({displayName:"styled__StepBoxTitle",componentId:"sc-1eiuwu5-5"})(["font-size:14px;font-style:normal;font-weight:700;line-height:20px;overflow:hidden;color:#212229;text-overflow:ellipsis;"]),Mg=o.default.div.withConfig({displayName:"styled__StepBoxSubtitleContainer",componentId:"sc-1eiuwu5-6"})(["display:flex;align-items:center;gap:8px;"]),Dg=o.default.span.withConfig({displayName:"styled__StepBoxSubtitle",componentId:"sc-1eiuwu5-7"})(["overflow:hidden;color:#212229;text-overflow:ellipsis;font-size:14px;font-style:normal;font-weight:400;line-height:20px;"]),Lg=o.default.div.withConfig({displayName:"styled__StepBoxContent",componentId:"sc-1eiuwu5-8"})(["display:flex;align-items:flex-start;align-content:flex-start;gap:8px 8px;align-self:stretch;flex-wrap:wrap;"]),Bg=o.default.button.withConfig({displayName:"styled__GoToSectionButton",componentId:"sc-1eiuwu5-9"})(["display:flex;height:24px;padding:0px 4px;justify-content:center;align-items:center;border-radius:4px;border:1px solid rgba(125,139,172,0.32);background-color:white;&:hover{cursor:pointer;background-color:rgba(17,164,255,0.1);}"]);var Rg=function(e){return a.createElement("svg",e,a.createElement("circle",{cx:"2",cy:"2",r:"2",fill:"#7D8BAC"}))};Rg.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"4",height:"4",fill:"none"};const Fg=e=>a.createElement(kg,null,a.createElement(Sg,null,a.createElement(Ag,null,a.createElement(Tg,null,a.createElement(Ng,null,e.title),e.subtitle?.length&&e.subtitle.map((t,n)=>a.createElement(Mg,{key:`${e.title}-${t}`},a.createElement(Rg,null),a.createElement(Dg,e.testIds?{"data-test-id":e.testIds[n]}:null,a.createElement("div",null,(e=>{const t=e.split(/(\d+)/g);return a.createElement(a.Fragment,null,t.map(e=>/\d+/.test(e)?a.createElement("b",null,e):e))})(t)))),e.testIds)),a.createElement(Ig,null,e.subText)),a.createElement(Bg,{onClick:e.goToSection,"data-test-id":`goToSectionBtn.${e.title}`},uf("goToSection"))),a.createElement(Lg,{style:{minHeight:e.contentMinHeight}},e.isLoading?a.createElement(Vr,null):e.children)),Og=o.default.div.withConfig({displayName:"styled__Box",componentId:"sc-8l30z9-0"})(["display:flex;padding:12px 32px 12px 12px;justify-content:center;align-items:center;gap:16px;border-radius:8px;background:#F4F5F8;width:fit-content;"]),Pg=o.default.div.withConfig({displayName:"styled__BoxTextContainer",componentId:"sc-8l30z9-1"})(["display:flex;min-width:38px;padding:12px 16px;flex-direction:column;align-items:flex-start;gap:2px;"]),zg=o.default.span.withConfig({displayName:"styled__BoxTitle",componentId:"sc-8l30z9-2"})(["overflow:hidden;color:#212229;text-overflow:ellipsis;font-size:12px;font-style:normal;font-weight:700;line-height:16px;"]),jg=o.default.span.withConfig({displayName:"styled__BoxContent",componentId:"sc-8l30z9-3"})(["overflow:hidden;color:#212229;text-overflow:ellipsis;font-size:14px;font-style:normal;font-weight:500;line-height:20px;display:flex;align-items:flex-start;gap:8px;"]),Wg=o.default.div.withConfig({displayName:"styled__Chip",componentId:"sc-8l30z9-4"})(["display:flex;height:24px;padding:0px 2px;justify-content:center;align-items:center;gap:0px;border-radius:4px;background:rgba(17,164,255,0.10);"]),$g=e=>a.createElement(Og,null,e.icon&&e.icon,a.createElement(Pg,null,a.createElement(zg,{"data-test-id":`${e.testId}-title`},e.title),a.createElement(jg,{"data-test-id":`${e.testId}-content`},e.content))),Vg=e=>uf(`details.${e}`),Gg=e=>uf(`territory.${e}`),Ug=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];var Zg=function(e){return a.createElement("svg",e,a.createElement("path",{d:"M0 12.8c0-4.48 0-6.72.872-8.432A8 8 0 0 1 4.368.872C6.08 0 8.32 0 12.8 0h6.4c4.48 0 6.72 0 8.432.872a8 8 0 0 1 3.496 3.496C32 6.08 32 8.32 32 12.8v6.4c0 4.48 0 6.72-.872 8.432a8 8 0 0 1-3.496 3.496C25.92 32 23.68 32 19.2 32h-6.4c-4.48 0-6.72 0-8.432-.872a8 8 0 0 1-3.496-3.496C0 25.92 0 23.68 0 19.2v-6.4Z",fill:"#212229"}),a.createElement("path",{d:"m11 26 4-7.5-8-1L19 6h2l-4 7.5 8 1L13 26h-2Z",fill:"#fff"}))};Zg.defaultProps={width:"32",height:"32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var Hg=function(e){return a.createElement("svg",e,a.createElement("path",{d:"M0 12.8c0-4.48 0-6.72.872-8.432A8 8 0 0 1 4.368.872C6.08 0 8.32 0 12.8 0h6.4c4.48 0 6.72 0 8.432.872a8 8 0 0 1 3.496 3.496C32 6.08 32 8.32 32 12.8v6.4c0 4.48 0 6.72-.872 8.432a8 8 0 0 1-3.496 3.496C25.92 32 23.68 32 19.2 32h-6.4c-4.48 0-6.72 0-8.432-.872a8 8 0 0 1-3.496-3.496C0 25.92 0 23.68 0 19.2v-6.4Z",fill:"#212229"}),a.createElement("path",{d:"M7.75 25V9c0-.55.196-1.02.588-1.412A1.926 1.926 0 0 1 9.75 7h6c.55 0 1.02.196 1.413.588.391.391.587.862.587 1.412v7h1c.55 0 1.02.196 1.413.587.391.392.587.863.587 1.413v4.5c0 .283.096.52.288.712.191.192.429.288.712.288s.52-.096.712-.288a.968.968 0 0 0 .288-.712v-7.2c-.15.083-.308.137-.475.162a3.539 3.539 0 0 1-.525.038c-.7 0-1.292-.242-1.775-.725-.483-.483-.725-1.075-.725-1.775 0-.533.146-1.012.438-1.438.291-.425.679-.729 1.162-.912l-2.1-2.1L19.8 7.5l3.7 3.6c.25.25.438.542.563.875.125.333.187.675.187 1.025v9.5c0 .7-.242 1.292-.725 1.775-.483.483-1.075.725-1.775.725s-1.292-.242-1.775-.725c-.483-.483-.725-1.075-.725-1.775v-5h-1.5V25h-10Zm2-11h6V9h-6v5Zm12 0c.283 0 .52-.096.712-.287A.968.968 0 0 0 22.75 13a.968.968 0 0 0-.288-.713.968.968 0 0 0-.712-.287.968.968 0 0 0-.712.287.968.968 0 0 0-.288.713c0 .283.096.52.288.713.191.191.429.287.712.287Z",fill:"#fff"}))};Hg.defaultProps={width:"32",height:"32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var qg=function(e){return a.createElement("svg",e,a.createElement("path",{d:"M0 12.8c0-4.48 0-6.72.872-8.432A8 8 0 0 1 4.368.872C6.08 0 8.32 0 12.8 0h6.4c4.48 0 6.72 0 8.432.872a8 8 0 0 1 3.496 3.496C32 6.08 32 8.32 32 12.8v6.4c0 4.48 0 6.72-.872 8.432a8 8 0 0 1-3.496 3.496C25.92 32 23.68 32 19.2 32h-6.4c-4.48 0-6.72 0-8.432-.872a8 8 0 0 1-3.496-3.496C0 25.92 0 23.68 0 19.2v-6.4Z",fill:"#212229"}),a.createElement("path",{d:"m21.15 24.7-6.05-6.1c-.333.133-.67.233-1.012.3A5.67 5.67 0 0 1 13 19c-1.667 0-3.083-.583-4.25-1.75C7.583 16.083 7 14.667 7 13c0-.6.083-1.17.25-1.713.167-.541.4-1.054.7-1.537l3.65 3.65 1.8-1.8-3.65-3.65c.483-.3.996-.533 1.537-.7A5.79 5.79 0 0 1 13 7c1.667 0 3.083.583 4.25 1.75C18.417 9.917 19 11.333 19 13c0 .383-.033.746-.1 1.088-.067.341-.167.679-.3 1.012l6.1 6.05c.2.2.3.442.3.725s-.1.525-.3.725l-2.1 2.1c-.2.2-.442.3-.725.3a.988.988 0 0 1-.725-.3Z",fill:"#fff"}))};qg.defaultProps={width:"32",height:"32",fill:"none",xmlns:"http://www.w3.org/2000/svg"};const Kg=function(e){return uf(`fillingStations.${e}`,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},Jg=e=>uf(`vehicles.${e}`),Xg=e=>uf(`shifts.${e}`),Yg=e=>uf(`driverGroups.${e}`),Qg=e=>uf(`demandData.${e}`),ef=e=>uf(`tasks.${e}`),tf=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!e||!t||"object"!=typeof e||"object"!=typeof t)return{};const a=Object?.keys(t);return a.reduce((a,i)=>{if(null!==t[i]&&void 0!==t[i]||e[i]===t[i])if("object"!=typeof t[i]||Array.isArray(t[i]))t[i]!==e[i]&&(a[n+i]=e[i]);else{const l=tf(e[i],t[i],`${n}${i}.`);Object.assign(a,l)}else a[n+i]=e[i];return a},{})},nf=e=>uf(`settings.${e}`),af=e=>b.Ay.t(`addExperimentWizard.steps.settings.entries.${e}`),lf=new Set(["router.type"]),rf=(e,t)=>{const[n,i]=(0,a.useState)(t??{});return(0,a.useEffect)(()=>{if(!t?.isLoading||!e)return void(t&&i(t));const n=setInterval(async()=>{const t=await kl([e]);!1===t?.[0]?.metrics?.isLoading&&(i(t[0].metrics),clearInterval(n))},5e3);return()=>clearInterval(n)},[t?.isLoading,e]),n},of=o.default.div.withConfig({displayName:"Timeline__FullWidthContainer",componentId:"sc-npf0m9-0"})(["width:100%;"]),sf=o.default.span.withConfig({displayName:"Timeline__FormatHint",componentId:"sc-npf0m9-1"})(["font-size:12px;color:#999;font-weight:normal;margin-left:8px;"]),df=e=>uf(`timeline.${e}`),cf=e=>{if(!e)return"N/A";const t=G()(e);return t.isValid()?t.format("M/D/YYYY HH:mm"):"N/A"},pf=e=>{let{demandMetrics:t,tasksMetrics:n,demandUrl:i,tasksUrl:l}=e;const r=rf(i,t),o=rf(l,n),s=r?.isLoading,d=o?.isLoading,c=pl({demandData:{file:{metrics:r}},tasks:{file:{metrics:o}}}),p=r?.startDate&&r?.endDate?`${cf(r.startDate)} - ${cf(r.endDate)}`:null,u=o?.startDate&&o?.endDate?`${cf(o.startDate)} - ${cf(o.endDate)}`:null;return a.createElement(kg,null,a.createElement(Sg,null,a.createElement(Ag,null,a.createElement(Tg,null,a.createElement(Ng,null,df("title"),a.createElement(sf,null,"(M/D/YYYY HH:mm)"))))),a.createElement(Lg,null,s||d?a.createElement(Vr,null):a.createElement(a.Fragment,null,p?a.createElement($g,{title:df("demand"),content:p,testId:"timeline.demand"}):a.createElement($g,{title:df("demand"),content:df("noDemand"),testId:"timeline.demand"}),u?a.createElement($g,{title:df("tasks"),content:u,testId:"timeline.tasks"}):a.createElement($g,{title:df("tasks"),content:df("noTasks"),testId:"timeline.tasks"})),c&&a.createElement(of,null,a.createElement(Dl,null,Sf("review.dateRangeExceededError",{maxDays:40})))))},uf=function(e){return Sf(`review.${e}`,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},mf={details:e=>{let{wizardData:t,goToSection:n}=e;const{simType:i,tags:l}=t?.details,r={rides:Vg("rideOperation"),fieldServicing:Vg("fieldServicing")},o=l?.map(e=>a.createElement(Wg,null,e));return a.createElement("div",null,a.createElement(Fg,{title:Vg("title"),goToSection:n},a.createElement($g,{title:Vg("simulationType"),content:r[i],testId:"simulationType"}),l&&0!==l.length&&a.createElement($g,{title:Vg("tags"),content:o,testId:"tags"})))},territory:e=>{let{wizardData:t,goToSection:n}=e;const{polygon:i,center:l}=t?.territory,r=i?ba.area(ba.polygon([i]))/1e6:0;return a.createElement(Fg,{title:Gg("title"),contentMinHeight:"188px",subtitle:[`${r.toFixed(1).toString()} ${Gg("subtitle")}`],goToSection:n,style:{zIndex:1}},a.createElement(Ed,{polygon:i,center:l,drawingMode:"polygon",withSearch:!1,height:"188px",width:"340px"}))},fillingStations:e=>{let{wizardData:t,goToSection:n}=e;const i=(l=t.fillingStations)?l.reduce((e,t)=>(e.total+=1,e.stationTypes[t.stationType]+=1,["parking","parking_and_charging"].includes(t.stationType)&&(e.parking+=Number(t.capacity)||0),["charging","parking_and_charging"].includes(t.stationType)&&("ice"===t.type?e.ice+=Number(t.slots)||0:(e.electric+=Number(t.slots)||0,e.totalPower+=Number(t.slots)*Number(t.rate))),"maintenance"===t.stationType&&(e.maintenance+=1,e.maintenanceCapacity+=Number(t.capacity)||0),e),{electric:0,totalPower:0,ice:0,parking:0,maintenance:0,maintenanceCapacity:0,total:0,stationTypes:{parking_and_charging:0,parking:0,charging:0,maintenance:0}}):{electric:0,totalPower:0,ice:0,parking:0,maintenance:0,maintenanceCapacity:0,total:0,stationTypes:{parking_and_charging:0,parking:0,charging:0,maintenance:0}};var l;const r=(e=>{const t=[],{stationTypes:n}=e;return n.charging>0&&t.push(`${n.charging} ${Kg("fiiling")}`),n.parking>0&&t.push(`${n.parking} ${Kg("parking")}`),n.parking_and_charging>0&&t.push(`${n.parking_and_charging} ${Kg("parkingAndCharging")}`),n.maintenance>0&&t.push(`${n.maintenance} ${Kg("maintenance")}`),t.join(", ")})(i);return a.createElement(Fg,{title:Kg("title"),goToSection:n,subtitle:[`${i.total} ${Kg("total")} ${r.length>0?`( ${r} )`:""}`.trim(),Kg("parkingCount",{parking:i.parking}),Kg("fillingCount",{charging:i.electric+i.ice})],testIds:["totalAmountSubtitle","parkingAmountSubtitle","fillingAmountSubtitle"]},a.createElement($g,{title:Kg("EV"),content:`${i.electric} ${Kg("slots")} (${i.totalPower.toFixed(2)} ${Kg("totalPower")})`,icon:a.createElement(Zg,{width:32,height:32,viewBox:"0 0 32 32"}),testId:"fillingStationsEV"}),a.createElement($g,{title:Kg("ICE"),content:`${i.ice} ${Kg("slots")}`,icon:a.createElement(Hg,{width:32,height:32,viewBox:"0 0 32 32"}),testId:"fillingStationsICE"}),i.maintenance>0&&a.createElement($g,{title:Kg("maintenance"),content:`${i.maintenance} stations (${i.maintenanceCapacity} ${Kg("totalDefaultCapacity")})`,icon:a.createElement(qg,{width:32,height:32,viewBox:"0 0 32 32"}),testId:"fillingStationsMaintenance"}))},vehicleGroups:e=>{let{wizardData:t,goToSection:n}=e;const{vehicleGroups:i}=t,l=(e=>{const t={EV:0,IC:0};return e?e.reduce((e,t)=>(e[t.powerTrain]+=Number(t.amount),e),t):t})(i);return a.createElement(Fg,{title:Jg("title"),goToSection:n,subtitle:[`${l.EV+l.IC} ${Jg("total")}`,`${l.EV} ${Jg("EV")}`,`${l.IC} ${Jg("ICE")}`],testIds:["vehicleTotalAmountTitle","vehicleEvAmountTitle","vehicleIceAmountTitle"]},i&&i.map((e,t)=>{const n=e.brand?`${e.brand} ${e.modelName}`:e.modelName;return a.createElement($g,{title:`${n} (${e.range} ${Jg("kmRange")})`,content:e.amount,icon:a.createElement("img",{src:$[e?.bodyType?.toUpperCase()],style:{maxWidth:"88px",maxHeight:"50px"},alt:e?.bodyType?.toUpperCase()}),key:`${e.brand}-${e.modelName}-${t}`,testId:`vehicles-${e.powerTrain}-${e.range}`})}))},shifts:e=>{let{wizardData:t,goToSection:n}=e;const{shifts:i}=t,l=(e=>e?e.reduce((e,t)=>(e.total+=1,0===e.days[t.day]&&(e.numOfDays+=1),e.days[t.day]+=1,e),{days:{1:0,2:0,3:0,4:0,5:0,6:0,7:0},total:0,numOfDays:0}):{days:{1:0,2:0,3:0,4:0,5:0,6:0,7:0},total:0,numOfDays:0})(i);return a.createElement(Fg,{title:Xg("title"),goToSection:n,subtitle:[`${l.total} ${Xg("totalAcross")} ${l.numOfDays} ${Xg("days")}`],testIds:["shiftsSubtitle"]},i&&l.total>0&&Ug.map((e,t)=>a.createElement($g,{title:Xg(e),content:String(l.days[t+1]),key:e,testId:`shift-${e}`})))},driverGroups:e=>{let{wizardData:t,goToSection:n}=e;const{driverGroups:i}=t,l=(e=>{const t={total:0,numOfGroups:0,groupsCount:{}};return e?e.reduce((e,t)=>(e.total+=t.amount,e.groupsCount[t.groupName]||(e.numOfGroups+=1),e.groupsCount[t.groupName]=(e.groupsCount[t.groupName]||0)+t.amount,e),t):t})(i);return a.createElement(Fg,{title:Yg("title"),goToSection:n,subtitle:[`${l.total} ${Yg("totalAcross")} ${l.numOfGroups} ${Yg("groups")}`],testIds:["driverSubtitle"]},i&&l.total>0&&Object.keys(l.groupsCount).map((e,t)=>a.createElement($g,{title:e,content:l.groupsCount[e],key:e,testId:`driver-${e}`})))},demandData:e=>{let{wizardData:t,goToSection:n}=e;const{demandData:i}=t,[l,r]=(0,a.useState)(i?.file?.metrics?.isLoading),[o,s]=(0,a.useState)(i?.file?.metrics||{});return(0,a.useEffect)(()=>{if(i?.file?.metrics?.isLoading){const{url:e}=i,t=setInterval(async()=>{const n=await kl([e]);if(n?.length>0&&!1===n[0]?.metrics?.isLoading){const e=n[0]?.metrics;s(e),r(!1),clearInterval(t)}},5e3);return()=>clearInterval(t)}},[i?.file?.metrics?.isLoading]),a.createElement(Fg,{title:Qg("title"),goToSection:n,subtitle:[`${o?.totalRides||0} ${Qg("totalRidesAcross")} ${o?.numOfDays||0} ${Qg("days")}`],isLoading:l,testIds:["demandDataSubtitle"],subText:Qg("subText")},a.createElement($g,{title:Qg("min"),content:o?.minRidesPerHour||0,testId:"demandData.min"}),a.createElement($g,{title:Qg("max"),content:o?.maxRidesPerHour||0,testId:"demandData.max"}),a.createElement($g,{title:Qg("avg"),content:o?.avgRidesPerHour||0,testId:"demandData.avg"}),a.createElement($g,{title:Qg("median"),content:o?.medianRidesPerHour||0,testId:"demandData.med"}))},tasks:e=>{let{wizardData:t,goToSection:n}=e;const{tasks:i}=t,[l,r]=(0,a.useState)(i?.file?.metrics?.isLoading),[o,s]=(0,a.useState)(i?.file?.metrics||{});if((0,a.useEffect)(()=>{if(i?.file?.metrics?.isLoading){const{url:e}=i,n=setInterval(async()=>{const a=await kl([e]);if(a?.length>0&&!1===a[0]?.metrics?.isLoading){const e=a[0]?.metrics;s(e),r(!1),t.tasks?.file&&(t.tasks.file.metrics=e),clearInterval(n)}},5e3);return()=>clearInterval(n)}},[i?.file?.metrics?.isLoading]),!i?.url)return null;const d=((e,t)=>dl(e?.taskTypes||[],t?.fillingStations||[]).map(e=>sl(e)))(o,t),c=d.length>0,p=((e,t)=>cl(e?.vehicleGroups||[],t?.vehicleGroups||[]))(o,t),u=p.length>0;return a.createElement(Fg,{title:ef("title"),goToSection:n,subtitle:[`${o?.totalTasks||0} ${ef("totalTasksAcross")} ${o?.numOfDays||0} ${ef("days")}`],isLoading:l,testIds:["tasksSubtitle"]},c&&a.createElement(Dl,null,Sf("tasks.unsupportedTaskTypesError"),": ",d.join(", ")),u&&a.createElement(Dl,null,Sf("tasks.unsupportedVehicleGroupsError"),": ",p.join(", ")))},settings:e=>{let{wizardData:t,goToSection:n}=e;const{settings:i}=t,l=tf(i,sp),r=D();return a.createElement(Fg,{title:nf("title"),subtitle:[nf("subtitle")],goToSection:n},Object.keys(l).map(e=>((e,t,n)=>{if(lf.has(e)||!n&&(e=>{const{entries:t}=Qa,n=t.find(t=>t.key===e);return!0===n?.internal})(e))return null;switch(e){case"placement.mode":return[Ji.STAGING,Ji.DEMAND_STAGING,Ji.TERRITORY_WIDE].includes(t)?a.createElement($g,{title:af("placement.title"),content:af(`placement.options.${t}.title`),testId:`${e}-setting`}):null;case"placement.active":return a.createElement($g,{title:af("placement.title"),content:af("placement.options.off.title"),testId:`${e}-setting`});case"secondaryRouter":return a.createElement($g,{title:af("secondaryRouter.title"),content:af(`secondaryRouter.options.${t}.title`),testId:`${e}-setting`});case"evChargingRates.defaultRate":return a.createElement($g,{title:af("evChargingRates.title"),content:`${t}$`,testId:`${e}-setting`});case"startingChargeLevel.min":case"startingChargeLevel.max":return a.createElement($g,{title:`${af("startingChargeLevel.title")} - ${af(`${e.split(".")[1]}.label`)}`,content:`${t}%`,testId:`${e}-setting`});case"accelerated":return t&&a.createElement($g,{title:af("accelerated.title"),content:af("accelerated.active.true"),testId:`${e}-setting`});case"osrmServer":return a.createElement($g,{title:af("osrmServer.title"),content:"http://no-driver-north-california"===t?af("osrmServer.options.noDriverNorthCalifornia.title"):String(t),testId:`${e}-setting`});case"indefleet.active":return t&&a.createElement($g,{title:af("indefleet.title"),content:af("indefleet.active.true"),testId:`${e}-setting`});case"indefleet.ridePerVehicleRatio":case"indefleet.minInfleetedVehicles":case"indefleet.scheduleInterval":case"indefleet.demandWindowEnd":return a.createElement($g,{title:af(`${e.split(".")[1]}.label`),content:t,testId:`${e}-setting`});case"indefleet.timeBasedVehicleAvailability":return t&&a.createElement($g,{title:af(`${e}.title`),content:t.split("/")[t.split("/").length-1],testId:`${e}-setting`});case"maxChargeLevel":case"minimalChargingLevelAtEndOfShift":case"refuelThreshold":case"rideRefuelThreshold":return a.createElement($g,{title:af(`${e}.title`),content:t?`${t}%`:af("nullOption"),testId:`${e}-setting`});case"gasPrice":return a.createElement($g,{title:af(`${e}.title`),content:t?`${t}$`:af("nullOption"),testId:`${e}-setting`});default:return a.createElement($g,{title:af(`${e}.title`),content:t?String(t):af("nullOption"),testId:`${e}-setting`})}})(e,l[e],r)))}},hf=e=>{let{stepName:t,wizardData:n,stepData:i,setSelectedStepIndexById:l,showTimelineAfter:r}=e;const o=mf[t];return a.createElement(a.Fragment,null,o&&a.createElement(o,{wizardData:n,stepData:i,goToSection:()=>l?l(t):null}),r&&a.createElement(pf,{demandMetrics:n.demandData?.file?.metrics,tasksMetrics:n.tasks?.file?.metrics,demandUrl:n.demandData?.url,tasksUrl:n.tasks?.url}))},gf=e=>{let{wizardData:t,setSelectedStepIndexById:n,stepData:i}=e;const l=Al[t.details.simType],r=l?.includes("tasks");return a.createElement("div",null,l?.map(e=>{const l="tasks"===e||!r&&"demandData"===e;return a.createElement(hf,{key:e,stepName:e,wizardData:t,stepData:i,setSelectedStepIndexById:n,showTimelineAfter:l})}))},ff=()=>({data:null,file:null,url:null}),yf=e=>{let{stepData:t,updateStepData:n,showErrors:i}=e;return a.createElement(Xh,{shouldSaveDataAsJson:!0,showErrors:i,dataFile:t.file,dataUrl:t.url,updateData:n,initialData:{data:null,file:null,url:null},exampleFileName:ao,supportedFileType:".json",incompleteErrorText:Sf("vehiclesAndRoutes.incompleteErrorText"),uploadFolder:xl})},vf=o.default.div.withConfig({displayName:"styled__ApprovalBannerContainer",componentId:"sc-1hsvh5h-0"})(["display:flex;padding:24px;padding-left:4em;align-items:center;gap:24px;align-self:stretch;border-bottom:1px solid rgba(125,139,172,0.32);background:#FFF;position:relative;box-shadow:0px 4px 10px rgba(0,0,0,0.04);"]),wf=o.default.div.withConfig({displayName:"styled__ApprovalBannerAlert",componentId:"sc-1hsvh5h-1"})(["display:flex;align-items:flex-start;flex:1 0 0;background-color:",";padding:4px;gap:8px;"],e=>e.isApproved?"rgba(37, 184, 97, 0.1)":"rgba(17, 164, 255, 0.1)"),xf=o.default.button.withConfig({displayName:"styled__ApprovalBannerButton",componentId:"sc-1hsvh5h-2"})(["display:flex;height:40px;width:88px;padding:0px 4px;gap:4px;justify-content:center;align-items:center;border-radius:4px;background:#25B861;color:rgba(255,255,255,1);border:none;&:hover{background:#1C8C4A;cursor:pointer;}"]);var Ef=function(e){return a.createElement("svg",e,a.createElement("g",{fill:"#25B861"},a.createElement("path",{d:"m13.742 7.146-5.146 5.147-2.243-2.243-.707.707 2.95 2.95 5.853-5.854-.707-.707Z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0Zm-1 0a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z"})))};Ef.defaultProps={width:"20",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var bf=function(e){return a.createElement("svg",e,a.createElement("g",{fill:"#11A4FF"},a.createElement("path",{d:"M9.35 14V9.5h1.3V14h-1.3ZM10 6.5a.85.85 0 1 0 0 1.7.85.85 0 0 0 0-1.7Z"}),a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm0-1a7 7 0 1 0 0-14 7 7 0 0 0 0 14Z"})))};bf.defaultProps={width:"20",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var Cf=function(e){return a.createElement("svg",e,a.createElement("path",{d:"m1196-561 3 3 5-5",transform:"translate(-1195.47 563.53)",style:{fill:"none",stroke:"#fff",strokeWidth:"1.5px"}}))};Cf.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"9.061",height:"6.591"};const _f=function(e){return uf(`approveBanner.${e}`,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},kf=e=>{let{wizardData:t}=e;if(t?.variationMetaData?.status!==z.AWAITING_APPROVAL)return null;const[n,i]=(0,a.useState)(!1),[l,r]=(0,a.useState)(!1),[o,s]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{(async()=>{const e=await(async()=>{const{data:e}=await te.get("/api/v1/users/me");return e})();e?.isAdmin&&r(!0)})()},[]),a.createElement(a.Fragment,null,a.createElement(vf,null,a.createElement(wf,{isApproved:n},n?a.createElement(Ef,null):a.createElement(bf,null),a.createElement("span",null,_f(n?"ApprovedMessage":"approveRequiredMessage"))),!n&&l&&a.createElement(xf,{onClick:async()=>{s(!0),await(async e=>{const{data:t}=await te.put(`/api/v1/variations/${e}/approve`,null);return t})(t?.variationMetaData?.id)&&(i(!0),t.variationMetaData.status=z.PENDING),s(!1)},"data-test-id":"approvalBtn"},o?a.createElement(Vr,null):a.createElement("span",null,a.createElement(Cf,null)," ",_f("approve")))))},Sf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return T.t(`addExperimentWizard.steps.${e}`,t)},Af=e=>[{id:"details",title:Sf("details.title"),description:Sf("details.description"),component:hr,initialDataGetter:()=>{return t=e?.type,{[dr]:"",[cr]:"",[pr]:[],[mr]:t||Se};var t}},{id:"territory",title:Sf("territory.title"),description:Sf("territory.description"),component:Cd,initialDataGetter:bd},{id:"fillingStations",title:Sf("fillingStations.title"),description:Sf("fillingStations.description"),component:Im,initialDataGetter:Am},{id:"vehicleGroups",title:Sf("vehicles.title"),description:Sf("vehicles.description"),component:Sp,initialDataGetter:fp},{id:"vehiclesAndRoutes",title:Sf("vehiclesAndRoutes.title"),description:Sf("vehiclesAndRoutes.description"),component:yf,initialDataGetter:ff},{id:"shifts",title:Sf("shifts.title"),description:Sf("shifts.description"),component:Gh,initialDataGetter:$h},{id:"driverGroups",title:Sf("drivers.title"),description:Sf("drivers.description"),component:Td,initialDataGetter:Ad},{id:"demandData",title:Sf("demandData.title"),description:Sf("demandData.description"),component:xg,initialDataGetter:wg},{id:"tasks",title:Sf("tasks.title"),description:Sf("tasks.description"),component:_g,initialDataGetter:bg},{id:"settings",title:Sf("settings.title"),description:Sf("settings.description"),component:pp,initialDataGetter:dp},{id:"review",title:Sf("review.title"),description:Sf("review.description"),component:gf,initialDataGetter:()=>{},topStickyComponent:kf}],Tf=e=>{let{submitNewVariation:t,variationId:n,variationName:i,isReadOnly:l,isDraft:r,isClone:o,experiment:s,throttleSubmitNewVariation:d}=e,c=T.t("addExperimentWizard.title");return o?c=T.t("addExperimentWizard.cloneTitle",{var_name:i}):n&&(l||r)&&(c=i),a.createElement(Tl,{title:c,steps:Af(s).filter(e=>!e.shouldHide),variationId:n,isReadOnly:l,isDraft:r,onSubmit:function(e,n,a){return t(e,n,a,!(arguments.length>3&&void 0!==arguments[3])||arguments[3])},throttleOnSubmit:d})},If=(e,t)=>{const n=t?.map(e=>e.id);return{...e,driverShifts:e.driverShifts.filter(e=>n?.includes(e))}},Nf=async(e,t,n,a)=>{const i=((e,t,n,a)=>{const i={experimentId:e},l=t.settings?.evChargingRates?.defaultRate?hl(t.settings.evChargingRates,null,"utc"):null,r={details:()=>(i.name=t.details.name,i.type=t.details.simType,i.description=t.details.details,void(i.tags=t.details.tags)),territory:()=>{i.territory=a&&t.territory.polygon?ba.polygon([t.territory.polygon]).geometry:null},parkingStations:()=>{i.parkingStations=(t.fillingStations||[]).filter(e=>Qi(e.stationType)).map(rl)},fillingStations:()=>{i.fillingStations=(t.fillingStations||[]).filter(e=>el(e.stationType)).map(ll)},vehicleGroups:()=>{i.vehicleGroups=t.vehicleGroups},shifts:()=>{i.shifts=t.shifts||n},driverGroups:()=>{i.driverGroups=t.driverGroups?.map(e=>If(e,t.shifts))},demandData:()=>{i.demandFileUrl=t.demandData?.url,i.demandPredictionFileUrl=t.demandData?.demandPredictionFileUrl},tasks:()=>{i.tasksFileUrl=t.tasks?.url||null,i.maintenanceStations=(t.fillingStations||[]).filter(e=>tl(e.stationType)).map(il)},settings:()=>{i.settings={...t.settings,evChargingRates:l,demandPredictionFileUrl:t.demandData?.demandPredictionFileUrl}},vehiclesAndRoutes:()=>{i.vehiclesAndRoutes=t.vehiclesAndRoutes?.data,i.vehiclesAndRoutesFileUrl=t.vehiclesAndRoutes?.url}},o=t.details?.simType;return(Al[o]||Object.keys(r)).forEach(e=>{r[e]&&r[e]()}),i})(e,t,n?null:[],t.territory.polygon?.length>0);let l=0;if((i.vehicleGroups||[]).forEach((e,t)=>{if(l+=e.amount,delete i.vehicleGroups[t][mi],a===W){const e=i.vehicleGroups[t].range;i.vehicleGroups[t].range=yl(j,e);const n=i.vehicleGroups[t].cost;i.vehicleGroups[t].cost=((e,t)=>{let n=t;return n/=fl,n})(0,n)}}),i.driverGroups&&"DefaultCopied"!==i?.driverGroups[0]?.groupName||!i.vehicleGroups||(i.driverGroups=[{amount:l,driverShifts:[],groupName:"DefaultCopied"}]),i?.settings?.accelerated&&(i.settings.router={...i.settings.router,type:"linear"}),Qa.entries.forEach(e=>{e.isVirtual&&i?.settings&&delete i.settings[e.key]}),ep.isFieldServicingVariation(t)&&i?.settings&&(i.settings.rideRefuelThreshold=i.settings.refuelThreshold),n&&(i.status="draft"),i.settings?.placement&&!i.settings.placement.active&&(i.settings.placement.mode=void 0),i.demandPredictionFileUrl&&(i.settings.demandPredictionFileUrl=i.demandPredictionFileUrl,delete i.demandPredictionFileUrl),i.settings?.chargerSelectionStrategy){const e=i.settings.chargerSelectionStrategy;"string"==typeof e?i.settings.chargerSelectionStrategy={chargerSelectionStrategyValue:e,powerMismatchAlpha:0,powerMismatchBeta:0}:(i.settings.chargerSelectionStrategy={...e},i.settings.chargerSelectionStrategy.enableChargerPowerPrioritization||(i.settings.chargerSelectionStrategy.powerMismatchAlpha=0,i.settings.chargerSelectionStrategy.powerMismatchBeta=0),delete i.settings.chargerSelectionStrategy.enableChargerPowerPrioritization)}return i},Mf=()=>{const{handleGetExperiment:e,handleCreateExperiment:t}=(0,a.useContext)(oe),n=ue(),[i,l]=(0,a.useState)(""),[o,s]=(0,a.useState)(),[d,c]=(0,a.useState)(),[p,u]=(0,a.useState)(!1),{experimentId:m}=(0,r.g)(),h=(0,r.Zp)(),{search:g}=(0,r.zy)(),f=new URLSearchParams(g),y=f.get("variationId"),v=f.get("readOnly"),w=f.get("draft"),x=f.get("cloned"),E="true"===v,b="true"===w,C="true"===x,_=async function(e,a,i){let l=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const r=e?.variationMetaData?.status===z.PENDING;if(p)return;u(!0);let g=m,f=d||y;if(g===re)if(o?.id)g=o?.id;else{let e=await t();await s(e),({id:g}=e||{id:""})}C&&!d&&(e.settings.generalSeed=Math.floor(1e6*Math.random()));const v=await Nf(g,e,C?a:a&&!r,n.distanceSystem);let w;try{if(P.trackEvent("starting variation event",{varIdToUse:f,variationData:v}),C&&!d){w="create variation from clone";const{id:e}=await Ln(v);await c(e),P.trackEvent("create variation from clone - successful",{varIdToUse:f,variationData:v})}else if(i)w="update variation on isFinishedDraft",await Bn(v,f),P.trackEvent("update variation - successful",{varIdToUse:f,variationData:v}),w="move variation draft to pending",await(async e=>(async e=>{const{data:t}=await te.put(`/api/v1/variations/${e}/move-to-pending`,null);return t})(e))(f),P.trackEvent("move variation draft to pending - successful",{varIdToUse:f,variationData:v});else if(d||b||r)w="update variation",await Bn(v,f),P.trackEvent("update variation - successful",{varIdToUse:f,variationData:v});else if(!E){w="create variation";const{id:e}=await Ln(v);await c(e),P.trackEvent("create variation - successful",{varIdToUse:f,variationData:v})}l&&de(h)}catch(e){P.trackEvent(`${w} - failed`,{varIdToUse:f,variationData:v});const t=e?.response?.data?.errors,n=Array.isArray(t)?t.join(", "):e?.response?.data?.message||e?.message;throw new Error(n)}finally{u(!1)}};(0,a.useEffect)(()=>{y&&(async()=>{try{P.trackEvent("trying to get variation data",{variationId:y});const e=await Dn(y);P.trackEvent("getting variation data - successful",{variationId:y}),l(e&&e.name)}catch{P.trackEvent("getting variation data - failed",{variationId:y});const e=L();h(`${e}/`)}})()},[y]),(0,a.useEffect)(()=>{m!==re&&(async()=>{const t=await e(m);s(t)})()},[m]);const k=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=Y.A.getUri({url:e,params:t});h(n)},S=Vs(_,1500);return(0,a.useEffect)(()=>()=>{S.cancel()},[]),a.createElement(a.Fragment,null,!(y&&!i)&&a.createElement(We,{withScroll:!0,headerContent:a.createElement(Sa,null),sidePanelContent:a.createElement(st,{onClickReports:()=>k("/reports",{fleetId:J(),simType:Se}),onClickExperiments:()=>k("/")})},a.createElement(Tf,{experiment:o,isDraft:b,isClone:C,variationId:y,variationName:i,isReadOnly:E,submitNewVariation:_,throttleSubmitNewVariation:S})))};function Df(e){let{embeddingUrl:t}=e;const[n,i]=(0,a.useState)(t);return(0,a.useEffect)(()=>{i(t)},[t]),a.createElement(a.Fragment,null,n?a.createElement("iframe",{src:n,width:"100%",height:"600",frameBorder:"0",title:n,style:{height:"100%"}}):null)}const Lf=o.default.div.withConfig({displayName:"styled__Container",componentId:"sc-h6u98t-0"})(["display:flex;margin-top:auto;align-items:flex-end;width:500px;justify-content:flex-start;gap:16px;"]),Bf=o.default.div.withConfig({displayName:"styled__Title",componentId:"sc-h6u98t-1"})(["font-size:",";font-weight:400;padding-bottom:8px;color:",";"],m,w),Rf=o.default.div.withConfig({displayName:"styled__ReportsOption",componentId:"sc-h6u98t-2"})(["color:",";font-size:",";cursor:pointer;padding-bottom:7px;border-bottom:1px solid ",";"],e=>{let{chosen:t}=e;return t?`${h}`:`${g}`},p,e=>{let{chosen:t}=e;return t?` ${h}`:"transparent"}),Ff=e=>{let{availableTabs:t,currentTab:n,onChange:i}=e;return a.createElement(Lf,null,a.createElement(Sa,{marginBottom:5}),a.createElement(Bf,null,T.t("reports.title")),t&&t.length>1&&t.map((e,t)=>a.createElement(Rf,{key:e.value,onClick:()=>i(e.value),chosen:n===e.value},e.label)))},Of=()=>{const[e,t]=(0,a.useState)(null),n=(0,r.Zp)(),{search:i}=(0,r.zy)(),l=new URLSearchParams(i),o=J(),s=l.get("experimentId"),d=l.get("variationId"),c=l.get("simType"),[p,u]=(0,a.useState)(0),m=async()=>"America/New_York",h=async()=>{const e=await(async e=>{const{data:t}=await te.get("/api/v1/reports",{params:e});return t})({simType:c,locale:A.has(b.Ay.language)?b.Ay.language:"en",timezone:await m(),fleetId:o,experimentId:s,variationId:d});t(e)},g=(0,a.useMemo)(()=>!e||e.length<2?[]:e.map((e,t)=>({label:e.displayName||`tab number ${t}`,value:t})),[e&&e.length]);return(0,a.useEffect)(()=>{h()},[]),a.createElement(a.Fragment,null,e&&a.createElement(We,{headerContent:a.createElement(Ff,{currentTab:p,onChange:e=>(e=>{u(e),h()})(e),availableTabs:g}),sidePanelContent:a.createElement(st,{onClickReports:()=>{},onClickExperiments:()=>de(n)})},a.createElement(Df,{embeddingUrl:e[p].embeddingUrl})))};var Pf=n(85072),zf=n.n(Pf),jf=n(97825),Wf=n.n(jf),$f=n(77659),Vf=n.n($f),Gf=n(55056),Uf=n.n(Gf),Zf=n(10540),Hf=n.n(Zf),qf=n(41113),Kf=n.n(qf),Jf=n(63016),Xf={};Xf.styleTagTransform=Kf(),Xf.setAttributes=Uf(),Xf.insert=Vf().bind(null,"head"),Xf.domAPI=Wf(),Xf.insertStyleElement=Hf(),zf()(Jf.A,Xf),Jf.A&&Jf.A.locals&&Jf.A.locals;const Yf=(0,Nl.us)({isDarkMode:!1}),Qf=[{path:"/",element:a.createElement(Ea,null),supportAdvancedPrefix:!0},{path:"/experiment/:experimentId/create-variation",element:a.createElement(Mf,null),supportAdvancedPrefix:!0},{path:"/experiment/:experimentId/create-variation/extended-settings",element:a.createElement(Mf,null),supportAdvancedPrefix:!0},{path:"/reports",element:a.createElement(Of,null),supportAdvancedPrefix:!0}],ey=()=>a.createElement(o.ThemeProvider,{theme:Yf},a.createElement(l.Kd,null,a.createElement(me,null,a.createElement(se,null,a.createElement(Yd,null,a.createElement(r.BV,null,Qf.map(e=>a.createElement(r.qh,{key:`Route$${e.path}`,path:e.path,element:e.element})),Qf.filter(e=>e.supportAdvancedPrefix).map(e=>a.createElement(r.qh,{key:`Route$${M}${e.path}`,path:`${M}${e.path}`,element:e.element}))),a.createElement(E,null)))))),ty=document.getElementById("app");i.createRoot(ty).render(a.createElement(ey,null))},23326(){},25509(){},29248(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-100.woff2"},30136(){},35358(e,t,n){var a={"./af":25177,"./af.js":25177,"./ar":61509,"./ar-dz":41488,"./ar-dz.js":41488,"./ar-kw":58676,"./ar-kw.js":58676,"./ar-ly":42353,"./ar-ly.js":42353,"./ar-ma":24496,"./ar-ma.js":24496,"./ar-ps":6947,"./ar-ps.js":6947,"./ar-sa":82682,"./ar-sa.js":82682,"./ar-tn":89756,"./ar-tn.js":89756,"./ar.js":61509,"./az":95533,"./az.js":95533,"./be":28959,"./be.js":28959,"./bg":47777,"./bg.js":47777,"./bm":54903,"./bm.js":54903,"./bn":61290,"./bn-bd":17357,"./bn-bd.js":17357,"./bn.js":61290,"./bo":31545,"./bo.js":31545,"./br":11470,"./br.js":11470,"./bs":44429,"./bs.js":44429,"./ca":7306,"./ca.js":7306,"./cs":56464,"./cs.js":56464,"./cv":73635,"./cv.js":73635,"./cy":64226,"./cy.js":64226,"./da":93601,"./da.js":93601,"./de":77853,"./de-at":26111,"./de-at.js":26111,"./de-ch":54697,"./de-ch.js":54697,"./de.js":77853,"./dv":60708,"./dv.js":60708,"./el":54691,"./el.js":54691,"./en-au":53872,"./en-au.js":53872,"./en-ca":28298,"./en-ca.js":28298,"./en-gb":56195,"./en-gb.js":56195,"./en-ie":66584,"./en-ie.js":66584,"./en-il":65543,"./en-il.js":65543,"./en-in":9033,"./en-in.js":9033,"./en-nz":79402,"./en-nz.js":79402,"./en-sg":43004,"./en-sg.js":43004,"./eo":32934,"./eo.js":32934,"./es":97650,"./es-do":20838,"./es-do.js":20838,"./es-mx":17730,"./es-mx.js":17730,"./es-us":56575,"./es-us.js":56575,"./es.js":97650,"./et":3035,"./et.js":3035,"./eu":3508,"./eu.js":3508,"./fa":119,"./fa.js":119,"./fi":90527,"./fi.js":90527,"./fil":95995,"./fil.js":95995,"./fo":52477,"./fo.js":52477,"./fr":85498,"./fr-ca":26435,"./fr-ca.js":26435,"./fr-ch":37892,"./fr-ch.js":37892,"./fr.js":85498,"./fy":37071,"./fy.js":37071,"./ga":41734,"./ga.js":41734,"./gd":70217,"./gd.js":70217,"./gl":77329,"./gl.js":77329,"./gom-deva":32124,"./gom-deva.js":32124,"./gom-latn":93383,"./gom-latn.js":93383,"./gu":95050,"./gu.js":95050,"./he":11713,"./he.js":11713,"./hi":43861,"./hi.js":43861,"./hr":26308,"./hr.js":26308,"./hu":90609,"./hu.js":90609,"./hy-am":17160,"./hy-am.js":17160,"./id":74063,"./id.js":74063,"./is":89374,"./is.js":89374,"./it":88383,"./it-ch":21827,"./it-ch.js":21827,"./it.js":88383,"./ja":23827,"./ja.js":23827,"./jv":89722,"./jv.js":89722,"./ka":41794,"./ka.js":41794,"./kk":27088,"./kk.js":27088,"./km":96870,"./km.js":96870,"./kn":84451,"./kn.js":84451,"./ko":63164,"./ko.js":63164,"./ku":98174,"./ku-kmr":6181,"./ku-kmr.js":6181,"./ku.js":98174,"./ky":78474,"./ky.js":78474,"./lb":79680,"./lb.js":79680,"./lo":15867,"./lo.js":15867,"./lt":45766,"./lt.js":45766,"./lv":69532,"./lv.js":69532,"./me":58076,"./me.js":58076,"./mi":41848,"./mi.js":41848,"./mk":30306,"./mk.js":30306,"./ml":73739,"./ml.js":73739,"./mn":99053,"./mn.js":99053,"./mr":86169,"./mr.js":86169,"./ms":73386,"./ms-my":92297,"./ms-my.js":92297,"./ms.js":73386,"./mt":77075,"./mt.js":77075,"./my":72264,"./my.js":72264,"./nb":22274,"./nb.js":22274,"./ne":8235,"./ne.js":8235,"./nl":92572,"./nl-be":43784,"./nl-be.js":43784,"./nl.js":92572,"./nn":54566,"./nn.js":54566,"./oc-lnc":69330,"./oc-lnc.js":69330,"./pa-in":29849,"./pa-in.js":29849,"./pl":94418,"./pl.js":94418,"./pt":79834,"./pt-br":48303,"./pt-br.js":48303,"./pt.js":79834,"./ro":24457,"./ro.js":24457,"./ru":82271,"./ru.js":82271,"./sd":1221,"./sd.js":1221,"./se":33478,"./se.js":33478,"./si":17538,"./si.js":17538,"./sk":5784,"./sk.js":5784,"./sl":46637,"./sl.js":46637,"./sq":86794,"./sq.js":86794,"./sr":45719,"./sr-cyrl":3322,"./sr-cyrl.js":3322,"./sr.js":45719,"./ss":56e3,"./ss.js":56e3,"./sv":41011,"./sv.js":41011,"./sw":40748,"./sw.js":40748,"./ta":11025,"./ta.js":11025,"./te":11885,"./te.js":11885,"./tet":28861,"./tet.js":28861,"./tg":86571,"./tg.js":86571,"./th":55802,"./th.js":55802,"./tk":59527,"./tk.js":59527,"./tl-ph":29231,"./tl-ph.js":29231,"./tlh":31052,"./tlh.js":31052,"./tr":85096,"./tr.js":85096,"./tzl":79846,"./tzl.js":79846,"./tzm":81765,"./tzm-latn":97711,"./tzm-latn.js":97711,"./tzm.js":81765,"./ug-cn":48414,"./ug-cn.js":48414,"./uk":16618,"./uk.js":16618,"./ur":57777,"./ur.js":57777,"./uz":57609,"./uz-latn":72475,"./uz-latn.js":72475,"./uz.js":57609,"./vi":21135,"./vi.js":21135,"./x-pseudo":64051,"./x-pseudo.js":64051,"./yo":82218,"./yo.js":82218,"./zh-cn":52648,"./zh-cn.js":52648,"./zh-hk":1632,"./zh-hk.js":1632,"./zh-mo":31541,"./zh-mo.js":31541,"./zh-tw":50304,"./zh-tw.js":50304};function i(e){var t=l(e);return n(t)}function l(e){if(!n.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}i.keys=function(){return Object.keys(a)},i.resolve=l,e.exports=i,i.id=35358},35825(){},40290(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-900italic.woff2"},41596(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-500.woff2"},42634(){},43331(){},43685(){},50477(){},51160(){},51318(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-300.woff2"},52492(){},53789(){},54308(){},55368(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-900.woff2"},57376(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-500italic.woff2"},62663(){},63016(e,t,n){"use strict";n.d(t,{A:()=>d});var a=n(71354),i=n.n(a),l=n(76314),r=n.n(l),o=n(6578),s=r()(i());s.i(o.A),s.push([e.id,".VWQyKZr22FK6aNsLyNC3:after {\n /* Disclaimer: not needed to show 'powered by Google' if also a Google Map is shown */\n\n background-image: none !important;\n height: 0px;\n padding: 0;\n margin: 0;\n}","",{version:3,sources:["webpack://./src/css/main.css"],names:[],mappings:"AAEA;IACI,qFAAqF;;IAErF,iCAAiC;IACjC,WAAW;IACX,UAAU;IACV,SAAS;AACb",sourcesContent:["@import url('./fonts.css');\n\n.pac-container:after {\n /* Disclaimer: not needed to show 'powered by Google' if also a Google Map is shown */\n\n background-image: none !important;\n height: 0px;\n padding: 0;\n margin: 0;\n}"],sourceRoot:""}]),s.locals={"pac-container":"VWQyKZr22FK6aNsLyNC3"};const d=s},65090(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-700italic.woff2"},65217(){},65922(){},67857(){},69915(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-200italic.woff2"},76737(){},77346(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-700.woff2"},80542(){},82471(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-200.woff2"},86718(e,t,n){var a={"./":29688,"./ca":32714,"./ca.js":32714,"./cn":63739,"./cn.js":63739,"./en":5413,"./en.js":5413,"./es":39410,"./es.js":39410,"./fi":32287,"./fi.js":32287,"./formatted-message":18634,"./formatted-message.js":18634,"./index":29688,"./index.js":29688,"./ja":65587,"./ja.js":65587,"./locales":8835,"./locales.js":8835,"./pt":21594,"./pt.js":21594,"./ru":24031,"./ru.js":24031};function i(e){var t=l(e);return n(t)}function l(e){if(!n.o(a,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return a[e]}i.keys=function(){return Object.keys(a)},i.resolve=l,e.exports=i,i.id=86718},87171(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-italic.woff2"},88817(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-800italic.woff2"},92583(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-600italic.woff2"},93657(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-800.woff2"},93974(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-300italic.woff2"},97477(e,t,n){"use strict";e.exports=n.p+"fonts/montserrat-v31-latin-regular.woff2"}},i={};function l(e){var t=i[e];if(void 0!==t)return t.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return a[e].call(n.exports,n,n.exports,l),n.loaded=!0,n.exports}l.m=a,l.amdO={},e=[],l.O=(t,n,a,i)=>{if(!n){var r=1/0;for(c=0;c=i)&&Object.keys(l.O).every(e=>l.O[e](n[s]))?n.splice(s--,1):(o=!1,i0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[n,a,i]},l.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return l.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,l.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var i=Object.create(null);l.r(i);var r={};t=t||[null,n({}),n([]),n(n)];for(var o=2&a&&e;("object"==typeof o||"function"==typeof o)&&!~t.indexOf(o);o=n(o))Object.getOwnPropertyNames(o).forEach(t=>r[t]=()=>e[t]);return r.default=()=>e,l.d(i,r),i},l.d=(e,t)=>{for(var n in t)l.o(t,n)&&!l.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},l.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),l.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),l.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),l.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),l.p="/",(()=>{l.b="undefined"!=typeof document&&document.baseURI||self.location.href;var e={792:0};l.O.j=t=>0===e[t];var t=(t,n)=>{var a,i,[r,o,s]=n,d=0;if(r.some(t=>0!==e[t])){for(a in o)l.o(o,a)&&(l.m[a]=o[a]);if(s)var c=s(l)}for(t&&t(n);dl(84315)),l.O(void 0,[136],()=>l(7452));var r=l.O(void 0,[136],()=>l(21853));r=l.O(r)})(); //# sourceMappingURL=main.23231c5447fcea4fa687.js.map