var AiRouter=(function(app){'use strict';const validation_messages={path_and_options_requirement:'AiRouter: Path and Options are required paramethers. (Please see documentation)',prefix_and_options_requirement:'AiRouter: Prefix and Options are required paramethers. (Please see documentation)',option_requierment:'AiRouter: Options is required. (Please see documentation)',options_object_requirement:'AiRouter: Options paramether must be Object. (Please see documentation)',options_not_match_requestments:'AiRouter: Options does not match requirements. (Please see documentation)',not_roted_paths:'AiRouter: No Routes Found. (Please see documentation)',path_or_prefix_requirement:'AiRouter: Path and Prefix must be Sting. (Please see documentation)'};var _mode=null;var _routes;var _current_route=null;var _not_routed_paths={action:()=>{throw new Error(validation_messages.not_roted_paths)}};var _groups;function AiRouter(){_routes=[];_groups=[];listener()} AiRouter.prototype.route=function(path,options){if(!path||!options){throw new Error(validation_messages.path_and_options_requirement)} checkPrefixOrPath(path);cheackOptions(options);_routes.push({path:path,beforeAction:options.beforeAction,action:options.action,afterAction:options.afterAction})};AiRouter.prototype.mode=function(mode){_mode=mode};AiRouter.prototype.go=function(path){window.location.href=path};AiRouter.prototype.notFound=function(options){cheackOptions(options);_not_routed_paths=options};AiRouter.prototype.group=function(prefix,options){if(!prefix||!options){throw new Error(validation_messages.prefix_and_options_requirement)} checkPrefixOrPath(prefix);cheackOptions(options);_groups.push({prefix:prefix,beforeAction:options.beforeAction,action:options.action,afterAction:options.afterAction})};function checkForRoute(){var isMatch=!1;var route=null;var current_params=_current_route.split('/');for(var x=0;x<_routes.length;x++){var routed_params=_routes[x].path.split('/');if(current_params.length===routed_params.length){var isParamsMatch=!0;for(var i=0;i