frontexpress/frontexpress.min.js

1 line
24 KiB
JavaScript

!function(modules){function __webpack_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={exports:{},id:moduleId,loaded:!1};return modules[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}var installedModules={};return __webpack_require__.m=modules,__webpack_require__.c=installedModules,__webpack_require__.p="",__webpack_require__(0)}([function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _frontexpress=__webpack_require__(8);_interopRequireDefault(_frontexpress)},function(module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),Middleware=function(){function Middleware(){var name=arguments.length<=0||void 0===arguments[0]?"":arguments[0];_classCallCheck(this,Middleware),this.name=name}return _createClass(Middleware,[{key:"entered",value:function(request){}},{key:"exited",value:function(request){}},{key:"updated",value:function(request,response){}},{key:"failed",value:function(request,response){}},{key:"next",value:function(){return!0}}]),Middleware}();exports["default"]=Middleware,module.exports=exports["default"]},function(module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=["GET","HEAD","POST","PUT","DELETE","CONNECT","OPTIONS","TRACE","PATCH"],module.exports=exports["default"]},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_methods=__webpack_require__(2),_methods2=_interopRequireDefault(_methods),_middleware=__webpack_require__(1),_middleware2=_interopRequireDefault(_middleware),Route=function(){function Route(router,uriPart,method,middleware){_classCallCheck(this,Route),this.router=router,this.uriPart=uriPart,this.method=method,this.middleware=middleware,this.visited=!1}return _createClass(Route,[{key:"uri",get:function(){if(this.uriPart||this.method)return this.uriPart instanceof RegExp?this.uriPart:this.router.baseUri instanceof RegExp?this.router.baseUri:this.router.baseUri&&this.uriPart?(this.router.baseUri.trim()+this.uriPart.trim()).replace(/\/{2,}/,"/"):this.router.baseUri?this.router.baseUri.trim():this.uriPart}}]),Route}(),Router=function(){function Router(uri){_classCallCheck(this,Router),uri&&(this._baseUri=uri),this._routes=[]}return _createClass(Router,[{key:"_add",value:function(route){return this._routes.push(route),this}},{key:"routes",value:function(uri,method){return this._routes.filter(function(route){if(!route.uri&&!route.method)return!0;if(route.method!==method)return!1;if(!route.uri)return!0;var uriToCheck=uri,questionMarkIndex=uriToCheck.indexOf("?");questionMarkIndex>=0&&(uriToCheck=uriToCheck.slice(0,questionMarkIndex));var hashIndex=uriToCheck.indexOf("#");return hashIndex>=0&&(uriToCheck=uriToCheck.slice(0,hashIndex)),route.uri instanceof RegExp?uriToCheck.match(route.uri):route.uri===uriToCheck})}},{key:"visited",value:function(){return this._routes.filter(function(route){return route.visited})}},{key:"use",value:function(middleware){if(!(middleware instanceof _middleware2["default"])&&"function"!=typeof middleware)throw new TypeError("use method takes at least a middleware");return this._add(new Route(this,(void 0),(void 0),middleware)),this}},{key:"all",value:function(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];if(0===args.length)throw new TypeError("use all method takes at least a middleware");var middleware=void 0;if(middleware=1===args.length?args[0]:args[1],!(middleware instanceof _middleware2["default"])&&"function"!=typeof middleware)throw new TypeError("use all method takes at least a middleware");var _iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=_methods2["default"][Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var method=_step.value;this[method.toLowerCase()].apply(this,args)}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{!_iteratorNormalCompletion&&_iterator["return"]&&_iterator["return"]()}finally{if(_didIteratorError)throw _iteratorError}}return this}},{key:"baseUri",set:function(uri){if(uri){if(!this._baseUri)return void(this._baseUri=uri);if(this._baseUri instanceof RegExp)throw new TypeError("the router already contains a regexp uri "+this._baseUri.toString()+" It cannot be mixed with "+uri.toString());if(uri instanceof RegExp)throw new TypeError("the router already contains an uri "+this._baseUri.toString()+" It cannot be mixed with regexp "+uri.toString())}},get:function(){return this._baseUri}}]),Router}();exports["default"]=Router;var _iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _step2,_loop=function(){var method=_step2.value,methodName=method.toLowerCase();Router.prototype[methodName]=function(){for(var _len2=arguments.length,args=Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];if(0===args.length)throw new TypeError("use "+methodName+" method takes at least a middleware");var uri=void 0,middleware=void 0;if(1===args.length?middleware=args[0]:(uri=args[0],middleware=args[1]),!(middleware instanceof _middleware2["default"])&&"function"!=typeof middleware)throw new TypeError("use "+methodName+" method takes at least a middleware");if(uri&&this._baseUri&&this._baseUri instanceof RegExp)throw new TypeError("router contains a regexp cannot mix with route uri/regexp");return this._add(new Route(this,uri,method,middleware)),this}},_iterator2=_methods2["default"][Symbol.iterator]();!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0)_loop()}catch(err){_didIteratorError2=!0,_iteratorError2=err}finally{try{!_iteratorNormalCompletion2&&_iterator2["return"]&&_iterator2["return"]()}finally{if(_didIteratorError2)throw _iteratorError2}}module.exports=exports["default"]},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++)arr2[i]=arr[i];return arr2}return Array.from(arr)}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_methods=__webpack_require__(2),_methods2=_interopRequireDefault(_methods),_settings=__webpack_require__(7),_settings2=_interopRequireDefault(_settings),_router=__webpack_require__(3),_router2=_interopRequireDefault(_router),_middleware=__webpack_require__(1),_middleware2=_interopRequireDefault(_middleware),Application=function(){function Application(){_classCallCheck(this,Application),this.routers=[],this.isDOMLoaded=!1,this.isDOMReady=!1,this.settings=new _settings2["default"]}return _createClass(Application,[{key:"set",value:function(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];if(1===args.length){var _name=[args];return this.settings.get(_name)}var name=args[0],value=args[1];return this.settings.set(name,value),this}},{key:"listen",value:function(callback){var _this=this;window.onbeforeunload=function(){_this._callMiddlewareExited()},window.onpopstate=function(event){if(event.state){var _event$state=event.state,request=_event$state.request,response=_event$state.response,currentRoutes=_this._routes(request.uri,request.method);_this._callMiddlewareEntered(currentRoutes,request),_this._callMiddlewareUpdated(currentRoutes,request,response)}},document.onreadystatechange=function(){var request={method:"GET",uri:window.location.pathname+window.location.search},response={status:200,statusText:"OK"},currentRoutes=_this._routes();"loading"!==document.readyState||_this.isDOMLoaded?"interactive"!==document.readyState||_this.isDOMReady||(_this.isDOMLoaded||(_this.isDOMLoaded=!0,_this._callMiddlewareEntered(currentRoutes,request)),_this.isDOMReady=!0,_this._callMiddlewareUpdated(currentRoutes,request,response),callback&&callback(request,response)):(_this.isDOMLoaded=!0,_this._callMiddlewareEntered(currentRoutes,request))}}},{key:"route",value:function(uri){var router=new _router2["default"](uri);return this.routers.push(router),router}},{key:"use",value:function(){for(var _len2=arguments.length,args=Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];if(0===args.length)throw new TypeError("use method takes at least a middleware or a router");var baseUri=void 0,middleware=void 0,router=void 0,which=void 0;if(1===args.length?which=args[0]:(baseUri=args[0],which=args[1]),!(which instanceof _middleware2["default"]||"function"==typeof which||which instanceof _router2["default"]))throw new TypeError("use method takes at least a middleware or a router");if(which instanceof _router2["default"])router=which,router.baseUri=baseUri;else{middleware=which,router=new _router2["default"](baseUri);var _iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=_methods2["default"][Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var method=_step.value;router[method.toLowerCase()](middleware)}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{!_iteratorNormalCompletion&&_iterator["return"]&&_iterator["return"]()}finally{if(_didIteratorError)throw _iteratorError}}}return this.routers.push(router),this}},{key:"_routes",value:function(){var uri=arguments.length<=0||void 0===arguments[0]?window.location.pathname+window.location.search:arguments[0],method=arguments.length<=1||void 0===arguments[1]?"GET":arguments[1],currentRoutes=[],_iteratorNormalCompletion2=!0,_didIteratorError2=!1,_iteratorError2=void 0;try{for(var _step2,_iterator2=this.routers[Symbol.iterator]();!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=!0){var router=_step2.value,routes=router.routes(uri,method);currentRoutes.push.apply(currentRoutes,_toConsumableArray(routes))}}catch(err){_didIteratorError2=!0,_iteratorError2=err}finally{try{!_iteratorNormalCompletion2&&_iterator2["return"]&&_iterator2["return"]()}finally{if(_didIteratorError2)throw _iteratorError2}}return currentRoutes}},{key:"_callMiddlewareEntered",value:function(currentRoutes,request){var _iteratorNormalCompletion3=!0,_didIteratorError3=!1,_iteratorError3=void 0;try{for(var _step3,_iterator3=currentRoutes[Symbol.iterator]();!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=!0){var route=_step3.value;if(route.middleware.entered&&route.middleware.entered(request),route.middleware.next&&!route.middleware.next())break}}catch(err){_didIteratorError3=!0,_iteratorError3=err}finally{try{!_iteratorNormalCompletion3&&_iterator3["return"]&&_iterator3["return"]()}finally{if(_didIteratorError3)throw _iteratorError3}}}},{key:"_callMiddlewareUpdated",value:function(currentRoutes,request,response){var _iteratorNormalCompletion4=!0,_didIteratorError4=!1,_iteratorError4=void 0;try{for(var _step4,_iterator4=currentRoutes[Symbol.iterator]();!(_iteratorNormalCompletion4=(_step4=_iterator4.next()).done);_iteratorNormalCompletion4=!0){var route=_step4.value;if(route.visited=request,route.middleware.updated){if(route.middleware.updated(request,response),route.middleware.next&&!route.middleware.next())break}else{var breakMiddlewareLoop=!0,next=function(){breakMiddlewareLoop=!1};if(route.middleware(request,response,next),breakMiddlewareLoop)break}}}catch(err){_didIteratorError4=!0,_iteratorError4=err}finally{try{!_iteratorNormalCompletion4&&_iterator4["return"]&&_iterator4["return"]()}finally{if(_didIteratorError4)throw _iteratorError4}}}},{key:"_callMiddlewareExited",value:function(){var _iteratorNormalCompletion5=!0,_didIteratorError5=!1,_iteratorError5=void 0;try{for(var _step5,_iterator5=this.routers[Symbol.iterator]();!(_iteratorNormalCompletion5=(_step5=_iterator5.next()).done);_iteratorNormalCompletion5=!0){var router=_step5.value,routes=router.visited(),_iteratorNormalCompletion6=!0,_didIteratorError6=!1,_iteratorError6=void 0;try{for(var _step6,_iterator6=routes[Symbol.iterator]();!(_iteratorNormalCompletion6=(_step6=_iterator6.next()).done);_iteratorNormalCompletion6=!0){var route=_step6.value;route.middleware.exited&&(route.middleware.exited(route.visited),route.visited=null)}}catch(err){_didIteratorError6=!0,_iteratorError6=err}finally{try{!_iteratorNormalCompletion6&&_iterator6["return"]&&_iterator6["return"]()}finally{if(_didIteratorError6)throw _iteratorError6}}}}catch(err){_didIteratorError5=!0,_iteratorError5=err}finally{try{!_iteratorNormalCompletion5&&_iterator5["return"]&&_iterator5["return"]()}finally{if(_didIteratorError5)throw _iteratorError5}}}},{key:"_callMiddlewareFailed",value:function(currentRoutes,request,response){var _iteratorNormalCompletion7=!0,_didIteratorError7=!1,_iteratorError7=void 0;try{for(var _step7,_iterator7=currentRoutes[Symbol.iterator]();!(_iteratorNormalCompletion7=(_step7=_iterator7.next()).done);_iteratorNormalCompletion7=!0){var route=_step7.value;if(route.middleware.failed){if(route.middleware.failed(request,response),route.middleware.next&&!route.middleware.next())break}else{var breakMiddlewareLoop=!0,next=function(){breakMiddlewareLoop=!1};if(route.middleware(request,response,next),breakMiddlewareLoop)break}}}catch(err){_didIteratorError7=!0,_iteratorError7=err}finally{try{!_iteratorNormalCompletion7&&_iterator7["return"]&&_iterator7["return"]()}finally{if(_didIteratorError7)throw _iteratorError7}}}},{key:"_fetch",value:function(request,resolve,reject){var _this2=this,method=request.method,uri=request.uri,headers=request.headers,data=request.data,history=request.history,httpMethodTransformer=this.get("http "+method+" transformer");httpMethodTransformer&&(uri=httpMethodTransformer.uri?httpMethodTransformer.uri({uri:uri,headers:headers,data:data}):uri,headers=httpMethodTransformer.headers?httpMethodTransformer.headers({uri:uri,headers:headers,data:data}):headers,data=httpMethodTransformer.data?httpMethodTransformer.data({uri:uri,headers:headers,data:data}):data),this._callMiddlewareExited();var currentRoutes=this._routes(uri,method);this._callMiddlewareEntered(currentRoutes,request),this.settings.get("http requester").fetch(request,function(req,res){history&&window.history.pushState({request:req,response:res},history.title,history.uri),_this2._callMiddlewareUpdated(currentRoutes,req,res),resolve&&resolve(req,res)},function(req,res){_this2._callMiddlewareFailed(currentRoutes,req,res),reject&&reject(req,res)})}}]),Application}();exports["default"]=Application,_methods2["default"].reduce(function(reqProto,method){var middlewareMethodName=method.toLowerCase();reqProto[middlewareMethodName]=function(){for(var _len3=arguments.length,args=Array(_len3),_key3=0;_key3<_len3;_key3++)args[_key3]=arguments[_key3];if("get"===middlewareMethodName){if(0===args.length)throw new TypeError(middlewareMethodName+" method takes at least a string or a middleware");if(1===args.length){var name=args[0];if("string"==typeof name)return this.settings.get(name)}}else if(0===args.length)throw new TypeError(middlewareMethodName+" method takes at least a middleware");var baseUri=void 0,middleware=void 0,which=void 0;if(1===args.length?which=args[0]:(baseUri=args[0],which=args[1]),!(which instanceof _middleware2["default"])&&"function"!=typeof which)throw new TypeError(middlewareMethodName+" method takes at least a middleware");var router=new _router2["default"];return middleware=which,router[middlewareMethodName](baseUri,middleware),this.routers.push(router),this};var httpMethodName="http"+method.charAt(0).toUpperCase()+method.slice(1).toLowerCase();return reqProto[httpMethodName]=function(request,resolve,reject){var uri=request.uri,headers=request.headers,data=request.data,history=request.history;return uri||(uri=request),this._fetch({uri:uri,method:method,headers:headers,data:data,history:history},resolve,reject)},reqProto},Application.prototype),module.exports=exports["default"]},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}Object.defineProperty(exports,"__esModule",{value:!0});var _application=__webpack_require__(4),_application2=_interopRequireDefault(_application),_router=__webpack_require__(3),_router2=_interopRequireDefault(_router),_middleware=__webpack_require__(1),_middleware2=_interopRequireDefault(_middleware),frontexpress=function(){return new _application2["default"]};frontexpress.Router=function(baseUri){return new _router2["default"](baseUri)},frontexpress.Middleware=function(name){return new _middleware2["default"](name)},exports["default"]=frontexpress,module.exports=exports["default"]},function(module,exports){"use strict";function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),Requester=function(){function Requester(){_classCallCheck(this,Requester)}return _createClass(Requester,[{key:"fetch",value:function(request,resolve,reject){var _this=this,method=request.method,uri=request.uri,headers=request.headers,data=request.data,success=function(responseText){resolve(request,{status:200,statusText:"OK",responseText:responseText})},fail=function(_ref){var status=_ref.status,statusText=_ref.statusText,errorThrown=_ref.errorThrown,errors=_this._analyzeErrors({status:status,statusText:statusText,errorThrown:errorThrown});reject(request,{status:status,statusText:statusText,errorThrown:errorThrown,errors:errors})},xmlhttp=new XMLHttpRequest;xmlhttp.onreadystatechange=function(){4===xmlhttp.readyState&&(200===xmlhttp.status?success(xmlhttp.responseText):fail({status:xmlhttp.status,statusText:xmlhttp.statusText}))};try{if(xmlhttp.open(method,uri,!0),headers){var _iteratorNormalCompletion=!0,_didIteratorError=!1,_iteratorError=void 0;try{for(var _step,_iterator=Object.keys(headers)[Symbol.iterator]();!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=!0){var header=_step.value;xmlhttp.setRequestHeader(header,headers[header])}}catch(err){_didIteratorError=!0,_iteratorError=err}finally{try{!_iteratorNormalCompletion&&_iterator["return"]&&_iterator["return"]()}finally{if(_didIteratorError)throw _iteratorError}}}data?xmlhttp.send(data):xmlhttp.send()}catch(errorThrown){fail({errorThrown:errorThrown})}}},{key:"_analyzeErrors",value:function(response){if(response.errorThrown){if("SyntaxError"===response.errorThrown.name)return"Problem during data decoding [JSON]";if("TimeoutError"===response.errorThrown.name)return"Server is taking too long to reply";if("AbortError"===response.errorThrown.name)return"Request cancelled on server";if("NetworkError"===response.errorThrown.name)return"A network error occurred";throw response.errorThrown}return 0===response.status?"Server access problem. Check your network connection":401===response.status?"Your session has expired, Please reconnect. [code: 401]":404===response.status?"Page not found on server. [code: 404]":500===response.status?"Internal server error. [code: 500]":"Unknown error. "+(response.statusText?response.statusText:"")}}]),Requester}();exports["default"]=Requester,module.exports=exports["default"]},function(module,exports,__webpack_require__){"use strict";function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||!1,descriptor.configurable=!0,"value"in descriptor&&(descriptor.writable=!0),Object.defineProperty(target,descriptor.key,descriptor)}}return function(Constructor,protoProps,staticProps){return protoProps&&defineProperties(Constructor.prototype,protoProps),staticProps&&defineProperties(Constructor,staticProps),Constructor}}(),_requester=__webpack_require__(6),_requester2=_interopRequireDefault(_requester),Settings=function(){function Settings(){_classCallCheck(this,Settings),this.settings={"http requester":new _requester2["default"],"http GET transformer":{uri:function(_ref){var _uri=_ref.uri,data=(_ref.headers,_ref.data);if(!data)return _uri;var anchor="",uriWithoutAnchor=_uri,hashIndex=_uri.indexOf("#");return hashIndex>=1&&(uriWithoutAnchor=_uri.slice(0,hashIndex),anchor=_uri.slice(hashIndex,_uri.length)),uriWithoutAnchor=Object.keys(data).reduce(function(gUri,d,index){return gUri+=0===index&&gUri.indexOf("?")===-1?"?":"&",gUri+=d+"="+data[d]},uriWithoutAnchor),uriWithoutAnchor+anchor},data:function(_ref2){_ref2.uri,_ref2.headers,_ref2.data}}},this.rules={"http requester":function(requester){if("function"!=typeof requester.fetch)throw new TypeError("setting http requester has no fetch method")}}}return _createClass(Settings,[{key:"set",value:function(name,value){var checkRules=this.rules[name];checkRules&&checkRules(value),this.settings[name]=value}},{key:"get",value:function(name){return this.settings[name]}}]),Settings}();exports["default"]=Settings,module.exports=exports["default"]},function(module,exports,__webpack_require__){(function(global){module.exports=global.frontexpress=__webpack_require__(5)}).call(exports,function(){return this}())}]);