@ -1,47 +1,31 @@ 
				
			 
			
		
	
		
		
			
				
					 
					 
					/ * *  
					 
					 
					/ * *  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 *  @file  Capacitor  Platform  Entry  Point  
					 
					 
					 *  @file  Capacitor  Main  Entry  Point  
				
			 
			
				
				
			
		
	
		
		
			
				
					 
					 
					 *  @description  Initializes  the  application  for  Capacitor  platform  ( iOS / Android )  
					 
					 
					 
				
			 
			
		
	
		
		
	
		
		
			
				
					 
					 
					 *  @author  Matthew  Raymer  
					 
					 
					 *  @author  Matthew  Raymer  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					 *  @version  0.4 . 4  
					 
					 
					 *   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *  
					 
					 
					 *  This  file  initializes  the  deep  linking  system  for  the  TimeSafari  app .  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *  Process  Flow :  
					 
					 
					 *  It  sets  up  the  connection  between  Capacitor ' s  URL  handling  and  our  deep  link  processor .  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *  1 .  Initialization  
					 
					 
					 *   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *     -  Logs  start  of  initialization  
					 
					 
					 *  Deep  Linking  Flow :  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *     -  Logs  current  platform  
					 
					 
					 *  1 .  Capacitor  receives  URL  open  event  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *     -  Initializes  core  application  via  main . common  
					 
					 
					 *  2 .  Event  is  passed  to  DeepLinkHandler  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *  
					 
					 
					 *  3 .  URL  is  validated  and  processed  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *  2 .  Error  Handling  Setup  
					 
					 
					 *  4 .  Router  navigates  to  appropriate  view  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *     -  Registers  global  unhandled  promise  rejection  handler  
					 
					 
					 *   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *     -  Routes  API  errors  to  error  handling  system  
					 
					 
					 *  Integration  Points :  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *  
					 
					 
					 *  -  Capacitor  App  plugin  for  URL  handling  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *  3 .  Deep  Linking  Configuration  
					 
					 
					 *  -  Vue  Router  for  navigation  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *     -  Registers  URL  scheme  handler  ( timesafari : //)
  
					 
					 
					 *  -  Error  handling  system  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *     -  Supports  11  parameterized  routes :  
					 
					 
					 *  -  Logging  system  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *       *  claim - add - raw  
					 
					 
					 *   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *       *  claim - cert  
					 
					 
					 *  Type  Safety :  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *       *  claim  
					 
					 
					 *  -  Uses  DeepLinkHandler  for  type - safe  parameter  processing  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *       *  confirm - gift  
					 
					 
					 *  -  Ensures  type  safety  between  Capacitor  events  and  app  routing  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *       *  contact - edit  
					 
					 
					 *  -  Maintains  type  checking  through  the  entire  deep  link  flow  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *       *  contact - import  
					 
					 
					 *   
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *       *  did  
					 
					 
					 *  @example  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *       *  invite - one - accept  
					 
					 
					 *  // URL open event from OS
  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *       *  offer - details  
					 
					 
					 *  timesafari : //claim/123?view=details
  
				
			 
			
				
				
			
		
	
		
		
			
				
					
					 
					 
					 *       *  project  
					 
					 
					 *  // Processed and routed to appropriate view with type-safe parameters
  
				
			 
			
				
				
			
		
	
		
		
			
				
					 
					 
					 *       *  userProfile  
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					 
					 
					 *  
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					 
					 
					 *  4 .  Application  Mounting  
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					 
					 
					 *     -  Mounts  Vue  application  to  DOM  
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					 
					 
					 *     -  Logs  completion  of  mounting  process  
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					 
					 
					 *  
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					 
					 
					 *  Security  Measures :  
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					 
					 
					 *  -  URL  validation  before  processing  
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					 
					 
					 *  -  Type - safe  error  handling  
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					 
					 
					 *  -  Parameterized  route  pattern  matching  
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					 
					 
					 *  -  Comprehensive  error  logging  
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					 
					 
					 *  
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					 
					 
					 *  @example  Deep  Link  Format  
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					 
					 
					 *  timesafari : //<route>/<parameter>
  
					 
					 
					 
				
			 
			
		
	
		
		
			
				
					 
					 
					 *  timesafari : //claim/01JMAAFZRNSRTQ0EBSD70A8E1H
  
					 
					 
					 
				
			 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 
					 
					 * /  
					 
					 
					 * /  
				
			 
			
		
	
		
		
			
				
					 
					 
					
 
					 
					 
					
 
				
			 
			
		
	
		
		
			
				
					 
					 
					import  {  initializeApp  }  from  "./main.common" ;  
					 
					 
					import  {  initializeApp  }  from  "./main.common" ;  
				
			 
			
		
	
	
		
		
			
				
					
						
							
								 
							 
						
						
							
								 
							 
						
						
					 
					@ -88,7 +72,9 @@ const handleDeepLink = async (data: { url: string }) => { 
				
			 
			
		
	
		
		
			
				
					 
					 
					    await  deepLinkHandler . handleDeepLink ( data . url ) ;  
					 
					 
					    await  deepLinkHandler . handleDeepLink ( data . url ) ;  
				
			 
			
		
	
		
		
			
				
					 
					 
					  }  catch  ( error )  {  
					 
					 
					  }  catch  ( error )  {  
				
			 
			
		
	
		
		
			
				
					 
					 
					    logConsoleAndDb ( "[DeepLink] Error handling deep link: "  +  error ,  true ) ;  
					 
					 
					    logConsoleAndDb ( "[DeepLink] Error handling deep link: "  +  error ,  true ) ;  
				
			 
			
		
	
		
		
			
				
					
					 
					 
					    handleApiError ( error ,  "deep-link" ) ;  
					 
					 
					    handleApiError ( {   
				
			 
			
				
				
			
		
	
		
		
	
		
		
			
				
					 
					 
					 
					 
					 
					      message : error  instanceof  Error  ?  error.message  : String ( error )  
				
			 
			
		
	
		
		
			
				
					 
					 
					 
					 
					 
					    }  as  AxiosError ,  "deep-link" ) ;  
				
			 
			
		
	
		
		
			
				
					 
					 
					  }  
					 
					 
					  }  
				
			 
			
		
	
		
		
			
				
					 
					 
					} ;  
					 
					 
					} ;