| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -3,6 +3,10 @@ tag app-links | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						selection_index = 0 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						bang = no | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def mount | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							p document | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							$links-input.focus! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def increment_selection_index | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							selection_index = Math.min(state.sorted_links.length - 1, selection_index + 1) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -10,14 +14,11 @@ tag app-links | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							selection_index = Math.max(0, selection_index - 1) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						get active_bang | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							return bang or config.default_bang | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							return bang or config.data.default_bang | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						get encoded_bang_query | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							"{active_bang.url}{window.encodeURIComponent(state.query)}" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def mount | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							$links-input.focus! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						get math_result | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							try | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								let result = Number(eval_math state.query) | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -29,11 +30,101 @@ tag app-links | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def handle_input | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							selection_index = 0 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							sort_links! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							api.sort_links! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def handle_edit link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							prior_query = state.query | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							editing_link = link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							state.query = construct_link_text(link) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def make_edit link, new_link_text | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							def edit_link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								try | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									await update_link link, new_link_text | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								catch e | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									return err "editing link", e | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							state.loading = yes | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							await edit_link! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							state.loading = no | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def handle_click_link link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if link.is_bang | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								state.query = '' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								bang = link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							else | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								navigate link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def handle_bang | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							await increment_link_frequency active_bang | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							window.location.href = encoded_bang_query | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def handle_click_bang | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							handle_bang! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def navigate link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							await increment_link_frequency link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							window.location.href = link.url | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def handle_return | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							return if editing_link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if bang or state.sorted_links.length < 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								return handle_bang! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							let link = selected_link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if link.is_bang | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								state.query = '' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								bang = link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							else | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								navigate link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def handle_del | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if state.query.length < 1 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								bang = no | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								api.sort_links! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def handle_click_delete link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							return unless window.confirm "Do you really want to delete {link..display_name}?" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							handle_delete link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def handle_click_edit link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							handle_edit link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def handle_click_pin link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							api.pin_link link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def handle_shift_backspace | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if editing_link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								await handle_delete editing_link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							else | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								return unless state.sorted_links.length > 0 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								handle_edit selected_link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def handle_shift_return | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							def go | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								if viewing_community_links | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									try | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										await add_community_link selected_link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									catch e | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										err "adding community link", e | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								elif editing_link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									try | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										await update_link editing_link, state.query | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									catch e | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										err "updating link", e | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								else | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									handle_add! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							state.loading = yes | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							await go! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							editing_link = no | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							state.query = '' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							api.sort_links! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							state.loading = no | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def toggle_settings | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							refs.settings.open! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
						def render | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							<self> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							<self[w:100%]> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								css .link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									d:flex fld:row jc:space-between ai:center | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -99,109 +190,114 @@ tag app-links | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								css .right | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									d:flex jc:right | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								<.header> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								if $as.active | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									<app-settings$as> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								else | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									<.header> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										<.side.left@click=api.toggle_effective_names> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											if config.data.enable_effective_names | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<svg src="../assets/eye.svg"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											else | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<svg src="../assets/eye-off.svg"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										<input$links-input | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											bind=state.query | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@hotkey('return').capture.if(!state.loading)=handle_return | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@hotkey('tab').capture.if(!state.loading)=api.toggle_effective_names | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@hotkey('esc').capture.if(!state.loading)=toggle_settings | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@hotkey('shift+return').capture.if(!state.loading)=handle_shift_return | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@hotkey('esc').capture.if(!state.loading)=handle_esc | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@hotkey('shift+backspace').capture.if(!state.loading)=handle_shift_backspace | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@hotkey('down').capture.if(!state.loading)=increment_selection_index | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@hotkey('up').capture.if(!state.loading)=decrement_selection_index | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@keydown.del.if(!state.loading)=handle_del | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@input.if(!state.loading)=handle_input | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@paste.if(!state.loading)=handle_paste | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@blur=this.focus | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@cut=handle_cut | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											disabled=state.loading | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									<.side.left@click=api.toggle_effective_names> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										if config.enable_effective_names | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<svg src="../assets/eye.svg"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										if (let m = math_result) isnt no | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<.side.right[c:blue3 fs:20px ml:10px w:unset] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												@click=handle_click_copy(m) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											> "= {Math.round(m * 100)/100}" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										else | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<svg src="../assets/eye-off.svg"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									<input$links-input | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										bind=state.query | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										@hotkey('return').capture.if(!state.loading)=handle_return | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										@hotkey('tab').capture.if(!state.loading)=api.toggle_effective_names | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										@hotkey('shift+return').capture.if(!state.loading)=handle_shift_return | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										@hotkey('esc').capture.if(!state.loading)=handle_esc | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										@hotkey('shift+backspace').capture.if(!state.loading)=handle_shift_backspace | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										@hotkey('down').capture.if(!state.loading)=increment_selection_index | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										@hotkey('up').capture.if(!state.loading)=decrement_selection_index | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										@keydown.del.if(!state.loading)=handle_del | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										@input.if(!state.loading)=handle_input | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										@paste.if(!state.loading)=handle_paste | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										@blur=this.focus | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										@cut=handle_cut | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										disabled=state.loading | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									if (let m = math_result) isnt no | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										<.side.right[c:blue3 fs:20px ml:10px w:unset] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@click=handle_click_copy(m) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										> "= {Math.round(m * 100)/100}" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									else | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										<.side.right @click.if(!state.loading)=toggle_settings> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<svg src="../assets/settings.svg"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								if config.enable_tips and not config.enable_simplify_ui | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									<.middle-button> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										<.tip[jc:start ta:left fl:1] @click=handle_return> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<.tip-hotkey> "Return" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<.tip-content> "Navigate To Link" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										<.tip[jc:center ta:center fl:2 px:15px] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@click=handle_shift_return | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<.tip-hotkey> "Shift + Return" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<.tip-content[of:hidden text-overflow:ellipsis white-space:nowrap]> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<span> "Add New Link" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<span[ws:pre]> " " | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												let sq = state.query.trim!.split /\s+/ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												if sq.length >= 2 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													let url = sq.pop! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<span> '"' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<span> sq.join ' ' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<span[ws:pre]> ' ' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<span[c:blue3]> url | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<span> '"' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												else | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<span> '"' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<span> sq.join ' ' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<span> '"' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										<.tip[jc:end ta:right fl:1] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@click=handle_shift_backspace | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<.tip-hotkey> "Shift + Backspace" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<.tip-content> "Edit Link" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<.side.right @click.if(!state.loading)=toggle_settings> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<svg src="../assets/settings.svg"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									if config.data.enable_tips | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										<.middle-button> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<.tip[jc:start ta:left fl:1] @click=handle_return> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<.tip-hotkey> "Return" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<.tip-content> "Navigate To Link" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<.tip[jc:center ta:center fl:2 px:15px] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												@click=handle_shift_return | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<.tip-hotkey> "Shift + Return" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<.tip-content[of:hidden text-overflow:ellipsis white-space:nowrap]> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<span> "Add New Link" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<span[ws:pre]> " " | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													let sq = state.query.trim!.split /\s+/ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													if sq.length >= 2 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														let url = sq.pop! | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														<span> '"' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														<span> sq.join ' ' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														<span[ws:pre]> ' ' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														<span[c:blue3]> url | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														<span> '"' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													else | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														<span> '"' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														<span> sq.join ' ' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														<span> '"' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<.tip[jc:end ta:right fl:1] | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												@click=handle_shift_backspace | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<.tip-hotkey> "Shift + Backspace" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<.tip-content> "Edit Link" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								<div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									css d:flex fld:column jc:flex-start fl:1 w:100% ofy:auto pt:15px | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									<div> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										css d:flex fld:column jc:flex-start fl:1 w:100% ofy:auto pt:15px | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									if not viewing_community_links and (bang or state.sorted_links.length < 1) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										<a.link.selected | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											href=encoded_bang_query | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											@click=handle_click_bang | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<.link-left> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<img.link-icon src=active_bang.icon> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<.display-name.bang-text> encoded_bang_query | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<.link-right[jc:flex-end]> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<.frequency> active_bang.frequency | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
									else | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										for link, index in state.sorted_links | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<a.link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												href=link.url | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												@pointerover=(selection_index = index) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												@click.prevent=handle_click_link(link) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												.selected=(index is selection_index) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										if not viewing_community_links and (bang or state.sorted_links.length < 1) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											<a.link.selected | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												href=encoded_bang_query | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												@click=handle_click_bang | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<.link-left> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<img.link-icon src=link.icon> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<.display-name | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														[c:#FAD4AB]=link.is_bang | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													> link.display_name | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													if link.display_name isnt link.name and config.enable_effective_names | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														<.name> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
															<span.parens> "(" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
															<span> link.name | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
															<span.parens> ")" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<.link-right> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<.link-buttons .buttons-disabled=(not config.enable_buttons or config.enable_simplify_ui)> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														<.link-button@click.prevent.stop=handle_click_edit(link)> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
															<svg src='../assets/edit-2.svg'> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														<.link-button@click.prevent.stop=handle_click_delete(link)> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
															<svg src='../assets/trash.svg'> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														<.link-button | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
															@click.prevent.stop=handle_click_pin(link) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
															[visibility:visible c:purple3/50]=(link.is_pinned and (index isnt selection_index or not config.enable_buttons or config.enable_simplify_ui)) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
															<svg src='../assets/star.svg'> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<.frequency> link.frequency | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<img.link-icon src=active_bang.icon> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<.display-name.bang-text> encoded_bang_query | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<.link-right[jc:flex-end]> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<.frequency> active_bang.frequency | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
										else | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
											for link, index in state.sorted_links | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												<a.link | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													href=link.url | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													@pointerover=(selection_index = index) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													@click.prevent=handle_click_link(link) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													.selected=(index is selection_index) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
												> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<.link-left> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														<img.link-icon src=link.icon> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														<.display-name | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
															[c:#FAD4AB]=link.is_bang | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														> link.display_name | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														if link.display_name isnt link.name and config.data.enable_effective_names | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
															<.name> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
																<span.parens> "(" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
																<span> link.name | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
																<span.parens> ")" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
													<.link-right> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														<.link-buttons .buttons-disabled=!config.data.enable_buttons> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
															<.link-button@click.prevent.stop=handle_click_edit(link)> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
																<svg src='../assets/edit-2.svg'> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
															<.link-button@click.prevent.stop=handle_click_delete(link)> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
																<svg src='../assets/trash.svg'> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
															<.link-button | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
																@click.prevent.stop=handle_click_pin(link) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
																[visibility:visible c:purple3/50]=(link.is_pinned and (index isnt selection_index or not config.data.enable_buttons)) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
															> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
																<svg src='../assets/star.svg'> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
														<.frequency> link.frequency | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
					 | 
				
				 | 
				
					
  |