PageSourceSearch

https://ai.engineer/_next/static/chunks/pages/tools/map-creator-a5b8c6d1d6f0fbf4.js

js ai.engineer collected 2026-09-24 09:50:42 UTC 64,521 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7357],{36059:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>W});var r=a(4930),o=a(65162),i=a(26735),s=a.n(i),n=a(53262),l=a(85795),_=a(97563),d=a(61269),c=a(60058),u=a(80120),p=a(75654),m=a(61824),f=a(47750),h=a(65672),g=a(30707),b=a(26222),x=a(68509),y=a(43800),w=a(16057),v=a(53911),k=a(45135),j=a(88049),N=a(67549),C=a(94778),z=a(46362),S=a(72580),A=a(12151),q=a(16266);let I=["10k","10mp","11mp","123","12mp","13mp","14mp","15mp","16mp","17mp","18_up_rating","18mp","19mp","1k","1k_plus","1x_mobiledata","20mp","21mp","22mp","23mp","24mp","2k","2k_plus","2mp","30fps","30fps_select","360","3d_rotation","3g_mobiledata","3k","3k_plus","3mp","3p","4g_mobiledata","4g_plus_mobiledata","4k","4k_plus","4mp","5g","5k","5k_plus","5mp","60fps","60fps_select","6_ft_apart","6k","6k_plus","6mp","7k","7k_plus","7mp","8k","8k_plus","8mp","9k","9k_plus","9mp","abc","ac_unit","access_alarm","access_alarms","access_time","access_time_filled","accessibility","accessibility_new","accessible","accessible_forward","account_balance","account_balance_wallet","account_box","account_circle","account_tree","ad_units","adb","add","add_a_photo","add_alarm","add_alert","add_box","add_business","add_call","add_card","add_chart","add_circle","add_circle_outline","add_comment","add_home","add_home_work","add_ic_call","add_link","add_location","add_location_alt","add_moderator","add_photo_alternate","add_reaction","add_road","add_shopping_cart","add_task","add_to_drive","add_to_home_screen","add_to_photos","add_to_queue","addchart","adf_scanner","adjust","admin_panel_settings","adobe","ads_click","agriculture","air","airline_seat_flat","airline_seat_flat_angled","airline_seat_individual_suite","airline_seat_legroom_extra","airline_seat_legroom_normal","airline_seat_legroom_reduced","airline_seat_recline_extra","airline_seat_recline_normal","airline_stops","airlines","airplane_ticket","airplanemode_active","airplanemode_inactive","airplanemode_off","airplanemode_on","airplay","airport_shuttle","alarm","alarm_add","alarm_off","alarm_on","album","align_horizontal_center","align_horizontal_left","align_horizontal_right","align_vertical_bottom","align_vertical_center","align_vertical_top","all_inbox","all_inclusive","all_out","alt_route","alternate_email","amp_stories","analytics","anchor","android","animation","announcement","aod","apartment","api","app_blocking","app_registration","app_settings_alt","app_shortcut","apple","approval","apps","apps_outage","architecture","archive","area_chart","arrow_back","arrow_back_ios","arrow_back_ios_new","arrow_circle_down","arrow_circle_left","arrow_circle_right","arrow_circle_up","arrow_downward","arrow_drop_down","arrow_drop_down_circle","arrow_drop_up","arrow_forward","arrow_forward_ios","arrow_left","arrow_outward","arrow_right","arrow_right_alt","arrow_upward","art_track","article","aspect_ratio","assessment","assignment","assignment_add","assignment_ind","assignment_late","assignment_return","assignment_returned","assignment_turned_in","assist_walker","assistant","assistant_direction","assistant_navigation","assistant_photo","assured_workload","atm","attach_email","attach_file","attach_money","attachment","attractions","attribution","audio_file","audiotrack","auto_awesome","auto_awesome_mosaic","auto_awesome_motion","auto_delete","auto_fix_high","auto_fix_normal","auto_fix_off","auto_graph","auto_mode","auto_stories","autofps_select","autorenew","av_timer","baby_changing_station","back_hand","backpack","backspace","backup","backup_table","badge","bakery_dining","balance","balcony","ballot","bar_chart","barcode_reader","batch_prediction","bathroom","bathtub","battery_0_bar","battery_1_bar","battery_2_bar","battery_3_bar","battery_4_bar","battery_5_bar","battery_6_bar","battery_alert","battery_charging_full","battery_full","battery_saver","battery_std","battery_unknown","beach_access","bed","bedroom_baby","bedroom_child","bedroom_parent","bedtime","bedtime_off","beenhere","bento","bike_scooter","biotech","blender","blind","blinds","blinds_closed","block","block_flipped","bloodtype","bluetooth","bluetooth_audio","bluetooth_connected","bluetooth_disabled","bluetooth_drive","bluetooth_searching","blur_circular","blur_linear","blur_off","blur_on","bolt","book","book_online","bookmark","bookmark_add","bookmark_added","bookmark_border","bookmark_outline","bookmark_remove","bookmarks","border_all","border_bottom","border_clear","border_color","border_horizontal","border_inner","border_left","border_outer","border_right","border_style","border_top","border_vertical","boy","branding_watermark","breakfast_dining","brightness_1","brightness_2","brightness_3","brightness_4","brightness_5","brightness_6","brightness_7","brightness_auto","brightness_high","brightness_low","brightness_medium","broadcast_on_home","broadcast_on_personal","broken_image","browse_gallery","browser_not_supported","browser_updated","brunch_dining","brush","bubble_chart","bug_report","build","build_circle","bungalow","burst_mode","bus_alert","business","business_center","cabin","cable","cached","cake","calculate","calendar_month","calendar_today","calendar_view_day","calendar_view_month","calendar_view_week","call","call_end","call_made","call_merge","call_missed","call_missed_outgoing","call_received","call_split","call_to_action","camera","camera_alt","camera_enhance","camera_front","camera_indoor","camera_outdoor","camera_rear","camera_roll","cameraswitch","campaign","cancel","cancel_presentation","cancel_schedule_send","candlestick_chart","car_crash","car_rental","car_repair","card_giftcard","card_membership","card_travel","carpenter","cases","casino","cast","cast_connected","cast_for_education","castle","catching_pokemon","category","celebration","cell_tower","cell_wifi","center_focus_strong","center_focus_weak","chair","chair_alt","chalet","change_circle","change_history","charging_station","chat","chat_bubble","chat_bubble_outline","check","check_box","check_box_outline_blank","check_circle","check_circle_outline","checklist","checklist_rtl","checkroom","chevron_left","chevron_right","child_care","child_friendly","chrome_reader_mode","church","circle","circle_notifications","class","clean_hands","cleaning_services","clear","clear_all","close","close_fullscreen","closed_caption","closed_caption_disabled","closed_caption_off","cloud","cloud_circle","cloud_done","cloud_download","cloud_off","cloud_queue","cloud_sync","cloud_upload","cloudy_snowing","co2","co_present","code","code_off","coffee","coffee_maker","collections","collections_bookmark","color_lens","colorize","comment","comment_bank","comments_disabled","commit","commute","compare","compare_arrows","compass_calibration","compost","compress","computer","confirmation_num","confirmation_number","connect_without_contact","connected_tv","connecting_airports","construction","contact_emergency","contact_mail","contact_page","contact_phone","contact_support","contactless","contacts","content_copy","content_cut","content_paste","content_paste_go","content_paste_off","content_paste_search","contrast","control_camera","control_point","control_point_duplicate","conveyor_belt","cookie","copy_all","copyright","coronavirus","corporate_fare","cottage","countertops","create","create_new_folder","credit_card","credit_card_off","credit_score","crib","crisis_alert","crop","crop_16_9","crop_3_2","crop_5_4","crop_7_5","crop_din","crop_free","crop_landscape","crop_original","crop_portrait","crop_rotate","crop_square","cruelty_free","css","currency_bitcoin","currency_exchange","currency_franc","currency_lira","currency_pound","currency_ruble","currency_rupee","currency_yen","currency_yuan","curtains","curtains_closed","cyclone","dangerous","dark_mode","dashboard","dashboard_customize","data_array","data_exploration","data_object","data_saver_off","data_saver_on","data_thresholding","data_usage","dataset","dataset_linked","date_range","deblur","deck","dehaze","delete","delete_forever","delete_outline","delete_sweep","delivery_dining","density_large","density_medium","density_small","departure_board","description","deselect","design_services","desk","desktop_access_disabled","desktop_mac","desktop_windows","details","developer_board","developer_board_off","developer_mode","device_hub","device_thermostat","device_unknown","devices","devices_fold","devices_other","dew_point","dialer_sip","dialpad","diamond","difference","dining","dinner_dining","directions","directions_bike","directions_boat","directions_boat_filled","directions_bus","directions_bus_filled","directions_car","directions_car_filled","directions_ferry","directions_off","directions_railway","directions_railway_filled","directions_run","directions_subway","directions_subway_filled","directions_train","directions_transit","directions_transit_filled","directions_walk","dirty_lens","disabled_by_default","disabled_visible","disc_full","discord","discount","display_settings","diversity_1","diversity_2","diversity_3","dnd_forwardslash","dns","do_disturb","do_disturb_alt","do_disturb_off","do_disturb_on","do_not_disturb","do_not_disturb_alt","do_not_disturb_off","do_not_disturb_on","do_not_disturb_on_total_silence","do_not_step","do_not_touch","dock","document_scanner","domain","domain_add","domain_disabled","domain_verification","done","done_all","done_outline","donut_large","donut_small","door_back","door_front","door_sliding","doorbell","double_arrow","downhill_skiing","download","download_done","download_for_offline","downloading","drafts","drag_handle","drag_indicator","draw","drive_eta","drive_file_move","drive_file_move_outline","drive_file_move_rtl","drive_file_rename_outline","drive_folder_upload","dry","dry_cleaning","duo","dvr","dynamic_feed","dynamic_form","e_mobiledata","earbuds","earbuds_battery","east","eco","edgesensor_high","edgesensor_low","edit","edit_attributes","edit_calendar","edit_document","edit_location","edit_location_alt","edit_note","edit_notifications","edit_off","edit_road","edit_square","egg","egg_alt","eject","elderly","elderly_woman","electric_bike","electric_bolt","electric_car","electric_meter","electric_moped","electric_rickshaw","electric_scooter","electrical_services","elevator","email","emergency","emergency_recording","emergency_share","emoji_emotions","emoji_events","emoji_flags","emoji_food_beverage","emoji_nature","emoji_objects","emoji_people","emoji_symbols","emoji_transportation","energy_savings_leaf","engineering","enhance_photo_translate","enhanced_encryption","equalizer","error","error_outline","escalator","escalator_warning","euro","euro_symbol","ev_station","event","event_available","event_busy","event_note","event_repeat","event_seat","exit_to_app","expand","expand_circle_down","expand_less","expand_more","explicit","explore","explore_off","exposure","exposure_minus_1","exposure_minus_2","exposure_neg_1","exposure_neg_2","exposure_plus_1","exposure_plus_2","exposure_zero","extension","extension_off","face","face_2","face_3","face_4","face_5","face_6","face_retouching_natural","face_retouching_off","facebook","fact_check","factory","family_restroom","fast_forward","fast_rewind","fastfood","favorite","favorite_border","favorite_outline","fax","featured_play_list","featured_video","feed","feedback","female","fence","festival","fiber_dvr","fiber_manual_record","fiber_new","fiber_pin","fiber_smart_record","file_copy","file_download","file_download_done","file_download_off","file_open","file_present","file_upload","file_upload_off","filter","filter_1","filter_2","filter_3","filter_4","filter_5","filter_6","filter_7","filter_8","filter_9","filter_9_plus","filter_alt","filter_alt_off","filter_b_and_w","filter_center_focus","filter_drama","filter_frames","filter_hdr","filter_list","filter_list_alt","filter_list_off","filter_none","filter_tilt_shift","filter_vintage","find_in_page","find_replace","fingerprint","fire_extinguisher","fire_hydrant","fire_hydrant_alt","fire_truck","fireplace","first_page","fit_screen","fitbit","fitness_center","flag","flag_circle","flaky","flare","flash_auto","flash_off","flash_on","flashlight_off","flashlight_on","flatware","flight","flight_class","flight_land","flight_takeoff","flip","flip_camera_android","flip_camera_ios","flip_to_back","flip_to_front","flood","flourescent","fluorescent","flutter_dash","fmd_bad","fmd_good","foggy","folder","folder_copy","folder_delete","folder_off","folder_open","folder_shared","folder_special","folder_zip","follow_the_signs","font_download","font_download_off","food_bank","forest","fork_left","fork_right","forklift","format_align_center","format_align_justify","format_align_left","format_align_right","format_bold","format_clear","format_color_fill","format_color_reset","format_color_text","format_indent_decrease","format_indent_increase","format_italic","format_line_spacing","format_list_bulleted","format_list_bulleted_add","format_list_numbered","format_list_numbered_rtl","format_overline","format_paint","format_quote","format_shapes","format_size","format_strikethrough","format_textdirection_l_to_r","format_textdirection_r_to_l","format_underline","format_underlined","fort","forum","forward","forward_10","forward_30","forward_5","forward_to_inbox","foun
1dation","free_breakfast","free_cancellation","front_hand","front_loader","fullscreen","fullscreen_exit","functions","g_mobiledata","g_translate","gamepad","games","garage","gas_meter","gavel","generating_tokens","gesture","get_app","gif","gif_box","girl","gite","goat","golf_course","gpp_bad","gpp_good","gpp_maybe","gps_fixed","gps_not_fixed","gps_off","grade","gradient","grading","grain","graphic_eq","grass","grid_3x3","grid_4x4","grid_goldenratio","grid_off","grid_on","grid_view","group","group_add","group_off","group_remove","group_work","groups","groups_2","groups_3","h_mobiledata","h_plus_mobiledata","hail","handshake","handyman","hardware","hd","hdr_auto","hdr_auto_select","hdr_enhanced_select","hdr_off","hdr_off_select","hdr_on","hdr_on_select","hdr_plus","hdr_strong","hdr_weak","headphones","headphones_battery","headset","headset_mic","headset_off","healing","health_and_safety","hearing","hearing_disabled","heart_broken","heat_pump","height","help","help_center","help_outline","hevc","hexagon","hide_image","hide_source","high_quality","highlight","highlight_alt","highlight_off","highlight_remove","hiking","history","history_edu","history_toggle_off","hive","hls","hls_off","holiday_village","home","home_filled","home_max","home_mini","home_repair_service","home_work","horizontal_distribute","horizontal_rule","horizontal_split","hot_tub","hotel","hotel_class","hourglass_bottom","hourglass_disabled","hourglass_empty","hourglass_full","hourglass_top","house","house_siding","houseboat","how_to_reg","how_to_vote","html","http","https","hub","hvac","ice_skating","icecream","image","image_aspect_ratio","image_not_supported","image_search","imagesearch_roller","import_contacts","import_export","important_devices","inbox","incomplete_circle","indeterminate_check_box","info","info_outline","input","insert_chart","insert_chart_outlined","insert_comment","insert_drive_file","insert_emoticon","insert_invitation","insert_link","insert_page_break","insert_photo","insights","install_desktop","install_mobile","integration_instructions","interests","interpreter_mode","inventory","inventory_2","invert_colors","invert_colors_off","invert_colors_on","ios_share","iron","iso","javascript","join_full","join_inner","join_left","join_right","kayaking","kebab_dining","key","key_off","keyboard","keyboard_alt","keyboard_arrow_down","keyboard_arrow_left","keyboard_arrow_right","keyboard_arrow_up","keyboard_backspace","keyboard_capslock","keyboard_command","keyboard_command_ke
1y","keyboard_control","keyboard_control_key","keyboard_double_arrow_down","keyboard_double_arrow_left","keyboard_double_arrow_right","keyboard_double_arrow_up","keyboard_hide","keyboard_option","keyboard_option_key","keyboard_return","keyboard_tab","keyboard_voice","king_bed","kitchen","kitesurfing","label","label_important","label_important_outline","label_off","label_outline","lan","landscape","landslide","language","laptop","laptop_chromebook","laptop_mac","laptop_windows","last_page","launch","layers","layers_clear","leaderboard","leak_add","leak_remove","leave_bags_at_home","legend_toggle","lens","lens_blur","library_add","library_add_check","library_books","library_music","light","light_mode","lightbulb","lightbulb_circle","lightbulb_outline","line_axis","line_style","line_weight","linear_scale","link","link_off","linked_camera","liquor","list","list_alt","live_help","live_tv","living","local_activity","local_airport","local_atm","local_attraction","local_bar","local_cafe","local_car_wash","local_convenience_store","local_dining","local_drink","local_fire_department","local_florist","local_gas_station","local_grocery_store","local_hospital","local_hotel","local_laundry_service","local_library","local_mall","local_movies","local_offer","local_parking","local_pharmacy","local_phone","local_pizza","local_play","local_police","local_post_office","local_print_shop","local_printshop","local_restaurant","local_see","local_shipping","local_taxi","location_city","location_disabled","location_history","location_off","location_on","location_pin","location_searching","lock","lock_clock","lock_open","lock_outline","lock_person","lock_reset","login","logo_dev","logout","looks","looks_3","looks_4","looks_5","looks_6","looks_one","looks_two","loop","loupe","low_priority","loyalty","lte_mobiledata","lte_plus_mobiledata","luggage","lunch_dining","lyrics","macro_off","mail","mail_lock","mail_outline","male","man","man_2","man_3","man_4","manage_accounts","manage_history","manage_search","map","maps_home_work","maps_ugc","margin","mark_as_unread","mark_chat_read","mark_chat_unread","mark_email_read","mark_email_unread","mark_unread_chat_alt","markunread","markunread_mailbox","masks","maximize","media_bluetooth_off","media_bluetooth_on","mediation","medical_information","medical_services","medication","medication_liquid","meeting_room","memory","menu","menu_book","menu_open","merge","merge_type","message","messenger","messenger_outline","mic","mic_external_off","mic_external_on","mic_none","mic_off","microwave","military_tech","minimize","minor_crash","miscellaneous_services","missed_video_call","mms","mobile_friendly","mobile_off","mobile_screen_share","mobiledata_off","mode","mode_comment","mode_edit","mode_edit_outline","mode_fan_off","mode_night","mode_of_travel","mode_standby","model_training","monetization_on","money","money_off","money_off_csred","monitor","monitor_heart","monitor_weight","monochrome_photos","mood","mood_bad","moped","more","more_horiz","more_time","more_vert","mosque","motion_photos_auto","motion_photos_off","motion_photos_on","motion_photos_pause","motion_photos_paused","motorcycle","mouse","move_down","move_to_inbox","move_up","movie","movie_creation","movie_edit","movie_filter","moving","mp","multiline_chart","multiple_stop","multitrack_audio","museum","music_note","music_off","music_video","my_library_add","my_library_books","my_library_music","my_location","nat","nature","nature_people","navigate_before","navigate_next","navigation","near_me","near_me_disabled","nearby_error","nearby_off","nest_cam_wired_stand","network_cell","network_check","network_locked","network_ping","network_wifi","network_wifi_1_bar","network_wifi_2_bar","network_wifi_3_bar","new_label","new_releases","newspaper","next_plan","next_week","nfc","night_shelter","nightlife","nightlight","nightlight_round","nights_stay","no_accounts","no_adult_content","no_backpack","no_cell","no_crash","no_drinks","no_encryption","no_encryption_gmailerrorred","no_flash","no_food","no_luggage","no_meals","no_meals_ouline","no_meeting_room","no_photography","no_sim","no_stroller","no_transfer","noise_aware","noise_control_off","nordic_walking","north","north_east","north_
1west","not_accessible","not_interested","not_listed_location","not_started","note","note_add","note_alt","notes","notification_add","notification_important","notifications","notifications_active","notifications_none","notifications_off","notifications_on","notifications_paused","now_wallpaper","now_widgets","numbers","offline_bolt","offline_pin","offline_share","oil_barrel","on_device_training","ondemand_video","online_prediction","opacity","open_in_browser","open_in_full","open_in_new","open_in_new_off","open_with","other_houses","outbond","outbound","outbox","outdoor_grill","outgoing_mail","outlet","outlined_flag","output","padding","pages","pageview","paid","palette","pallet","pan_tool","pan_tool_alt","panorama","panorama_fish_eye","panorama_fisheye","panorama_horizontal","panorama_horizontal_select","panorama_photosphere","panorama_photosphere_select","panorama_vertical","panorama_vertical_select","panorama_wide_angle","panorama_wide_angle_select","paragliding","park","party_mode","password","pattern","pause","pause_circle","pause_circle_filled","pause_circle_outline","pause_presentation","payment","payments","paypal","pedal_bike","pending","pending_actions","pentagon","people","people_alt","people_outline","percent","perm_camera_mic","perm_contact_cal","perm_contact_calendar","perm_data_setting","perm_device_info","perm_device_information","perm_identity","perm_media","perm_phone_msg","perm_scan_wifi","person","person_2","person_3","person_4","person_add","person_add_alt","person_add_alt_1","person_add_disabled","person_off","person_outline","person_pin","person_pin_circle","person_remove","person_remove_alt_1","person_search","personal_injury","personal_video","pest_control","pest_control_rodent","pets","phishing","phone","phone_android","phone_bluetooth_speaker","phone_callback","phone_disabled","phone_enabled","phone_forwarded","phone_in_talk","phone_iphone","phone_locked","phone_missed","phone_paused","phonelink","phonelink_erase","phonelink_lock","phonelink_off","phonelink_ring","phonelink_setup","photo","photo_album","photo_camera","photo_camera_back","photo_camera_front","photo_filter","photo_library","photo_size_select_actual","photo_size_select_large","photo_size_select_small","php","piano","piano_off","picture_as_pdf","picture_in_picture","picture_in_picture_alt","pie_chart","pie_chart_outline","pie_chart_outlined","pin","pin_drop","pin_end","pin_invoke","pinch","pivot_table_chart","pix","place","plagiarism","play_arrow","play_circle","play_circle_fill","play_circle_filled","play_circle_outline","play_disabled","play_for_work","play_lesson","playlist_add","playlist_add_check","playlist_add_check_circle","playlist_add_circle","playlist_play","playlist_remove","plumbing","plus_one","podcasts","point_of_sale","policy","poll","polyline","polymer","pool","portable_wifi_off","portrait","post_add","power","power_input","power_off","power_settings_new","precision_manufacturing","pregnant_woman","present_to_all","preview","price_change","price_check","print","print_disabled","priority_high","privacy_tip","private_connectivity","production_quantity_limits","propane","propane_tank","psychology","psychology_alt","public","public_off","publish","published_with_changes","punch_clock","push_pin","qr_code","qr_code_2","qr_code_scanner","query_builder","query_stats","question_answer","question_mark","queue","queue_music","queue_play_next","quick_contacts_dialer","quick_contacts_mail","quickreply","quiz","quora","r_mobiledata","radar","radio","radio_button_checked","radio_button_off","radio_button_on","radio_button_unchecked","railway_alert","ramen_dining","ramp_left","ramp_right","rate_review","raw_off","raw_on","read_more","real_estate_agent","rebase_edit","receipt","receipt_long","recent_actors","recommend","record_voice_over","rectangle","recycling","reddit","redeem","redo","reduce_capacity","refresh","remember_me","remove","remove_circle","remove_circle_outline","remove_done","remove_from_queue","remove_moderator","remove_red_eye","remove_road","remove_shopping_cart","reorder","repartition","repeat","repeat_on","repeat_one","repeat_one_on","replay","replay_10","replay_30","replay_5","replay_circle_filled","reply","reply_all","report","report_gmailerrorred","report_off","report_problem","request_page","request_quote","reset_tv","restart_alt","restaurant","restaurant_menu","restore","restore_from_trash","restore_page","reviews","rice_bowl","ring_volume","rocket","rocket_launch","roller_shades","roller_shades_closed","roller_skating","roofing","room","room_preferences","room_service","rotate_90_degrees_ccw","rotate_90_degrees_cw","rotate_left","rotate_right","roundabout_left","roundabout_right","rounded_corner","route","router","rowing","rss_feed","rsvp","rtt","rule","rule_folder","run_circle","running_with_errors","rv_hookup","safety_check","safety_divider","sailing","sanitizer","satellite","satellite_alt","save","save_alt","save_as","saved_search","savings","scale","scanner","scatter_plot","schedule","schedule_send","schema","school","science","score","scoreboard","screen_lock_landscape","screen_lock_portrait","screen_lock_rotation","screen_rotation","screen_rotation_alt","screen_search_desktop","screen_share","screenshot","screenshot_monitor","scuba_diving","sd","sd_card","sd_card_alert","sd_storage","search","search_off","security","security_update","security_update_good","security_update_warning","segment","select_all","self_improvement","sell","send","send_and_archive","send_time_extension","send_to_mobile","sensor_door","sensor_occupied","sensor_window","
1sensors","sensors_off","sentiment_dissatisfied","sentiment_neutral","sentiment_satisfied","sentiment_satisfied_alt","sentiment_very_dissatisfied","sentiment_very_satisfied","set_meal","settings","settings_accessibility","settings_applications","settings_backup_restore","settings_bluetooth","settings_brightness","settings_cell","settings_display","settings_ethernet","settings_input_antenna","settings_input_component","settings_input_composite","settings_input_hdmi","settings_input_svideo","settings_overscan","settings_phone","settings_power","settings_remote","settings_suggest","settings_system_daydream","settings_voice","severe_cold","shape_line","share","share_arrival_time","share_location","shelves","shield","shield_moon","shop","shop_2","shop_two","shopify","shopping_bag","shopping_basket","shopping_cart","shopping_cart_checkout","short_text","shortcut","show_chart","shower","shuffle","shuffle_on","shutter_speed","sick","sign_language","signal_cellular_0_bar","signal_cellular_4_bar","signal_cellular_alt","signal_cellular_alt_1_bar","signal_cellular_alt_2_bar","signal_cellular_connected_no_internet_0_bar","signal_cellular_connected_no_internet_4_bar","signal_cellular_no_sim","signal_cellular_nodata","signal_cellular_null","signal_cellular_off","signal_wifi_0_bar","signal_wifi_4_bar","signal_wifi_4_bar_lock","signal_wifi_bad","signal_wifi_connected_no_internet_4","signal_wifi_off","signal_wifi_statusbar_4_bar","signal_wifi_statusbar_connected_no_internet_4","signal_wifi_statusbar_null","signpost","sim_card","sim_card_alert","sim_card_download","single_bed","sip","skateboarding","skip_next","skip_previous","sledding","slideshow","slow_motion_video","smart_button","smart_display","smart_screen","smart_toy","smartphone","smoke_free","smoking_rooms","sms","sms_failed","snapchat","snippet_folder","snooze","snowboarding","snowing","snowmobile","snowshoeing","soap","social_distance","solar_power","sort","sort_by_alpha","sos","
1soup_kitchen","source","south","south_america","south_east","south_west","spa","space_bar","space_dashboard","spatial_audio","spatial_audio_off","spatial_tracking","speaker","speaker_group","speaker_notes","speaker_notes_off","speaker_phone","speed","spellcheck","splitscreen","spoke","sports","sports_bar","sports_baseball","sports_basketball","sports_cricket","sports_esports","sports_football","sports_golf","sports_gymnastics","sports_handball","sports_hockey","sports_kabaddi","sports_martial_arts","sports_mma","sports_motorsports","sports_rugby","sports_score","sports_soccer","sports_tennis","sports_volleyball","square","square_foot","ssid_chart","stacked_bar_chart","stacked_line_chart","stadium","stairs","star","star_border","star_border_purple500","star_half","star_outline","star_purple500","star_rate","stars","start","stay_current_landscape","stay_current_portrait","stay_primary_landscape","stay_primary_portrait","sticky_note_2","stop","stop_circle","stop_screen_share","storage","store","store_mall_directory","storefront","storm","straight","straighten","stream","streetview","strikethrough_s","stroller","style","subdirectory_arrow_left","subdirectory_arrow_right","subject","subscript","subscriptions","subtitles","subtitles_off","subway","summarize","sunny","sunny_snowing","superscript","supervised_user_circle","supervisor_account","support","support_agent","surfing","surround_sound","swap_calls","swap_horiz","swap_horizontal_circle","swap_vert","swap_vert_circle","swap_vertical_circle","swipe","swipe_down","swipe_down_alt","swipe_left","swipe_left_alt","swipe_right","swipe_right_alt","swipe_up","swipe_up_alt","swipe_vertical","switch_access_shortcut","switch_access_shortcut_add","switch_account","switch_camera","switch_left","switch_right","switch_video","synagogue","sync","sync_alt","sync_disabled","sync_lock","sync_problem","system_security_update","system_security_update_good","system_security_update_warning","system_update","system_update_alt","system_update_tv","tab","tab_unselected","table_bar","table_chart","table_restaurant","table_rows","table_view","tablet","tablet_android","tablet_mac","tag","tag_faces","takeout_dining","tap_and_play","tapas","task","task_alt","taxi_alert","telegram","temple_buddhist","temple_hindu","terminal","terrain","text_decrease","text_fields","text_format","text_increase","text_rotate_up","text_rotate_vertical","text_rotation_angledown","text_rotation_angleup","text_rotation_down","text_rotation_none","text_snippet","textsms","texture","theater_comedy","theaters","thermostat","thermostat_auto","thumb_down","thumb_down_alt","thumb_down_off_alt","thumb_up","thumb_up_alt","thumb_up_off_alt","thumbs_up_down","thunderstorm","tiktok","time_to_leave","timelapse","timeline","timer","timer_10","timer_10_select","timer_3","timer_3_select","timer_off","tips_and_updates","tire_repair","title","toc","today","toggle_off","toggle_on","token","toll","tonality","topic","tornado","touch_app","tour","toys","track_changes","traffic","train","tram","transcribe","transfer_within_a_station","transform","transgender","transit_enterexit","translate","travel_explore","trending_down","trending_flat","trending_neutral","trending_up","trip_origin","trolley","troubleshoot","try","tsunami","tty","tune","tungsten","turn_left","turn_right","turn_sharp_left","turn_sharp_right","turn_slight_left","turn_slight_right","turned_in","turned_in_not","tv","tv_off","two_wheeler","type_specimen","u_turn_left","u_turn_right","umbrella","unarchive","undo","unfold_less","unfold_less_double","unfold_more","unfold_more_double","unpublished","unsubscribe","upcoming","update","update_disabled","upgrade","upload","upload_file","usb","usb_off","vaccines","vape_free","vaping_rooms","verified","verified_user","vertical_align_bottom","vertical_align_center","vertical_align_top","vertical_distribute","vertical_shades","vertical_shades_closed","vertical_split","vibration","video_call","video_camera_back","video_camera_front","video_chat","video_collection","video_file","video_label","video_library","video_settings","video_stable","videocam","videocam_off","videogame_asset","videogame_asset_off","view_agenda","view_array","view_carousel","view_column","view_comfortable","view_comfy","view_comfy_alt","view_compact","view_compact_alt","view_cozy","view_day","view_headline","view_in_ar","view_kanban","view_list","view_module","view_quilt","view_sidebar","view_stream","view_timeline","view_week","vignette","villa","visibility","visibility_off","voice_chat","voice_over_off","voicemail","volcano","volume_down","volume_down_alt","volume_mute","volume_off","volume_up","volunteer_activism","vpn_key","vpn_key_off","vpn_lock","vrpano","wallet","wallet_giftcard","wallet_membership","wallet_travel","
1wallpaper","warehouse","warning","warning_amber","wash","watch","watch_later","watch_off","water","water_damage","water_drop","waterfall_chart","waves","waving_hand","wb_auto","wb_cloudy","wb_incandescent","wb_iridescent","wb_shade","wb_sunny","wb_twighlight","wb_twilight","wc","web","web_asset","web_asset_off","web_stories","webhook","wechat","weekend","west","whatshot","wheelchair_pickup","where_to_vote","widgets","width_full","width_normal","width_wide","wifi","wifi_1_bar","wifi_2_bar","wifi_calling","wifi_calling_3","wifi_channel","wifi_find","wifi_lock","wifi_off","wifi_password","wifi_protected_setup","wifi_tethering","wifi_tethering_error","wifi_tethering_error_rounded","wifi_tethering_off","wind_power","window","wine_bar","woman","woman_2","woo_commerce","wordpress","work","work_history","work_off","work_outline","workspace_premium","workspaces","workspaces_filled","workspaces_outline","wrap_text","wrong_location","wysiwyg","yard","youtube_searched_for","zoom_in","zoom_in_map","zoom_out","zoom_out_map"];function $({value:e,onChange:t}){let[a,i]=(0,o.useState)(""),s=(0,o.useMemo)(()=>{let e=a.trim().toLowerCase().replace(/\s+/g,"_");return(e?I.filter(t=>t.includes(e)):I).slice(0,60)},[a]);return(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(N.A,{size:12,className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,r.jsx)("input",{value:a,onChange:e=>i(e.target.value),placeholder:"Search icons…",className:"h-7 w-full rounded-md border border-input bg-white pl-7 pr-2 text-xs"})]}),(0,r.jsxs)("div",{className:"grid max-h-28 grid-cols-8 gap-1 overflow-y-auto",children:[(0,r.jsx)("button",{type:"button",title:"No icon (color only)",onClick:()=>t(null),className:`flex h-6 w-6 items-center justify-center rounded border transition ${!e?"border-black bg-accent":"border-border hover:bg-accent"}`,children:(0,r.jsx)(q.A,{size:13,className:"text-muted-foreground"})}),s.map(a=>(0,r.jsx)("button",{type:"button",title:a,onClick:()=>t(a),className:`flex h-6 w-6 items-center justify-center rounded border transition ${e===a?"border-black bg-accent":"border-border hover:bg-accent"}`,children:(0,r.jsx)("span",{className:"material-icons",style:{fontSize:15,lineHeight:1},children:a})},a))]})]})}let D="buildthingsagentswant2026",E=["#ef4444","#f97316","#f59e0b","#eab308","#84cc16","#22c55e","#10b981","#14b8a6","#06b6d4","#0ea5e9","#3b82f6","#6366f1","#8b5cf6","#a855f7","#d946ef","#ec4899","#f43f5e","#64748b","#0f172a","#78350f","#365314","#1e3a8a","#4a044e","#111827"],M="#3b82f6";function R(){return Math.random().toString(36).slice(2,8)+Date.now().toString(36).slice(-4)}let J="maptool:draft",U="maptool:auth",L=[8,16,24,40,64,100];function P({onUnlock:e}){let[t,a]=(0,o.useState)(""),[i,s]=(0,o.useState)(!1);return(0,r.jsx)("div",{className:"font-inter flex min-h-screen items-center justify-center bg-neutral-950 px-4",children:(0,r.jsxs)("form",{onSubmit:a=>{if(a.preventDefault(),t===D){try{localStorage.setItem(U,t)}catch{}e()}else s(!0)},className:"w-full max-w-sm rounded-xl border border-white/10 bg-neutral-900 p-6 shadow-xl",children:[(0,r.jsxs)("div",{className:"mb-4 flex items-center gap-2 text-white",children:[(0,r.jsx)(n.A,{size:18}),(0,r.jsx)("h1",{className:"text-lg font-semibold",children:"Map Creator"})]}),(0,r.jsx)("p",{className:"mb-4 text-sm text-white/50",children:"This tool is password protected. Enter the password to continue."}),(0,r.jsx)(z.p,{type:"password",autoFocus:!0,value:t,onChange:e=>{a(e.target.value),s(!1)},placeholder:"Password",className:"bg-neutral-800 text-white placeholder:text-white/30"}),i&&(0,r.jsx)("p",{className:"mt-2 text-sm text-red-400",children:"Incorrect password."}),(0,r.jsx)(C.$,{type:"submit",className:"mt-4 w-full",children:"Unlock"})]})})}function O(){let[e,t]=(0,o.useState)(()=>({id:R(),title:"Untitled Map",levels:[],nodes:[],edges:[],updatedAt:Date.now()})),[a,i]=(0,o.useState)(0),[s,n]=(0,o.useState)("move"),[q,I]=(0,o.useState)(null),[D,P]=(0,o.useState)(null),[O,T]=(0,o.useState)(null),[W,F]=(0,o.useState)(24),[H,B]=(0,o.useState)(!0),[
1K,X]=(0,o.useState)(!0),[V,Z]=(0,o.useState)(!1),[G,Y]=(0,o.useState)(null),[Q,ee]=(0,o.useState)(null),[et,ea]=(0,o.useState)(!1),[er,eo]=(0,o.useState)(!1),[ei,es]=(0,o.useState)(""),en=(0,o.useRef)(null),el=(0,o.useRef)(null),e_=(0,o.useRef)(!1),ed=(0,o.useRef)(e),ec=(0,o.useRef)([]),eu=(0,o.useRef)([]),[,ep]=(0,o.useState)(0);(0,o.useEffect)(()=>{ed.current=e},[e]);let em=ec.current.length>0,ef=eu.current.length>0,eh=(0,o.useRef)(null),eg=(0,o.useRef)(null),eb=(0,o.useRef)({node:()=>void 0,edge:()=>void 0,nudge:()=>void 0}),ex=(0,o.useCallback)(()=>{if(!ec.current.length)return;let e=ec.current[ec.current.length-1];ec.current=ec.current.slice(0,-1),eu.current=[ed.current,...eu.current],ed.current=e,t(e),Y(null),ep(e=>e+1)},[]),ey=(0,o.useCallback)(()=>{if(!eu.current.length)return;let e=eu.current[0];eu.current=eu.current.slice(1),ec.current=[...ec.current,ed.current],ed.current=e,t(e),Y(null),ep(e=>e+1)},[]);(0,o.useEffect)(()=>{if(e_.current)return;e_.current=!0;let e=new URLSearchParams(window.location.search).get("load");if(e)return void fetch(`/api/tools/map-creator/${encodeURIComponent(e)}`).then(e=>e.ok?e.json():null).then(e=>{e?.doc&&t(e.doc)}).catch(()=>void 0);let a=function(){try{let e=localStorage.getItem(J);return e?JSON.parse(e):null}catch{return null}}();a?.id&&t(a)},[]),(0,o.useEffect)(()=>{try{localStorage.setItem(J,JSON.stringify(e))}catch{}},[e]),(0,o.useEffect)(()=>{let e=e=>{let t=e.target,a=!!t&&("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable),r=e.metaKey||e.ctrlKey;if(r&&("z"===e.key||"Z"===e.key)){e.preventDefault(),e.shiftKey?ey():ex();return}if(r&&("y"===e.key||"Y"===e.key)){e.preventDefault(),ey();return}if("Escape"===e.key){T(null),P(null),I(null);return}if(!a&&!r){if(eh.current&&("ArrowUp"===e.key||"ArrowDown"===e.key||"ArrowLeft"===e.key||"ArrowRight"===e.key)){e.preventDefault();let t=e.shiftKey?.02:.004,a="ArrowLeft"===e.key?-t:"ArrowRight"===e.key?t:0,r="ArrowUp"===e.key?-t:"ArrowDown"===e.key?t:0;eb.current.nudge(eh.current,a,r);return}if("Delete"===e.key||"Backspace"===e.key)return void(eg.current?(e.preventDefault(),eb.current.edge(eg.current)):eh.current&&(e.preventDefault(),eb.current.node(eh.current)));"v"===e.key||"V"===e.key?n("move"):"p"===e.key||"P"===e.key?n("place"):"w"===e.key||"W"===e.key?n("waypoint"):("c"===e.key||"C"===e.key)&&n("connect")}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[ex,ey]);let ew=e.levels[a],ev=e.nodes.find(e=>e.id===q)??null,ek=e.edges.find(e=>e.id===D)??null,ej=(0,o.useCallback)(e=>{let a=ed.current,r={...e(a),updatedAt:Date.now()};ec.current=[...ec.current,a].slice(-100),eu.current=[],ed.current=r,t(r),Y(null),ep(e=>e+1)},[]),eN=async t=>{let a=await new Promise((e,a)=>{let r=new FileReader;r.onerror=()=>a(Error("Failed to read file")),r.onload=()=>{let o=new Image;o.onerror=()=>a(Error("Failed to decode image")),o.onload=()=>{let{width:r,height:i}=o,s=Math.min(1,2400/Math.max(r,i)),n=Math.round(r*s),l=Math.round(i*s),_=document.createElement("canvas");_.width=n,_.height=l;let d=_.getContext("2d");if(!d)return a(Error("Canvas unavailable"));d.drawImage(o,0,0,n,l);let c="image/png"===t.type;e({dataUrl:_.toDataURL(c?"image/png":"image/jpeg",.9),width:n,height:l})},o.src=r.result}
1,r.readAsDataURL(t)}),r=R();ej(e=>({...e,levels:[...e.levels,{id:r,name:`Level ${e.levels.length+1}`,image:a.dataUrl,naturalWidth:a.width,naturalHeight:a.height,rotation:0}]})),i(e.levels.length)},eC=(e,t)=>ej(a=>({...a,levels:a.levels.map(a=>a.id===e?{...a,...t}:a)})),ez=e=>{if(!ew)return;let t=90*Math.round(ew.rotation/90);eC(ew.id,{rotation:((t+e)%360+360)%360})},eS=(0,o.useCallback)((t,a)=>{var r,o,i,s;if(!ew||!H)return t;let n=null,l=.02;for(let r of e.nodes){if(r.levelId!==ew.id||r.id===a)continue;let e=Math.hypot(r.x-t.x,r.y-t.y);e<l&&(l=e,n=r)}return n?{x:n.x,y:n.y}:(r=t.x,o=t.y,{x:Math.round(r*(i=ew.naturalWidth)/W)*W/i,y:Math.round(o*(s=ew.naturalHeight)/W)*W/s})},[e.nodes,ew,W,H]),eA=(t,a,r)=>ew?e.nodes.find(e=>"waypoint"!==e.type&&e.id!==r&&e.levelId===ew.id&&12>Math.hypot((e.x-t)*ew.naturalWidth,(e.y-a)*ew.naturalHeight))??null:null,eq=(e,t)=>ej(a=>({...a,nodes:a.nodes.map(a=>a.id===e?{...a,...t}:a)})),eI=e=>{ej(t=>({...t,nodes:t.nodes.filter(t=>t.id!==e),edges:t.edges.filter(t=>t.from!==e&&t.to!==e)})),q===e&&I(null),O===e&&T(null)},e$=t=>e.nodes.find(e=>e.id===t)?.name||"Waypoint",eD=e=>{ej(t=>({...t,edges:t.edges.filter(t=>t.id!==e)})),D===e&&P(null)};eh.current=q,eg.current=D,eb.current={node:eI,edge:eD,nudge:(t,a,r)=>{let o=e.nodes.find(e=>e.id===t);if(!o)return;let i=Math.min(1,Math.max(0,o.x+a)),s=Math.min(1,Math.max(0,o.y+r));"waypoint"!==o.type&&eA(i,s,t)||ej(e=>({...e,nodes:e.nodes.map(e=>e.id===t?{...e,x:i,y:s}:e)}))}};let eE=t=>{let a=e.nodes.find(e=>e.id===t);if(!a)return;let r=e.levels.findIndex(e=>e.id===a.levelId);r>=0&&i(r),n("move"),T(null),I(t),P(null)},eM=t=>e.levels.find(e=>e.id===t)?.name??"",eR=ei.trim().toLowerCase(),eJ=(0,o.useMemo)(()=>e.nodes.filter(e=>"waypoint"!==e.type).filter(e=>!eR||e.name.toLowerCase().includes(eR)),[e.nodes,eR]),eU=(0,o.useMemo)(()=>e.nodes.filter(e=>"waypoint"===e.type),[e.nodes]),eL=async()=>{Z(!0),ee(null);try{let t=localStorage.getItem(U)??"",a=await fetch("/api/tools/map-creator/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:t,doc:e})}),r=await a.json();if(!a.ok)throw Error(r?.error||"Save failed");let o=r.slug||r.id,i=`${window.location.origin}/tools/map-creator/view/${o}`;Y(i)}catch(e){ee(e instanceof Error?e.message:"Save failed")}finally{Z(!1)}},eP=async e=>{let a=await e.text();try{let e=JSON.parse(a);e&&Array.isArray(e.levels)&&Array.isArray(e.nodes)&&(t({...e,updatedAt:Date.now()}),i(0),I(null),P(null))}catch{ee("Invalid JSON file")}},eO=[{id:"move",label:"Select",icon:(0,r.jsx)(l.A,{size:15}),hotkey:"V"},{id:"place",label:"Place",icon:(0,r.jsx)(_.A,{size:15}),hotkey:"P"},{id:"waypoint",label:"Path",icon:(0,r.jsx)(d.A,{size:15}),hotkey:"W"},{id:"connect",label:"Connect",icon:(0,r.jsx)(c.A,{size:15}),hotkey:"C"}];return(0,r.jsxs)("div",{className:"font-inter flex h-screen w-screen overflow-hidden bg-neutral-100 text-foreground",children:[(0,r.jsxs)("aside",{className:"flex h-full w-[340px] shrink-0 flex-col border-r border-border bg-white",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-border px-4 py-3",children:[(0,r.jsxs)("h1",{className:"flex items-center gap-2 text-base font-semibold",children:[(0,r.jsx)("img",{src:"/tools/aie-square-logo-black.svg",alt:"AI Engineer",className:"h-5 w-auto"}),"Map Creator"]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("button",{onClick:ex,disabled:!em,title:"Undo (⌘/Ctrl+Z)","aria-label":"Undo",className:"rounded-md border border-border p-1.5 text-muted-foreground transition hover:bg-accent disabled:opacity-40",children:(0,r.jsx)(u.A,{size:15})}),(0,r.jsx)("button",{onClick:ey,disabled:!ef,title:"Redo (⌘/Ctrl+Shift+Z)","aria-label":"Redo",className:"rounded-md border border-border p-1.5 text-muted-foreground transition hover:bg-accent disabled:opacity-40",children:(0,r.jsx)(p.A,{size:15})}),(0,r.jsxs)("span",{className:"rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground",children:[e.levels.length," level",1===e.levels.length?"":"s"]})]})]}),(0,r.jsxs)("div",{className:"flex-1 space-y-5 overflow-y-auto p-4",children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsx)(S.J,{htmlFor:"map-title",className:"text-xs",children:"Map title"}),(0,r.jsx)(z.p,{id:"map-title",value:e.title,onChange:e=>ej(t=>({...t,title:e.target.value}))})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(S.J,{className:"text-xs",children:"Levels"}),(0,r.jsxs)(C.$,{size:"sm",variant:"outline",onClick:()=>en.current?.click(),children:[(0,r.jsx)(m.A,{size:14,className:"mr-1"})," Upload"]}),(0,r.jsx)("input",{ref:en,type:"file",accept:"image/*",className:"hidden",onChange:e=>{let t=e.target.files?.[0];t&&eN(t),e.target.value=""}})]}),0===e.levels.length&&(0,r.jsx)("p",{className:"rounded-md border border-dashed border-border p-3 text-center text-xs text-muted-foreground",children:"Upload a map image to get started."}),(0,r.jsx)("div",{className:"space-y-1.5",children:e.levels.map((e,t)=>(0,r.jsxs)("div",{className:`flex items-center gap-2 rounded-md border p-2 ${t===a?"border-primary bg-accent":"border-border"}`,children:[(0,r.jsx)("button",{onClick:()=>{i(t),I(null),P(null)},className:"h-9 w-12 shrink-0 overflow-hidden rounded bg-muted","aria-label":`Select ${e.name}`,children:(0,r.jsx)("img",{src:e.image,alt:"",className:"h-full w-full object-cover"})}),(0,r.jsx)(z.p,{value:e.name,onChange:t=>eC(e.id,{name:t.target.value}),className:"h-8 flex-1 text-sm"}),(0,r.jsx)("button",{onClick:()=>{var t;return t=e.id,void(ej(e=>({...e,levels:e.levels.filter(e=>e.id!==t),nodes:e.nodes.filter(e=>e.levelId!==t),edges:e.edges.filter(a=>{let r=e.nodes.find(e=>e.id===a.from),o=e.nodes.find(e=>e.id===a.to);return r?.levelId!==t&&o?.levelId!==t})})),i(0))},className:"text-muted-foreground transition hover:text-destructive","aria-label":"Delete level",children:(0,r.jsx)(f.A,{size:15})})]},e.id))})]}),ew&&(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)(S.J,{className:"text-xs",children:["Rotate “",ew.name,"”"]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(C.$,{size:"sm",variant:"outline",onClick:()=>ez(-90),children:(0,r.jsx)(h.A,{size:14})}),(0,r.jsx)(C.$,{size:"sm",variant:"outline",onClick:()=>ez(90),children:(0,r.jsx)(g.A,{size:14})}),(0,r.jsxs)("span",{className:"text-xs tabular-nums text-muted-foreground",children:[ew.rotation,"\xb0 \xb7 90\xb0 steps"]})]})]}),ew&&(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(S.J,{className:"text-xs",children:"Compass (north)"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"range",min:0,max:359,value:ew.north??0,onChange:e=>eC(ew.id,{north:Number(e.target.value)}),className:"flex-1 accent-neutral-900"}),(0,r.jsxs)("span",{className:"w-9 text-right text-xs tabular-nums text-muted-foreground",children:[ew.north??0,"\xb0"]})]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"Rotate the compass so N points the right way on this floor."})]}),ew&&(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(S.J,{className:"text-xs",children:"Tool"}),(0,r.jsx)("div",{className:"grid grid-cols-2 gap-1.5",children:eO.map(e=>(0,r.jsxs)("button",{onClick:()=>{n(e.id),T(null)},className:`flex items-center gap-1.5 rounded-md border px-2.5 py-2 text-sm font-medium transition ${s===e.id?"border-primary bg-primary text-primary-foreground":"border-border bg-white hover:bg-accent"}`,children:[e.icon,e.label,(0,r.jsx)("span",{className:`ml-auto rounded px-1 text-[10px] font-semibold ${s===e.id?"bg-white/20":"bg-muted text-muted-foreground"}`,children:e.hotkey})]},e.id))}),(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["place"===s&&"Click the map to drop a named place.","waypoint"===s&&"Click to add path points along corridors.","connect"===s&&(O?`Drawing road from “${e$(O)}” — click a node, a road, or the map to extend; Esc to finish.`:"Click a node, a road, or the map to start a road, then keep clicking to draw it."),"move"===s&&"Click a point to edit it; drag or use arrow keys to reposition (Shift = larger steps)."]})]}),ew&&(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(S.J,{className:"text-xs",children:"Show labels"}),(0,r.jsx)("button",{type:"button",role:"switch","aria-checked":K,onClick:()=>X(e=>!e),className:`relative h-5 w-9 shrink-0 rounded-full transition ${K?"bg-primary":"bg-muted"}`,children:(0,r.jsx)("span",{className:`absolute top-0.5 h-4 w-4 roun
1ded-full bg-white shadow transition-all ${K?"left-[18px]":"left-0.5"}`})})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(S.J,{className:"text-xs",children:"Snap to grid"}),(0,r.jsx)("button",{type:"button",role:"switch","aria-checked":H,onClick:()=>B(e=>!e),className:`relative h-5 w-9 shrink-0 rounded-full transition ${H?"bg-primary":"bg-muted"}`,children:(0,r.jsx)("span",{className:`absolute top-0.5 h-4 w-4 rounded-full bg-white shadow transition-all ${H?"left-[18px]":"left-0.5"}`})})]}),H?(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsx)(S.J,{className:"text-xs",children:"Grid size (px)"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"range",min:4,max:100,step:2,value:Math.min(100,Math.max(4,W)),onChange:e=>F(Number(e.target.value)),className:"flex-1 accent-neutral-900"}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)(z.p,{type:"number",min:2,max:500,value:W,onChange:e=>{let t=Number(e.target.value);Number.isFinite(t)&&F(Math.min(500,Math.max(2,Math.round(t))))},className:"h-8 w-16 px-2 text-right text-xs tabular-nums"}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:"px"})]})]}),(0,r.jsx)("div",{className:"flex flex-wrap gap-1",children:L.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>F(e),className:`rounded border px-1.5 py-0.5 text-[11px] transition ${W===e?"border-primary bg-primary text-primary-foreground":"border-border bg-white hover:bg-accent"}`,children:e},e))}),(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Points snap to a ",W,"px grid (in image pixels). Type a value to override."]})]}):(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"Free placement — points drop exactly where you click so you can center them on background elements. Arrow keys still fine-tune."})]}),ek&&(0,r.jsxs)("div",{className:"space-y-2 rounded-md border border-border p-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(S.J,{className:"text-xs",children:"Selected road"}),(0,r.jsxs)("button",{onClick:()=>eD(ek.id),className:"flex items-center gap-1 text-xs text-destructive",children:[(0,r.jsx)(f.A,{size:13})," Delete"]})]}),(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:[e$(ek.from)," → ",e$(ek.to)]}),(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"Press Delete/Backspace to remove."})]})]}),(0,r.jsxs)("div",{className:"space-y-2 border-t border-border p-4",children:[G&&(0,r.jsxs)("div",{className:"space-y-1.5 rounded-md border border-green-200 bg-green-50 p-2 text-xs",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1 font-medium text-green-800",children:[(0,r.jsx)(b.A,{size:13})," Saved! Share this link:"]}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,r.jsx)("input",{readOnly:!0,value:G,className:"flex-1 truncate rounded border border-green-200 bg-white px-1.5 py-1"}),(0,r.jsx)("button",{onClick:()=>{G&&navigator.clipboard.writeText(G).then(()=>{ea(!0),setTimeout(()=>ea(!1),1500)})},className:"rounded bg-green-700 px-2 py-1 text-white",children:et?"Copied":"Copy"}),(0,r.jsx)("a",{href:G,target:"_blank",rel:"noreferrer",className:"rounded bg-neutral-900 px-2 py-1 text-white","aria-label":"Open view",children:(0,r.jsx)(x.A,{size:13})})]})]}),(0,r.jsxs)("div",{className:"space-y-1",children:[(0,r.jsx)(S.J,{className:"text-xs",children:"Custom link (optional)"}),(0,r.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-input bg-white px-2 text-xs text-muted-foreground",children:[(0,r.jsx)("span",{className:"shrink-0",children:"/tools/map-creator/view/"}),(0,r.jsx)("input",{value:e.slug??"",onChange:e=>t(t=>({...t,slug:e.target.value.toLowerCase().trim().replace(/[^a-z0-9-]+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"").slice(0,50)})),placeholder:"my-venue",className:"h-8 flex-1 bg-transparent py-1 text-foreground outline-none"})]})]}),Q&&(0,r.jsx)("p",{className:"text-xs text-destructive",children:Q}),(0,r.jsxs)(C.$,{onClick:eL,disabled:V||0===e.levels.length,className:"w-full",children:[(0,r.jsx)(y.A,{size:15,className:"mr-1.5"}),V?"Saving…":"Save & get share link"]}),(0,r.jsxs)("div",{className:"flex gap-2",children:[(0,r.jsxs)(C.$,{variant:"outline",className:"flex-1",onClick:()=>{let t=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),a=URL.createObjectURL(t),r=document.createElement("a");
1r.href=a,r.download=`${e.title.replace(/\s+/g,"-").toLowerCase()||"map"}.json`,r.click(),URL.revokeObjectURL(a)},children:[(0,r.jsx)(w.A,{size:14,className:"mr-1"})," Export"]}),(0,r.jsxs)(C.$,{variant:"outline",className:"flex-1",onClick:()=>el.current?.click(),children:[(0,r.jsx)(v.A,{size:14,className:"mr-1"})," Import"]}),(0,r.jsx)("input",{ref:el,type:"file",accept:"application/json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];t&&eP(t),e.target.value=""}})]})]})]}),(0,r.jsxs)("main",{className:"relative flex-1 bg-neutral-200",onDragOver:e=>{e.preventDefault(),er||eo(!0)},onDragLeave:e=>{e.currentTarget===e.target&&eo(!1)},onDrop:e=>{e.preventDefault(),eo(!1),Array.from(e.dataTransfer.files).filter(e=>e.type.startsWith("image/")).forEach(e=>eN(e))},children:[er&&(0,r.jsx)("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center border-4 border-dashed border-primary bg-primary/10",children:(0,r.jsxs)("div",{className:"rounded-lg bg-white/95 px-4 py-3 text-sm font-medium shadow",children:["Drop image",ew?" to add a level":" to start your map"]})}),ew?(0,r.jsx)(A.d,{level:ew,nodes:e.nodes,edges:e.edges,editable:!0,zoomable:!0,selectedNodeId:q,selectedEdgeId:D,nodeOverlay:ev&&(0,r.jsxs)("div",{className:"w-56 space-y-2 rounded-lg border border-border bg-white p-3 shadow-xl",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)(S.J,{className:"text-xs",children:"Edit point"}),(0,r.jsxs)("button",{onClick:()=>eI(ev.id),className:"flex items-center gap-1 text-xs text-destructive",children:[(0,r.jsx)(f.A,{size:13})," Delete"]})]}),(0,r.jsx)(z.p,{value:ev.name,placeholder:"Name",onChange:e=>eq(ev.id,{name:e.target.value})}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.J,{className:"text-[11px] text-muted-foreground",children:"Color"}),(0,r.jsx)("div",{className:"mt-1 grid grid-cols-8 gap-1",children:E.map(e=>{let t=(ev.color??M)===e;return(0,r.jsx)("button",{type:"button","aria-label":e,onClick:()=>eq(ev.id,{color:e}),className:`h-5 w-5 rounded-full border transition ${t?"border-black ring-2 ring-black ring-offset-1":"border-black/10 hover:scale-110"}`,style:{background:e}},e)})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)(S.J,{className:"text-[11px] text-muted-foreground",children:"Icon (optional)"}),(0,r.jsx)("div",{className:"mt-1",children:(0,r.jsx)($,{value:ev.icon??null,onChange:e=>eq(ev.id,{icon:e??void 0})})})]}),(0,r.jsxs)("button",{type:"button",onClick:()=>(t=>{if(!ew)return;let a=e.nodes.find(e=>e.id===t);if(!a)return;let r=ew.naturalWidth,o=ew.naturalHeight,i=new Set(e.edges.filter(e=>e.from===t||e.to===t).map(e=>e.from===t?e.to:e.from)),s=e.nodes.filter(e=>e.id!==t&&"waypoint"!==e.type&&e.levelId===ew.id&&!i.has(e.id)).map(e=>({n:e,d:Math.hypot((a.x-e.x)*r,(a.y-e.y)*o)})).sort((e,t)=>e.d-t.d);if(0===s.length)return;let n=.28*Math.min(r,o),l=s.filter(e=>e.d<=n).slice(0,6);0===l.length&&(l=[s[0]]),ej(e=>({...e,edges:[...e.edges,...l.map(e=>({id:R(),from:t,to:e.n.id}))]}))})(ev.id),className:"flex w-full items-center justify-center gap-1.5 rounded-md border border-input bg-white px-2 py-1.5 text-xs font-medium transition hover:bg-accent",children:[(0,r.jsx)(k.A,{size:13})," Connect to nearby places"]})]}),onStageClick:t=>{if(!ew)return;if("move"===s){I(null),P(null);return}let a=eS(t);if("connect"===s){let e=R(),t={id:e,levelId:ew.id,x:a.x,y:a.y,name:"",type:"waypoint"};ej(a=>{let r=O?[...a.edges,{id:R(),from:O,to:e}]:a.edges;return{...a,nodes:[...a.nodes,t],edges:r}}),T(e);return}if("place"!==s&&"waypoint"!==s)return;if("place"===s){let e=eA(a.x,a.y);if(e){I(e.id),P(null);return}}let r=R(),o={id:r,levelId:ew.id,x:a.x,y:a.y,name:"waypoint"===s?"":`Place ${e.nodes.filter(e=>"waypoint"!==e.type).length+1}`,type:"waypoint"===s?"waypoint":"room",..."place"===s?{color:M}:{}};ej(e=>({...e,nodes:[...e.nodes,o]})),"place"===s&&I(r)},onNodeClick:t=>{if("connect"===s){if(O)if(O===t)T(null);else{if(!e.edges.some(e=>e.from===O&&e.to===t||e.from===t&&e.to===O)){let e={id:R(),from:O,to:t};ej(t=>({...t,edges:[...t.edges,e]}))}T(t)}else T(t);return}I(t),P(null)},onNodeDrag:"move"===s?(t,a)=>{let r=eS(a,t),o=e.nodes.find(e=>e.id===t);o&&"waypoint"!==o.type&&eA(r.x,r.y,t)||ej(e=>({...e,nodes:e.nodes.map(e=>e.id===t?{...e,x:r.x,y:r.y}:e)}))}:void 0,onEdgeClick:(t,a)=>{if("connect"===s){var r,o;let i,s,n,l,_,d,c,u;if(!ew||!a)return;let p=e.edges.find(e=>e.id===t),m=p&&e.nodes.find(e=>e.id===p.from),f=p&&e.nodes.find(e=>e.id===p.to);if(!p||!m||!f)return;
1let h=(r=ew.naturalWidth,o=ew.naturalHeight,i=a.x*r,s=a.y*o,n=m.x*r,l=m.y*o,_=f.x*r-n,u=0==(c=_*_+(d=f.y*o-l)*d)?0:Math.max(0,Math.min(1,((i-n)*_+(s-l)*d)/c)),{x:(n+u*_)/r,y:(l+u*d)/o}),g=R(),b={id:g,levelId:ew.id,x:h.x,y:h.y,name:"",type:"waypoint"};ej(e=>{let a=e.edges.filter(e=>e.id!==t);return a.push({id:R(),from:p.from,to:g}),a.push({id:R(),from:g,to:p.to}),O&&a.push({id:R(),from:O,to:g}),{...e,nodes:[...e.nodes,b],edges:a}}),T(g);return}P(t),I(null)},showLabels:K,showGrid:H&&("place"===s||"waypoint"===s||"connect"===s),gridPx:W,showCompass:!0}):(0,r.jsxs)("div",{className:"flex h-full flex-col items-center justify-center gap-3 text-muted-foreground",children:[(0,r.jsx)(m.A,{size:40,strokeWidth:1.3}),(0,r.jsx)("p",{className:"text-sm",children:"Upload a map image from the sidebar to begin."}),(0,r.jsxs)(C.$,{variant:"outline",onClick:()=>en.current?.click(),children:[(0,r.jsx)(j.A,{size:15,className:"mr-1"})," Upload map image"]})]})]}),(0,r.jsxs)("aside",{className:"flex h-full w-[300px] shrink-0 flex-col border-l border-border bg-white",children:[(0,r.jsxs)("div",{className:"border-b border-border px-4 py-3",children:[(0,r.jsx)("h2",{className:"text-base font-semibold",children:"Items"}),(0,r.jsxs)("div",{className:"relative mt-2",children:[(0,r.jsx)(N.A,{size:14,className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,r.jsx)(z.p,{value:ei,onChange:e=>es(e.target.value),placeholder:"Search places…",className:"h-8 pl-8 text-sm"})]})]}),(0,r.jsxs)("div",{className:"flex-1 space-y-5 overflow-y-auto p-4 text-sm",children:[(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsxs)(S.J,{className:"text-xs",children:["Places (",eJ.length,")"]}),0===eJ.length?(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:eR?"No places match your search.":"No places yet."}):(0,r.jsx)("div",{className:"space-y-1",children:eJ.map(e=>(0,r.jsxs)("div",{className:`flex items-center gap-2 rounded-md border px-2 py-1.5 ${e.id===q?"border-primary bg-accent":"border-border"}`,children:[(0,r.jsx)("span",{className:"h-2.5 w-2.5 shrink-0 rounded-full",style:{background:e.color??(0,A._)(e.type)}}),(0,r.jsxs)("button",{onClick:()=>eE(e.id),className:"flex-1 truncate text-left text-sm",title:e.name,children:[e.name||"Untitled",(0,r.jsxs)("span",{className:"ml-1 text-xs text-muted-foreground",children:["\xb7 ",eM(e.levelId)]})]}),(0,r.jsx)("button",{onClick:()=>eI(e.id),className:"shrink-0 text-muted-foreground transition hover:text-destructive","aria-label":"Delete place",children:(0,r.jsx)(f.A,{size:14})})]},e.id))})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsxs)(S.J,{className:"text-xs",children:["Path points (",eU.length,")"]}),0===eU.length?(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"No path points yet."}):(0,r.jsx)("div",{className:"space-y-1",children:eU.map((e,t)=>(0,r.jsxs)("div",{className:`flex items-center gap-2 rounded-md border px-2 py-1.5 ${e.id===q?"border-primary bg-accent":"border-border"}`,children:[(0,r.jsx)("span",{className:"h-2.5 w-2.5 shrink-0 rounded-full",style:{background:(0,A._)("waypoint")}}),(0,r.jsxs)("button",{onClick:()=>eE(e.id),className:"flex-1 truncate text-left text-sm",children:["Path point ",t+1,(0,r.jsxs)("span",{className:"ml-1 text-xs text-muted-foreground",children:["\xb7 ",eM(e.levelId)]})]}),(0,r.jsx)("button",{onClick:()=>eI(e.id),className:"shrink-0 text-muted-foreground transition hover:text-destructive","aria-label":"Delete path point",children:(0,r.jsx)(f.A,{size:14})})]},e.id))})]}),(0,r.jsxs)("div",{className:"space-y-1.5",children:[(0,r.jsxs)(S.J,{className:"text-xs",children:["Roads / paths (",e.edges.length,")"]}),0===e.edges.length?(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"No roads yet."}):(0,r.jsx)("div",{className:"space-y-1",children:e.edges.map(t=>(0,r.jsxs)("div",{className:`flex items-center justify-between gap-2 rounded-md border px-2 py-1.5 text-sm transition ${t.id===D?"border-primary bg-accent":"border-border hover:bg-accent"}`,children:[(0,r.jsxs)("button",{onClick:()=>(t=>{let a=e.edges.find(e=>e.id===t);if(!a)return;let r=e.nodes.find(e=>e.id===a.from),o=r?e.levels.findIndex(e=>e.id===r.levelId):-1;o>=0&&i(o),n("move"),T(null),I(null),P(t)})(t.id),className:"flex-1 truncate text-left",children:[e$(t.from)," ↔ ",e$(t.to)]}),(0,r.jsx)("button",{onClick:()=>eD(t.id),className:"shrink-0 text-muted-foreground transition hover:text-destructive","aria-label":"Delete road",children:(0,r.jsx)(f.A,{size:14})})]},t.id))})]})]})]})]})}function T(){let[e,t]=(0,o.useState)(!1),[a,i]=(0,o.useState)(!1);return((0,o.useEffect)(()=>{try{t(localStorage.getItem(U)===D)}catch{}i(!0)},[]),a)?e?(0,r.jsx)(O,{}):(0,r.jsx)(P,{onUnlock:()=>t(!0)}):null}let W=s()(()=>Promise.resolve(T),{ssr:!1,loading:()=>(0,r.jsx)("div",{className:"fixed inset-0 flex items-center justify-center bg-neutral-950 text-white/50",children:"Loading…"})})},46362:(e,t,a)=>{"use strict";a.d(t,{p:()=>s});var r=a(4930),o=a(65162),i=a(53441);let s=o.forwardRef(({className:e,type:t,...a},o)=>(0,r.jsx)("input",{type:t,className:(0,i.cn)("border-input ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border bg-transparent px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-hidden focu
1s-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));s.displayName="Input"},72580:(e,t,a)=>{"use strict";a.d(t,{J:()=>_});var r=a(4930),o=a(65162),i=a(41668),s=a(2244),n=a(53441);let l=(0,s.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),_=o.forwardRef(({className:e,...t},a)=>(0,r.jsx)(i.b,{ref:a,className:(0,n.cn)(l(),e),...t}));_.displayName=i.b.displayName},84169:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/tools/map-creator",function(){return a(36059)}])},94778:(e,t,a)=>{"use strict";a.d(t,{$:()=>_});var r=a(4930),o=a(65162),i=a(99949),s=a(2244),n=a(53441);let l=(0,s.F)("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none ring-offset-background",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"underline-offset-4 hover:underline text-primary"},size:{default:"h-10 py-2 px-4",sm:"h-9 px-3 rounded-md",lg:"h-11 px-8 rounded-md"}},defaultVariants:{variant:"default",size:"default"}}),_=o.forwardRef(({className:e,variant:t,size:a,asChild:o=!1,...s},_)=>{let d=o?i.DX:"button";return(0,r.jsx)(d,{className:(0,n.cn)(l({variant:t,size:a,className:e})),ref:_,...s})});_.displayName="Button"}},e=>{e.O(0,[9330,5967,2151,636,6593,8792],()=>e(e.s=84169)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.