diff --git a/android/app/src/main/assets/index.android.bundle b/android/app/src/main/assets/index.android.bundle index a17ac0da..e5b98be3 100644 --- a/android/app/src/main/assets/index.android.bundle +++ b/android/app/src/main/assets/index.android.bundle @@ -3,7 +3,7 @@ var __BUNDLE_START_TIME__=this.nativePerformanceNow?nativePerformanceNow():Date. !(function(n){var e=(function(){function n(n,e){return n}function e(n){var e={};return n.forEach(function(n,r){e[n]=!0}),e}function r(n,r,u){if(n.formatValueCalls++,n.formatValueCalls>200)return"[TOO BIG formatValueCalls "+n.formatValueCalls+" exceeded limit of 200]";var f=t(n,r);if(f)return f;var c=Object.keys(r),s=e(c);if(d(r)&&(c.indexOf('message')>=0||c.indexOf('description')>=0))return o(r);if(0===c.length){if(v(r)){var p=r.name?': '+r.name:'';return n.stylize('[Function'+p+']','special')}if(g(r))return n.stylize(RegExp.prototype.toString.call(r),'regexp');if(y(r))return n.stylize(Date.prototype.toString.call(r),'date');if(d(r))return o(r)}var h,b,m='',j=!1,O=['{','}'];(h=r,Array.isArray(h)&&(j=!0,O=['[',']']),v(r))&&(m=' [Function'+(r.name?': '+r.name:'')+']');return g(r)&&(m=' '+RegExp.prototype.toString.call(r)),y(r)&&(m=' '+Date.prototype.toUTCString.call(r)),d(r)&&(m=' '+o(r)),0!==c.length||j&&0!=r.length?u<0?g(r)?n.stylize(RegExp.prototype.toString.call(r),'regexp'):n.stylize('[Object]','special'):(n.seen.push(r),b=j?i(n,r,u,s,c):c.map(function(e){return a(n,r,u,s,e,j)}),n.seen.pop(),l(b,m,O)):O[0]+m+O[1]}function t(n,e){if(s(e))return n.stylize('undefined','undefined');if('string'==typeof e){var r="'"+JSON.stringify(e).replace(/^"|"$/g,'').replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return n.stylize(r,'string')}return c(e)?n.stylize(''+e,'number'):u(e)?n.stylize(''+e,'boolean'):f(e)?n.stylize('null','null'):void 0}function o(n){return'['+Error.prototype.toString.call(n)+']'}function i(n,e,r,t,o){for(var i=[],l=0,u=e.length;l-1&&(u=a?u.split('\n').map(function(n){return' '+n}).join('\n').substr(2):'\n'+u.split('\n').map(function(n){return' '+n}).join('\n')):u=n.stylize('[Circular]','special')),s(l)){if(a&&i.match(/^\d+$/))return u;(l=JSON.stringify(''+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(l=l.substr(1,l.length-2),l=n.stylize(l,'name')):(l=l.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),l=n.stylize(l,'string'))}return l+': '+u}function l(n,e,r){return n.reduce(function(n,e){return 0,e.indexOf('\n')>=0&&0,n+e.replace(/\u001b\[\d\d?m/g,'').length+1},0)>60?r[0]+(''===e?'':e+'\n ')+' '+n.join(',\n ')+' '+r[1]:r[0]+e+' '+n.join(', ')+' '+r[1]}function u(n){return'boolean'==typeof n}function f(n){return null===n}function c(n){return'number'==typeof n}function s(n){return void 0===n}function g(n){return p(n)&&'[object RegExp]'===h(n)}function p(n){return'object'==typeof n&&null!==n}function y(n){return p(n)&&'[object Date]'===h(n)}function d(n){return p(n)&&('[object Error]'===h(n)||n instanceof Error)}function v(n){return'function'==typeof n}function h(n){return Object.prototype.toString.call(n)}function b(n,e){return Object.prototype.hasOwnProperty.call(n,e)}return function(e,t){return r({seen:[],formatValueCalls:0,stylize:n},e,t.depth)}})(),r='(index)',t={trace:0,info:1,warn:2,error:3},o=[];o[t.trace]='debug',o[t.info]='log',o[t.warn]='warning',o[t.error]='error';var i=1;function a(r){return function(){var a;a=1===arguments.length&&'string'==typeof arguments[0]?arguments[0]:Array.prototype.map.call(arguments,function(n){return e(n,{depth:10})}).join(', ');var l=r;'Warning: '===a.slice(0,9)&&l>=t.error&&(l=t.warn),n.__inspectorLog&&n.__inspectorLog(o[l],a,[].slice.call(arguments),i),s.length&&(a=g('',a)),n.nativeLoggingHook(a,l)}}function l(n,e){return Array.apply(null,Array(e)).map(function(){return n})}var u="\u2502",f="\u2510",c="\u2518",s=[];function g(n,e){return s.join('')+n+' '+(e||'')}if(n.nativeLoggingHook){n.console;n.console={error:a(t.error),info:a(t.info),log:a(t.info),warn:a(t.warn),trace:a(t.trace),debug:a(t.trace),table:function(e){if(!Array.isArray(e)){var o=e;for(var i in e=[],o)if(o.hasOwnProperty(i)){var a=o[i];a[r]=i,e.push(a)}}if(0!==e.length){var u=Object.keys(e[0]).sort(),f=[],c=[];u.forEach(function(n,r){c[r]=n.length;for(var t=0;t';return function(){for(var r=arguments.length,u=new Array(r),e=0;e0:b,R=t.overshootRight,y=void 0===R?_>0:R,E=v.Animated.add(h,p.interpolate({inputRange:[0,s],outputRange:[0,1]})).interpolate({inputRange:[-_-(y?1:l),-_,f,f+(A?1:l)],outputRange:[-_-(y||l>1?1:0),-_,f,f+(A||l>1?1:0)]});o._transX=E,o._showLeftAction=f>0?E.interpolate({inputRange:[-1,0,f],outputRange:[0,0,1]}):new v.Animated.Value(0),o._leftActionTranslate=o._showLeftAction.interpolate({inputRange:[0,Number.MIN_VALUE],outputRange:[-1e4,0],extrapolate:'clamp'}),o._showRightAction=_>0?E.interpolate({inputRange:[-_,0,1],outputRange:[1,0,0]}):new v.Animated.Value(0),o._rightActionTranslate=o._showRightAction.interpolate({inputRange:[0,Number.MIN_VALUE],outputRange:[-1e4,0],extrapolate:'clamp'})},o._onTapHandlerStateChange=function(t){t.nativeEvent.oldState===w.State.ACTIVE&&o.close()},o._onHandlerStateChange=function(t){var n=t.nativeEvent;n.oldState===w.State.ACTIVE&&o._handleRelease(n)},o._handleRelease=function(t){var n=t.velocityX,s=t.translationX,l=o.state,p=l.leftWidth,h=void 0===p?0:p,u=l.rowWidth,f=void 0===u?0:u,c=l.rowState,v=o.state.rightOffset,w=f-(void 0===v?f:v),O=o.props,S=O.friction,b=O.leftThreshold,A=void 0===b?h/2:b,R=O.rightThreshold,y=void 0===R?w/2:R,E=o._currentOffset()+s/S,W=(s+_*n)/S,L=0;0===c?W>A?L=h:W<-y&&(L=-w):1===c?W>-A&&(L=h):W0&&o.props.onSwipeableLeftOpen?o.props.onSwipeableLeftOpen():n<0&&o.props.onSwipeableRightOpen&&o.props.onSwipeableRightOpen(),0===n?o.props.onSwipeableClose&&o.props.onSwipeableClose():o.props.onSwipeableOpen&&o.props.onSwipeableOpen())}),n>0&&o.props.onSwipeableLeftWillOpen?o.props.onSwipeableLeftWillOpen():n<0&&o.props.onSwipeableRightWillOpen&&o.props.onSwipeableRightWillOpen(),0===n?o.props.onSwipeableWillClose&&o.props.onSwipeableWillClose():o.props.onSwipeableWillOpen&&o.props.onSwipeableWillOpen()},o._onRowLayout=function(t){var n=t.nativeEvent;o.setState({rowWidth:n.layout.width})},o._currentOffset=function(){var t=o.state,n=t.leftWidth,s=void 0===n?0:n,l=t.rowWidth,p=void 0===l?0:l,h=t.rowState,u=o.state.rightOffset;return 1===h?s:-1===h?-(p-(void 0===u?p:u)):0},o.close=function(){o._animateRow(o._currentOffset(),0)},o.openLeft=function(){var t=o.state.leftWidth,n=void 0===t?0:t;o._animateRow(o._currentOffset(),n)},o.openRight=function(){var t=o.state.rowWidth,n=void 0===t?0:t,s=o.state.rightOffset,l=n-(void 0===s?n:s);o._animateRow(o._currentOffset(),-l)};var s=new v.Animated.Value(0);return o.state={dragX:s,rowTranslation:new v.Animated.Value(0),rowState:0,leftWidth:void 0,rightOffset:void 0,rowWidth:void 0},o._updateAnimatedEvent(t,o.state),o._onGestureEvent=v.Animated.event([{nativeEvent:{translationX:s}}],{useNativeDriver:t.useNativeAnimations}),o}return(0,f.default)(n,t),(0,p.default)(n,[{key:"UNSAFE_componentWillUpdate",value:function(t,n){this.props.friction===t.friction&&this.props.overshootLeft===t.overshootLeft&&this.props.overshootRight===t.overshootRight&&this.props.overshootFriction===t.overshootFriction&&this.state.leftWidth===n.leftWidth&&this.state.rightOffset===n.rightOffset&&this.state.rowWidth===n.rowWidth||this._updateAnimatedEvent(t,n)}},{key:"render",value:function(){var t=this,n=this.state.rowState,s=this.props,l=s.children,p=s.renderLeftActions,h=s.renderRightActions,u=p&&c.default.createElement(v.Animated.View,{style:[A.leftActions,{transform:[{translateX:this._leftActionTranslate}]}]},p(this._showLeftAction,this._transX),c.default.createElement(v.View,{onLayout:function(n){var o=n.nativeEvent;return t.setState({leftWidth:o.layout.x})}})),f=h&&c.default.createElement(v.Animated.View,{style:[A.rightActions,{transform:[{translateX:this._rightActionTranslate}]}]},h(this._showRightAction,this._transX),c.default.createElement(v.View,{onLayout:function(n){var o=n.nativeEvent;return t.setState({rightOffset:o.layout.x})}}));return c.default.createElement(w.PanGestureHandler,(0,o.default)({activeOffsetX:[-10,10]},this.props,{onGestureEvent:this._onGestureEvent,onHandlerStateChange:this._onHandlerStateChange}),c.default.createElement(v.Animated.View,{onLayout:this._onRowLayout,style:[A.container,this.props.containerStyle]},u,f,c.default.createElement(w.TapGestureHandler,{enabled:0!==n,onHandlerStateChange:this._onTapHandlerStateChange},c.default.createElement(v.Animated.View,{pointerEvents:0===n?'auto':'box-only',style:[{transform:[{translateX:this._transX}]},this.props.childrenContainerStyle]},l))))}}]),n})(c.Component);e.default=b,b.defaultProps={friction:1,overshootFriction:1,useNativeAnimations:!0};var A=v.StyleSheet.create({container:{overflow:'hidden'},leftActions:S({},v.StyleSheet.absoluteFillObject,{flexDirection:v.I18nManager.isRTL?'row-reverse':'row'}),rightActions:S({},v.StyleSheet.absoluteFillObject,{flexDirection:v.I18nManager.isRTL?'row':'row-reverse'})})},3,[4,1,6,7,8,9,10,12,13,15,18,380]); @@ -407,7 +407,7 @@ __d(function(g,r,i,a,m,e,d){var t=r(d[0]),s=r(d[1]);Object.defineProperty(e,"__e __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var f=t(r(d[1])),u=t(r(d[2])),l=t(r(d[3])),o=u.default.forwardRef(function(t,o){return u.default.createElement(l.default,(0,f.default)({ref:o},t))});o.defaultProps=l.default.defaultProps,o.propTypes=l.default.publicPropTypes;var p=o;e.default=p},401,[1,6,15,400]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),u=n(r(d[4])),c=n(r(d[5])),p=n(r(d[6])),f=n(r(d[7])),s=n(r(d[8])),y=n(r(d[9])),O=r(d[10]),h=t(r(d[11])),v=t(r(d[12])),E=n(r(d[13]));function b(t,n){var l=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),l.push.apply(l,o)}return l}function T(t){for(var n=1;n3&&void 0!==arguments[3]&&arguments[3],l=o.indexOf(n,t),s=f?n.index:l,c=o.replaceAtIndex(n,l,u);return c.index=s,c},replaceAtIndex:function(n,o,f){if((0,u.default)(!!n.routes[o],'invalid index %s for replacing route %s',o,f.key),n.routes[o]===f&&o===n.index)return n;var l=n.routes.slice();return l[o]=f,(0,t.default)({},n,{index:o,routes:l})},reset:function(n,o,f){(0,u.default)(o.length&&Array.isArray(o),'invalid routes to replace');var l=void 0===f?o.length-1:f;if(n.routes.length===o.length&&n.index===l){if(n.routes.every(function(n,t){return o[t]===n}))return n}return(0,u.default)(!!o[l],'invalid index %s to reset',l),(0,t.default)({},n,{index:l,routes:o})}},f=o;e.default=f},407,[1,408,409]); @@ -739,7 +739,7 @@ __d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);m.exports=(function(){"use s __d(function(g,r,i,a,m,e,d){var t=r(d[0]),o=r(d[1]);function n(t,o,n){this.db=t,this.query=o||{},n&&(this.execFn=n)}n.prototype.limit=function(t){return this._limit=t,this},n.prototype.skip=function(t){return this._skip=t,this},n.prototype.sort=function(t){return this._sort=t,this},n.prototype.projection=function(t){return this._projection=t,this},n.prototype.project=function(n){var s,c,u,h=[],p=this;return void 0===this._projection||0===Object.keys(this._projection).length?n:(s=0!==this._projection._id,this._projection=o.omit(this._projection,'_id'),(u=Object.keys(this._projection)).forEach(function(t){if(void 0!==c&&p._projection[t]!==c)throw new Error("Can't both keep and omit fields except for _id");c=p._projection[t]}),n.forEach(function(o){var n;1===c?(n={$set:{}},u.forEach(function(s){n.$set[s]=t.getDotValue(o,s),void 0===n.$set[s]&&delete n.$set[s]}),n=t.modify({},n)):(n={$unset:{}},u.forEach(function(t){n.$unset[t]=!0}),n=t.modify(o,n)),s?n._id=o._id:delete n._id,h.push(n)}),h)},n.prototype._exec=function(o){var n,s,c,u=[],h=0,p=0,f=this,_=null;function l(t,n){return f.execFn?f.execFn(t,n,o):o(t,n)}this.db.getCandidates(this.query,function(o,y){if(o)return l(o);try{for(n=0;np)p+=1;else if(u.push(y[n]),h+=1,f._limit&&f._limit<=h)break}catch(o){return l(o)}if(f._sort){s=Object.keys(f._sort);var j=[];for(n=0;n0&&this._events[h].length>l&&(this._events[h].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[h].length),'function'==typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(t,n){if(!s(n))throw TypeError('listener must be a function');var o=!1;function h(){this.removeListener(t,h),o||(o=!0,n.apply(this,arguments))}return h.listener=n,this.on(t,h),this},t.prototype.removeListener=function(t,o){var h,v,l,u;if(!s(o))throw TypeError('listener must be a function');if(!this._events||!this._events[t])return this;if(l=(h=this._events[t]).length,v=-1,h===o||s(h.listener)&&h.listener===o)delete this._events[t],this._events.removeListener&&this.emit('removeListener',t,o);else if(n(h)){for(u=l;u-- >0;)if(h[u]===o||h[u].listener&&h[u].listener===o){v=u;break}if(v<0)return this;1===h.length?(h.length=0,delete this._events[t]):h.splice(v,1),this._events.removeListener&&this.emit('removeListener',t,o)}return this},t.prototype.removeAllListeners=function(t){var n,o;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(n in this._events)'removeListener'!==n&&this.removeAllListeners(n);return this.removeAllListeners('removeListener'),this._events={},this}if(s(o=this._events[t]))this.removeListener(t,o);else if(o)for(;o.length;)this.removeListener(t,o[o.length-1]);return delete this._events[t],this},t.prototype.listeners=function(t){return this._events&&this._events[t]?s(this._events[t])?[this._events[t]]:this._events[t].slice():[]},t.prototype.listenerCount=function(t){if(this._events){var n=this._events[t];if(s(n))return 1;if(n)return n.length}return 0},t.listenerCount=function(t,s){return t.listenerCount(s)}},735,[]); -__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.authKeyData=e.MARKER_URL=e.videoUrl=e.authKeyUrl=e.walletActionUrl=e.configActionUrl=e.demandeActionUrl=e.locationActionUrl=e.networkActionUrl=e.memberActionUrl=e.adhesionUrl=e.testBaseUrl=e.baseUrl=e.isDebugMode=void 0;e.isDebugMode=!1;e.baseUrl="https://ilink-app.com/mobilebackend";e.testBaseUrl="https://test.ilink-app.com";e.adhesionUrl="https://ilink-app.com/mobilebackend/interacted/LoginAction.php";e.memberActionUrl="https://ilink-app.com/mobilebackend/interacted/MembersAction.php";e.networkActionUrl="https://ilink-app.com/mobilebackend/interacted/NetworkAction.php";e.locationActionUrl="https://ilink-app.com/mobilebackend/interacted/LocationAction.php";e.demandeActionUrl="https://ilink-app.com/mobilebackend/interacted/DemandeAction.php";e.configActionUrl="https://ilink-app.com/mobilebackend/interacted/ConfigAction.php";e.walletActionUrl="https://test.ilink-app.com/walletService/wallets";e.authKeyUrl="https://test.ilink-app.com/oauth/token";e.videoUrl="https://www.youtube.com/watch?v=wwGPDPsSLWY";e.MARKER_URL="https://ilink-app.com/mobilebackend/interacted/LocationAction.php";e.authKeyData={grant_type:"password",client_id:"2",client_secret:"rrbvxACJPBOG4cqjDNlstSljlmjydLon3P55JMav"}},736,[]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.authKeyData=e.MARKER_URL=e.videoUrl=e.authKeyUrl=e.transactionUrl=e.walletActionUrl=e.configActionUrl=e.demandeActionUrl=e.locationActionUrl=e.networkActionUrl=e.memberActionUrl=e.adhesionUrl=e.testBaseUrl=e.baseUrl=e.isDebugMode=void 0;e.isDebugMode=!1;e.baseUrl="https://ilink-app.com/mobilebackend";e.testBaseUrl="https://test.ilink-app.com";e.adhesionUrl="https://ilink-app.com/mobilebackend/interacted/LoginAction.php";e.memberActionUrl="https://ilink-app.com/mobilebackend/interacted/MembersAction.php";e.networkActionUrl="https://ilink-app.com/mobilebackend/interacted/NetworkAction.php";e.locationActionUrl="https://ilink-app.com/mobilebackend/interacted/LocationAction.php";e.demandeActionUrl="https://ilink-app.com/mobilebackend/interacted/DemandeAction.php";e.configActionUrl="https://ilink-app.com/mobilebackend/interacted/ConfigAction.php";e.walletActionUrl="https://test.ilink-app.com/walletService/wallets";e.transactionUrl="https://test.ilink-app.com/walletService/transactions";e.authKeyUrl="https://test.ilink-app.com/oauth/token";e.videoUrl="https://www.youtube.com/watch?v=wwGPDPsSLWY";e.MARKER_URL="https://ilink-app.com/mobilebackend/interacted/LocationAction.php";e.authKeyData={grant_type:"password",client_id:"2",client_secret:"rrbvxACJPBOG4cqjDNlstSljlmjydLon3P55JMav"}},736,[]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(r(d[1])),u=t(r(d[2])),s=t(r(d[3])),c=r(d[4]),o=r(d[5]),l=(function(){function t(){(0,u.default)(this,t),this.setCurrentPas=function(t){return n.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,u.next=3,n.default.awrap(o.AsyncStorage.setItem('@config:pasObject',JSON.stringify(t.pas)));case 3:u.next=8;break;case 5:u.prev=5,u.t0=u.catch(0),console.warn(u.t0);case 8:c.db.update({"configuration.pas":{$exists:!0}},{configuration:{pas:t.pas}},{upsert:!0},function(t,n,u){console.log([t,n,u])});case 9:case"end":return u.stop()}},null,null,[[0,5]],Promise)},this._getPasData=function(){return new Promise(function(t,u){var s;return n.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,n.default.awrap(o.AsyncStorage.getItem('@config:pasObject'));case 3:s=c.sent,t(JSON.parse(s)),c.next=10;break;case 7:c.prev=7,c.t0=c.catch(0),u(c.t0);case 10:case"end":return c.stop()}},null,null,[[0,7]],Promise)})},this._storeData=function(t){return n.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return u.prev=0,u.next=3,n.default.awrap(o.AsyncStorage.setItem('@config:lang',t.value));case 3:u.next=8;break;case 5:u.prev=5,u.t0=u.catch(0),console.warn(u.t0);case 8:case"end":return u.stop()}},null,null,[[0,5]],Promise)},this._getData=function(){return new Promise(function(t,u){var s;return n.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,n.default.awrap(o.AsyncStorage.getItem('@config:lang'));case 3:s=c.sent,t(s),c.next=10;break;case 7:c.prev=7,c.t0=c.catch(0),u(c.t0);case 10:case"end":return c.stop()}},null,null,[[0,7]],Promise)})}}return(0,s.default)(t,[{key:"getCurrentLangue",value:function(){var t;return n.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,n.default.awrap(_getData());case 2:(t=u.sent)?resolve(t):reject(t);case 4:case"end":return u.stop()}},null,null,null,Promise)}},{key:"getCurrentPasValue",value:function(){var t;return n.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,n.default.awrap(this._getPasData());case 2:if(!(t=u.sent)){u.next=7;break}return u.abrupt("return",t.valeur_int);case 7:return u.abrupt("return",t);case 8:case"end":return u.stop()}},null,this,null,Promise)}},{key:"getCurrentPubValue",value:function(){var t;return n.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:return u.next=2,n.default.awrap(this._getPubData());case 2:if(t=u.sent,console.warn(t),!t){u.next=8;break}return u.abrupt("return",t.valeur_bool);case 8:return u.abrupt("return",t);case 9:case"end":return u.stop()}},null,this,null,Promise)}},{key:"setPubActive",value:function(t){return n.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:if(u.prev=0,!t.pub){u.next=5;break}return u.next=4,n.default.awrap(o.AsyncStorage.setItem('pubObject',JSON.stringify(t.pub)));case 4:c.db.update({"configuration.pub":{$exists:!0}},{configuration:{pub:t.pub}},{upsert:!0},function(t,n,u){console.log([t,n,u])});case 5:u.next=10;break;case 7:u.prev=7,u.t0=u.catch(0),console.warn(u.t0);case 10:case"end":return u.stop()}},null,null,[[0,7]],Promise)}},{key:"_getPubData",value:function(){return new Promise(function(t,u){var s;return n.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:return c.prev=0,c.next=3,n.default.awrap(o.AsyncStorage.getItem('pubObject'));case 3:s=c.sent,t(JSON.parse(s)),c.next=10;break;case 7:c.prev=7,c.t0=c.catch(0),u(c.t0);case 10:case"end":return c.stop()}},null,null,[[0,7]],Promise)})}},{key:"setCurrentLangue",value:function(t){this._storeData(t),c.db.update({"configuration.lang":{$exists:!0}},{configuration:{lang:t}},{upsert:!0},function(t,n,u){console.log([t,n,u])})}}]),t})();e.default=l},737,[1,273,8,9,714,18]); __d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),t=r(d[1]),o={};o.DBEvents=new t,o.create_db=function(t){var u=this;u.db_name=t,u.get=function(t,o){n.table(u.db_name).then(function(n){var u=n.where(t).find();o&&o(u)})},u.get_id=function(t,o){n.table(u.db_name).then(function(n){var u=n.get(t);o&&o(u)})},u.get_all=function(t){n.table(u.db_name).then(function(n){var o=n.databaseData[u.db_name];t&&t(o)})},u.add=function(t,f){n.table(u.db_name).then(function(n){n.add(t,function(n){f&&f(n),o.DBEvents.emit("all")})})},u.add_all=function(n,t){if(n.length<=0)return null;var o=[];!(function n(f){if(0==f.length&&t)return t(o);var c=f.pop();u.add(c,function(t){n(f),o.push(t)})})(n)},u.remove=function(t,o){n.table(u.db_name).then(function(n){n.where(t).remove(function(n){o&&o(n)})})},u.remove_id=function(t,f){n.table(u.db_name).then(function(n){n.removeById(t,function(n){f&&f(n),o.DBEvents.emit("all")})})},u.erase_db=function(t){n.table(u.db_name).then(function(n){n.remove(function(n){t&&t(n),o.DBEvents.emit("all")})})},u.update=function(t,f,c){n.table(u.db_name).then(function(n){n.where(t).update(f,function(n){c&&c(n),o.DBEvents.emit("all")})})},u.update_id=function(t,f,c){n.table(u.db_name).then(function(n){n.updateById(t,f,function(n){c&&c(n),o.DBEvents.emit("all")})})},u.remove_id=function(t,f){n.table(u.db_name).then(function(n){n.removeById(t,function(n){f&&f(n),o.DBEvents.emit("all")})})}},m.exports=o},738,[739,742]); __d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),s=r(d[1]).Promise,n=t.AsyncStorage,h={},o=function(t,s){return this.tableName=t,this.databaseData=s,this._where=null,this._limit=100,this._offset=0,this};h.createDataBase=function(){return new s(function(t,s){n.setItem("db_store",JSON.stringify({}),function(n){n?s(n):t()})})},h.saveTable=function(t,h){var o=this;return new s(function(s,f){o.getItem("db_store").then(function(o){o[t]=h||{totalrows:0,autoinc:1,rows:{}},n.setItem("db_store",JSON.stringify(o),function(t){t?f(t):s(o)})})})},h.table=function(t){var n=this;return new s(function(s,h){return n.getItem("db_store").then(function(h){if(h)if(h[t]){var f=new o(t,h||{});s(f)}else n.saveTable(t).then(function(n){var h=new o(t,n||{});s(h)});else n.createDataBase().then(function(){n.saveTable(t).then(function(n){var h=new o(t,n||{});s(h)})})})})},h.getItem=function(t){return new s(function(s,h){n.getItem(t,function(t,n){t?h(t):s(JSON.parse(n))})})},o.prototype.where=function(t){return this._where=t||null,this},o.prototype.limit=function(t){return this._limit=t||100,this},o.prototype.offset=function(t){return this._offset=t||0,this},o.prototype.init=function(){return this.where(),this.limit(),this.offset(),this},o.prototype.update=function(t,s){var n=[],o=this.databaseData[this.tableName].rows,f=!1;if(this._where&&(f=!0),f){for(var u in o){var l=!0;for(var b in this._where)o[u][b]!=this._where[b]&&(l=!1);if(l)for(var c in n.push(this.databaseData[this.tableName].rows[u]._id),t)this.databaseData[this.tableName].rows[u][c]=t[c]}h.saveTable(this.tableName,this.databaseData[this.tableName]).then(function(t){s&&s(t)},function(t){s&&s(t)}),this.init()}else s&&s(null)},o.prototype.updateById=function(t,s,n){return this.where({_id:t}),this.update(s,n)},o.prototype.remove=function(t){var s=[],n=this.databaseData[this.tableName].rows,o=[],f=!1;this._where&&(f=!0);var u=0;if(f)for(var l in n){var b=!0;for(var c in this._where)n[l][c]!=this._where[c]&&(b=!1);b&&(u+=1,o.push(this.databaseData[this.tableName].rows[l]._id),delete this.databaseData[this.tableName].rows[l],this.databaseData[this.tableName].totalrows--)}else for(var l in u=0,n)u+=1,o.push(this.databaseData[this.tableName].rows[l]._id),delete this.databaseData[this.tableName].rows[l],this.databaseData[this.tableName].totalrows--;this.init(),u===o.length&&t?h.saveTable(this.tableName,this.databaseData[this.tableName]).then(function(s){t&&t({results:s,deleted_ids:o})},function(n){(s.push(n),t)&&t({error:n,deleted_ids:o})}):t&&0===o.length&&t(null)},o.prototype.removeById=function(t,s){return this.where({_id:t}),this.remove(s)},o.prototype.add=function(t,s){var n=this.databaseData[this.tableName].autoinc;t._id=n,this.databaseData[this.tableName].rows[n]=t,this.databaseData[this.tableName].autoinc+=1,this.databaseData[this.tableName].totalrows+=1,h.saveTable(this.tableName,this.databaseData[this.tableName]).then(function(n){s&&s(t)},function(t){s&&s(t)}),this.init()},o.prototype.get=function(t){return this.where({_id:t}),this.find(1)},o.prototype.find=function(){var t=[],s=this.databaseData[this.tableName].rows,n=!1;if(this._where&&(n=!0),n)for(var h in s){var o=!1;for(var f in this._where){if(s[h][f]!=this._where[f]){o=!1;break}o=!0}o&&t.push(s[h])}else for(var h in s)t.push(s[h]);return'number'==typeof this._limit?t.slice(this._offset,this._limit+this._offset):(this.init(),t)},m.exports=h},739,[18,740]); @@ -810,11 +810,11 @@ __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{ __d(function(g,r,i,a,m,e,d){var E=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.PositionError=void 0;var I=E(r(d[1])),_=Object.freeze({PERMISSION_DENIED:1,POSITION_UNAVAILABLE:2,TIMEOUT:3,PLAY_SERVICE_NOT_AVAILABLE:4,SETTINGS_NOT_SATISFIED:5,INTERNAL_ERROR:-1});e.PositionError=_;var o=I.default;e.default=o},804,[1,805]); __d(function(g,r,i,a,m,e,d){var n=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=n(r(d[1])),o=r(d[2]),s=o.NativeModules.RNFusedLocation,l=new o.NativeEventEmitter(s),u=function(){},c=[],v=!1,f={setRNConfiguration:function(n){},requestAuthorization:function(){},getCurrentPosition:function(n){var o,l,c=arguments;return t.default.async(function(t){for(;;)switch(t.prev=t.next){case 0:o=c.length>1&&void 0!==c[1]?c[1]:u,l=c.length>2&&void 0!==c[2]?c[2]:{},n||console.error('Must provide a success callback'),s.getCurrentPosition(l,n,o);case 4:case"end":return t.stop()}},null,null,null,Promise)},watchPosition:function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n||console.error('Must provide a success callback'),v||(s.startObserving(o),v=!0);var u=c.length;return c.push([l.addListener('geolocationDidChange',n),t?l.addListener('geolocationError',t):null]),u},clearWatch:function(n){var t=c[n];if(t){t[0].remove();var o=t[1];o&&o.remove(),c[n]=void 0;for(var s=!0,l=0;l0?h.default.createElement(y.HistoryListItem,{list:t,refreshing:function(){n.refreshData()},isRefreshing:this.state.isRefreshing,navigator:this.props.navigation,style:V.listbackground}):this.state.filter?h.default.createElement(p.View,{style:V.emptyListe},h.default.createElement(p.Text,null,D.default.t('NO_ITEM_REQUEST'))):0===s.length?h.default.createElement(p.View,{style:V.emptyListe},h.default.createElement(p.Text,null,D.default.t('NO_ITEM_REQUEST'))):h.default.createElement(p.View,{style:V.emptyListe},h.default.createElement(p.ProgressBarAndroid,null),h.default.createElement(p.Text,null,D.default.t('LOADING_DOTS'))):h.default.createElement(p.View,{style:V.emptyListe},h.default.createElement(p.Text,null,D.default.t('EMPTY_LIST_REQUEST')," "))}if(0===t.length)return h.default.createElement(p.View,{style:V.emptyListe},h.default.createElement(p.Text,null,"Aucuns \xe9l\xe9ments ne corresponds"))}},{key:"componentDidUpdate",value:function(t){t.isFocused!==this.props.isFocused&&this.props.isFocused&&this.refreshData()}},{key:"render",value:function(){return h.default.createElement(p.View,{style:{flex:1,marginBottom:20}},h.default.createElement(_.IndicatorViewPager,{style:{flex:1},indicator:"geolocated"===this.state.user.category?this._renderTabGeolocated():'hyper'===this.state.user.category?this._renderTabHyper():this._renderTabs()},"hyper"!==this.state.user.category?this._renderListDemandsSend():null,"geolocated"!==this.state.user.category?this._renderListDemandReceive():null))}},{key:"renderSectionnedList",value:function(t){if(this.state.isLoaded){return null!==t?t.length>0?h.default.createElement(y.HistoryItemSectionned,{list:t,navigator:this.props.navigator,style:V.listbackground}):this.state.filter?h.default.createElement(p.View,{style:V.emptyListe},h.default.createElement(p.Text,null,D.default.t('NO_ITEMS_REQUEST'))):h.default.createElement(p.View,{style:V.emptyListe},h.default.createElement(p.ProgressBarAndroid,null),h.default.createElement(p.Text,null,D.default.t('LOADING_DOTS'))):h.default.createElement(p.View,{style:V.emptyListe},h.default.createElement(p.Text,null,D.default.t('EMPTY_LIST_REQUEST')))}}},{key:"renderLoading",value:function(){return h.default.createElement(p.View,null,h.default.createElement(p.ProgressBarAndroid,null),h.default.createElement(p.Text,null,D.default.t('LOADING_DOTS')))}},{key:"showSlidingUpPanel",value:function(){}},{key:"onfilterPress",value:function(){var t=this.state,n=t.datestart,s=t.dateend,l=this.state.conserve;null!==l&&(l=l.filter(function(t){var l=P(t.dateAjout);return P(t.dateAjout).isAfter(P(n).toDate())&&l.isBefore(P(s).toDate())}),this.setState({listdata:l,panelVisible:!1,filter:!0}))}},{key:"printOptions",value:function(){var t=this;return"hyper"===this.state.user.category?h.default.createElement(v.default,{buttonColor:L.accent},h.default.createElement(v.default.Item,{buttonColor:L.purpleLight,title:D.default.t('SAVE_HISTORY'),onPress:function(){}},h.default.createElement(E.default,{name:"save",style:V.actionButtonIcon}))):h.default.createElement(v.default,{buttonColor:L.accent},h.default.createElement(v.default.Item,{buttonColor:L.primary,title:D.default.t('MAKE_REQUEST'),onPress:function(){t.props.navigation.navigate(x.credrequester)}},h.default.createElement(E.default,{name:"edit",style:V.actionButtonIcon})),h.default.createElement(v.default.Item,{buttonColor:L.purpleLight,title:D.default.t('SAVE_HISTORY'),onPress:function(){}},h.default.createElement(E.default,{name:"save",style:V.actionButtonIcon})))}},{key:"_renderListDemandsSend",value:function(){return h.default.createElement(p.View,{style:V.container},this.state.isLoaded?this.state.isSectionned?this.renderSectionnedList(this.state.listdataSend):this.renderList(this.state.listdataSend):this.renderLoading(),this.printOptions(),this.showSlidingUpPanel())}},{key:"_renderListDemandReceive",value:function(){return h.default.createElement(p.View,{style:V.container},this.state.isLoaded?this.state.isSectionned?this.renderSectionnedList(this.state.listdata):this.renderList(this.state.listdata):this.renderLoading(),this.printOptions(),this.showSlidingUpPanel())}},{key:"_renderTabGeolocated",value:function(){var t=[{text:D.default.t('DEMANDE_SEND')}];return h.default.createElement(_.PagerTabIndicator,{style:{height:(0,S.responsiveHeight)(8)},tabs:t})}},{key:"_renderTabHyper",value:function(){var t=[{text:D.default.t('DEMANDE_RECEIVE')}];return h.default.createElement(_.PagerTabIndicator,{style:{height:(0,S.responsiveHeight)(8)},tabs:t})}},{key:"_renderTabs",value:function(){var t=[{text:D.default.t('MY_DEMANDE'),iconSource:this.state.usersicon},{text:D.default.t('DEMANDE_RECEIVE'),iconSource:this.state.charticon}];return h.default.createElement(_.PagerTabIndicator,{style:{height:(0,S.responsiveHeight)(8)},tabs:t})}},{key:"refreshData",value:function(){var t=this;this.setState({isRefreshing:!0}),(0,b.loadDemandeCredit)().then(function(n){void 0!==n.success&&(t.updateList(n.demands),t.setState({isRefreshing:!1}))}),(0,b.loadMyDemandeCredit)().then(function(n){void 0!==n.success&&(t.setState({isRefreshing:!1}),t.updateMyList(n.demands))})}}]),n})(k.default);C.navigatorStyle={navBarBackgroundColor:L.primary,statusBarColor:L.primaryDark,navBarTextColor:'#FFFFFF',navBarButtonColor:'#FFFFFF',contextualMenuStatusBarColor:A.accent,contextualMenuBackgroundColor:A.accentLight,contextualMenuButtonsColor:'#ffffff'},C.navigationOptions=function(t){var n=t.navigation;return{title:D.default.t('CREDIT_MANAGE'),drawerLabel:n.getParam('name',D.default.t('CREDIT_MANAGE')),drawerIcon:function(t){t.tintColor;return h.default.createElement(E.default,{name:'credit-card',size:24})}}};var M=(0,w.withNavigationFocus)(C);e.default=M;p.StyleSheet.create({titleHeader:{fontSize:20,fontWeight:'bold',color:'black',flex:1},datetitle:{fontSize:17,color:'black',marginLeft:(0,S.responsiveWidth)(2)},datetext:{fontSize:16,marginLeft:(0,S.responsiveWidth)(5)},content:{flex:2},btnContainer:{flexDirection:'row',width:(0,S.responsiveWidth)(100),alignSelf:'flex-end',flex:2},btn:{flex:1,borderColor:'transparent',borderRadius:0},btntext:{fontWeight:'bold',color:L.accent},container:{flex:1,justifyContent:'space-evenly'}});var V=p.StyleSheet.create({slidingup:{width:(0,S.responsiveHeight)(100)},root:{flex:1},container:{flex:1,backgroundColor:'white',justifyContent:'center',alignItems:'center'},emptylist:{flex:1,justifyContent:'center',alignItems:'center'},backgroundd_drawer:{backgroundColor:'#000'},listbackground:{},actionButtonIcon:{fontSize:20,height:22,color:'white'},welcome:{fontSize:20,textAlign:'center',margin:10},instructions:{textAlign:'center',color:'#333333',marginBottom:5},dateText:{marginTop:20,marginLeft:(0,S.responsiveWidth)(13),marginBottom:20,fontSize:17},titlecontent:{fontSize:17,marginLeft:(0,S.responsiveWidth)(10),color:'black'},content:{flex:8},title:{fontSize:20,marginLeft:20,marginTop:20,color:'black',fontWeight:'bold'}})},1139,[4,1,8,10,12,11,9,13,15,18,524,1002,527,1140,807,1149,815,709,711,806,937,712,766,768,840,405,1134,808]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=n(r(d[2])),l=n(r(d[3])),o=n(r(d[4])),u=n(r(d[5])),c=n(r(d[6])),f=n(r(d[7])),h=t(r(d[8])),p=r(d[9]),v=n(r(d[10])),E=n(r(d[11])),S=r(d[12]),y=r(d[13]),b=(r(d[14]),r(d[15])),k=n(r(d[16])),T=(n(r(d[17])),r(d[18])),L=r(d[19]),D=r(d[20]),_=n(r(d[21])),I=r(d[22]),w=(r(d[23]),r(d[24]),r(d[25])),x=r(d[14]),P=r(d[26]),A=r(d[19]);r(d[27]);var C=(function(t){function n(t){var c;return(0,s.default)(this,n),(c=(0,l.default)(this,(0,o.default)(n).call(this,t,!0)))._populateIcons=function(){return new Promise(function(t,n){Promise.all([E.default.getImageSource('sort',30),E.default.getImageSource('layer-group',30)]).then(function(n){n[0],n[1],t(!0)}).catch(function(t){console.log(t),n(t)}).done()})},c._handleAppStateChange=function(t){c.state.appState.match(/inactive|background/),c.setState({appState:t})},c._showDateTimePicker=function(t){1===t?c.setState({isDateTimePickerVisible:!0}):c.setState({isDateEndTimePickerVisible:!0})},c._showDateEndPicker=function(){return c.setState({isDateEndTimePickerVisible:!0})},c._hideDateTimePicker=function(){return c.setState({isDateTimePickerVisible:!1,isDateEndTimePickerVisible:!1})},c._handleDatePicked=function(t,n){console.log([t,n]),c.setState({datestart:t,datestartformated:P(t).format('dddd Do ,MMMM YYYY'),dateend:n,dateendformated:P(n).format('dddd Do ,MMMM YYYY')});var s=c.state.datestart,l=P(n);P(l).diff(s)<0?(c.setState({filder_disable:!0}),c.props.navigator.showSnackbar({text:_.default.t('DATE_WRONG'),duration:'long',backgroundColor:'red',textColor:'white'})):c.setState({filder_disable:!1}),c._hideDateTimePicker()},c.state=c.initState(),(0,T.readUser)().then(function(t){c.setState({user:t})}),c._populateIcons().then(function(){}),I.IlinkEmitter.on("langueChange",c.updateLangue.bind((0,u.default)(c))),c.refreshData(),c}return(0,f.default)(n,t),(0,c.default)(n,null,[{key:"options",value:function(t){return{topBar:{visible:!0,drawBehind:!1,background:{color:A.primaryDark}}}}}]),(0,c.default)(n,[{key:"navigationButtonPressed",value:function(t){var n=t.buttonId;'id'===n?this.showFilter():'sectionned'===n&&this.setState({isSectionned:!this.state.isSectionned})}},{key:"updateLangue",value:function(){this.props.navigation.setParams({name:_.default.t('CREDIT_MANAGE')}),this.forceUpdate()}},{key:"onNavigatorEvent",value:function(t){if('NavBarButtonPress'===t.type)'id'===t.id?this.showFilter():'sectionned'===t.id&&this.setState({isSectionned:!this.state.isSectionned});else switch(t.id){case'willAppear':this.refreshData()}}},{key:"showFilter",value:function(){}},{key:"initState",value:function(){return{user:{},listdata:[],listdataSend:[],conserve:[],appState:p.AppState.currentState,filter:!1,sortIcons:null,panelVisible:!1,filder_disable:!0,datestartformated:'La date de debut',dateendformated:'La date de fin',datestart:null,dateend:null,isLoaded:!1,isSectionned:!1,isDateTimePickerVisible:!1,isDateEndTimePickerVisible:!1}}},{key:"updateList",value:function(t){if(!this.state.filter){var n=t.reverse();this.setState({listdata:n,conserve:n,isLoaded:!0})}}},{key:"updateMyList",value:function(t){if(!this.state.filter){var n=t.reverse();this.setState({listdataSend:n,conserve:n,isLoaded:!0})}}},{key:"componentDidMount",value:function(){p.AppState.addEventListener('change',this._handleAppStateChange)}},{key:"componentWillUnmount",value:function(){p.AppState.removeEventListener('change',this._handleAppStateChange)}},{key:"renderList",value:function(t){var n=this;if(this.state.isLoaded){var s=t;return null!==s?s.length>0?h.default.createElement(y.HistoryListItem,{list:t,refreshing:function(){n.refreshData()},isRefreshing:this.state.isRefreshing,navigator:this.props.navigation,style:B.listbackground}):this.state.filter?h.default.createElement(p.View,{style:B.emptyListe},h.default.createElement(p.Text,null,_.default.t('NO_ITEM_REQUEST'))):0===s.length?h.default.createElement(p.View,{style:B.emptyListe},h.default.createElement(p.Text,null,_.default.t('NO_ITEM_REQUEST'))):h.default.createElement(p.View,{style:B.emptyListe},h.default.createElement(p.ProgressBarAndroid,null),h.default.createElement(p.Text,null,_.default.t('LOADING_DOTS'))):h.default.createElement(p.View,{style:B.emptyListe},h.default.createElement(p.Text,null,_.default.t('EMPTY_LIST_REQUEST')," "))}if(0===t.length)return h.default.createElement(p.View,{style:B.emptyListe},h.default.createElement(p.Text,null,"Aucuns \xe9l\xe9ments ne corresponds"))}},{key:"componentDidUpdate",value:function(t){t.isFocused!==this.props.isFocused&&this.props.isFocused&&this.refreshData()}},{key:"render",value:function(){return h.default.createElement(p.View,{style:{flex:1,marginBottom:20}},h.default.createElement(D.IndicatorViewPager,{style:{flex:1},indicator:"geolocated"===this.state.user.category?this._renderTabGeolocated():'hyper'===this.state.user.category?this._renderTabHyper():this._renderTabs()},"hyper"!==this.state.user.category?this._renderListDemandsSend():null,"geolocated"!==this.state.user.category?this._renderListDemandReceive():null))}},{key:"renderSectionnedList",value:function(t){if(this.state.isLoaded){return null!==t?t.length>0?h.default.createElement(y.HistoryItemSectionned,{list:t,navigator:this.props.navigator,style:B.listbackground}):this.state.filter?h.default.createElement(p.View,{style:B.emptyListe},h.default.createElement(p.Text,null,_.default.t('NO_ITEMS_REQUEST'))):h.default.createElement(p.View,{style:B.emptyListe},h.default.createElement(p.ProgressBarAndroid,null),h.default.createElement(p.Text,null,_.default.t('LOADING_DOTS'))):h.default.createElement(p.View,{style:B.emptyListe},h.default.createElement(p.Text,null,_.default.t('EMPTY_LIST_REQUEST')))}}},{key:"renderLoading",value:function(){return h.default.createElement(p.View,null,h.default.createElement(p.ProgressBarAndroid,null),h.default.createElement(p.Text,null,_.default.t('LOADING_DOTS')))}},{key:"showSlidingUpPanel",value:function(){}},{key:"onfilterPress",value:function(){var t=this.state,n=t.datestart,s=t.dateend,l=this.state.conserve;null!==l&&(l=l.filter(function(t){var l=P(t.dateAjout);return P(t.dateAjout).isAfter(P(n).toDate())&&l.isBefore(P(s).toDate())}),this.setState({listdata:l,panelVisible:!1,filter:!0}))}},{key:"printOptions",value:function(){var t=this;return"hyper"===this.state.user.category?h.default.createElement(v.default,{buttonColor:L.accent},h.default.createElement(v.default.Item,{buttonColor:L.purpleLight,title:_.default.t('SAVE_HISTORY'),onPress:function(){}},h.default.createElement(E.default,{name:"save",style:B.actionButtonIcon}))):h.default.createElement(v.default,{buttonColor:L.accent},h.default.createElement(v.default.Item,{buttonColor:L.primary,title:_.default.t('MAKE_REQUEST'),onPress:function(){t.props.navigation.push(x.credrequester,{onGoBack:function(){return t.refreshData()}})}},h.default.createElement(E.default,{name:"edit",style:B.actionButtonIcon})),h.default.createElement(v.default.Item,{buttonColor:L.purpleLight,title:_.default.t('SAVE_HISTORY'),onPress:function(){}},h.default.createElement(E.default,{name:"save",style:B.actionButtonIcon})))}},{key:"_renderListDemandsSend",value:function(){return h.default.createElement(p.View,{style:B.container},this.state.isLoaded?this.state.isSectionned?this.renderSectionnedList(this.state.listdataSend):this.renderList(this.state.listdataSend):this.renderLoading(),this.printOptions(),this.showSlidingUpPanel())}},{key:"_renderListDemandReceive",value:function(){return h.default.createElement(p.View,{style:B.container},this.state.isLoaded?this.state.isSectionned?this.renderSectionnedList(this.state.listdata):this.renderList(this.state.listdata):this.renderLoading(),this.printOptions(),this.showSlidingUpPanel())}},{key:"_renderTabGeolocated",value:function(){var t=[{text:_.default.t('DEMANDE_SEND')}];return h.default.createElement(D.PagerTabIndicator,{style:{height:(0,S.responsiveHeight)(8)},tabs:t})}},{key:"_renderTabHyper",value:function(){var t=[{text:_.default.t('DEMANDE_RECEIVE')}];return h.default.createElement(D.PagerTabIndicator,{style:{height:(0,S.responsiveHeight)(8)},tabs:t})}},{key:"_renderTabs",value:function(){var t=[{text:_.default.t('MY_DEMANDE'),iconSource:this.state.usersicon},{text:_.default.t('DEMANDE_RECEIVE'),iconSource:this.state.charticon}];return h.default.createElement(D.PagerTabIndicator,{style:{height:(0,S.responsiveHeight)(8)},tabs:t})}},{key:"refreshData",value:function(){var t=this;this.setState({isRefreshing:!0}),(0,b.loadDemandeCredit)().then(function(n){void 0!==n.success&&(t.updateList(n.demands),t.setState({isRefreshing:!1}))}),(0,b.loadMyDemandeCredit)().then(function(n){void 0!==n.success&&(t.setState({isRefreshing:!1}),t.updateMyList(n.demands))})}}]),n})(k.default);C.navigatorStyle={navBarBackgroundColor:L.primary,statusBarColor:L.primaryDark,navBarTextColor:'#FFFFFF',navBarButtonColor:'#FFFFFF',contextualMenuStatusBarColor:A.accent,contextualMenuBackgroundColor:A.accentLight,contextualMenuButtonsColor:'#ffffff'},C.navigationOptions=function(t){var n=t.navigation;return{title:_.default.t('CREDIT_MANAGE'),drawerLabel:n.getParam('name',_.default.t('CREDIT_MANAGE')),drawerIcon:function(t){t.tintColor;return h.default.createElement(E.default,{name:'credit-card',size:24})}}};var M=(0,w.withNavigationFocus)(C);e.default=M;p.StyleSheet.create({titleHeader:{fontSize:20,fontWeight:'bold',color:'black',flex:1},datetitle:{fontSize:17,color:'black',marginLeft:(0,S.responsiveWidth)(2)},datetext:{fontSize:16,marginLeft:(0,S.responsiveWidth)(5)},content:{flex:2},btnContainer:{flexDirection:'row',width:(0,S.responsiveWidth)(100),alignSelf:'flex-end',flex:2},btn:{flex:1,borderColor:'transparent',borderRadius:0},btntext:{fontWeight:'bold',color:L.accent},container:{flex:1,justifyContent:'space-evenly'}});var B=p.StyleSheet.create({slidingup:{width:(0,S.responsiveHeight)(100)},root:{flex:1},container:{flex:1,backgroundColor:'white',justifyContent:'center',alignItems:'center'},emptylist:{flex:1,justifyContent:'center',alignItems:'center'},backgroundd_drawer:{backgroundColor:'#000'},listbackground:{},actionButtonIcon:{fontSize:20,height:22,color:'white'},welcome:{fontSize:20,textAlign:'center',margin:10},instructions:{textAlign:'center',color:'#333333',marginBottom:5},dateText:{marginTop:20,marginLeft:(0,S.responsiveWidth)(13),marginBottom:20,fontSize:17},titlecontent:{fontSize:17,marginLeft:(0,S.responsiveWidth)(10),color:'black'},content:{flex:8},title:{fontSize:20,marginLeft:20,marginTop:20,color:'black',fontWeight:'bold'}})},1139,[4,1,8,10,12,11,9,13,15,18,524,1002,527,1140,807,1149,815,709,711,806,937,712,766,768,840,405,1134,808]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryListItem=e.HistoryItemSectionned=e.HistoryItem=void 0;var s=n(r(d[2])),o=n(r(d[3])),l=n(r(d[4])),u=n(r(d[5])),f=n(r(d[6])),c=t(r(d[7])),h=(n(r(d[8])),r(d[9])),p=r(d[10]),v=(r(d[11]),n(r(d[12]))),y=n(r(d[13]));r(d[14]),r(d[15]),r(d[16]),r(d[17]),r(d[18]),r(d[19]),r(d[20]);var E=n(r(d[21])),x=r(d[22]),S=(r(d[23]),r(d[24])),T=r(d[25]),D=(function(t){function n(t){var o;return(0,s.default)(this,n),(o=(0,l.default)(this,(0,u.default)(n).call(this,t))).state=o.initState(),o}return(0,f.default)(n,t),(0,o.default)(n,[{key:"initState",value:function(){var t=' Transaction '+this.props.selfData.id,n=y.default.t('PHONE')+' '+this.props.selfData.phone+" "+y.default.t('DEMAND_TEXT_FIRST_PART')+' '+this.props.selfData.montant+' '+y.default.t('TO_')+' ';n+=this.props.selfData.reseau;new Date,this.props.selfData.date_creation;var s=this.props.selfData.status,o=E.default.getDeviceLocale().includes("fr")?"fr":E.default.getDeviceLocale();x.locale(o);var l=x.tz(this.props.selfData.date_creation,'Etc/GMT+0').format();return l=x(l),{title:t,description:n,status:'1'===this.props.selfData.status?y.default.t('TREAT'):y.default.t('NO_TREAT'),time:l.fromNow(),navigator:this.props.navigator,type:s,colorstate:'1'===s?'green':'red'}}},{key:"render",value:function(){var t=this;return c.default.createElement(h.TouchableOpacity,{onPress:function(){return t.props.navigator.navigate(S.historyItemDetails,{item:t.props.selfData})}},c.default.createElement(h.View,{style:k.content},c.default.createElement(h.Text,{style:k.title},this.state.title),c.default.createElement(h.Text,{style:k.description},this.state.description),c.default.createElement(h.View,{style:k.timeContent},c.default.createElement(h.Text,{style:{fontWeight:'bold',marginLeft:20,marginBottom:10,color:this.state.colorstate}},this.state.status),c.default.createElement(h.Text,{style:k.time},this.state.time)),c.default.createElement(h.View,{style:k.bottomSeparator})))}}]),n})(c.default.Component);e.HistoryItem=D;var _=(function(t){function n(t){var o;return(0,s.default)(this,n),(o=(0,l.default)(this,(0,u.default)(n).call(this,t)))._keyExtractor=function(t,n){return t.id},o._renderItem=function(t){var n=t.item;return c.default.createElement(D,{navigator:o.props.navigator,selfData:n})},o.state=o.initState(),o}return(0,f.default)(n,t),(0,o.default)(n,[{key:"render",value:function(){var t=this;return c.default.createElement(h.SectionList,{sections:[{title:'Demande trait\xe9',type:0,data:this.state.treat,size:this.state.conservetreat.length,expandState:this.state.istreatexpand},{title:'Demande non trait\xe9',type:1,data:this.state.untreat,size:this.state.conserveuntreat.length,expandState:this.state.isuntreatexpand}],renderSectionHeader:function(n){var s=n.section,o=s.title,l=s.type,u=(s.data,s.size),f=s.expandState;return c.default.createElement(h.TouchableOpacity,{onPress:function(){return t.onPressedHeader(l)},style:{backgroundColor:T.accent,justifyContent:'center',alignItems:'center',flexDirection:'row',flex:1,height:70,width:(0,p.responsiveWidth)(100)}},c.default.createElement(h.View,{style:{height:70,justifyContent:'center',flex:1,width:(0,p.responsiveWidth)(100)}},c.default.createElement(h.Text,{style:{fontWeight:'bold',marginLeft:20,fontSize:20,color:'white'}},o),c.default.createElement(h.Text,{style:{fontWeight:'bold',marginLeft:20,fontSize:16,color:'white'}},u," demande(s)")),c.default.createElement(v.default,{name:f?'sort-up':'sort-down',size:30,color:'white',style:{marginRight:20}}))},style:k.listStyle,extraData:this.state,keyExtractor:this._keyExtractor,renderItem:this._renderItem})}},{key:"onPressedHeader",value:function(t){0===t?this.setState({istreatexpand:!this.state.istreatexpand,treat:this.state.istreatexpand?[]:this.state.conservetreat}):this.setState({isuntreatexpand:!this.state.isuntreatexpand,untreat:this.state.isuntreatexpand?[]:this.state.conserveuntreat})}},{key:"initState",value:function(){var t=this.props.list;return{conservetreat:t.filter(function(t){return t.statut===y.default.t('TREAT')}),treat:t.filter(function(t){return t.statut===y.default.t('TREAT')}),istreatexpand:!0,conserveuntreat:t.filter(function(t){return t.statut!==y.default.t('TREAT')}),untreat:t.filter(function(t){return t.statut!==y.default.t('TREAT')}),isuntreatexpand:!0}}}]),n})(c.PureComponent);e.HistoryItemSectionned=_;var w=(function(t){function n(t){var o;return(0,s.default)(this,n),(o=(0,l.default)(this,(0,u.default)(n).call(this,t)))._keyExtractor=function(t,n){return t.id},o._onPressItem=function(t){},o._renderItem=function(t){var n=t.item;return c.default.createElement(D,{navigator:o.props.navigator,selfData:n})},o.state=o.initState(),o}return(0,f.default)(n,t),(0,o.default)(n,[{key:"initState",value:function(){return{refreshing:!1}}},{key:"render",value:function(){return c.default.createElement(h.FlatList,{style:k.listStyle,data:this.props.list,extraData:this.state,keyExtractor:this._keyExtractor,renderItem:this._renderItem,refreshControl:c.default.createElement(h.RefreshControl,{refreshing:this.props.isRefreshing,colors:[T.primary,T.purpleLight,T.reddeconnect,T.accentLight],onRefresh:this.props.refreshing})})}},{key:"_onRefresh",value:function(){var t=this;this.setState({refreshing:!0}),setTimeout(function(){t.setState({refreshing:!1})},5e3)}}]),n})(c.default.Component);e.HistoryListItem=w;var k=h.StyleSheet.create({content:{width:(0,p.responsiveWidth)(100),borderBottomColor:'#FFFFFF',flex:1,flexDirection:'column',paddingTop:10},listStyle:{backgroundColor:'white'},bottomSeparator:{width:(0,p.responsiveWidth)(100),height:5,justifyContent:'center',alignSelf:'center',backgroundColor:'#EEE'},title:{color:'#000',paddingLeft:10,fontSize:(0,p.responsiveFontSize)(2.2)},description:{fontSize:(0,p.responsiveFontSize)(1.8),color:'#4f5b62',paddingLeft:10},timeContent:{justifyContent:'space-between',flex:1,marginTop:10,marginBottom:5,flexDirection:'row'},time:{fontWeight:'bold',marginRight:20,marginBottom:10,color:T.accent},treat:{}})},1140,[4,1,8,9,10,12,13,15,68,18,527,1141,1002,712,1142,1143,1144,1145,1146,1147,1148,930,1134,1024,807,806]); __d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.convertDateToHumanText=e.isSameDate=e.isSameMonth=e.isSameDay=e.isSameYear=void 0;var t=function(t,n){return t.getFullYear()==n.getFullYear()};e.isSameYear=t;var n=function(t,n){return t.getDate()==n.getDate()};e.isSameDay=n;var o=function(t,n){return t.getMonth()==n.getMonth()};e.isSameMonth=o;var u=function(u,s){return n(u,s)&&o(u,s)&&t(u,s)};e.isSameDate=u;e.convertDateToHumanText=function(n,s){var f=Math.abs(n.getTime()-s.getTime()/1e3);if(u(n,s))f<60||(f=f<3600?parseInt(f/60):parseInt(f/3600));else{if(t(n,s)&&o(n,s))return'Il y a '+Math.round(Math.abs(n.getMonth()-s.getMonth()))+' mois';if(t(n,s))return s.toDateString()}}},1141,[]); __d(function(g,r,i,a,m,e,d){var s,n;s=this,n=function(s){'use strict';return s.defineLocale('fr',{months:'janvier_f\xe9vrier_mars_avril_mai_juin_juillet_ao\xfbt_septembre_octobre_novembre_d\xe9cembre'.split('_'),monthsShort:'janv._f\xe9vr._mars_avr._mai_juin_juil._ao\xfbt_sept._oct._nov._d\xe9c.'.split('_'),monthsParseExact:!0,weekdays:'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),weekdaysShort:'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),weekdaysMin:'di_lu_ma_me_je_ve_sa'.split('_'),weekdaysParseExact:!0,longDateFormat:{LT:'HH:mm',LTS:'HH:mm:ss',L:'DD/MM/YYYY',LL:'D MMMM YYYY',LLL:'D MMMM YYYY HH:mm',LLLL:'dddd D MMMM YYYY HH:mm'},calendar:{sameDay:'[Aujourd\u2019hui \xe0] LT',nextDay:'[Demain \xe0] LT',nextWeek:'dddd [\xe0] LT',lastDay:'[Hier \xe0] LT',lastWeek:'dddd [dernier \xe0] LT',sameElse:'L'},relativeTime:{future:'dans %s',past:'il y a %s',s:'quelques secondes',ss:'%d secondes',m:'une minute',mm:'%d minutes',h:'une heure',hh:'%d heures',d:'un jour',dd:'%d jours',M:'un mois',MM:'%d mois',y:'un an',yy:'%d ans'},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(s,n){switch(n){case'D':return s+(1===s?'er':'');default:case'M':case'Q':case'DDD':case'd':return s+(1===s?'er':'e');case'w':case'W':return s+(1===s?'re':'e')}},week:{dow:1,doy:4}})},'object'==typeof e&&void 0!==m&&'function'==typeof r?n(r(d[0])):'function'==typeof define&&define.amd?define(['../moment'],n):n(s.moment)},1142,[1024]); @@ -1153,7 +1153,7 @@ __d(function(g,r,i,a,m,e,d){var t,n;t=this,n=function(t){'use strict';return t.d __d(function(g,r,i,a,m,e,d){var t,n;t=this,n=function(t){'use strict';return t.defineLocale('en-il',{months:'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),monthsShort:'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),weekdays:'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),weekdaysShort:'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),weekdaysMin:'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),longDateFormat:{LT:'HH:mm',LTS:'HH:mm:ss',L:'DD/MM/YYYY',LL:'D MMMM YYYY',LLL:'D MMMM YYYY HH:mm',LLLL:'dddd, D MMMM YYYY HH:mm'},calendar:{sameDay:'[Today at] LT',nextDay:'[Tomorrow at] LT',nextWeek:'dddd [at] LT',lastDay:'[Yesterday at] LT',lastWeek:'[Last] dddd [at] LT',sameElse:'L'},relativeTime:{future:'in %s',past:'%s ago',s:'a few seconds',m:'a minute',mm:'%d minutes',h:'an hour',hh:'%d hours',d:'a day',dd:'%d days',M:'a month',MM:'%d months',y:'a year',yy:'%d years'},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(t){var n=t%10;return t+(1==~~(t%100/10)?'th':1===n?'st':2===n?'nd':3===n?'rd':'th')}})},'object'==typeof e&&void 0!==m&&'function'==typeof r?n(r(d[0])):'function'==typeof define&&define.amd?define(['../moment'],n):n(t.moment)},1147,[1024]); __d(function(g,r,i,a,m,e,d){var t,n;t=this,n=function(t){'use strict';return t.defineLocale('en-nz',{months:'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'),monthsShort:'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),weekdays:'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),weekdaysShort:'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),weekdaysMin:'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),longDateFormat:{LT:'h:mm A',LTS:'h:mm:ss A',L:'DD/MM/YYYY',LL:'D MMMM YYYY',LLL:'D MMMM YYYY h:mm A',LLLL:'dddd, D MMMM YYYY h:mm A'},calendar:{sameDay:'[Today at] LT',nextDay:'[Tomorrow at] LT',nextWeek:'dddd [at] LT',lastDay:'[Yesterday at] LT',lastWeek:'[Last] dddd [at] LT',sameElse:'L'},relativeTime:{future:'in %s',past:'%s ago',s:'a few seconds',ss:'%d seconds',m:'a minute',mm:'%d minutes',h:'an hour',hh:'%d hours',d:'a day',dd:'%d days',M:'a month',MM:'%d months',y:'a year',yy:'%d years'},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(t){var n=t%10;return t+(1==~~(t%100/10)?'th':1===n?'st':2===n?'nd':3===n?'rd':'th')},week:{dow:1,doy:4}})},'object'==typeof e&&void 0!==m&&'function'==typeof r?n(r(d[0])):'function'==typeof define&&define.amd?define(['../moment'],n):n(t.moment)},1148,[1024]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.sendDemandeSpecificque=e.sendDemande=e.updateCreditDemand=e.loadMyDemandeCredit=e.loadDemandeCredit=void 0;var o=n(r(d[2])),c=(t(r(d[3])),n(r(d[4]))),s=r(d[5]),u=r(d[6]);r(d[7]).DBEvents,r(d[8]);e.loadDemandeCredit=function(){var t,n,l,p;return o.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,o.default.awrap((0,u.readUser)());case 2:return t=f.sent,n={tag:"credit_demands",id:t.code_membre,lang:c.default.currentLocale(),test:s.isDebugMode},f.next=6,o.default.awrap(fetch(s.demandeActionUrl,{method:'POST',headers:{Accept:'application/json','Content-Type':'application/json'},body:JSON.stringify(n)}));case 6:return l=f.sent,f.prev=7,console.log(l),f.next=11,o.default.awrap(l.json());case 11:return p=f.sent,console.log(p),f.abrupt("return",p);case 16:return f.prev=16,f.t0=f.catch(7),console.log(l.text()),f.abrupt("return",[]);case 20:case"end":return f.stop()}},null,null,[[7,16]],Promise)};e.loadMyDemandeCredit=function(){var t,n,l,p;return o.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return f.next=2,o.default.awrap((0,u.readUser)());case 2:return t=f.sent,n={tag:"credit_demands_of_agent",id:t.agentId,lang:c.default.currentLocale(),test:s.isDebugMode},console.log(n),f.next=7,o.default.awrap(fetch(s.demandeActionUrl,{method:'POST',headers:{Accept:'application/json','Content-Type':'application/json'},body:JSON.stringify(n)}));case 7:return l=f.sent,f.prev=8,console.log(l,"my demande"),f.next=12,o.default.awrap(l.json());case 12:return p=f.sent,console.log(p),f.abrupt("return",p);case 17:return f.prev=17,f.t0=f.catch(8),f.abrupt("return",[]);case 20:case"end":return f.stop()}},null,null,[[8,17]],Promise)};e.updateCreditDemand=function(t,n){var o={tag:"update_ask_credit",phone:t,id:n,lang:c.default.currentLocale(),test:s.isDebugMode};return fetch(s.demandeActionUrl,{method:"POST",headers:{Accept:'application/json','Content-Type':'application/json'},body:JSON.stringify(o)}).then(function(t){return t.json()}).then(function(t){return t}).catch(function(t){console.warn(t)})};e.sendDemande=function(t){var n,l,p,f,h;return o.default.async(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,o.default.awrap((0,u.readUser)());case 2:if(void 0===(n=b.sent)||void 0===n.code_parrain||void 0===n.code_membre||n.code_membre===n.code_parrain){b.next=24;break}return l={tag:"ask_credit",phone:n.phone,code:n.code,lang:c.default.currentLocale(),test:s.isDebugMode,montant:t},b.next=7,o.default.awrap(fetch(s.demandeActionUrl,{method:'POST',headers:{Accept:'application/json','Content-Type':'application/json'},body:JSON.stringify(l)}));case 7:return p=b.sent,f="",b.prev=9,b.next=12,o.default.awrap(p.text());case 12:return f=b.sent,h=JSON.parse(f),b.abrupt("return",h);case 17:return b.prev=17,b.t0=b.catch(9),console.log(p),console.log("error",f),b.abrupt("return",[]);case 22:b.next=25;break;case 24:return b.abrupt("return",-1);case 25:case"end":return b.stop()}},null,null,[[9,17]],Promise)};e.sendDemandeSpecificque=function(t,n,u){var l,p,f;return o.default.async(function(h){for(;;)switch(h.prev=h.next){case 0:return l={tag:"ask_credit",phone:n,test:s.isDebugMode,code:u,montant:t,lang:c.default.currentLocale()},h.next=3,o.default.awrap(fetch(s.demandeActionUrl,{method:'POST',headers:{Accept:'application/json','Content-Type':'application/json'},body:JSON.stringify(l)}));case 3:return p=h.sent,h.prev=4,h.next=7,o.default.awrap(p.json());case 7:return f=h.sent,console.log(f),h.abrupt("return",f);case 12:return h.prev=12,h.t0=h.catch(4),console.log(p),console.warn(h.t0),h.abrupt("return",[]);case 17:case"end":return h.stop()}},null,null,[[4,12]],Promise)}},1149,[4,1,273,15,712,736,711,738,714]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),u=n(r(d[3])),c=n(r(d[4])),l=n(r(d[5])),s=n(r(d[6])),f=n(r(d[7])),v=t(r(d[8])),h=r(d[9]),p=(n(r(d[10])),n(r(d[11]))),k=r(d[12]),y=(n(r(d[13])),r(d[14]),r(d[15])),I=r(d[16]),N=n(r(d[17])),A=n(r(d[18])),T=r(d[19]),S=r(d[20]),E=n(r(d[21])),C=(t(r(d[22])),n(r(d[23]))),O=r(d[24]);r(d[14]);r(d[25]);r(d[26]).DBEvents;var b=r(d[15]),w=(function(t){function n(t){var u;return(0,o.default)(this,n),(u=(0,c.default)(this,(0,l.default)(n).call(this,t))).redirectToScreen=function(t){switch(console.log("Item Menu Click",t),u.state.user.category){case"super":case"hyper":"walletSelect"===t&&(t="walletDetail"),u.props.navigation.navigate(t,{agentId:u.state.user.agentId});break;default:u.props.navigation.navigate(t)}},u._renderItem=function(t){if("creditrequest"===t||'historyItemDetails'===t||'filter'===t||'networks'===t||'walletDetail'===t)return null;u.state.currentId===t.id&&b.accent;return v.default.createElement(h.TouchableOpacity,{onPress:function(){u.props.navigation.toggleDrawer(),u.setState({currentId:t.id}),u.redirectToScreen(t)}},v.default.createElement(h.View,{style:U.content},v.default.createElement(p.default,{name:u.getIcon(t),size:32}),v.default.createElement(h.Text,{style:{marginLeft:20,fontSize:16}},u.getNameItems(t))))},u._onPress=function(t){u.setState({currentId:t.id});var n=u.state.menu.filter(function(t){return t.active})[0];n.active=!1,t.active=!0;var o=[];u.state.menu.forEach(function(u){u.id===n.id?o.push(n):u.id===t.id?o.push(t):o.push(u)}),u.setState({menu:o})},u.state=u.initState(),T.IlinkEmitter.on("menuLink",u.onMenuNavigationEvent.bind((0,s.default)(u))),T.IlinkEmitter.on("userconnect",u.onUserConnect.bind((0,s.default)(u))),T.IlinkEmitter.on("userdisconnect",u.hideSideMenu.bind((0,s.default)(u))),T.IlinkEmitter.on("langueChange",u.updateLangue.bind((0,s.default)(u))),u.configuration=new C.default,(0,I.readUser)().then(function(t){t.id!==u.state.user.id&&null!==t&&void 0!==t&&u.setState({user:t})}),u}return(0,f.default)(n,t),(0,u.default)(n,[{key:"retrieveAndroidInformation",value:function(){var t=this;return this.configuration._getData().then(function(n){if(n)N.default.locale=n,(0,I.readUser)().then(function(n){setTimeout(function(){t.updateUser(n)},3e3)});else{var o=E.default.getDeviceLocale();N.default.locale=o.toLowerCase(),(0,I.readUser)().then(function(n){setTimeout(function(){t.updateUser(n)},3e3)}).catch(function(n){t.props.navigation.navigate("Auth")})}}).catch(function(n){var o=E.default.getDeviceLocale();N.default.locale=o.toLowerCase(),(0,I.readUser)().then(function(n){setTimeout(function(){t.updateUser(n)},3e3)}).catch(function(n){t.props.navigation.navigate("Auth")})}),""}},{key:"componentDidMount",value:function(){var t=this.props.navigation.router.childRouters.sta.childRouters;this.setState({items:t}),this.retrieveAndroidInformation()}},{key:"updateLangue",value:function(){this.setState({lang:"change"}),this.forceUpdate()}},{key:"componentWillUnmount",value:function(){}},{key:"onMenuNavigationEvent",value:function(t){}},{key:"onUserConnect",value:function(){var t=this;(0,I.readUser)().then(function(n){null!==n&&void 0!==n&&t.updateUser(n)})}},{key:"onNavigatorEvent",value:function(t){}},{key:"hideSideMenu",value:function(){}},{key:"initState",value:function(){return{user:null,menu:[],currentId:0}}},{key:"getGeolocatedUserMenu",value:function(){return[{title:N.default.t('MAP'),id:0,key:0,icon:'md-map',active:!0},{title:N.default.t('MY_ACCOUNT'),id:1,key:1,icon:'md-person',active:!1},{title:N.default.t('WALLET'),id:6,key:6,icon:'md-wallet-outline',active:!1},{title:N.default.t('CREDIT_MANAGE'),id:2,key:2,icon:'md-card',active:!1},{title:N.default.t('ADD_NETWORK'),id:11,key:11,icon:'md-people',active:!1},{title:N.default.t('CHANGE_INFORMATION'),id:13,key:13,icon:'md-person',active:!1},{title:N.default.t('NOTIFICATIONS'),id:3,key:3,icon:'md-notifications',active:!1},{title:N.default.t('CONFIGURATIONS'),id:4,icon:'md-settings',active:!1}]}},{key:"getSuperUserMenu",value:function(){return[{title:N.default.t('MAP'),id:0,key:0,icon:'md-map',active:!0},{title:N.default.t('MY_ACCOUNT'),id:1,key:1,icon:'md-person',active:!1},{title:N.default.t('WALLET'),id:6,key:6,icon:'md-wallet-outline',active:!1},{title:N.default.t('CREDIT_MANAGE'),id:2,key:2,icon:'md-card',active:!1},{title:N.default.t('GROUP_MANAGE'),id:5,key:5,icon:'md-people',active:!1},{title:N.default.t('NOTIFICATIONS'),id:3,key:3,icon:'md-notifications',active:!1},{title:N.default.t('CONFIGURATIONS'),id:4,icon:'md-settings',active:!1}]}},{key:"getHyperUsermenu",value:function(){return[{title:N.default.t('MAP'),id:0,key:0,icon:'md-map',active:!0},{title:N.default.t('MY_ACCOUNT'),id:1,key:1,icon:'md-person',active:!1},{title:N.default.t('WALLET'),id:6,key:6,icon:'md-wallet-outline',active:!1},{title:N.default.t('CREDIT_MANAGE'),id:2,key:2,icon:'md-card',active:!1},{title:N.default.t('GROUP_MANAGE'),id:5,key:5,icon:'md-people',active:!1},{title:N.default.t('NOTIFICATIONS'),id:3,key:3,icon:'md-notifications',active:!1},{title:N.default.t('CONFIGURATIONS'),id:4,icon:'md-settings',active:!1}]}},{key:"updateUser",value:function(t){var n=[];if(void 0!==t)if(void 0!==t.category)switch(t.category){case"geolocated":n=this.getGeolocatedUserMenu();break;case"super":n=this.getSuperUserMenu();break;case"hyper":n=this.getHyperUsermenu()}else n=this.getUserMenu();this.setState({user:t,menu:n})}},{key:"getUserMenu",value:function(){return[{title:N.default.t('MAP'),id:0,key:0,icon:'md-map',active:!0},{title:N.default.t('MY_ACCOUNT'),id:1,key:1,icon:'md-person',active:!1},{title:N.default.t('NOTIFICATIONS'),id:3,key:3,icon:'md-notifications',active:!1},{title:N.default.t('CONFIGURATIONS'),id:4,icon:'md-settings',active:!1}]}},{key:"getNameItems",value:function(t){var n=t;switch(t){case"home":n=N.default.t('MAP');break;case'useraccount':n=N.default.t('MY_ACCOUNT');break;case'walletSelect':n=N.default.t('WALLET');break;case'Historique':n=N.default.t('CREDIT_MANAGE');break;case"superviseurgroup":n=N.default.t('GROUP_MANAGE');break;case"updateinformation":n=N.default.t("CHANGE_INFORMATION");break;case'notificationview':n=N.default.t('NOTIFICATIONS');break;case'configuration':n=N.default.t('CONFIGURATIONS');break;case'addNetwork':n=N.default.t('ADD_NETWORK');break;case'about':n=N.default.t('ABOUT')}return n}},{key:"getIcon",value:function(t){var n="md-map";switch(t){case"home":n="md-map";break;case'useraccount':n="md-person";break;case'walletSelect':n="md-wallet";break;case'Historique':n="md-card";break;case"superviseurgroup":n="md-people";break;case'notificationview':n="md-notifications";break;case"updateinformation":n="md-people";break;case'configuration':n='md-settings';break;case'addNetwork':n="md-people";break;case'about':n='md-contacts'}return n}},{key:"render",value:function(){var t=this,n=this.state.user?this.state.user.firstname:"",o=this.state.user?this.state.user.lastname:"";return this.state.lang||"change"===this.state.lang?(setTimeout(function(){return t.setState({lang:""})},500),v.default.createElement(h.View,null)):v.default.createElement(h.View,{style:M.container},v.default.createElement(h.View,{style:M.headercontent},v.default.createElement(h.Text,{style:M.headerTitle},n),v.default.createElement(h.Text,{style:M.headerTitle},o),v.default.createElement(h.Text,{style:M.headerPhone},this.state.user?""+this.state.user.phone:"")),v.default.createElement(O.ScrollView,{style:{flex:1,height:(0,k.responsiveHeight)(40)}},v.default.createElement(S.SafeAreaView,{forceInset:{top:'always',horizontal:'never'}},this.state.items&&Object.keys(this.state.items).map(function(n,o){return t._renderItem(n)}))),v.default.createElement(A.default,{textStyle:M.btntext,style:M.btnDeconnect,onPress:function(){return t.userDeconnect()}},N.default.t('DISCONNEXION')))}},{key:"userDeconnect",value:function(){var t=this;h.Alert.alert(N.default.t('DISCONNEXION'),N.default.t('DISCONNEXION_TEXT'),[{},{text:N.default.t('NO'),onPress:function(){return console.log('Cancel Pressed')},style:'cancel'},{text:N.default.t('YES'),onPress:function(){(0,I.disconnect)().then(function(){T.IlinkEmitter.emit("userdisconnect"),t.props.navigation.navigate("Auth")})}}],{cancelable:!1})}},{key:"watchUser",value:function(){var t=this;(0,I.readUser)().then(function(n){n.id!==t.state.user.id&&null!==n&&void 0!==n&&t.updateUser(n)})}}]),n})(v.Component);e.default=w,w.navigatorStyle={statusBarColor:y.primaryDarkAdvanced};var U=h.StyleSheet.create({content:{width:(0,k.responsiveWidth)(100),height:50,paddingLeft:20,flexDirection:'row',alignItems:'center'},itemText:{color:'#000000',marginLeft:20,fontSize:(0,k.responsiveFontSize)(2)}}),M=h.StyleSheet.create({container:{flex:1,backgroundColor:"white"},btnDeconnect:{borderColor:"transparent",marginLeft:20,marginRight:20,backgroundColor:b.accent},btntext:{color:"white",fontSize:17,fontWeight:"bold"},headerTitle:{fontSize:14,marginBottom:5,color:"white",fontWeight:'bold'},headerPhone:{fontSize:12,marginBottom:20,color:"white",justifyContent:'flex-end'},listMenu:{paddingTop:15},headercontent:{height:(0,k.responsiveHeight)(30),backgroundColor:y.primary,justifyContent:'flex-end',alignItems:'flex-start',paddingLeft:20},backgroundd_drawer:{backgroundColor:'#000'},listbackground:{},actionButtonIcon:{fontSize:20,height:22,color:'white'},welcome:{fontSize:20,textAlign:'center',margin:10},instructions:{textAlign:'center',color:'#333333',marginBottom:5}})},1150,[4,1,8,9,10,12,11,13,15,18,524,871,527,1151,807,806,711,712,709,766,405,930,404,737,2,808,738]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),l=n(r(d[3])),u=n(r(d[4])),c=n(r(d[5])),s=n(r(d[6])),f=n(r(d[7])),v=t(r(d[8])),h=r(d[9]),p=(n(r(d[10])),n(r(d[11]))),k=r(d[12]),y=(n(r(d[13])),r(d[14]),r(d[15])),I=r(d[16]),N=n(r(d[17])),A=n(r(d[18])),T=r(d[19]),S=r(d[20]),E=n(r(d[21])),C=(t(r(d[22])),n(r(d[23]))),O=r(d[24]);r(d[14]);r(d[25]);r(d[26]).DBEvents;var b=r(d[15]),w=(function(t){function n(t){var l;return(0,o.default)(this,n),(l=(0,u.default)(this,(0,c.default)(n).call(this,t))).redirectToScreen=function(t){if(console.log("Item Menu Click",t),null!==l.state.user)switch(l.state.user.category){case"super":case"hyper":"walletSelect"===t&&(t="walletDetail"),l.props.navigation.navigate(t,{agentId:l.state.user.agentId});break;default:l.props.navigation.navigate(t)}},l._renderItem=function(t){if("creditrequest"===t||'historyItemDetails'===t||'filter'===t||'networks'===t||'walletDetail'===t||'walletDepot'===t||'walletRetrait'===t)return null;l.state.currentId===t.id&&b.accent;return v.default.createElement(h.TouchableOpacity,{onPress:function(){l.props.navigation.toggleDrawer(),l.setState({currentId:t.id}),l.redirectToScreen(t)}},v.default.createElement(h.View,{style:U.content},v.default.createElement(p.default,{name:l.getIcon(t),size:32}),v.default.createElement(h.Text,{style:{marginLeft:20,fontSize:16}},l.getNameItems(t))))},l._onPress=function(t){l.setState({currentId:t.id});var n=l.state.menu.filter(function(t){return t.active})[0];n.active=!1,t.active=!0;var o=[];l.state.menu.forEach(function(l){l.id===n.id?o.push(n):l.id===t.id?o.push(t):o.push(l)}),l.setState({menu:o})},l.state=l.initState(),T.IlinkEmitter.on("menuLink",l.onMenuNavigationEvent.bind((0,s.default)(l))),T.IlinkEmitter.on("userconnect",l.onUserConnect.bind((0,s.default)(l))),T.IlinkEmitter.on("userdisconnect",l.hideSideMenu.bind((0,s.default)(l))),T.IlinkEmitter.on("langueChange",l.updateLangue.bind((0,s.default)(l))),l.configuration=new C.default,(0,I.readUser)().then(function(t){t.id!==l.state.user.id&&null!==t&&void 0!==t&&l.setState({user:t})}),l}return(0,f.default)(n,t),(0,l.default)(n,[{key:"retrieveAndroidInformation",value:function(){var t=this;return this.configuration._getData().then(function(n){if(n)N.default.locale=n,(0,I.readUser)().then(function(n){setTimeout(function(){t.updateUser(n)},3e3)});else{var o=E.default.getDeviceLocale();N.default.locale=o.toLowerCase(),(0,I.readUser)().then(function(n){setTimeout(function(){t.updateUser(n)},3e3)}).catch(function(n){t.props.navigation.navigate("Auth")})}}).catch(function(n){var o=E.default.getDeviceLocale();N.default.locale=o.toLowerCase(),(0,I.readUser)().then(function(n){setTimeout(function(){t.updateUser(n)},3e3)}).catch(function(n){t.props.navigation.navigate("Auth")})}),""}},{key:"componentDidMount",value:function(){var t=this.props.navigation.router.childRouters.sta.childRouters;this.setState({items:t}),this.retrieveAndroidInformation()}},{key:"updateLangue",value:function(){this.setState({lang:"change"}),this.forceUpdate()}},{key:"componentWillUnmount",value:function(){}},{key:"onMenuNavigationEvent",value:function(t){}},{key:"onUserConnect",value:function(){var t=this;(0,I.readUser)().then(function(n){null!==n&&void 0!==n&&t.updateUser(n)})}},{key:"onNavigatorEvent",value:function(t){}},{key:"hideSideMenu",value:function(){}},{key:"initState",value:function(){return{user:null,menu:[],currentId:0}}},{key:"getGeolocatedUserMenu",value:function(){return[{title:N.default.t('MAP'),id:0,key:0,icon:'md-map',active:!0},{title:N.default.t('MY_ACCOUNT'),id:1,key:1,icon:'md-person',active:!1},{title:N.default.t('WALLET'),id:6,key:6,icon:'md-wallet-outline',active:!1},{title:N.default.t('CREDIT_MANAGE'),id:2,key:2,icon:'md-card',active:!1},{title:N.default.t('ADD_NETWORK'),id:11,key:11,icon:'md-people',active:!1},{title:N.default.t('CHANGE_INFORMATION'),id:13,key:13,icon:'md-person',active:!1},{title:N.default.t('NOTIFICATIONS'),id:3,key:3,icon:'md-notifications',active:!1},{title:N.default.t('CONFIGURATIONS'),id:4,icon:'md-settings',active:!1}]}},{key:"getSuperUserMenu",value:function(){return[{title:N.default.t('MAP'),id:0,key:0,icon:'md-map',active:!0},{title:N.default.t('MY_ACCOUNT'),id:1,key:1,icon:'md-person',active:!1},{title:N.default.t('WALLET'),id:6,key:6,icon:'md-wallet-outline',active:!1},{title:N.default.t('CREDIT_MANAGE'),id:2,key:2,icon:'md-card',active:!1},{title:N.default.t('GROUP_MANAGE'),id:5,key:5,icon:'md-people',active:!1},{title:N.default.t('NOTIFICATIONS'),id:3,key:3,icon:'md-notifications',active:!1},{title:N.default.t('CONFIGURATIONS'),id:4,icon:'md-settings',active:!1}]}},{key:"getHyperUsermenu",value:function(){return[{title:N.default.t('MAP'),id:0,key:0,icon:'md-map',active:!0},{title:N.default.t('MY_ACCOUNT'),id:1,key:1,icon:'md-person',active:!1},{title:N.default.t('WALLET'),id:6,key:6,icon:'md-wallet-outline',active:!1},{title:N.default.t('CREDIT_MANAGE'),id:2,key:2,icon:'md-card',active:!1},{title:N.default.t('GROUP_MANAGE'),id:5,key:5,icon:'md-people',active:!1},{title:N.default.t('NOTIFICATIONS'),id:3,key:3,icon:'md-notifications',active:!1},{title:N.default.t('CONFIGURATIONS'),id:4,icon:'md-settings',active:!1}]}},{key:"updateUser",value:function(t){var n=[];if(void 0!==t)if(void 0!==t.category)switch(t.category){case"geolocated":n=this.getGeolocatedUserMenu();break;case"super":n=this.getSuperUserMenu();break;case"hyper":n=this.getHyperUsermenu()}else n=this.getUserMenu();this.setState({user:t,menu:n})}},{key:"getUserMenu",value:function(){return[{title:N.default.t('MAP'),id:0,key:0,icon:'md-map',active:!0},{title:N.default.t('MY_ACCOUNT'),id:1,key:1,icon:'md-person',active:!1},{title:N.default.t('NOTIFICATIONS'),id:3,key:3,icon:'md-notifications',active:!1},{title:N.default.t('CONFIGURATIONS'),id:4,icon:'md-settings',active:!1}]}},{key:"getNameItems",value:function(t){var n=t;switch(t){case"home":n=N.default.t('MAP');break;case'useraccount':n=N.default.t('MY_ACCOUNT');break;case'walletSelect':n=N.default.t('WALLET');break;case'Historique':n=N.default.t('CREDIT_MANAGE');break;case"superviseurgroup":n=N.default.t('GROUP_MANAGE');break;case"updateinformation":n=N.default.t("CHANGE_INFORMATION");break;case'notificationview':n=N.default.t('NOTIFICATIONS');break;case'configuration':n=N.default.t('CONFIGURATIONS');break;case'addNetwork':n=N.default.t('ADD_NETWORK');break;case'about':n=N.default.t('ABOUT')}return n}},{key:"getIcon",value:function(t){var n="md-map";switch(t){case"home":n="md-map";break;case'useraccount':n="md-person";break;case'walletSelect':n="md-wallet";break;case'Historique':n="md-card";break;case"superviseurgroup":n="md-people";break;case'notificationview':n="md-notifications";break;case"updateinformation":n="md-people";break;case'configuration':n='md-settings';break;case'addNetwork':n="md-people";break;case'about':n='md-contacts'}return n}},{key:"render",value:function(){var t=this,n=this.state.user?this.state.user.firstname:"",o=this.state.user?this.state.user.lastname:"";return this.state.lang||"change"===this.state.lang?(setTimeout(function(){return t.setState({lang:""})},500),v.default.createElement(h.View,null)):v.default.createElement(h.View,{style:M.container},v.default.createElement(h.View,{style:M.headercontent},v.default.createElement(h.Text,{style:M.headerTitle},n),v.default.createElement(h.Text,{style:M.headerTitle},o),v.default.createElement(h.Text,{style:M.headerPhone},this.state.user?""+this.state.user.phone:"")),v.default.createElement(O.ScrollView,{style:{flex:1,height:(0,k.responsiveHeight)(40)}},v.default.createElement(S.SafeAreaView,{forceInset:{top:'always',horizontal:'never'}},this.state.items&&Object.keys(this.state.items).map(function(n,o){return t._renderItem(n)}))),v.default.createElement(A.default,{textStyle:M.btntext,style:M.btnDeconnect,onPress:function(){return t.userDeconnect()}},N.default.t('DISCONNEXION')))}},{key:"userDeconnect",value:function(){var t=this;h.Alert.alert(N.default.t('DISCONNEXION'),N.default.t('DISCONNEXION_TEXT'),[{},{text:N.default.t('NO'),onPress:function(){return console.log('Cancel Pressed')},style:'cancel'},{text:N.default.t('YES'),onPress:function(){(0,I.disconnect)().then(function(){T.IlinkEmitter.emit("userdisconnect"),t.props.navigation.navigate("Auth")})}}],{cancelable:!1})}},{key:"watchUser",value:function(){var t=this;(0,I.readUser)().then(function(n){n.id!==t.state.user.id&&null!==n&&void 0!==n&&t.updateUser(n)})}}]),n})(v.Component);e.default=w,w.navigatorStyle={statusBarColor:y.primaryDarkAdvanced};var U=h.StyleSheet.create({content:{width:(0,k.responsiveWidth)(100),height:50,paddingLeft:20,flexDirection:'row',alignItems:'center'},itemText:{color:'#000000',marginLeft:20,fontSize:(0,k.responsiveFontSize)(2)}}),M=h.StyleSheet.create({container:{flex:1,backgroundColor:"white"},btnDeconnect:{borderColor:"transparent",marginLeft:20,marginRight:20,backgroundColor:b.accent},btntext:{color:"white",fontSize:17,fontWeight:"bold"},headerTitle:{fontSize:14,marginBottom:5,color:"white",fontWeight:'bold'},headerPhone:{fontSize:12,marginBottom:20,color:"white",justifyContent:'flex-end'},listMenu:{paddingTop:15},headercontent:{height:(0,k.responsiveHeight)(30),backgroundColor:y.primary,justifyContent:'flex-end',alignItems:'flex-start',paddingLeft:20},backgroundd_drawer:{backgroundColor:'#000'},listbackground:{},actionButtonIcon:{fontSize:20,height:22,color:'white'},welcome:{fontSize:20,textAlign:'center',margin:10},instructions:{textAlign:'center',color:'#333333',marginBottom:5}})},1150,[4,1,8,9,10,12,11,13,15,18,524,871,527,1151,807,806,711,712,709,766,405,930,404,737,2,808,738]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]),u=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.HeaderMenu=void 0;var n=u(r(d[2])),l=u(r(d[3])),f=u(r(d[4])),o=u(r(d[5])),c=u(r(d[6])),v=t(r(d[7])),p=r(d[8]),s=(u(r(d[9])),(function(t){function u(){return(0,n.default)(this,u),(0,f.default)(this,(0,o.default)(u).apply(this,arguments))}return(0,c.default)(u,t),(0,l.default)(u,[{key:"render",value:function(){return v.default.createElement(p.View,null,v.default.createElement(p.Text,null,"Freud"))}}]),u})(v.PureComponent));e.HeaderMenu=s},1151,[4,1,8,9,10,12,13,15,18,68]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),l=n(r(d[3])),s=n(r(d[4])),u=n(r(d[5])),c=n(r(d[6])),f=n(r(d[7])),h=n(r(d[8])),p=t(r(d[9])),y=r(d[10]),k=n(r(d[11])),w=n(r(d[12])),v=r(d[13]),E=r(d[14]),b=r(d[15]),S=r(d[16]),T=r(d[17]),C=n(r(d[18])),P=n(r(d[19])),x=n(r(d[20])),R=n(r(d[21])),N=(r(d[22]),n(r(d[23]))),_=r(d[24]),I=r(d[25]),A=n(r(d[26])),M=n(r(d[27])),L=n(r(d[28])),D=n(r(d[29])),O=n(r(d[30])),B=n(r(d[31])),V=r(d[32]),z=n(r(d[33])),F=n(r(d[34])),U=r(d[35]),H=n(r(d[36])),W=r(d[37]),j=n(r(d[38])),K=r(d[39]),G=r(d[40]);r(d[41]);var X={enableHighAccuracy:!0,timeout:2e4,maximumAge:500,useSignificantChanges:!1,distanceFilter:0},Y=[{label:"mon Reseau",value:0},{label:"Tout",value:1}],q=r(d[42]),J=r(d[43]),Q=y.Dimensions.get('window'),Z=(Q.width,Q.height,(0,E.responsiveHeight)(30)>270?270:(0,E.responsiveHeight)(30)),$=(function(t){function n(t){var f;return(0,l.default)(this,n),(f=(0,s.default)(this,(0,u.default)(n).call(this,t,!0)))._draggedValue=new y.Animated.Value(0),f.renderIcon=function(t){return function(n){n.isActive;return p.default.createElement(L.default,{size:24,color:"white",name:t})}},f.openDrawer=function(){f.props.navigation.openDrawer()},f._retrieveData=function(){var t,n,l;return o.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,s.next=3,o.default.awrap(y.AsyncStorage.getItem('position'));case 3:null!==(t=s.sent)&&((n=JSON.parse(t)).longitudeDelta=.04,n.latitudeDelta=.01,l=JSON.parse(t),f.setState({region:n,oldPosition:l})),s.next=10;break;case 7:s.prev=7,s.t0=s.catch(0),console.warn(s.t0);case 10:case"end":return s.stop()}},null,null,[[0,7]],Promise)},f._storeData=function(t){return o.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,o.default.awrap(y.AsyncStorage.setItem('position',JSON.stringify(t)));case 3:n.next=8;break;case 5:n.prev=5,n.t0=n.catch(0),console.warn(n.t0);case 8:case"end":return n.stop()}},null,null,[[0,5]],Promise)},f.backPressed=function(){return y.Alert.alert(R.default.t('EXIT_TITLE'),R.default.t('EXIT_DESC'),[{text:R.default.t('NO'),onPress:function(){return console.log('Cancel Pressed')},style:'cancel'},{text:R.default.t("YES"),onPress:function(){return y.BackHandler.exitApp()}}],{cancelable:!1}),!0},f.onMapReady=function(){(0,T.readUser)().then(function(t){if(t){f.setState({user:t}),f.setState({network:t.network});var n={latitude:parseFloat(t.latitude),longitude:parseFloat(t.longitude)};f.setState({myPosition:n}),f.refocusMap(!1),t.category?(f.setState({loadingDialog:!1}),"geolocated"!==t.category?f.showMyMembers():n.latitude<=0&&n.longitude<=0&&f.props.navigation.push(J.updateinfo)):'android'===y.Platform.OS?f.requestCameraPermission():(f.getPosition(),f.watchLocation())}}).catch(function(t){console.log("ERROR LOADING USER",t.message)})},f.renderRow=function(t){return p.default.createElement(y.TouchableOpacity,{key:t,onPress:function(){return f.onRowPress(t)}},p.default.createElement(y.View,{style:ae.rowContainer},p.default.createElement(y.View,{style:ae.iconContainer},p.default.createElement(L.default,{name:f.state.filternetworkTemp&&t.name===f.state.filternetworkTemp.name?'radio-button-checked':'radio-button-unchecked',color:f.state.filternetworkTemp&&t.name===f.state.filternetworkTemp.name?q.accent:f.props.colorAccent,size:24})),p.default.createElement(y.Text,{style:b.material.subheading},t.name)))},f.state=f.geInitialState(),f.mounted=!1,f.filterOptions=[{value:5,label:"5 km"},{value:15,label:"15 km"},{value:20,label:"20 km"},{value:25,label:"25 km"}],L.default.getImageSource('md-car',24,'white').then(function(t){f.setState({caricon:t})}),f._renderFavoriteIcon=f._renderFavoriteIcon.bind((0,c.default)(f)),f.makeMarkerInformation=f.makeMarkerInformation.bind((0,c.default)(f)),f}return(0,h.default)(n,t),(0,f.default)(n,[{key:"onLoadMore",value:function(){var t=this,n=this.state,l=n.user;n.prevRegion,n.boundarie;void 0!==l.category&&null!==l.category||(this.promiseRegion&&this.promiseRegion.done(),this.promiseRegion=new Promise(function(n,s){var u,c,f,h,p;return o.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return t.setState({isNeedLoadMore:!1,isLoadingMap:!0}),s.next=3,o.default.awrap(t.mapRef.getCamera());case 3:if(u=s.sent,u.zoom-10,c=[],t.setState({isLoadingMap:!0}),void 0!==t.state.filternetworkTemp&&(f=t.state.filternetworkTemp.id,c=t.state.networks.filter(function(t){return t.id===f})),!(c.length>0)){s.next=23;break}return c[0],h={longitude:l.longitude,latitude:l.latitude},s.prev=11,s.next=14,o.default.awrap(t.loadingMarkers(t.state.myPosition,t.state.filternetwork,t.state.value));case 14:p=s.sent,t.treatNewData(h,p,!1),s.next=21;break;case 18:s.prev=18,s.t0=s.catch(11),t.setState({isNeedLoadMore:!1,isLoadingMap:!1});case 21:s.next=24;break;case 23:t.setState({isNeedLoadMore:!0,isLoadingMap:!1});case 24:t.map&&t.map.focusToUser(),n();case 26:case"end":return s.stop()}},null,null,[[11,18]],Promise)}))}},{key:"onslidingEvent",value:function(t){this.setState({maxHeightSliding:t.nativeEvent.layout.height})}},{key:"componentDidMount",value:function(){var t=this;(0,T.readUser)().then(function(n){n&&void 0!==n&&void 0!==n.phone&&t.props.getAuthApiKey(n.phone)}),this.mounted=!0,this.configuration=new N.default;var n=this.props.navigation;this.markerManager=new F.default,this.configuration.getCurrentPubValue().then(function(n){try{var o=parseInt(n);t.setState({isPubShow:o})}catch(t){}}),this.focusListener=n.addListener("didFocus",function(){t.configuration.getCurrentPasValue().then(function(n){try{t.setState({pas:parseInt(n)})}catch(t){}}),t.componentDidAppear()}),this.blurListener=n.addListener("didBlur",function(n){t.componentDidDisappear()}),this._retrieveData(),this.props.coordinate}},{key:"requestCameraPermission",value:function(){var t=this;return o.default.async(function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,o.default.awrap(y.PermissionsAndroid.request(y.PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,{title:'Cool Photo App Camera Permission',message:"Cool Photo App needs access to your camera so you can take awesome pictures."}));case 3:n.sent===y.PermissionsAndroid.RESULTS.GRANTED&&(0,T.readUser)().then(function(n){if(n)if(void 0!==n.category&&null!==n.category){var o={latitude:parseFloat(n.latitude),longitude:parseFloat(n.longitude)},l={latitude:o.latitude,longitude:o.longitude,latitudeDelta:.03,longitudeDelta:.01};t.setState({myPosition:o}),t.mapRef.animateToCoordinate({latitude:o.latitude,longitude:o.longitude},1e3),t.mapRef.animateToRegion(l,1e3),t.setState({isLoading:!1,isLoadingMap:!1,loadingDialog:!1}),"geolocated"!==n.category?t.showMyMembers():o.latitude<=0&&o.longitude<=0&&t.props.navigation.push(J.updateinfo)}else t.getPosition(),t.watchLocation()}),n.next=10;break;case 7:n.prev=7,n.t0=n.catch(0),console.log(n.t0);case 10:case"end":return n.stop()}},null,null,[[0,7]],Promise)}},{key:"watchLocation",value:function(){var t=this;this.watchID=D.default.watchPosition(function(n){var o=t.state.myPosition,l=n.coords;t.state.oldPosition;o&&l.longitude===o.longitude&&l.latitude===o.latitude||(0!==l.longitude&&0!==l.latitude&&t._storeData(l),((0,P.default)(t.state.region,{})||(0,P.default)(t.state.region,void 0)||(0,P.default)(t.state.region,null))&&(t.state.myPosition.longitude||t.state.myPosition.latitude||null!==t.mapRef&&void 0!==t.mapRef&&(t.mapRef.animateToRegion({latitude:l.latitude,longitude:l.longitude,latitudeDelta:.03,longitudeDelta:.01},1e3),t.mapRef.animateCamera({center:t.myPosition,pitch:0,heading:0,altitude:0,zoom:12},1e3))),t.setState({region:{latitude:l.latitude,longitude:l.longitude,latitudeDelta:.003,longitudeDelta:.004}}),t.setState({myPosition:l}),t.map&&t.map.focusToUser())},function(t){return console.log("wat s",t)},X)}},{key:"getNetworks",value:function(t){var n=this;if(t)(0,T.getCountryNetwork)(t).then(function(o){n.reseaux=[];var l=o;for(var s in l)n.reseaux.push(l[s]);n.setState({networks:n.reseaux});var u=n.reseaux.filter(function(t){return t.name.includes(n.state.network)});void 0!==n.state.user.category&&null!==n.state.user.category||(u.length>0&&t?(n.setState({filternetwork:u[0],myNetwork:u[0],filternetworkTemp:u[0]}),n.retrieveAllPoint(t)):n.state.user&&(n.state.user.category||y.Alert.alert(R.default.t("UNABLE_TO_CONNECT_TITLE"),R.default.t('TEXT_NETWORK_UNABLE'),[{text:R.default.t("NO"),onPress:function(){y.BackHandler.exitApp()}},{text:R.default.t("YES"),onPress:function(){null!==t&&void 0!==t?n.getNetworks(t):n.requestCameraPermission()}}],{cancelable:!1})))},function(o){y.Alert.alert(R.default.t("UNABLE_TO_CONNECT_TITLE"),R.default.t('TEXT_NETWORK_UNABLE'),[{text:R.default.t("NO"),onPress:function(){y.BackHandler.exitApp()}},{text:R.default.t("YES"),onPress:function(){null!==t&&void 0!==t?n.getNetworks(t):n.requestCameraPermission()}}],{cancelable:!1})});else{console.log("get network missing pays");y.Alert.alert(R.default.t("UNABLE_TO_CONNECT_TITLE"),R.default.t('TEXT_NETWORK_UNABLE'),[{text:R.default.t("NO"),onPress:function(){y.BackHandler.exitApp()}},{text:R.default.t("YES"),onPress:function(){n.requestCameraPermission()}}],{cancelable:!1})}}},{key:"getPosition",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;console.log("on get position"),D.default.getCurrentPosition(function(o){var l=t.state.myPosition,s=o.coords;t.state.oldPosition;if(!(0,P.default)(s,l)&&0!==s.longitude&&0!==s.latitude||l){t.map&&t.map.focusToUser(),(0,S.getPositionInformation)(s).then(function(o){if(o)if(void 0!==o.results){if(o.results.length>0){var l=o.results[0],s=l.address_components,u=l.formatted_address,c=l.place_id;t.setState({address:s,textadress:u,place:c});for(var f,h,p=o.results,k=0;k=v.length)break;S=v[b++]}else{if((b=v.next()).done)break;S=b.value}var T=S;T.code===f&&(t.setState({indicatif:T.dial_code}),t.getNetworks(T.dial_code))}}}else console.log("on else result null "),y.Alert.alert(R.default.t("UNABLE_TO_CONNECT_TITLE"),R.default.t('TEXT_NETWORK_UNABLE'),[{text:R.default.t("NO"),onPress:function(){y.BackHandler.exitApp()}},{text:R.default.t("YES"),onPress:function(){t.getPosition(n)}}],{cancelable:!1});else y.Alert.alert(R.default.t("UNABLE_TO_CONNECT_TITLE"),R.default.t('TEXT_NETWORK_UNABLE'),[{text:R.default.t("NO"),onPress:function(){y.BackHandler.exitApp()}},{text:R.default.t("YES"),onPress:function(){t.getPosition(n)}}],{cancelable:!1})});var u={latitude:s.latitude,longitude:s.longitude,latitudeDelta:.03,longitudeDelta:.01};t.setState({myPosition:s,region:u}),t.mapRef&&!t.state.myPositionIsAnimated&&(t.mapRef.animateCamera({center:s,pitch:0,heading:0,altitude:5,zoom:12},1e3),t.setState({myPositionIsAnimated:!0}))}else console.warn("errror")},function(n){switch(console.warn(n.message),n.code){case 3:t.state.oldPosition&&t.treatPosition(t.state.oldPosition);break;default:console.log("onjjj",n.message)}},X)}},{key:"componentDidDisappear",value:function(){y.BackHandler.removeEventListener('hardwareBackPress',this.backPressed)}},{key:"componentDidAppear",value:function(){var t=this;y.BackHandler.addEventListener('hardwareBackPress',this.backPressed),(0,T.readUser)().then(function(n){if(n&&n.category){t.setState({user:n}),t.setState({network:n.network});var o={latitude:parseFloat(n.latitude),longitude:parseFloat(n.longitude)};t.setState({myPosition:o}),t.refocusMap(!0)}})}},{key:"componentWillUnmount",value:function(){this.mounted=!1,this.blurListener.remove(),this.focusListener.remove(),this.watchID&&D.default.clearWatch(this.watchID)}}]),(0,f.default)(n,[{key:"makeCardSearch",value:function(){var t=this;if(!this.state.isPubShow)return p.default.createElement(y.View,{style:ae.topBar},p.default.createElement(V.Surface,{style:{elevation:4,borderRadius:10}},p.default.createElement(y.View,{style:{flexDirection:'row',alignSelf:'center',justifyContent:'center',flex:1,borderRadius:10,margin:10,alignItems:'center',height:48}},p.default.createElement(y.TouchableOpacity,{onPress:function(){return t.openDrawer()}},p.default.createElement(y.Text,{style:ae.hambuger},"Menu")),p.default.createElement(y.View,{style:{flex:1}}),p.default.createElement(y.Text,{style:{backgroundColor:this.state.myNetwork.id===this.state.filternetwork.id?q.primary:q.accent,padding:5,color:"white",marginRight:10,fontSize:10,borderRadius:12}},this.state.filternetwork.name?this.state.filternetwork.name:this.state.network),this.renderSupplementInformation()),this.showLoadingMapView()))}},{key:"renderSupplementInformation",value:function(){var t=this;return this.state.user&&"geolocated"===this.state.user.category?p.default.createElement(y.View,null):p.default.createElement(y.View,{style:{flexDirection:"row"}},p.default.createElement(y.View,{style:{backgroundColor:"#FFFFFFA0",justifyContent:'center',alignItems:'center',alignSelf:'center'}},p.default.createElement(y.Text,null,this.state.markers.length+" "+(0===this.state.currentNetworkSize?"":"/"+this.state.currentNetworkSize)," ")),p.default.createElement(y.TouchableOpacity,{onPress:function(){t.setState({page:t.state.page+1}),t.onLoadMore()},style:{borderRadius:12,height:32,width:32,backgroundColor:"white",borderColor:"transparent"}},p.default.createElement(L.default,{name:this.state.markers.length>=this.state.currentNetworkSize?"close":"refresh",size:32,color:this.state.markers.length>=this.state.currentNetworkSize?"red":"grey"})))}},{key:"_renderMarker2",value:function(){var t=this,n=this.state,o=n.currentMarker,l=n.myPosition,s=o,u={latitude:parseFloat(o.latitude),longitude:parseFloat(o.longitude)},c=G.getDistance(l,u),f=(c>900?c/1e3+" Km":c+"m")+R.default.t('TO_YOU'),h=null===s.lastname?s.adresse:s.lastname;return p.default.createElement(y.View,{style:{flex:1,backgroundColor:"white"}},p.default.createElement(y.View,{style:{flexDirection:"row",justifyContent:"flex-end",alignItems:'center',backgroundColor:"white"}},p.default.createElement(y.Text,{style:te.title},h),p.default.createElement(L.default.Button,{name:"close",size:24,color:"red",backgroundColor:"transparent",onPress:function(){t.toggleSlidingUp(!1)}})),p.default.createElement(y.Text,{style:te.subtitle2},s.adresse),p.default.createElement(y.View,{style:{flexDirection:"row",alignItems:"center"}},p.default.createElement(y.Text,{style:te.reseau},s.network),p.default.createElement(y.Text,{style:te.solde},R.default.t('SOLDE_UNVAIBLE'))),p.default.createElement(y.Text,{style:te.reseau},f),p.default.createElement(y.View,{style:{flexDirection:'row',marginTop:(0,E.responsiveHeight)(3),marginLeft:10}},this.state.needRoad?this.showBtnClose():this.showBtnItineraire(),p.default.createElement(x.default,{style:{backgroundColor:"white",width:(0,E.responsiveWidth)(30),height:36,marginLeft:5,borderRadius:100,borderColor:"#9e9e9e",justifyContent:'center'},onPress:function(){return t.callItem(s)}},p.default.createElement(y.View,{style:{flexDirection:'row'}},p.default.createElement(L.default,{name:"phone",size:16,color:q.primary,style:{alignSelf:'center'}}),p.default.createElement(y.Text,{style:{fontSize:15,color:'#9e9e9e',marginLeft:(0,E.responsiveWidth)(2)}},R.default.t("CALL"))))))}},{key:"_renderItemMarkerdetails",value:function(t){var n=this,o=t;if(void 0!==o&&null!==o){var l=this.state,s=l.currentMarker,u=l.myPosition,c={latitude:parseFloat(s.latitude),longitude:parseFloat(s.longitude)},f=G.getDistance(u,c),h=(f>900?f/1e3+" Km":f+"m")+R.default.t('TO_YOU'),k=null===o.lastname?o.adresse:o.lastname;return p.default.createElement(v.CardView,{style:te.container,cardElevation:2,cardMaxElevation:2,cornerRadius:5},p.default.createElement(y.View,{style:{flexDirection:"row",justifyContent:"flex-end",alignItems:'center'}},p.default.createElement(y.Text,{style:te.title},k),p.default.createElement(L.default.Button,{name:"close",size:24,color:"red",backgroundColor:"transparent",onPress:function(){n.toggleSlidingUp(!1)}})),p.default.createElement(y.Text,{style:te.subtitle2},o.adresse),p.default.createElement(y.View,{style:{flexDirection:"row",alignItems:"center"}},p.default.createElement(y.Text,{style:te.reseau},o.network),p.default.createElement(y.Text,{style:te.solde},R.default.t('SOLDE_UNVAIBLE'))),p.default.createElement(y.Text,{style:te.reseau},h),p.default.createElement(y.View,{style:{flexDirection:'row',marginTop:(0,E.responsiveHeight)(3),marginLeft:10}},this.state.needRoad?this.showBtnClose():this.showBtnItineraire(),p.default.createElement(x.default,{style:{backgroundColor:"white",width:(0,E.responsiveWidth)(30),height:36,marginLeft:5,borderRadius:100,borderColor:"#9e9e9e",justifyContent:'center'},onPress:function(){return n.callItem(o)}},p.default.createElement(y.View,{style:{flexDirection:'row'}},p.default.createElement(L.default,{name:"phone",size:16,color:q.primary,style:{alignSelf:'center'}}),p.default.createElement(y.Text,{style:{fontSize:15,color:'#9e9e9e',marginLeft:(0,E.responsiveWidth)(2)}},R.default.t("CALL"))))))}}},{key:"renderCurrentMarker",value:function(t){var n=this;if(t)return p.default.createElement(y.View,null,p.default.createElement(y.View,{style:{flexDirection:"row",justifyContent:"flex-end",alignItems:'center'}},p.default.createElement(y.Text,{style:te.title},name),p.default.createElement(L.default.Button,{name:"close",size:24,color:"red",backgroundColor:"transparent",on:!0,dPress:function(){n.toggleSlidingUp(!1)}})),p.default.createElement(y.Text,{style:te.title},t.adresse),p.default.createElement(y.View,{style:{flexDirection:"row"}},p.default.createElement(y.Text,{style:te.reseau},t.network),p.default.createElement(y.Text,{style:te.solde},R.default.t('SOLDE_UNVAIBLE'))),p.default.createElement(y.Text,{style:te.reseau},distanceTxt),p.default.createElement(y.View,{style:{flexDirection:'row',marginTop:(0,E.responsiveHeight)(3),marginLeft:10}},this.state.needRoad?this.showBtnClose():this.showBtnItineraire(),p.default.createElement(x.default,{style:{backgroundColor:"white",width:(0,E.responsiveWidth)(30),height:36,marginLeft:5,borderRadius:100,borderColor:"#9e9e9e",justifyContent:'center'},onPress:function(){return n.callItem(t)}},p.default.createElement(y.View,{style:{flexDirection:'row'}},p.default.createElement(L.default,{name:"phone",size:16,color:q.primary,style:{alignSelf:'center'}}),p.default.createElement(y.Text,{style:{fontSize:15,color:'#9e9e9e',marginLeft:(0,E.responsiveWidth)(2)}},R.default.t("CALL"))))))}},{key:"callItem",value:function(t){var n={number:t.phone,prompt:!1};(0,M.default)(n).catch(function(t){return console.log(t)})}},{key:"makeMarkerInformation",value:function(){var t=this.state,n=t.currentMarker;t.myPosition;return void 0!==n&&null!==n?this._renderItemMarkerdetails(n):p.default.createElement(y.Text,null,"Impossible de'afficher l'element")}},{key:"makeActionButon",value:function(){var t=this.state.user;if(t)switch(t.category){case"super":return this.getSuperActionButton();case"geolocated":return this.geoLocatedAction();case"hyper":return this.getHypervisorActionButton();default:return this.getSimpleActionButton()}}},{key:"getSuperActionButton",value:function(){var t=this;return p.default.createElement(w.default,{buttonColor:q.accent},p.default.createElement(w.default.Item,{buttonColor:"#3498db",title:R.default.t("MY_GROUP"),onPress:function(){return t.showMyMembers()},size:48},p.default.createElement(L.default,{name:"group-work",style:ae.actionButtonIcon})),p.default.createElement(w.default.Item,{buttonColor:"#3498db",title:R.default.t("REPOSITIONNING"),onPress:function(){return t.refocusMap(!1)},size:48},p.default.createElement(L.default,{name:"person-pin",style:ae.actionButtonIcon})),p.default.createElement(w.default.Item,{buttonColor:q.primary,title:R.default.t("CHANGE_MAP"),onPress:function(){t.onMapTypeChange()},size:48},p.default.createElement(L.default,{name:"layers",style:ae.actionButtonIcon})))}},{key:"getSimpleActionButton",value:function(){var t=this;return p.default.createElement(w.default,{ref:function(n){return t.actionButton=n}},p.default.createElement(w.default.Item,{buttonColor:"#3498db",title:R.default.t("FILTER"),onPress:function(){return t.showFilterDialog()},size:48},p.default.createElement(L.default,{name:"filter-list",style:ae.actionButtonIcon})),p.default.createElement(w.default.Item,{buttonColor:"#3498db",title:R.default.t("REPOSITIONNING"),onPress:function(){return t.refocusMap(!1)},size:48},p.default.createElement(L.default,{name:"person-pin",style:ae.actionButtonIcon})),p.default.createElement(w.default.Item,{buttonColor:"#9b59b6",title:R.default.t("CHANGE_MAP"),onPress:function(){t.onMapTypeChange()},size:48},p.default.createElement(L.default,{name:"layers",style:ae.actionButtonIcon})),p.default.createElement(w.default.Item,{buttonColor:"#3498db",title:R.default.t("PRINT_MY_NETWORK"),size:48,onPress:function(){t.showMynetworkMap()}},p.default.createElement(L.default,{name:"group-work",style:ae.actionButtonIcon})),p.default.createElement(w.default.Item,{buttonColor:"#3498db",title:R.default.t("CHANGE_NETWORK"),size:48,onPress:function(){t.showNewDialogNetwork()}},p.default.createElement(L.default,{name:"rss-feed",style:ae.actionButtonIcon})))}},{key:"toggleSlidingUp",value:function(t){var n=this;t&&this.bottomSheetRef?(this.bottomSheetRef.snapTo(1),this.setState({showcurentMarker:t})):t||this.bottomSheetRef.snapTo(0);var o=t?Z:0,l=t?0:Z;this.setState({panelVisible:t}),!t&&this.state.needRoad&&this.setState({needRoad:!1}),this.state.animation.setValue(o),y.Animated.timing(this.state.animation,{toValue:l,duration:200}).start(function(o){!t&&n.map&&n.map.focusToUser()})}},{key:"makeSlidingUp",value:function(){var t=this;return p.default.createElement(z.default,{ref:function(n){t.bottomSheetRef=n},snapPoints:[0,"30%"],renderHeader:function(){return t.markerView()}})}},{key:"_renderFavoriteIcon",value:function(){var t=this,n=this.props.draggableRange,o=n.top,l=n.bottom,s=[{scale:this._draggedValue.interpolate({inputRange:[l,o],outputRange:[1,0],extrapolate:'clamp'})}];return p.default.createElement(y.TouchableNativeFeedback,{onPress:function(){t.setState({needRoad:!0})}},p.default.createElement(y.Animated.View,{style:[ae.favoriteIcon,{transform:s}]},p.default.createElement(L.default,{name:"car",size:24,color:"white",style:{alignSelf:'center'}})))}},{key:"geInitialState",value:function(){return{region:{latitude:0,longitude:0,latitudeDelta:.015,longitudeDelta:.0121},pas:100,prevRegion:{latitude:0,longitude:0},isPubShow:!0,loadingDialog:!0,textreach:"",currentNetworkSize:0,markersearchfilter:[],animation:new y.Animated.Value(0),myPosition:null,currentMarker:null,filterNetworkOption:Y[1],needRoad:!1,initialAnim:!1,filternetwork:{},destinationPosition:{},panelVisible:!1,markers:[],isNeedLoadMore:!1,isLoadingMap:!1,value:5,page:0,valuePosition:0,markerfilter:null,allpoint:[],typeMap:'standard',indexTypeMap:0,user:null,snack_visible:!1,snack_text_message:"",networks:[],dialogSliderVisible:!1,showProgress:!1,myNetwork:{},dialogNetworkVisible:!1,myPositionMarkerText:R.default.t("YOUR_THERE")}}},{key:"onMarkerPress",value:function(t){console.warn(t),this.setState({currentMarker:t}),this.toggleSlidingUp(!0)}},{key:"onMapTypeChange",value:function(){var t={index:this.state.indexTypeMap,text:this.state.typeMap};switch(t.index=t.index+1,t.index=t.index%3,t.index){default:t.text='standard';break;case 1:t.text='hybrid';break;case 2:t.text="terrain"}this.setState({indexTypeMap:t.index,typeMap:t.text})}},{key:"showInterticiel",value:function(){var t=this;if(this.state.isPubShow)return p.default.createElement(O.default,{closeIntersticiel:function(){return t.setState({isPubShow:!1})},navigation:this.props.navigation})}},{key:"renderBottomHome",value:function(){var t=this;return p.default.createElement(y.View,{style:{flex:1,backgroundColor:"lightblue"}},p.default.createElement(k.default,{ref:function(n){t.map=n,null!=n&&(t.mapRef=n.getMapRef())},typeMap:this.state.typeMap,onMarkerClick:function(n){return t.onMarkerPress(n)},network:this.state.filternetwork,initialRegion:this.state.region,markers:this.state.markers,selectedMarker:this.state.currentMarker,myNetwork:this.state.myNetwork,lang:this.state.lang,myPosition:this.state.myPosition,onMapReady:function(){(0,T.readUser)().then(function(n){n&&(t.setState({user:n}),t.setState({network:n.network}),n.category?(t.setState({loadingDialog:!1}),"geolocated"!==n.category?t.showMyMembers():myPosition.latitude<=0&&myPosition.longitude<=0&&t.props.navigation.push(J.updateinfo)):'android'===y.Platform.OS?t.requestCameraPermission():t.watchLocation())})},needRoad:this.state.needRoad,onNeedRoadReady:function(n){t.setState({showProgress:!1})},onNeedRoadError:function(n){t.setState({showProgress:!1}),y.Alert.alert(R.default.t("PROBLEM_OCCUR"),R.default.t("PROBLEM_OCCUR_DIRECTION"),[{text:"Ok",onPress:function(){}}])}}),this.makeCardSearch(),p.default.createElement(z.default,{ref:function(n){t.bottomSheetRef=n},snapPoints:[60,"30%","100%"],renderHeader:function(){return t.renderHeader()}}))}},{key:"renderInner",value:function(){return p.default.createElement(y.View,{style:{flex:1,backgroundColor:"green"}},p.default.createElement(y.Text,null,"Freud junior"))}},{key:"markerView",value:function(){if(this.state.currentMarker)return this._renderMarker2()}},{key:"renderHeader",value:function(){var t=this;return p.default.createElement(p.default.Fragment,null,p.default.createElement(y.View,{style:{position:"absolute",width:32,height:this.state.currentMarker?200:100,bottom:80,right:0,justifyContent:'center'}},p.default.createElement(w.default,{size:32,style:{marginRight:15},buttonColor:"white"}),p.default.createElement(w.default,{size:42,renderIcon:function(){return p.default.createElement(L.default,{name:"group-work",style:ae.actionButtonIcon})},style:{marginTop:40,marginRight:20},buttonColor:q.primary})),p.default.createElement(y.View,{style:{flex:1,backgroundColor:"white"}},this.markerView(),this.renderFilterMarker(),p.default.createElement(y.View,{style:{flexDirection:'row',height:60,justifyContent:'space-evenly',alignItems:'flex-end'}},p.default.createElement(y.View,{style:{flexDirection:'row',flex:1,marginBottom:10,justifyContent:'space-around',alignItems:'flex-end'}},p.default.createElement(V.FAB,{small:!0,icon:this.state.showFilterDistance?"close":"filter",color:q.primary,style:{backgroundColor:"white"},onPress:function(){t.state.showFilterDistance?(t.bottomSheetRef.snapTo(0),t.setState({showFilterDistance:!1})):(t.bottomSheetRef.snapTo(2),t.setState({showFilterDistance:!0}))}}),p.default.createElement(V.FAB,{small:!0,icon:"add",color:"white",style:{backgroundColor:q.primary},onPress:function(){t.bottomSheetRef.snapTo(2),t.setState({showdialogNetworkVisible:!0})}})),this.makeMarkerButton())))}},{key:"renderFilterMarker",value:function(){var t=this;if(this.state.showFilterDistance)return p.default.createElement(y.View,{style:{height:(0,E.responsiveHeight)(80),justifyContent:'center',backgroundColor:'white',margin:20}},p.default.createElement(y.View,{style:{height:(0,E.responsiveHeight)(30),justifyContent:'center'}},p.default.createElement(y.Text,null,R.default.t('TEXT_FILTER_DISTANCE')," "),p.default.createElement(A.default,{items:this.filterOptions,defaultItem:this.state.valuePosition,labelPosition:"bottom",onSlidingComplete:function(n){return t.slidingComplete(n)}}),p.default.createElement(y.Text,null,p.default.createElement(y.Text,{style:{fontWeight:"bold"}},void 0===this.state.value?0:this.state.value)," km ",R.default.t("DISTANCE_ARROUND"))),p.default.createElement(y.View,{style:{flexDirection:"row",flex:1}},p.default.createElement(x.default,{style:{flex:1}}),p.default.createElement(x.default,{style:{flex:1}})))}},{key:"makeMarkerButton",value:function(){var t=this;return this.state.currentMarker?p.default.createElement(y.View,{style:{flex:2,flexDirection:'row',justifyContent:'flex-end',marginEnd:20}},this.state.needRoad?this.showBtnClose():this.showBtnItineraire(),p.default.createElement(x.default,{style:{backgroundColor:"white",width:(0,E.responsiveWidth)(26),height:36,marginLeft:5,borderRadius:100,borderColor:"#9e9e9e",justifyContent:'center'},onPress:function(){return t.callItem(marker)}},p.default.createElement(y.View,{style:{flexDirection:'row'}},p.default.createElement(L.default,{name:"phone",size:16,color:q.primary,style:{alignSelf:'center'}}),p.default.createElement(y.Text,{style:{fontSize:15,color:'#9e9e9e',marginLeft:(0,E.responsiveWidth)(2)}},R.default.t("CALL"))))):p.default.createElement(y.View,{style:{flex:2,flexDirection:'row',justifyContent:'flex-end',marginEnd:20}})}},{key:"renderOldHome",value:function(){var t=this;return p.default.createElement(y.View,{style:ae.container},p.default.createElement(y.StatusBar,{backgroundColor:"#00000030",barStyle:"light-content",translucent:!0}),this.state.loadingDialog?p.default.createElement(y.View,{style:{position:"absolute",zIndex:1,backgroundColor:"#00000050",width:this.state.loadingDialog?(0,E.responsiveWidth)(100):0,height:this.state.loadingDialog?(0,E.responsiveHeight)(100):0,flex:1,justifyContent:'center',alignItems:'center'}},p.default.createElement(y.Text,{style:{fontSize:20,color:'white',fontWeight:'bold'}},R.default.t("LOADING_DOTS"))):null,p.default.createElement(k.default,{ref:function(n){t.map=n,null!=n&&(t.mapRef=n.getMapRef())},typeMap:this.state.typeMap,onMarkerClick:function(n){return t.onMarkerPress(n)},network:this.state.filternetwork,initialRegion:this.state.region,markers:this.state.markers,selectedMarker:this.state.currentMarker,myNetwork:this.state.myNetwork,lang:this.state.lang,myPosition:this.state.myPosition,onMapReady:'android'===y.Platform.OS?this.onMapReady:null,onLayout:'ios'===y.Platform.OS?this.onMapReady:null,needRoad:this.state.needRoad,onNeedRoadReady:function(n){t.setState({showProgress:!1})},onNeedRoadError:function(n){t.setState({showProgress:!1}),y.Alert.alert(R.default.t("PROBLEM_OCCUR"),R.default.t("PROBLEM_OCCUR_DIRECTION"),[{text:"Ok",onPress:function(){}}])}}),this.makeCardSearch(),this.makeSlidingUp(),this.makeDialogLoader(),this.makeDistanceDialog(),this.makeNetworkChangeDialog(),p.default.createElement(B.default,{visible:this.state.snack_visible,textMessage:this.state.snack_text_message,autoHidingTime:5e3}),this.makeActionButon())}},{key:"renderTutoOldHome",value:function(){return p.default.createElement(y.View,{style:{flex:1}},p.default.createElement(CopilotStep,{text:"This is a hello world example!",order:1,name:"hello"},this.makeCardSearch()))}},{key:"render",value:function(){return this.renderOldHome()}},{key:"renderCurrentMarker",value:function(){if(this.state.currentMarker)return p.default.createElement(y.View,{style:{height:200,backgroundColor:'#fff'}},this.makeMarkerInformation())}},{key:"makeDialogLoader",value:function(){return p.default.createElement(I.ProgressDialog,{visible:this.state.showProgress,title:R.default.t("LOADING_PROGRESS"),message:R.default.t("WAITING_LONG"),animationType:"slide",activityIndicatorSize:"large",activityIndicatorColor:"blue"})}},{key:"showMynetworkMap",value:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,o=null===n?this.state.user:n,l=this.state.myNetwork;return this.setState({filternetwork:l,page:0,filternetworkTemp:l,loadingDialog:!0}),new Promise(function(){void 0!==l?t.loadingMarkers(t.state.myPosition,l,t.state.value).then(function(n){var l=n||[];if(t.setState({loadingDialog:!1}),void 0!==o.category&&null!==o.category){var s=l.filter(function(t){return t.code_parrain===o.code_membre});t.treatNewData(t.state.myPosition,s,!0)}else t.treatNewData(t.state.myPosition,l,!0)}).catch(function(n){t.setState({loadingDialog:!1}),console.log("error j"),console.log(n)}):(t.setState({loadingDialog:!1}),console.log("error no net"))})}},{key:"showMyMembers",value:function(){var t=this,n=this.state.user.code_membre;void 0!==n?(0,S.loadGroupeAgent)(n).then(function(n){if(1===n.success)return t.setState({markers:n.datas})}):console.log("error")}},{key:"slidingComplete",value:function(t){this.setState({value:this.filterOptions[t].value,valuePosition:t})}},{key:"makeDistanceDialog",value:function(){var t=this;return p.default.createElement(_.MaterialDialog,{visible:this.state.dialogSliderVisible,title:R.default.t('MENU_FILTER'),onOk:function(){t.setState({dialogSliderVisible:!1,showProgress:!0}),setTimeout(function(){return t.filterPoint()},300)},cancelLabel:R.default.t("QUIT_"),okLabel:R.default.t('FILTER'),onCancel:function(){t.setState({dialogSliderVisible:!1})},onTouchOutside:function(){return t.setState({dialogSliderVisible:!1})}},p.default.createElement(y.Text,null,R.default.t('TEXT_FILTER_DISTANCE')," "),p.default.createElement(A.default,{items:this.filterOptions,defaultItem:this.state.valuePosition,labelPosition:"bottom",onSlidingComplete:function(n){return t.slidingComplete(n)}}),p.default.createElement(y.Text,null,p.default.createElement(y.Text,{style:{fontWeight:"bold"}},void 0===this.state.value?0:this.state.value)," km ",R.default.t("DISTANCE_ARROUND")))}},{key:"showFilterDialog",value:function(){this.setState({dialogSliderVisible:!0})}},{key:"filterPoint",value:function(){var t,n,l,s,u,c=this;return o.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:t=this.state,n=t.value,l=t.myPosition,t.user,s=t.filternetwork,void 0!==n?(this.setState({page:0}),1e3*n,u=this.state.networks.filter(function(t){return t.id===s.id}),u[0],this.loadingMarkers(l,s,n).then(function(t){c.treatNewData(c.state.prevRegion,t,!0)}).catch(function(t){c.setState({showProgress:!1}),y.Alert.alert(R.default.t("ERROR_FILTER"),R.default.t("ERROR_FILTER_TEXT"),[{text:R.default.t("CANCEL")},{text:R.default.t("RESTART"),onPress:function(){c.filterPoint()}}])})):(this.setState({showProgress:!1}),this.setState({snack_visible:!0,snack_text_message:"impossible de filtrer les \xe9lements"}),setTimeout(function(){c.setState({snack_visible:!1})},5e3));case 2:case"end":return o.stop()}},null,this,null,Promise)}},{key:"userChangeMarker",value:function(t){var n=this.state.markers[t];if(null!==this.mapRef&&void 0!==this.mapRef){var o={latitude:parseFloat(n.latitude),longitude:parseFloat(n.longitude),latitudeDelta:.03,longitudeDelta:.01};this.mapRef.animateToCoordinate({latitude:parseFloat(n.latitude),longitude:parseFloat(n.longitude)},1e3),this.mapRef.animateToRegion(o,1e3),console.log(n)}}},{key:"geoLocatedAction",value:function(){var t=this;return p.default.createElement(w.default,{buttonColor:q.accent},p.default.createElement(w.default.Item,{buttonColor:"#3498db",title:R.default.t("REPOSITIONNING"),onPress:function(){return t.refocusMap()},size:48},p.default.createElement(L.default,{name:"person-pin",style:ae.actionButtonIcon})),p.default.createElement(w.default.Item,{buttonColor:q.primary,title:R.default.t("CHANGE_MAP"),onPress:function(){t.onMapTypeChange()},size:48},p.default.createElement(L.default,{name:"layers",style:ae.actionButtonIcon})))}},{key:"makeNetworkChangeDialog",value:function(){var t=this;return p.default.createElement(_.MaterialDialog,{title:R.default.t("CHOICE_NETWORK"),visible:this.state.dialogNetworkVisible,subtitle:R.default.t("CHOICE_NETWORK_TEXT"),onCancel:function(){return t.setState({dialogNetworkVisible:!1})},onOk:function(n){t.setState({dialogNetworkVisible:!1,page:0}),t.setState({showProgress:!0,filternetwork:t.state.filternetworkTemp}),setTimeout(function(){return t.showFilterNetwork()},500)}},p.default.createElement(y.FlatList,{style:{height:(0,E.responsiveHeight)(40)},data:this.state.networks,renderItem:function(n){var o=n.item;return t.renderRow(o)}}))}},{key:"onRowPress",value:function(t){this.setState({filternetworkTemp:t})}},{key:"showNewDialogNetwork",value:function(){this.setState({dialogNetworkVisible:!0})}},{key:"showFilterNetwork",value:function(){var t,n,l,s=this;return o.default.async(function(o){for(;;)switch(o.prev=o.next){case 0:t=this.state,n=t.myPosition,t.user,void 0!==(l=t.filternetwork)?(this.setState({showProgress:!0}),this.loadingMarkers(this.state.myPosition,l,this.state.value,0).then(function(t){s.setState({showProgress:!1}),s.treatNewData(n,t,!0)}).catch(function(t){s.setState({snack_visible:!0,snack_text_message:"Probleme de connexion"}),console.log(t)})):console.log("error no net");case 2:case"end":return o.stop()}},null,this,null,Promise)}},{key:"showBtnItineraire",value:function(){var t=this;return p.default.createElement(x.default,{style:{backgroundColor:q.primary,width:(0,E.responsiveWidth)(30),height:36,borderRadius:100,marginLeft:5,borderColor:"transparent",justifyContent:'center'},onPress:function(){t.setState({needRoad:!0,showProgress:!0})}},p.default.createElement(y.View,{style:{flexDirection:'row'}},p.default.createElement(L.default,{name:"near-me",size:16,color:"white",style:{alignSelf:'center'}}),p.default.createElement(y.Text,{style:{fontSize:15,color:'white',marginLeft:(0,E.responsiveWidth)(2)}},R.default.t("WAY"))))}},{key:"showBtnClose",value:function(){var t=this;return p.default.createElement(x.default,{style:{backgroundColor:q.reddeconnect,height:36,width:(0,E.responsiveWidth)(30),borderRadius:100,borderColor:"transparent",justifyContent:'center'},onPress:function(){t.setState({needRoad:!1,showProgress:!1})}},p.default.createElement(y.View,{style:{flexDirection:'row'}},p.default.createElement(L.default,{name:"close",size:16,color:"white",style:{alignSelf:'center'}}),p.default.createElement(y.Text,{style:{fontSize:15,color:'white',marginLeft:(0,E.responsiveWidth)(2)}},R.default.t("CANCEL"))))}},{key:"getHypervisorActionButton",value:function(){var t=this;return p.default.createElement(w.default,{buttonColor:q.accent},p.default.createElement(w.default.Item,{buttonColor:"#3498db",title:R.default.t("REPOSITIONNING"),onPress:function(){return t.refocusMap(!1)},size:48},p.default.createElement(L.default,{name:"person-pin",style:ae.actionButtonIcon})),p.default.createElement(w.default.Item,{buttonColor:q.primary,title:R.default.t("CHANGE_MAP"),onPress:function(){t.onMapTypeChange()},size:48},p.default.createElement(L.default,{name:"map",style:ae.actionButtonIcon})))}},{key:"moveToMarker",value:function(t){this.mapRef.animateToCoordinate({latitude:parseFloat(t.latitude),longitude:parseFloat(t.longitude)},1e3),this.setState({textreach:t.lastname,texta:!0}),this.setState({markersearchfilter:[]}),this.onMarkerPress(t)}},{key:"refocusMap",value:function(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?this.mapRef&&void 0!==this.state.myPosition&&this.mapRef.animateCamera({center:{latitude:this.state.myPosition.latitude,longitude:this.state.myPosition.longitude},pitch:0,heading:0},1e3):this.mapRef&&void 0!==this.state.myPosition&&this.mapRef.animateCamera({center:{latitude:this.state.myPosition.latitude,longitude:this.state.myPosition.longitude},pitch:0,heading:0,altitude:5,zoom:12},1e3),this.map&&this.map.focusToUser()}},{key:"renderCardSeashItem",value:function(t){var n=this;return p.default.createElement(y.TouchableOpacity,{key:t.id,style:{margin:5},onPress:function(){n.moveToMarker(t)}},p.default.createElement(y.Text,{style:{flex:1,fontSize:14,color:"#000"}},null===t.firstname?t.adresse:t.firstname),p.default.createElement(y.Text,{style:{flex:1,fontSize:12}},t.lastname),p.default.createElement(y.Text,{style:{flex:1,fontSize:13,alignSelf:'flex-end',color:q.accent}},t.network))}},{key:"retrieveAllPoint",value:function(t){var n=this;(0,S.getMakersFrom)(t).then(function(o){new Promise(function(t,l){try{var s=o.datas;n.setState({allpoint:s,loadingDialog:!1}),t(s)}catch(t){console.warn(t.message),l(new Error(t.message))}}).then(function(t){n.onLoadMore()}).catch(function(o){n.setState({loadingDialog:!1}),console.log("on get marker"),y.Alert.alert(R.default.t("UNABLE_TO_CONNECT_TITLE"),R.default.t('TEXT_NETWORK_UNABLE'),[{text:R.default.t("NO"),onPress:function(){y.BackHandler.exitApp()}},{text:R.default.t("YES"),onPress:function(){n.setState({loadingDialog:!0}),null!==t&&void 0!==t?n.retrieveAllPoint(t):n.requestCameraPermission()}}],{cancelable:!1})})}).catch(function(o){console.log("on retreive>getmarkers",o.message),n.setState({loadingDialog:!1}),n.state.allpoint.length<=0&&(console.log("no point"),y.Alert.alert(R.default.t("UNABLE_TO_CONNECT_TITLE"),R.default.t('TEXT_NETWORK_UNABLE'),[{text:R.default.t("NO"),onPress:function(){y.BackHandler.exitApp()}},{text:R.default.t("YES"),onPress:function(){n.state.allpoint.length<=0&&(n.setState({loadingDialog:!0}),null!==t&&void 0!==t?n.retrieveAllPoint(t):n.requestCameraPermission())}}],{cancelable:!1}))})}},{key:"showLoadMoreView",value:function(){var t=this;if(this.state.isNeedLoadMore)return p.default.createElement(y.View,{style:{flex:1,flexDirection:'row',width:(0,E.responsiveWidth)(90)}},p.default.createElement(x.default,{onPress:function(){t.setState({page:t.state.page+1}),t.onLoadMore()},style:{borderRadius:48,height:48,width:48,backgroundColor:"white",borderColor:"transparent",alignItems:"center",justifyContent:"center"}},p.default.createElement(L.default,{name:"refresh",size:32})),p.default.createElement(y.View,{style:{backgroundColor:"#FFFFFFA0",width:(0,E.responsiveWidth)(20),height:30,borderRadius:12,justifyContent:'center',alignItems:'center',alignSelf:'center'}},p.default.createElement(y.Text,null,(this.state.markers.length,this.state.markers.length)," / ",this.state.currentNetworkSize," ")))}},{key:"showLoadingMapView",value:function(){if(this.state.isLoadingMap)return p.default.createElement(y.View,{style:{flexDirection:'row',margin:10,width:(0,E.responsiveWidth)(95),backgroundColor:'white',justifyContent:"center",alignSelf:"center"}},p.default.createElement(y.Text,{style:{fontSize:12,alignSelf:'center'}},R.default.t("LOADING_TEXT_MARKERS")+" "+this.state.value+" km "+R.default.t("DISTANCE_ARROUND")),p.default.createElement(y.ProgressBarAndroid,{style:{alignSelf:'center'}}))}},{key:"loadingMarkers",value:function(t,n,o){var l=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return new Promise(function(u,c){var f=l.state.allpoint,h=void 0!==s?s:l.state.page,p=f.filter(function(l,s){var u={longitude:parseFloat(l.longitude),latitude:parseFloat(l.latitude)};return G.getDistance(t,u)<=1e3*o&&l.network===n.name}).slice(0,(h+1)*l.state.pas);try{var y=f.filter(function(l,s){var u={longitude:parseFloat(l.longitude),latitude:parseFloat(l.latitude)};return G.getDistance(t,u)<=1e3*o&&l.network===n.name});l.setState({currentNetworkSize:y.length,currentNetworkMarkers:y})}catch(t){console.debug("after "+t.message)}console.debug("data:",p,"value"+1e3*o),u(p)})}},{key:"treatNewData",value:function(t,n){var o=this,l=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.setState({isLoadingMap:!1});var s=n;if(n.length>0){var u=s;l&&this.setState({showProgress:!1}),u.length>0&&this.setState({markers:u,prevRegion:t}),s.length0){var o=n.results[0],l=o.address_components,u=o.formatted_address,c=o.place_id;s.setState({address:l,textadress:u,place:c});for(var f,h,p=n.results,k=0;k=v.length)break;S=v[b++]}else{if((b=v.next()).done)break;S=b.value}var T=S;T.code===f&&(s.setState({indicatif:T.dial_code}),s.getNetworks(T.dial_code))}}}else console.log("on treat 1"),y.Alert.alert(R.default.t("UNABLE_TO_CONNECT_TITLE"),R.default.t('TEXT_NETWORK_UNABLE'),[{text:R.default.t("NO"),onPress:function(){y.BackHandler.exitApp()}},{text:R.default.t("YES"),onPress:function(){s.treatPosition(t)}}],{cancelable:!1});else console.log("on treat 2"),y.Alert.alert(R.default.t("UNABLE_TO_CONNECT_TITLE"),R.default.t('TEXT_NETWORK_UNABLE'),[{text:R.default.t("NO"),onPress:function(){y.BackHandler.exitApp()}},{text:R.default.t("YES"),onPress:function(){s.treatPosition(t)}}],{cancelable:!1})}).catch(function(n){console.log("on treat 3"),y.Alert.alert(R.default.t("UNABLE_TO_CONNECT_TITLE"),R.default.t('TEXT_NETWORK_UNABLE'),[{text:R.default.t("NO"),onPress:function(){y.BackHandler.exitApp()}},{text:R.default.t("YES"),onPress:function(){s.treatPosition(t)}}],{cancelable:!1})}),l={latitude:t.latitude,longitude:t.longitude,latitudeDelta:.03,longitudeDelta:.01},this.setState({myPosition:t,region:l}),this.mapRef&&!this.state.myPositionIsAnimated&&(this.mapRef.animateCamera({center:t,pitch:0,heading:0,altitude:5,zoom:13},1e3),this.setState({myPositionIsAnimated:!0})));case 3:case"end":return o.stop()}},null,this,null,Promise)}}]),n})(C.default);$.navigationOptions=function(t){return{headerMode:"none",headerStyle:{display:'none'},header:null,drawerLabel:t.navigation.getParam("name",R.default.t('MAP')),drawerIcon:function(t){var n=t.tintColor;return p.default.createElement(L.default,{name:'map',size:24,color:n})}}},$.defaultProps={draggableRange:{top:(0,E.responsiveHeight)(30),bottom:0},panel:null};var ee=(0,W.connect)(function(t){return{loading:t.authKeyReducer.loading,authKey:t.authKeyReducer.authKey,error:t.authKeyReducer.error}},function(t){return(0,U.bindActionCreators)({getAuthApiKey:H.default,getWalletActivated:j.default},t)})($);e.default=ee;var te=y.StyleSheet.create({solde:{backgroundColor:q.accent,color:"white",marginLeft:10,padding:5,fontSize:9,borderRadius:100},title:{color:'black',marginLeft:10,flex:1,fontSize:11,fontWeight:'bold'},subtitle2:{color:'black',marginLeft:10,flex:1,fontSize:10,fontWeight:'bold'},subtitle:{color:'black',marginLeft:9,fontSize:9},otherInformation:{marginLeft:13,fontSize:9},reseau:{marginLeft:10,fontWeight:'bold',color:q.accent,fontSize:10},container:{flex:1,width:(0,E.responsiveWidth)(95),alignSelf:"center",paddingTop:(0,E.responsiveHeight)(1),marginBottom:(0,E.responsiveHeight)(1),backgroundColor:"white",justifyContent:'flex-start'}}),ae=y.StyleSheet.create({container:{flex:1,backgroundColor:'#FFF'},panelContainer:{position:'absolute',top:0,bottom:0,left:0,right:0},panel:{height:600,padding:20,backgroundColor:'#f7f5eee8'},header:{backgroundColor:'#f7f5eee8',shadowColor:'#000000',paddingTop:20,borderTopLeftRadius:20,borderTopRightRadius:20},panelHandle:{width:40,height:8,borderRadius:4,backgroundColor:'#00000040',marginBottom:10},panelTitle:{fontSize:27,height:35},panelSubtitle:{fontSize:14,color:'gray',height:30,marginBottom:10},panelButton:{padding:20,borderRadius:10,backgroundColor:'#318bfb',alignItems:'center',marginVertical:10},panelButtonTitle:{fontSize:17,fontWeight:'bold',color:'white'},fab:{position:'absolute',margin:16,right:0,bottom:0},networkname:{backgroundColor:q.primary,padding:5,color:"white",marginRight:10,fontSize:10,borderRadius:12},myClusterTextStyle:{color:"white"},myClusterStyle:{backgroundColor:q.accent,height:32,justifyContent:'center',alignItems:'center',width:32,borderRadius:16},rowContainer:{height:52,flex:1,flexDirection:'row',justifyContent:'flex-start',alignItems:'center'},iconContainer:{marginRight:16},mapmarker:{width:52,height:52},slidingup:{backgroundColor:"transparent",position:"absolute",height:Z,bottom:0,left:(0,E.responsiveWidth)(2.5),width:(0,E.responsiveWidth)(95),zIndex:1},panelHeader:{height:120,backgroundColor:'#b197fc',alignItems:'center',justifyContent:'center'},favoriteIcon:{left:(0,E.responsiveWidth)(75),backgroundColor:q.primary,width:64,justifyContent:'center',alignContent:'center',bottom:-64,position:'absolute',height:64,padding:8,zIndex:1,borderRadius:32},hambuger:{color:q.primary,borderColor:q.primary,borderWidth:1,alignSelf:'center',padding:5},topBar:{position:'absolute',alignSelf:'center',justifyContent:'center',borderRadius:10,alignItems:'center',marginTop:(0,E.responsiveHeight)(4),width:(0,E.responsiveWidth)(90)},searchInput:{flex:1,fontSize:14},search:{width:(0,E.responsiveWidth)(70),height:(0,E.responsiveHeight)(10),backgroundColor:'#00000000'},map:{width:(0,E.responsiveWidth)(100),height:(0,E.responsiveHeight)(100)},backgroundd_drawer:{backgroundColor:'#000'},cardsearch:{width:(0,E.responsiveWidth)(90),height:(0,E.responsiveHeight)(10),position:'absolute',alignSelf:'center',marginTop:5},actionButtonIcon:{fontSize:20,height:22,color:'white'},welcome:{fontSize:20,textAlign:'center',margin:10},instructions:{textAlign:'center',color:'#333333',marginBottom:5}})},1152,[4,1,273,8,10,12,11,9,13,15,18,1153,524,528,527,771,764,711,815,681,709,712,766,737,768,1373,1378,1379,827,804,826,1380,1029,1384,1444,1472,1475,1504,1537,813,1471,808,806,807]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]),o=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(d[2])),s=o(r(d[3])),u=o(r(d[4])),l=o(r(d[5])),c=o(r(d[6])),f=o(r(d[7])),p=t(r(d[8])),h=t(r(d[9])),k=o(r(d[10])),y=r(d[11]),v=r(d[12]),R=o(r(d[13])),b=o(r(d[14])),C=o(r(d[15])),w=(r(d[16]),r(d[17])),M=(o(r(d[18])),r(d[19])),S=(r(d[20]),r(d[21]),(function(t){function o(t){var s;return(0,n.default)(this,o),(s=(0,u.default)(this,(0,l.default)(o).call(this,t))).mapRef=function(t){s.mapview=t},s.getMapRef=function(){return s.mapview},s.state={markers:[],roadReady:!1,isNeedUserFocus:!1,positionMarkerText:b.default.t("YOUR_THERE")},w.IlinkEmitter.on("langueChange",s.updateLangue.bind((0,c.default)(s))),s}return(0,f.default)(o,t),(0,s.default)(o,[{key:"getPositionMarkerText",value:function(){var t=null;switch(b.default.currentLocale()){case"fr":t="Vous \xeates ici";break;case"en":t="Your are here";break;default:t=b.default.t("YOUR_THERE")}return t}},{key:"updateLangue",value:function(){this.setState({positionMarkerText:this.getPositionMarkerText()})}},{key:"componentDidUpdate",value:function(t,o){o.positionMarkerText!==this.state.positionMarkerText&&this.forceUpdate()}},{key:"componentWillReceiveProps",value:function(t,o){var n=this.state.markers,s=t.markers;n.length<=0?this.setState({markers:s}):n.length!==s&&this.setState({markers:s}),this.setState({isNeedUserFocus:t.isNeedUserFocus})}},{key:"render",value:function(){var t=this,o=this.props,n=(o.markers,o.initialRegion),s=(o.myPosition,o.myNetwork),u=o.typeMap,l=o.selectedMarker;return null!==n&&null!==s?p.default.createElement(y.View,{style:N.container},p.default.createElement(h.default,{style:{flex:1},initialRegion:n,mapType:u,ref:function(o){return t.mapview=o},onMapReady:this.props.onMapReady,onLayout:this.props.onLayout,onRegionChangeComplete:function(o){t.onRegionChangeOver(o)}},this.state.markers.map(function(o,n){return p.default.createElement(R.default,{isUser:!1,title:o.lastname,isSelected:l&&l.id===o.id,data:o,onPress:function(o,n){return t.props.onMarkerClick(o,n)},network:s})}),this.renderMyPosition(),this.makeDirection())):p.default.createElement(y.View,null)}},{key:"focusToUser",value:function(){this.setState({isNeedUserFocus:!0})}},{key:"closeUserFocus",value:function(){this.setState({isNeedUserFocus:!1})}},{key:"onRegionChangeOver",value:function(t){}},{key:"makeDirection",value:function(){var t=this,o=this.props,n=o.myPosition,s=o.selectedMarker,u=o.needRoad;if(null!==n&&null!==s&&void 0!==s&&void 0!==n&&u)return setTimeout(function(){t.state.roadReady||(t.setState({roadReady:!0}),t.props.onNeedRoadError())},1e4),p.default.createElement(C.default,{origin:n,destination:s,apikey:"AIzaSyAYOEp-Pckvc3TwOIulCICokKgmp14rGHI",strokeWidth:3,onReady:function(o){t.setState({roadReady:!0}),t.props.onNeedRoadReady(o)},onError:function(){t.setState({roadReady:!0}),t.props.onNeedRoadError()},strokeColor:M.primary})}},{key:"renderMyPosition",value:function(){var t=this.props,o=t.myPosition;t.myNetwork;if(null!=o)return p.default.createElement(R.default,{isUser:!0,lang:this.props.lang,isNeedFocus:this.state.isNeedUserFocus,title:this.state.positionMarkerText,data:{longitude:o.longitude,latitude:o.latitude}})}}]),o})(p.Component));S.propTypes={markers:k.default.array,map:k.default.object,network:k.default.object,myNetwork:k.default.object,selectedMarker:k.default.object,myPosition:k.default.object,onMarkerClick:k.default.func,initialRegion:k.default.object,typeMap:k.default.string,needRoad:k.default.bool,isNeedUserFocus:k.default.bool,onNeedRoadReady:k.default.func,onNeedRoadError:k.default.func,onMapReady:k.default.func,onLayout:k.default.func},S.defaultProps={isNeedUserFocus:!1};var x=S;e.default=x;var N=y.StyleSheet.create({container:{flex:1,backgroundColor:'#FFF'},myClusterTextStyle:{color:"white"},myClusterStyle:{backgroundColor:M.accent,height:32,justifyContent:'center',alignItems:'center',width:32,borderRadius:16},rowContainer:{height:52,flex:1,flexDirection:'row',justifyContent:'flex-start',alignItems:'center'},iconContainer:{marginRight:16},mapmarker:{width:52,height:52},slidingup:{backgroundColor:"transparent",position:"absolute",height:300,bottom:0,right:35,zIndex:1},panel:{flex:1,backgroundColor:'white',position:'relative'},panelHeader:{height:120,backgroundColor:'#b197fc',alignItems:'center',justifyContent:'center'},favoriteIcon:{left:(0,v.responsiveWidth)(75),backgroundColor:M.primary,width:64,justifyContent:'center',alignContent:'center',bottom:-64,position:'absolute',height:64,padding:8,zIndex:1,borderRadius:32},hambuger:{},topBar:{position:'absolute',alignSelf:'center',justifyContent:'center',alignItems:'center',marginTop:(0,v.responsiveHeight)(4),width:(0,v.responsiveWidth)(95)},searchInput:{width:(0,v.responsiveWidth)(70),fontSize:14},search:{width:(0,v.responsiveWidth)(70),height:(0,v.responsiveHeight)(10),backgroundColor:'#00000000'},map:{width:(0,v.responsiveWidth)(100),height:(0,v.responsiveHeight)(100)},backgroundd_drawer:{backgroundColor:'#000'},cardsearch:{width:(0,v.responsiveWidth)(90),height:(0,v.responsiveHeight)(10),position:'absolute',alignSelf:'center',marginTop:5},actionButtonIcon:{fontSize:20,height:22,color:'white'},welcome:{fontSize:20,textAlign:'center',margin:10},instructions:{textAlign:'center',color:'#333333',marginBottom:5}})},1153,[4,1,8,9,10,12,11,13,15,950,68,18,527,1154,712,1158,1160,766,930,806,1156,1157]); @@ -1540,9 +1540,9 @@ __d(function(g,r,i,a,m,e,d){"use strict";e.__esModule=!0,e.createStoreHook=n,e.u __d(function(g,r,i,a,m,e,d){"use strict";e.__esModule=!0,e.useReduxContext=function(){return(0,t.useContext)(u.ReactReduxContext)};var t=r(d[0]),u=r(d[1])},1534,[15,1509]); __d(function(g,r,i,a,m,e,d){"use strict";var t=r(d[0]);e.__esModule=!0,e.createSelectorHook=h,e.useSelector=void 0;var n=r(d[1]),u=r(d[2]),c=t(r(d[3])),o=r(d[4]),s=r(d[5]),f=function(t,n){return t===n};function v(t,u,s,f){var v,h=(0,n.useReducer)(function(t){return t+1},0)[1],R=(0,n.useMemo)(function(){return new c.default(s,f)},[s,f]),x=(0,n.useRef)(),y=(0,n.useRef)(),S=(0,n.useRef)();try{v=t!==y.current||x.current?t(s.getState()):S.current}catch(t){throw x.current&&(t.message+="\nThe error may be correlated with this previous error:\n"+x.current.stack+"\n\n"),t}return(0,o.useIsomorphicLayoutEffect)(function(){y.current=t,S.current=v,x.current=void 0}),(0,o.useIsomorphicLayoutEffect)(function(){function t(){try{var t=y.current(s.getState());if(u(t,S.current))return;S.current=t}catch(t){x.current=t}h({})}return R.onStateChange=t,R.trySubscribe(),t(),function(){return R.tryUnsubscribe()}},[s,R]),v}function h(t){void 0===t&&(t=s.ReactReduxContext);var c=t===s.ReactReduxContext?u.useReduxContext:function(){return(0,n.useContext)(t)};return function(t,n){void 0===n&&(n=f);var u=c();return v(t,n,u.store,u.subscription)}}var R=h();e.useSelector=R},1535,[1505,15,1534,1510,1520,1509]); __d(function(g,r,i,a,m,e,d){"use strict";e.__esModule=!0;var t=r(d[0]);e.unstable_batchedUpdates=t.unstable_batchedUpdates},1536,[18]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=r(d[1]),s=r(d[2]),n=r(d[3]),c=t(r(d[4])),o=function(t){var o=n.store.getState().authKeyReducer,u=null!==o?o.authKey.token_type+" "+o.authKey.access_token:'';return function(n){n((0,s.fetchWalletListPending)()),(0,c.default)({url:l.walletActionUrl+"/"+t+"/activated",method:'GET',headers:{Authorization:u}}).then(function(t){n((0,s.fetchWalletListSuccess)(t))}).catch(function(t){n((0,s.fetchWalletListError)(t.message)),t.response?n((0,s.fetchWalletListError)(t.response)):t.request?n((0,s.fetchWalletListError)(t.request)):n((0,s.fetchWalletListError)(t.message))})}};e.default=o},1537,[1,736,1538,1540,1476]); -__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.fetchWalletListError=e.fetchWalletListSuccess=e.fetchWalletListPending=void 0;var t=r(d[0]);e.fetchWalletListPending=function(){return{type:t.WALLET_LIST_PENDING}};e.fetchWalletListSuccess=function(l){return{type:t.WALLET_LIST_SUCCESS,result:l}};e.fetchWalletListError=function(l){return{type:t.WALLET_LIST_ERROR,result:l}}},1538,[1539]); -__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.WALLET_LIST_ERROR=e.WALLET_LIST_SUCCESS=e.WALLET_LIST_PENDING=void 0;e.WALLET_LIST_PENDING='WALLET_LIST_PENDING';e.WALLET_LIST_SUCCESS='WALLET_LIST_SUCCESS';e.WALLET_LIST_ERROR='WALLET_LIST_ERROR'},1539,[]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=r(d[1]),o=r(d[2]),s=r(d[3]),n=t(r(d[4])),c=function(t){var c=s.store.getState().authKeyReducer,u=null!==c?c.authKey.token_type+" "+c.authKey.access_token:'';return function(s){s((0,o.fetchWalletListPending)()),(0,n.default)({url:l.walletActionUrl+"/"+t+"/activated",method:'GET',headers:{Authorization:u}}).then(function(t){console.log(t),s((0,o.fetchWalletListSuccess)(t))}).catch(function(t){console.log(t),s((0,o.fetchWalletListError)(t.message)),t.response?s((0,o.fetchWalletListError)(t.response)):t.request?s((0,o.fetchWalletListError)(t.request)):s((0,o.fetchWalletListError)(t.message))})}};e.default=c},1537,[1,736,1538,1540,1476]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.fetchWalletHistoryError=e.fetchWalletHistorySuccess=e.fetchWalletHistoryPending=e.fetchWalletListError=e.fetchWalletListSuccess=e.fetchWalletListPending=void 0;var t=r(d[0]);e.fetchWalletListPending=function(){return{type:t.WALLET_LIST_PENDING}};e.fetchWalletListSuccess=function(l){return{type:t.WALLET_LIST_SUCCESS,result:l}};e.fetchWalletListError=function(l){return{type:t.WALLET_LIST_ERROR,result:l}};e.fetchWalletHistoryPending=function(){return{type:t.WALLET_HISTORY_PENDING}};e.fetchWalletHistorySuccess=function(l){return{type:t.WALLET_HISTORY_SUCCESS,result:l}};e.fetchWalletHistoryError=function(l){return{type:t.WALLET_HISTORY_ERROR,result:l}}},1538,[1539]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.WALLET_HISTORY_ERROR=e.WALLET_HISTORY_SUCCESS=e.WALLET_HISTORY_PENDING=e.WALLET_LIST_ERROR=e.WALLET_LIST_SUCCESS=e.WALLET_LIST_PENDING=void 0;e.WALLET_LIST_PENDING='WALLET_LIST_PENDING';e.WALLET_LIST_SUCCESS='WALLET_LIST_SUCCESS';e.WALLET_LIST_ERROR='WALLET_LIST_ERROR';e.WALLET_HISTORY_PENDING='WALLET_HISTORY_PENDING';e.WALLET_HISTORY_SUCCESS='WALLET_HISTORY_SUCCESS';e.WALLET_HISTORY_ERROR='WALLET_HISTORY_ERROR'},1539,[]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.persistor=e.store=void 0;r(d[1]);var o=r(d[2]),p=r(d[3]),s=t(r(d[4])),u=r(d[5]),v=t(r(d[6])),c=[];c.push(s.default);var l=(0,u.createLogger)({predicate:function(){return!1}});c.push(l);var n=(0,p.createStore)(v.default,(0,p.compose)(p.applyMiddleware.apply(void 0,c)));e.store=n;var f=(0,o.persistStore)(n);e.persistor=f},1540,[1,18,1541,1472,1553,1554,1555]); __d(function(g,r,i,a,m,e,d){"use strict";e.__esModule=!0;var t={persistReducer:!0,persistCombineReducers:!0,persistStore:!0,createMigrate:!0,createTransform:!0,getStoredState:!0,createPersistoid:!0,purgeStoredState:!0};e.purgeStoredState=e.createPersistoid=e.getStoredState=e.createTransform=e.createMigrate=e.persistStore=e.persistCombineReducers=e.persistReducer=void 0;var s=v(r(d[0]));e.persistReducer=s.default;var o=v(r(d[1]));e.persistCombineReducers=o.default;var u=v(r(d[2]));e.persistStore=u.default;var c=v(r(d[3]));e.createMigrate=c.default;var f=v(r(d[4]));e.createTransform=f.default;var l=v(r(d[5]));e.getStoredState=l.default;var p=v(r(d[6]));e.createPersistoid=p.default;var S=v(r(d[7]));e.purgeStoredState=S.default;var n=r(d[8]);function v(t){return t&&t.__esModule?t:{default:t}}Object.keys(n).forEach(function(s){"default"!==s&&"__esModule"!==s&&(Object.prototype.hasOwnProperty.call(t,s)||(e[s]=n[s]))})},1541,[1542,1548,1550,1551,1552,1546,1545,1547,1543]); __d(function(g,r,i,a,m,e,d){"use strict";e.__esModule=!0,e.default=function(f,c){var l=void 0!==f.version?f.version:t.DEFAULT_VERSION,v=(f.debug,void 0===f.stateReconciler?n.default:f.stateReconciler),O=f.getStoredState||u.default,h=void 0!==f.timeout?f.timeout:b,_=null,P=!1,j=!0,w=function(t){return t._persist.rehydrated&&_&&!j&&_.update(t),t};return function(n,u){var b=n||{},E=b._persist,S=y(b,["_persist"]),k=S;if(u.type===t.PERSIST){var R=!1,T=function(t,n){R||(u.rehydrate(f.key,t,n),R=!0)};if(h&&setTimeout(function(){!R&&T(void 0,new Error("redux-persist: persist timed out for persist key \"".concat(f.key,"\"")))},h),j=!1,_||(_=(0,o.default)(f)),E)return p({},c(k,u),{_persist:E});if('function'!=typeof u.rehydrate||'function'!=typeof u.register)throw new Error('redux-persist: either rehydrate or register is not a function on the PERSIST action. This can happen if the action is being replayed. This is an unexplored use case, please open an issue and we will figure out a resolution.');return u.register(f.key),O(f).then(function(t){var n=f.migrate||function(t,n){return Promise.resolve(t)};n(t,l).then(function(t){T(t)},function(t){T(void 0,t)})},function(t){T(void 0,t)}),p({},c(k,u),{_persist:{version:l,rehydrated:!1}})}if(u.type===t.PURGE)return P=!0,u.result((0,s.default)(f)),p({},c(k,u),{_persist:E});if(u.type===t.FLUSH)return u.result(_&&_.flush()),p({},c(k,u),{_persist:E});if(u.type===t.PAUSE)j=!0;else if(u.type===t.REHYDRATE){if(P)return p({},k,{_persist:p({},E,{rehydrated:!0})});if(u.key===f.key){var D=c(k,u),x=u.payload,I=!1!==v&&void 0!==x?v(x,n,D,f):D,U=p({},I,{_persist:p({},E,{rehydrated:!0})});return w(U)}}if(!E)return c(n,u);var A=c(k,u);return A===k?n:w(p({},A,{_persist:E}))}};var t=r(d[0]),n=f(r(d[1])),o=f(r(d[2])),u=f(r(d[3])),s=f(r(d[4]));function f(t){return t&&t.__esModule?t:{default:t}}function c(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);n&&(u=u.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),o.push.apply(o,u)}return o}function p(t){for(var n=1;n=0||Object.prototype.propertyIsEnumerable.call(t,o)&&(s[o]=t[o])}return s}function v(t,n){if(null==t)return{};var o,u,s={},f=Object.keys(t);for(u=0;u=0||(s[o]=t[o]);return s}var b=5e3},1542,[1543,1544,1545,1546,1547]); @@ -1558,115 +1558,142 @@ __d(function(g,r,i,a,m,e,d){"use strict";e.__esModule=!0,e.default=function(n,s) __d(function(g,r,i,a,m,e,d){"use strict";e.__esModule=!0,e.default=function(n,t){var u=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=u.whitelist||null,f=u.blacklist||null;function o(n){return!(!l||-1!==l.indexOf(n))||!(!f||-1===f.indexOf(n))}return{in:function(t,u,l){return!o(u)&&n?n(t,u,l):t},out:function(n,u,l){return!o(u)&&t?t(n,u,l):n}}}},1552,[]); __d(function(g,r,i,a,m,e,d){'use strict';function t(t){return function(n){var u=n.dispatch,c=n.getState;return function(n){return function(f){return'function'==typeof f?f(u,c,t):n(f)}}}}e.__esModule=!0;var n=t();n.withExtraArgument=t,e.default=n},1553,[]); __d(function(g,r,i,a,m,e,d){var t,n,o=r(d[0]);t=this,n=function(t){"use strict";function n(t,n){t.super_=n,t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}function c(t,n){Object.defineProperty(this,"kind",{value:t,enumerable:!0}),n&&n.length&&Object.defineProperty(this,"path",{value:n,enumerable:!0})}function l(t,n,o){l.super_.call(this,"E",t),Object.defineProperty(this,"lhs",{value:n,enumerable:!0}),Object.defineProperty(this,"rhs",{value:o,enumerable:!0})}function u(t,n){u.super_.call(this,"N",t),Object.defineProperty(this,"rhs",{value:n,enumerable:!0})}function f(t,n){f.super_.call(this,"D",t),Object.defineProperty(this,"lhs",{value:n,enumerable:!0})}function s(t,n,o){s.super_.call(this,"A",t),Object.defineProperty(this,"index",{value:n,enumerable:!0}),Object.defineProperty(this,"item",{value:o,enumerable:!0})}function p(t,n,o){var c=t.slice((o||n)+1||t.length);return t.length=n<0?t.length+n:n,t.push.apply(t,c),t}function h(t){var n=void 0===t?"undefined":T(t);return"object"!==n?n:t===Math?"math":null===t?"null":Array.isArray(t)?"array":"[object Date]"===Object.prototype.toString.call(t)?"date":"function"==typeof t.toString&&/^\/.*\//.test(t.toString())?"regexp":"object"}function v(t,n,o,c,y,b,w){y=y||[],w=w||[];var x=y.slice(0);if(void 0!==b){if(c){if("function"==typeof c&&c(x,b))return;if("object"===(void 0===c?"undefined":T(c))){if(c.prefilter&&c.prefilter(x,b))return;if(c.normalize){var S=c.normalize(x,b,t,n);S&&(t=S[0],n=S[1])}}}x.push(b)}"regexp"===h(t)&&"regexp"===h(n)&&(t=t.toString(),n=n.toString());var j=void 0===t?"undefined":T(t),k=void 0===n?"undefined":T(n),E="undefined"!==j||w&&w[w.length-1].lhs&&w[w.length-1].lhs.hasOwnProperty(b),A="undefined"!==k||w&&w[w.length-1].rhs&&w[w.length-1].rhs.hasOwnProperty(b);if(!E&&A)o(new u(x,n));else if(!A&&E)o(new f(x,t));else if(h(t)!==h(n))o(new l(x,t,n));else if("date"===h(t)&&t-n!=0)o(new l(x,t,n));else if("object"===j&&null!==t&&null!==n)if(w.filter(function(n){return n.lhs===t}).length)t!==n&&o(new l(x,t,n));else{if(w.push({lhs:t,rhs:n}),Array.isArray(t)){var D;for(t.length,D=0;D=n.length?o(new s(x,D,new f(void 0,t[D]))):v(t[D],n[D],o,c,x,D,w);for(;D=0?(v(t[l],n[l],o,c,x,l,w),N=p(N,f)):v(t[l],void 0,o,c,x,l,w)}),N.forEach(function(t){v(void 0,n[t],o,c,x,t,w)})}w.length=w.length-1}else t!==n&&("number"===j&&isNaN(t)&&isNaN(n)||o(new l(x,t,n)))}function y(t,n,o,c){return c=c||[],v(t,n,function(t){t&&c.push(t)},o),c.length?c:void 0}function b(t,n,o){if(o.path&&o.path.length){var c,l=t[n],u=o.path.length-1;for(c=0;c0&&void 0!==arguments[0]?arguments[0]:{},n=o({},H,t),c=n.logger,l=n.stateTransformer,u=n.errorTransformer,f=n.predicate,s=n.logErrors,p=n.diffPredicate;if(void 0===c)return function(){return function(t){return function(n){return t(n)}}};if(t.getState&&t.dispatch)return console.error("[redux-logger] redux-logger not installed. Make sure to pass logger instance as middleware:\n// Logger with default options\nimport { logger } from 'redux-logger'\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n// Or you can create your own logger with custom options http://bit.ly/redux-logger-options\nimport createLogger from 'redux-logger'\nconst logger = createLogger({\n // ...options\n});\nconst store = createStore(\n reducer,\n applyMiddleware(logger)\n)\n"),function(){return function(t){return function(n){return t(n)}}};var h=[];return function(t){var c=t.getState;return function(t){return function(v){if("function"==typeof f&&!f(c,v))return t(v);var y={};h.push(y),y.started=L.now(),y.startedTime=new Date,y.prevState=l(c()),y.action=v;var b=void 0;if(s)try{b=t(v)}catch(t){y.error=u(t)}else b=t(v);y.took=L.now()-y.started,y.nextState=l(c());var w=n.diff&&"function"==typeof p?p(c,v):n.diff;if(A(h,o({},n,{diff:w})),h.length=0,y.error)throw y.error;return b}}}}var O,N,P=function(t,n){return new Array(n+1).join(t)},C=function(t,n){return P("0",n-t.toString().length)+t},F=function(t){return C(t.getHours(),2)+":"+C(t.getMinutes(),2)+":"+C(t.getSeconds(),2)+"."+C(t.getMilliseconds(),3)},L="undefined"!=typeof performance&&null!==performance&&"function"==typeof performance.now?performance:Date,T="function"==typeof Symbol&&"symbol"==typeof("function"==typeof Symbol?Symbol.iterator:"@@iterator")?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==("function"==typeof Symbol?Symbol.prototype:"@@prototype")?"symbol":typeof t},_=function(t){if(Array.isArray(t)){for(var n=0,o=Array(t.length);n0&&void 0!==arguments[0]?arguments[0]:{},n=t.dispatch,o=t.getState;return"function"==typeof n||"function"==typeof o?D()({dispatch:n,getState:o}):void console.error("\n[redux-logger v3] BREAKING CHANGE\n[redux-logger v3] Since 3.0.0 redux-logger exports by default logger with default settings.\n[redux-logger v3] Change\n[redux-logger v3] import createLogger from 'redux-logger'\n[redux-logger v3] to\n[redux-logger v3] import { createLogger } from 'redux-logger'\n")};t.defaults=H,t.createLogger=D,t.logger=R,t.default=R,Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof e&&void 0!==m?n(e):"function"==typeof define&&define.amd?define(["exports"],n):n(t.reduxLogger=t.reduxLogger||{})},1554,[6]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;r(d[1]);var u=t(r(d[2])),l=t(r(d[3])),o=r(d[4]),c={key:'root',storage:r(d[5]).AsyncStorage,whitelist:['authKeyReducer'],blacklist:[]},s=(0,o.persistCombineReducers)(c,{walletReducer:u.default,authKeyReducer:l.default});e.default=s},1555,[1,1472,1556,1557,1541,18]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;r(d[1]);var u=t(r(d[2])),l=t(r(d[3])),o=t(r(d[4])),c=t(r(d[5])),s=r(d[6]),f={key:'root',storage:r(d[7]).AsyncStorage,whitelist:['authKeyReducer'],blacklist:[]},y=(0,s.persistCombineReducers)(f,{walletReducer:u.default,authKeyReducer:l.default,depositReducer:o.default,walletHistoryReducer:c.default});e.default=y},1555,[1,1472,1556,1557,1558,1560,1541,18]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(r(d[1])),o=r(d[2]);function l(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);n&&(l=l.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),o.push.apply(o,l)}return o}function u(t){for(var o=1;o0&&void 0!==arguments[0]?arguments[0]:c,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case o.WALLET_LIST_PENDING:return u({},t,{loading:!0});case o.WALLET_LIST_SUCCESS:return u({},t,{loading:!1,result:n.result.data,error:null});case o.WALLET_LIST_ERROR:return u({},t,{loading:!1,result:null,error:n.result});default:return t}}},1556,[1,7,1539]); __d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(r(d[1])),o=r(d[2]),u=r(d[3]);function l(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(t);n&&(u=u.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),o.push.apply(o,u)}return o}function c(t){for(var o=1;o0&&void 0!==arguments[0]?arguments[0]:y,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case o.AUTH_KEY_PENDING:return c({},t,{loading:!0});case o.AUTH_KEY_SUCCESS:return c({},t,{loading:!1,authKey:n.result.data,error:null});case o.AUTH_KEY_ERROR:return c({},t,{loading:!1,error:n.result});case u.REHYDRATE:return c({},t,{loading:!1,authKey:void 0!==n.payload?n.payload.authKeyReducer.authKey:null,error:null});default:return t}}},1557,[1,7,1503,1541]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),s=n(r(d[3])),o=n(r(d[4])),c=n(r(d[5])),f=n(r(d[6])),u=n(r(d[7])),y=t(r(d[8])),h=r(d[9]),E=n(r(d[10])),x=n(r(d[11])),w=r(d[12]),p=n(r(d[13])),v=r(d[14]),T=r(d[15]),D=n(r(d[16])),C=r(d[17]),b=(n(r(d[18])),r(d[19]),r(d[20])),L='white',A=r(d[21]),_=(r(d[22]),(function(t){function n(t){var o;(0,s.default)(this,n),(o=(0,c.default)(this,(0,f.default)(n).call(this,t))).styles=h.StyleSheet.create({container:{flex:1},btnstyle:{},simpleuser:{marginLeft:(0,w.responsiveWidth)(2),fontSize:16,color:'#3E3E3E'},textbtnstyle:{color:"white",fontWeight:"bold",fontSize:18},cardcontainer1:{justifyContent:'space-evenly',flex:2,marginRight:3,marginLeft:3},cardcontainer:{justifyContent:'space-evenly',flex:3,margin:3}}),o.item=o.props.navigation.getParam("item",null);var u='';return'1'===o.item.status?(1,L='#AEAEAE',u=D.default.t('TREAT_DEMAND')):(L='green',2,u=D.default.t('ACTION_TREAT_DEMAND')),o.state={statut:u,user:null,networks:[],loadingTreat:!1,color:L},(0,T.readUser)().then(function(t){var n;return l.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return n=[],s.next=3,l.default.awrap((0,C.getAgentNetworksList)(t.agentId));case 3:n=s.sent,o.setState({user:t,networks:n.networks});case 5:case"end":return s.stop()}},null,null,null,Promise)}),o}return(0,u.default)(n,t),(0,o.default)(n,[{key:"render",value:function(){var t=b.tz(this.item.date_creation,'Etc/GMT+0').format();return t=b(t),y.default.createElement(h.View,{style:this.styles.container},y.default.createElement(E.default,{style:this.styles.cardcontainer1},y.default.createElement(h.Text,{style:{fontSize:17,fontWeight:'bold',color:'black',marginLeft:(0,w.responsiveWidth)(5)}},D.default.t('MEMBER_INFO')),y.default.createElement(h.View,{style:{flexDirection:'row',justifyContent:'flex-start'}},y.default.createElement(p.default,{name:"md-call",size:28,color:A.accent,style:{marginLeft:20}}),y.default.createElement(h.Text,{style:this.styles.simpleuser},this.item.phone)),y.default.createElement(h.View,{style:{flexDirection:'row',justifyContent:'flex-start'}},y.default.createElement(p.default,{name:"md-person",size:28,color:A.accent,style:{marginLeft:20}}),y.default.createElement(h.Text,{style:this.styles.simpleuser},this.item.code_membre))),y.default.createElement(E.default,{style:this.styles.cardcontainer},y.default.createElement(h.Text,{style:{fontSize:17,fontWeight:'bold',color:'black',marginLeft:(0,w.responsiveWidth)(5)}},D.default.t('DEMAND_INFO')),y.default.createElement(h.View,{style:{flexDirection:'row',justifyContent:'flex-start'}},y.default.createElement(p.default,{name:"md-git-branch",size:28,color:A.accent,style:{marginLeft:20}}),y.default.createElement(h.Text,{style:this.styles.simpleuser},this.item.code_parrain)),y.default.createElement(h.View,{style:{flexDirection:'row',justifyContent:'flex-start'}},y.default.createElement(p.default,{name:"md-code-working",size:28,color:A.accent,style:{marginLeft:20}}),y.default.createElement(h.Text,{style:this.styles.simpleuser},this.item.reseau)),y.default.createElement(h.View,{style:{flexDirection:'row',justifyContent:'flex-start'}},y.default.createElement(p.default,{name:"md-wallet",size:28,color:A.accent,style:{marginLeft:20}}),y.default.createElement(h.Text,{style:this.styles.simpleuser},this.item.montant)),y.default.createElement(h.View,{style:{flexDirection:'row',justifyContent:'flex-start'}},y.default.createElement(p.default,{name:"md-calendar",size:28,color:A.accent,style:{marginLeft:20}}),y.default.createElement(h.Text,{style:this.styles.simpleuser},t.format(" Do MMMM YYYY \xe0 HH:mm"))),y.default.createElement(h.View,{style:{flexDirection:'row',alignSelf:'flex-end',marginRight:20,justifyContent:'flex-start'}},y.default.createElement(p.default,{name:"md-time",size:28,color:A.accent}),y.default.createElement(h.Text,{style:{marginLeft:(0,w.responsiveWidth)(2),fontSize:16,color:A.accent}},t.fromNow()))),this.state.user?this.renderBtn():null)}},{key:"onTreatDemand",value:function(){var t=this;"1"!==this.item&&(this.setState({loadingTreat:!0}),console.warn(this.item),(0,v.updateCreditDemand)(this.item.phone,this.item.id).then(function(n){t.setState({loadingTreat:!1}),console.log(n),1===n.success?t.setState({statut:D.default.t('TREAT_DEMAND'),color:"#AEAEAE"}):console.log(n)}))}},{key:"renderBtn",value:function(){var t=this,n=this.state.user;if(console.warn(this.item),n&&this.item.code_parrain===n.code_membre)return y.default.createElement(x.default,{style:{borderColor:'transparent',borderRadius:6,marginLeft:5,marginRight:5,backgroundColor:this.state.color},isLoading:this.state.loadingTreat,onPress:function(){t.onTreatDemand()},textStyle:this.styles.textbtnstyle},this.state.statut)}}]),n})(y.Component));e.default=_,_.navigatorStyle={navBarBackgroundColor:A.accentLight,statusBarColor:A.accent,navBarTextColor:'#FFFFFF',navBarButtonColor:'#FFFFFF'},_.navigationOptions=function(t){return{drawerLabel:function(){return null},title:"Transaction N\xb0"+t.navigation.getParam("item",{id:"-"}).id}}},1558,[4,1,273,8,9,10,12,13,15,18,528,709,527,871,1149,711,712,1001,1139,840,1134,806,807]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),s=n(r(d[4])),u=n(r(d[5])),c=n(r(d[6])),f=n(r(d[7])),h=t(r(d[8])),E=r(d[9]),y=n(r(d[10])),C=r(d[11]),b=r(d[12]),T=r(d[13]),p=r(d[14]),_=n(r(d[15])),x=(n(r(d[16])),r(d[17])),v=n(r(d[18])),I=n(r(d[19])),L=r(d[20]),S=r(d[21]);r(d[22]),r(d[23]),r(d[24]),r(d[25]),r(d[26]),r(d[27]),r(d[28]);r(d[29]);var w=r(d[30]);r(d[31]);r(d[32]);var k=r(d[33]),A=(function(t){function n(t){var c;return(0,l.default)(this,n),(c=(0,o.default)(this,(0,s.default)(n).call(this,t,!0)))._populateIcons=function(){return new Promise(function(t,n){Promise.all([_.default.getImageSource('users',30),_.default.getImageSource('chart-pie',30)]).then(function(n){n[0],n[0],t(n)}).catch(function(t){console.log(t),n(t)}).done()})},c.state=n.initState(),(0,p.readUser)().then(function(t){c.setState({user:t}),(0,T.listFreeCodesSuperViseur)(t.code_membre).then(function(t){console.log("codes",t),void 0!=t.success&&c.setState({freeCodes:t.networks})})}),(0,b.listAllMembers)().then(function(t){console.log(t),null!==t&&c.setState({listmembers:t,isLoading:!1,isRefreshing:!1})}),c._populateIcons().then(function(t){c.setState({usersicon:t[0],charticon:t[1]})}),(0,p.listDemandAdhesion)().then(function(t){console.log(t);var n=[];t.forEach(function(t){var l=!1;n.forEach(function(n){n.code_membre===t.code_membre&&(l=!0)}),l||n.push(t)}),console.log('filtered',n),void 0!==t&&c.setState({demands:n,isLoadingDemand:!1})}),w.IlinkEmitter.on("langueChange",c.updateLangue.bind((0,u.default)(c))),c}return(0,f.default)(n,t),(0,c.default)(n,null,[{key:"options",value:function(t){return{topBar:{rightButtons:[]}}}}]),(0,c.default)(n,[{key:"updateLangue",value:function(){this.props.navigation.setParams({name:v.default.t('GROUP_MANAGE')}),this.forceUpdate()}},{key:"render",value:function(){return h.default.createElement(E.View,{style:{flex:1,marginBottom:10}},h.default.createElement(E.StatusBar,{backgroundColor:"#00000030",barStyle:"light-content",translucent:!1}),h.default.createElement(L.IndicatorViewPager,{style:{flex:1},indicator:'hyper'===this.state.user.category?this._renderTabIndicatorAdmin():this._renderTabIndicator()},this.state.isLoading?this._renderLoadingItems():this._renderListMembers(),this.state.isLoadingDemand?this._renderLoadingItems():'hyper'===this.state.user.category?this._renderListDemandAdhesion():this._renderListCodeUnused()))}},{key:"_renderTabIndicatorAdmin",value:function(){var t=[{text:v.default.t('MEMBER_LIST'),iconSource:this.state.usersicon},{text:v.default.t('MEMBERSHIP_REQUEST'),iconSource:this.state.charticon}];return h.default.createElement(L.PagerTabIndicator,{style:{height:(0,C.responsiveHeight)(8)},tabs:t})}},{key:"_renderTabIndicator",value:function(){var t=[{text:v.default.t('MEMBER_LIST'),iconSource:this.state.usersicon}];return h.default.createElement(L.PagerTabIndicator,{style:{height:(0,C.responsiveHeight)(8)},tabs:t})}},{key:"_renderListMembers",value:function(){var t=this;return h.default.createElement(E.View,null,h.default.createElement(E.FlatList,{style:{flex:1,backgroundColor:'#EEE'},data:this.state.listmembers instanceof Array?this.state.listmembers:this.state.listmembers.datas?this.state.listmembers.datas:[],ListEmptyComponent:function(){return h.default.createElement(E.View,{style:{flex:1}},h.default.createElement(E.View,{style:{justifyContent:"center",alignItems:'center',marginTop:100}},h.default.createElement(I.default,{style:R.lottie,source:r(d[34]),autoPlay:!0,loop:!0}),h.default.createElement(E.Text,{style:R.text},v.default.t('NO_MEMBERS'))))},refreshControl:h.default.createElement(E.RefreshControl,{refreshing:this.state.isRefreshing,colors:[x.theme.primary,x.theme.purpleLight,x.theme.reddeconnect,x.theme.accentLight],onRefresh:function(){t.setState({isRefreshing:!0}),(0,b.listAllMembers)().then(function(n){console.log("from refresh",n),null!==n&&n.datas&&t.setState({listmembers:n,isLoading:!1,isRefreshing:!1})})}}),renderItem:function(n){var l=n.item;return t.renderMembers(l)}}))}},{key:"_renderLoadingItems",value:function(){return h.default.createElement(E.View,{style:{flex:1,justifyContent:'center',alignItems:'center'}},h.default.createElement(E.ProgressBarAndroid,null))}},{key:"renderMembers",value:function(t){var n=this,l=k.tz(t.created_at,'Etc/GMT+0').format();return l=k(l).fromNow(),h.default.createElement(S.Card,null,h.default.createElement(S.CardTitle,{title:t.lastname,subtitle:t.adresse}),h.default.createElement(S.CardContent,null,h.default.createElement(E.View,{Style:{flex:1,flexDirection:'row'}},h.default.createElement(E.View,{Style:{flex:1}}),h.default.createElement(E.View,{style:{flexDirection:'row',backgroundColor:x.theme.primary,marginRight:10,width:150,justifyContent:'center',alignItems:'center',borderRadius:10}},h.default.createElement(_.default,{name:"phone",color:"white",size:24,style:R.callIcon}),h.default.createElement(E.Text,{style:R.phone},t.phone)))),h.default.createElement(S.CardAction,{separator:!0,inColumn:!1},h.default.createElement(S.CardButton,{onPress:function(){E.Alert.alert(v.default.t("TITLE_SUPPRESS_CONFIRM"),v.default.t("TEXT_SUPPRESS_CONFIRM"),[{text:v.default.t('NO'),onPress:function(){}},{text:v.default.t('YES'),onPress:function(){(0,p.deleteUser)(t).then(function(){n.setState({isLoading:!0}),(0,b.listAllMembers)().then(function(t){console.log(t),null!==t&&n.setState({listmembers:t,isLoading:!1,isRefreshing:!1})})})},style:'cancel'}])},title:v.default.t('DELETE_GEOLOCATED_USER'),color:"crimson"})))}},{key:"_renderListDemandAdhesion",value:function(){var t=this;if('hyper'===this.state.user.category)return this.state.demands.length>0?h.default.createElement(E.View,{style:{backgroundColor:'#EEEEEE',flex:1}},h.default.createElement(E.FlatList,{data:this.state.demands,renderItem:function(n){var l=n.item;return t._renderAddhesionItem(l)},refreshControl:h.default.createElement(E.RefreshControl,{refreshing:this.state.isRefreshing,colors:[x.theme.primary,x.theme.purpleLight,x.theme.reddeconnect,x.theme.accentLight],onRefresh:function(){t.setState({isRefreshing:!0}),(0,b.listAllMembers)().then(function(n){console.log("from refresh",n),null!==n&&n.datas&&t.setState({listmembers:n,isLoading:!1,isRefreshing:!1})})}}),ListEmptyComponent:function(){return h.default.createElement(E.View,{style:{flex:1}},h.default.createElement(E.View,{style:{justifyContent:"center",alignItems:'center',marginTop:100}},h.default.createElement(I.default,{style:R.lottie,source:r(d[34]),autoPlay:!0,loop:!0}),h.default.createElement(E.Text,{style:R.text},v.default.t('NO_MEMBERS'))))}})):h.default.createElement(E.View,{style:{backgroundColor:'white',flex:1,justifyContent:'center',alignItems:'center'}},h.default.createElement(E.Text,null,v.default.t('NO_DEMAND_ADHESION')))}},{key:"_renderLoadingDemandItems",value:function(){var t=this;return this.state.freeCodes.length>0?h.default.createElement(E.View,{style:{backgroundColor:'#EEEEEE',flex:1}},h.default.createElement(E.FlatList,{data:this.state.freeCodes,renderItem:function(n){var l=n.item;return t._renderAddhesionItem(l)}})):h.default.createElement(E.View,{style:{backgroundColor:'white',flex:1,justifyContent:'center',alignItems:'center'}},h.default.createElement(E.Text,null,v.default.t('NO_GEO_POINT_CODE')))}},{key:"_renderAddhesionItem",value:function(t){var n=this;return h.default.createElement(S.Card,{style:{flex:1,height:(0,C.responsiveHeight)(30),backgroundColor:"white",marginBottom:10}},h.default.createElement(S.CardContent,{style:{height:(0,C.responsiveHeight)(20),flex:1,justifyContent:'space-evenly'}},h.default.createElement(E.View,null,h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},v.default.t('NAME')," :")," ",t.lastname),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},v.default.t('PHONE_NUMBER')," :")," ",t.phone),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},v.default.t('EMAIL')," :")," ",t.email),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},v.default.t('NETWORK')," :")," ",t.network))),h.default.createElement(S.CardAction,{separator:!0,inColumn:!1},h.default.createElement(S.CardButton,{title:v.default.t('ACTIVE_USER'),onPress:function(){(0,p.acceptDemandAdhesion)(t).then(function(l){E.Alert.alert(v.default.t('ACTIVATE_ACCOUNT'),v.default.t('THE_ACCOUNT')+' '+t.lastname+" "+v.default.t('ACTIVATED'),[{text:"Ok"}]);var o=n.state.demands;o.splice(o.indexOf(t),1),n.setState({demands:o})})},color:"green"}),h.default.createElement(S.CardButton,{title:v.default.t('DELETE_GEOLOCATED_USER'),color:"red",onPress:function(){}})))}},{key:"_renderListCodeUnused",value:function(){var t=this;return this.state.freeCodes.length>0?h.default.createElement(E.View,{style:{backgroundColor:'#EEEEEE',flex:1}},h.default.createElement(E.FlatList,{data:this.state.freeCodes,renderItem:function(n){var l=n.item;return t._renderFreeCodeItem(l)}})):h.default.createElement(E.View,{style:{backgroundColor:'white',flex:1,justifyContent:'center',alignItems:'center'}},h.default.createElement(E.Text,null,v.default.t('NO_GEO_POINT_CODE')))}},{key:"_renderFreeCodeItem",value:function(t){return console.log(t),h.default.createElement(E.View,{style:{flex:1,height:(0,C.responsiveHeight)(30),backgroundColor:"white",marginBottom:10}},h.default.createElement(E.View,{style:{height:(0,C.responsiveHeight)(20),flex:1,justifyContent:'space-evenly'}},h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},"Contact :")," ",t.phone),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},"code Membre :")," ",t.code_membre),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},"code Validation :")," ",t.validation_code)))}}],[{key:"initState",value:function(){return{enabledListMembers:!0,listmembers:[],usersicon:null,isLoadingDemand:!0,charticon:null,isRefreshing:!1,user:{},freeCodes:[],isLoading:!0}}}]),n})(y.default);e.default=A,A.navigatorStyle={tabBarHidden:!1,topTabTextColor:'#ffffff',topTabsHeight:70,topTabTextFontFamily:'BioRhyme-Bold',selectedTopTabTextColor:'#ff505c',statusBarColor:x.theme.primaryDark,navBarBackgroundColor:x.theme.primary,navBarTextColor:'white',navBarButtonColor:'white',topTabIconColor:'#ffffff',selectedTopTabIconColor:'#ff505c',selectedTopTabIndicatorHeight:2*E.PixelRatio.get(),selectedTopTabIndicatorColor:'#ff505c'},A.navigationOptions=function(t){var n=t.navigation;return{title:v.default.t("GROUP_MANAGE"),drawerLabel:n.getParam("name",v.default.t('GROUP_MANAGE')),drawerIcon:function(t){t.tintColor;return h.default.createElement(_.default,{name:'people',size:24})}}};var R=E.StyleSheet.create({container:{flex:1,backgroundColor:'white'},fromNow:{color:x.theme.accentLight},callIcon:{marginRight:5},phone:{textAlign:'center',color:"white"},balanceMember:{marginLeft:7,fontSize:18,fontWeight:"bold",color:x.theme.primary},balanceIcon:{},name:{color:'black',fontSize:20,margin:20,fontWeight:'bold'},surname:{fontSize:17,marginLeft:20},text:{fontSize:17,fontWeight:'bold'},lottie:{width:248,height:248}})},1559,[4,1,8,10,12,11,9,13,15,18,815,527,1560,1001,711,827,1561,815,712,832,937,1008,1142,1143,1144,1145,1146,1147,1148,840,766,808,807,1134,1565]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.listAllMembers=void 0;var l=n(r(d[2])),o=(t(r(d[3])),r(d[4])),s=n(r(d[5])),c=r(d[6]);r(d[7]).DBEvents,r(d[8]);e.listAllMembers=function(){var t,n,u,p,b,f;return l.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,l.default.awrap((0,o.readUser)());case 2:if(null===(t=v.sent)){v.next=23;break}return n=s.default.currentLocale(),u={tag:"member",id:t.member_code,la:n,test:c.isDebugMode,codeparrain:t.code_membre,type:'all_geolocated'},v.next=8,l.default.awrap(fetch(c.memberActionUrl,{method:'POST',headers:{Accept:'application/json','Content-Type':'application/json'},body:JSON.stringify(u)}));case 8:return p=v.sent,b="",v.prev=10,v.next=13,l.default.awrap(p.text());case 13:return b=v.sent,v.abrupt("return",JSON.parse(b));case 17:return v.prev=17,v.t0=v.catch(10),console.log(v.t0),console.log("error when liste member",b),f={error:-3,content:v.t0,text:b},v.abrupt("return",f);case 23:return v.abrupt("return",null);case 24:case"end":return v.stop()}},null,null,[[10,17]],Promise)}},1560,[4,1,273,15,711,712,736,738,714]); -__d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,"__esModule",{value:!0});var t=Object.assign||function(t){for(var n=1;nt.props.sensitivity&&Math.abs(o.dy)<=t.props.sensitivity},onPanResponderGrant:this._handlePanResponderGrant,onPanResponderMove:this._handlePanResponderMove,onPanResponderRelease:this._handlePanResponderEnd,onPanResponderTerminate:this._handlePanResponderEnd,onShouldBlockNativeResponder:function(t,n){return!1},onPanResponderTerminationRequest:function(){return!1}})},componentWillReceiveProps:function(t){t.close&&this._close(),t.openRight&&this._openRight(),t.openLeft&&this._openLeft()},_handlePanResponderGrant:function(t,n){var o=this;this.props.disabled||(this.state.openedLeft||this.state.openedRight?this._callOnClose():this._callOnOpen(),this.refs.swipeoutContent.measure(function(t,n,s,h){var p=o.props.buttonWidth||s/5;o.setState({btnWidth:p,btnsLeftWidth:o.props.left?p*o.props.left.length:0,btnsRightWidth:o.props.right?p*o.props.right.length:0,swiping:!0,timeStart:(new Date).getTime()})}))},_handlePanResponderMove:function(t,n){if(!this.props.disabled){var o=n.dx,s=n.dy,h=this.state.btnsLeftWidth,p=this.state.btnsRightWidth;if(this.state.openedRight)o=n.dx-p;else if(this.state.openedLeft)o=n.dx+h;var l=Math.abs(o)>Math.abs(s);this.props.scroll&&(l?this.props.scroll(!1):this.props.scroll(!0)),this.state.swiping&&(o<0&&this.props.right?this.setState({contentPos:Math.min(o,0)}):o>0&&this.props.left&&this.setState({contentPos:Math.max(o,0)}))}},_handlePanResponderEnd:function(t,n){if(!this.props.disabled){var o=n.dx,s=this.state.contentPos,h=this.state.contentWidth,p=this.state.btnsLeftWidth,l=this.state.btnsRightWidth,u=.33*h,f=o>u||o>p/2,c=o<-u||o<-l/2;if(this.state.openedRight)c=o-u<-u;if(this.state.openedLeft)f=o+u>u;if((new Date).getTime()-this.state.timeStart<200)c=o<-u/10&&!this.state.openedLeft,f=o>u/10&&!this.state.openedRight;this.state.swiping&&(c&&s<0&&o<0?this._open(-l,'right'):f&&s>0&&o>0?this._open(p,'left'):this._close()),this.props.scroll&&this.props.scroll(!0)}},_tweenContent:function(t,o){this.tweenState(t,{easing:n.default.easingTypes.easeInOutQuad,duration:0===o?1.5*this.state.tweenDuration:this.state.tweenDuration,endValue:o})},_rubberBandEasing:function(t,n){return t<0&&t0&&t>n?n+Math.pow(t-n,.85):t},_autoClose:function(t){this.state.autoClose&&this._close();var n=t.onPress;n&&n()},_open:function(t,n){var o='left'===n,s=this.props,h=s.sectionID,p=s.rowID,l=s.onOpen;l&&l(h,p,n),this._tweenContent('contentPos',t),this.setState({contentPos:t,openedLeft:o,openedRight:!o,swiping:!1})},_close:function(){var t=this.props,n=t.sectionID,o=t.rowID,s=t.onClose;s&&(this.state.openedLeft||this.state.openedRight)&&s(n,o,this.state.openedRight?'right':'left');this._tweenContent('contentPos',0),this._callOnClose(),this.setState({openedRight:!1,openedLeft:!1,swiping:!1})},_callOnClose:function(){this.props.onClose&&this.props.onClose(this.props.sectionID,this.props.rowID)},_callOnOpen:function(){this.props.onOpen&&this.props.onOpen(this.props.sectionID,this.props.rowID)},_openRight:function(){var t=this;this.refs.swipeoutContent.measure(function(n,o,s,h){var p=t.props.buttonWidth||s/5;t.setState({btnWidth:p,btnsRightWidth:t.props.right?p*t.props.right.length:0},function(){t._tweenContent('contentPos',-t.state.btnsRightWidth),t._callOnOpen(),t.setState({contentPos:-t.state.btnsRightWidth,openedLeft:!1,openedRight:!0,swiping:!1})})})},_openLeft:function(){var t=this;this.refs.swipeoutContent.measure(function(n,o,s,h){var p=t.props.buttonWidth||s/5;t.setState({btnWidth:p,btnsLeftWidth:t.props.left?p*t.props.left.length:0},function(){t._tweenContent('contentPos',t.state.btnsLeftWidth),t._callOnOpen(),t.setState({contentPos:t.state.btnsLeftWidth,openedLeft:!0,openedRight:!1,swiping:!1})})})},render:function(){var n=this.state.contentWidth,o=this.getTweeningValue('contentPos'),p=[s.default.swipeout,this.props.style];this.props.backgroundColor&&p.push([{backgroundColor:this.props.backgroundColor}]);var l=-this.state.btnsRightWidth;if(o>0)l=this.state.btnsLeftWidth;var f={left:{left:0,overflow:'hidden',width:Math.min(l*(o/l),l)}},c={right:{left:Math.abs(n+Math.max(l,o)),right:0}},b={content:{transform:[{translateX:this._rubberBandEasing(o,l)}]}},w=[s.default.swipeoutContent];w.push(b.content);var y=[s.default.swipeoutBtns];y.push(c.right);var _=[s.default.swipeoutBtns];_.push(f.left);var R=o<0,v=o>0;return h.default.createElement(u.View,{style:p},h.default.createElement(u.View,t({ref:'swipeoutContent',style:w,onLayout:this._onLayout},this._panResponder.panHandlers),this.props.children),this._renderButtons(this.props.right,R,y),this._renderButtons(this.props.left,v,_))},_onLayout:function(t){var n=t.nativeEvent.layout,o=n.width,s=n.height;this.setState({contentWidth:o,contentHeight:s})},_renderButtons:function(t,n,o){return t&&n?h.default.createElement(u.View,{style:o},t.map(this._renderButton)):h.default.createElement(u.View,null)},_renderButton:function(t,n){var o=this;return h.default.createElement(c,{backgroundColor:t.backgroundColor,color:t.color,component:t.component,disabled:t.disabled,height:this.state.contentHeight,key:n,onPress:function(){return o._autoClose(t)},text:t.text,type:t.type,underlayColor:t.underlayColor,width:this.state.btnWidth})}});b.NativeButton=o.default,b.SwipeoutButton=c,e.default=b},1561,[1562,1563,1564,15,68,212,18]); -__d(function(g,r,i,a,m,e,d){var n,t;n=this,t=function(){return(function(n){function t(o){if(u[o])return u[o].exports;var c=u[o]={exports:{},id:o,loaded:!1};return n[o].call(c.exports,c,c.exports,t),c.loaded=!0,c.exports}var u={};return t.m=n,t.c=u,t.p="",t(0)})({0:function(n,t,u){n.exports=u(90)},1:function(n,t){function u(){v=!1,f.length?h=f.concat(h):p=-1,h.length&&o()}function o(){if(!v){var n=setTimeout(u);v=!0;for(var t=h.length;t;){for(f=h,h=[];++p1)for(var u=1;uv.duration?v.duration:Math.max(0,s-h);u+=(0===v.duration?v.endValue:v.easing(p,v.beginValue,v.endValue,v.duration))-v.endValue}}return u},_rafCb:function(){var n=this.state;if(0!==n.tweenQueue.length){for(var t=Date.now(),u=[],o=0;on?c*Math.pow(2,10*(n-=1))*Math.sin((n*o-f)*(2*Math.PI)/s)*-.5+t:c*Math.pow(2,-10*(n-=1))*Math.sin((n*o-f)*(2*Math.PI)/s)*.5+l+t)},easeInBack:function(n,t,u,o,c){return void 0===c&&(c=1.70158),(u-t)*(n/=o)*n*((c+1)*n-c)+t},easeOutBack:function(n,t,u,o,c){return void 0===c&&(c=1.70158),(u-t)*((n=n/o-1)*n*((c+1)*n+c)+1)+t},easeInOutBack:function(n,t,u,o,c){var s=u-t;return void 0===c&&(c=1.70158),(n/=o/2)<1?s/2*(n*n*((1+(c*=1.525))*n-c))+t:s/2*((n-=2)*n*((1+(c*=1.525))*n+c)+2)+t},easeInBounce:function(n,t,o,c){var s=o-t;return s-u.easeOutBounce(c-n,0,s,c)+t},easeOutBounce:function(n,t,u,o){var c=u-t;return(n/=o)<.36363636363636365?c*(7.5625*n*n)+t:.7272727272727273>n?c*(7.5625*(n-=.5454545454545454)*n+.75)+t:.9090909090909091>n?c*(7.5625*(n-=.8181818181818182)*n+.9375)+t:c*(7.5625*(n-=.9545454545454546)*n+.984375)+t},easeInOutBounce:function(n,t,o,c){var s=o-t;return c/2>n?.5*u.easeInBounce(2*n,0,s,c)+t:.5*u.easeOutBounce(2*n-c,0,s,c)+.5*s+t}};n.exports=u}})},"object"==typeof e&&"object"==typeof m?m.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof e?e.tweenState=t():n.tweenState=t()},1562,[]); -__d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(t){for(var s=1;s1e6)&&(n=!1),this.setState({visibleError:!n}),n){this.setState({isSending:!0});var l="",o="";(0,T.sendDemandeSpecificque)(this.state.montant,this.state.user.phoneTransaction,this.state.user.code_membre).then(function(n){void 0!==n.success&&1===n.success?(l=D.default.t('DEMAND_SEND'),o=D.default.t('DEMAND_SEND_SUCCESFUL')):(l="Erreur survenu lors de l'envoie ",o="Une erreur est survenu lors de l'envoie de la demande"),p.Alert.alert(l,o,[{text:'Ok',onPress:function(){t.setState({montant:""})}}]),setTimeout(function(){t.setState({isSending:!1})},800)}).catch(function(t){l="Erreur survenu lors de l'envoie ",o="Une erreur est survenu lors de l'envoie de la demande",p.Alert.alert(l,o,[{text:'Ok'}])})}else this.montantView.shake(800),setTimeout(function(){t.setState({visibleError:!1})},3e3)}},{key:"render",value:function(){var t=this.state.user;return h.default.createElement(p.View,{style:{flex:1,alignItems:'center',backgroundColor:"lightgrey",paddingTop:(0,v.responsiveHeight)(10)}},h.default.createElement(p.StatusBar,{translucent:!1}),t?"geolocated"===t.category?this.multiNetwork():this.simpleAgent():h.default.createElement(p.ProgressBarAndroid,null))}},{key:"simpleAgent",value:function(){var t=this;return h.default.createElement(p.View,{style:{height:200}},h.default.createElement(A.Card,{style:{width:(0,v.responsiveWidth)(96),paddingTop:20}},h.default.createElement(A.CardContent,null,h.default.createElement(p.View,null,h.default.createElement(w.View,{ref:this.handleMontantRef},h.default.createElement(x.TextInput,{label:D.default.t('AMOUNT'),keyboardType:"numeric",style:I.selfitem,ref:function(n){t.refInp=n},mode:"outlined",inputStyle:I.style,onChangeText:function(n){try{var l=parseInt(n);t.setState({montant:l,isDisabled:isNaN(l)})}catch(t){}},value:this.state.montant}),h.default.createElement(x.HelperText,{type:"error",visible:this.state.visibleError},D.default.t('INVALID_MONTANT'))))),h.default.createElement(A.CardAction,{separator:!0,inColumn:!1},h.default.createElement(A.CardButton,{onPress:function(){t.onUserCancel()},title:D.default.t('CANCEL'),color:"crimson"}),h.default.createElement(A.CardButton,{onPress:function(){t.onUserSend()},title:D.default.t('SEND'),color:"steelblue"}))))}},{key:"multiNetwork",value:function(){var t=this;return h.default.createElement(p.View,{style:{height:250,justifyContent:'center'}},h.default.createElement(A.Card,{style:{width:(0,v.responsiveWidth)(96),justifyContent:'center'}},h.default.createElement(A.CardContent,null,h.default.createElement(p.View,{style:{flex:1}},h.default.createElement(p.View,{style:{flexDirection:'row'}},h.default.createElement(p.Picker,{selectedValue:this.state.currentNetwork,prompt:D.default.t("SELECT_NETWORK"),style:{height:50,flex:1,marginLeft:20},itemStyle:U.subtitle,onValueChange:function(n,l){return t.setState({currentNetwork:n})}},this.state.networks.map(function(t,n){return h.default.createElement(p.Picker.Item,{label:t.nt?D.default.t("SELECT_NETWORK"):D.default.t("FOR_NUMB")+t.phone+" ("+t.name+")",value:t})}))),h.default.createElement(w.View,{ref:this.handleMontantRef},h.default.createElement(x.TextInput,{label:D.default.t('AMOUNT'),keyboardType:"numeric",style:I.selfitem,ref:function(n){t.refInp=n},mode:"outlined",inputStyle:I.style,onChangeText:function(n){try{var l=parseInt(n);t.setState({montant:l,isDisabled:isNaN(l)})}catch(t){}},value:this.state.montant}),h.default.createElement(x.HelperText,{type:"error",visible:this.state.visibleError},D.default.t('INVALID_MONTANT'))))),h.default.createElement(A.CardAction,{separator:!0,inColumn:!1},h.default.createElement(A.CardButton,{onPress:function(){t.onUserCancel()},title:D.default.t('CANCEL'),color:"crimson"}),h.default.createElement(A.CardButton,{onPress:function(){var n=t.state,l=n.currentNetwork,o=n.montant;void 0!==l&&void 0===l.nt&&t.onNetworkSend(l.phone,l.code_membre,o)},title:D.default.t('SEND'),color:"steelblue"}))))}},{key:"renderSingleNetwork",value:function(t){var n=this,l=t.item;console.log(t);var o=null,s=null,u=0;return h.default.createElement(p.View,{style:U.container2},h.default.createElement(E.default,{style:U.cardInput2},h.default.createElement(p.View,null,h.default.createElement(p.Text,{style:U.title},D.default.t('ASK_CREDIT')),h.default.createElement(p.Text,{style:U.subtitle},D.default.t("FOR_NUMB")," ",l.phone," (",l.name,")"),h.default.createElement(w.View,{ref:this.handleMontantRef},h.default.createElement(S.Sae,{label:D.default.t('AMOUNT'),iconClass:y.default,iconName:'dollar',iconColor:C.primary,ref:function(t){o=t,n.setState({refIn:o})},inputStyle:I.style,value:this.state.montant,keyboardType:"numeric",onChangeText:function(t){if(t.length>0)try{u=parseFloat(t),n.setStat({montant:u}),s&&(s.setState({isDisabled:u>0}),s.isDisabled=u>0)}catch(t){}},style:I.selfitem,labelStyle:I.label,autoCapitalize:'none',autoCorrect:!1}))),h.default.createElement(p.View,{style:U.btnContainer},h.default.createElement(b.default,{style:U.button_1,textStyle:U.button_1_text,onPress:function(){return n.onUserCancel()}},D.default.t('CANCEL')),h.default.createElement(b.default,{ref:function(t){s=t},style:U.button_2,textStyle:U.button_2_text,onPress:function(){n.onNetworkSend(l.phone,l.code_membre,o.state.value,o,s)}},D.default.t('SEND')))))}},{key:"onNetworkSend",value:function(t,n,l){var o=this,s=!0,u=parseFloat(l);(null===u||!(0,N.isNumber)(u)||u>1e6)&&(s=!1),this.setState({visibleError:!s}),s?(0,T.sendDemandeSpecificque)(u,t,n).then(function(t){var n="",l="";void 0!==t.success&&1===t.success?(n=D.default.t("DEMAND_SEND"),l=D.default.t('DEMAND_SEND_SUCCESFUL')):(n="Erreur survenu lors de l'envoie ",l="Une erreur est survenu lors de l'envoie de la demande"),p.Alert.alert(n,l,[{text:"Ok",onPress:function(){o.setState({montant:""})}}])}):(this.montantView.shake(800),setTimeout(function(){o.setState({visibleError:!1})},3e3))}},{key:"updateState",value:function(){var t,n,o;return l.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,l.default.awrap((0,k.readUser)());case 2:if("geolocated"!==(t=s.sent).category){s.next=9;break}return s.next=6,l.default.awrap((0,_.getAgentNetworksList)(t.agentId));case 6:n=s.sent,console.log(n),1===n.success&&(o=[this.state.currentNetwork],n.networks.forEach(function(t){o.push(t)}),this.setState({networks:o}));case 9:this.setState({user:t});case 10:case"end":return s.stop()}},null,this,null,Promise)}}]),n})(h.Component));e.default=V,V.navigatorStyle={navBarHidden:!0},V.navigationOptions={drawerLabel:function(){return null},headerTitle:D.default.t('ASK_CREDIT'),title:D.default.t('ASK_CREDIT')};var I=p.StyleSheet.create({selfitem:{width:(0,v.responsiveWidth)(70),alignSelf:'center',marginBottom:20},label:{color:C.primary},style:{color:'black'}}),U=p.StyleSheet.create({title:{backgroundColor:C.primary,color:'white',paddingLeft:20,paddingTop:10,fontWeight:'bold',fontSize:(0,v.responsiveFontSize)(3),height:(0,v.responsiveHeight)(10)},subtitle:{color:'black',paddingLeft:20,paddingTop:10,marginBottom:(0,v.responsiveHeight)(3),fontWeight:'bold',fontSize:(0,v.responsiveFontSize)(2)},container:{flex:1,backgroundColor:'#EEE',justifyContent:'space-between'},container2:{flex:1,height:(0,v.responsiveHeight)(20),backgroundColor:'#EEE'},btnContainer:{flexDirection:'row',paddingRight:5,paddingLeft:5,paddingTop:5,marginBottom:-2.5},button_1:{flex:1,borderColor:'transparent'},button_2:{flex:1,borderColor:'transparent',backgroundColor:C.primary,borderRadius:0},button_1_text:{color:C.primary,fontWeight:'bold'},button_2_text:{color:'white',fontWeight:'bold'},cardInput:{marginLeft:10,marginRight:10,marginTop:(0,v.responsiveHeight)(5),width:(0,v.responsiveWidth)(98),alignSelf:'center',justifyContent:'space-between',height:(0,v.responsiveHeight)(40)},cardInput2:{marginLeft:10,marginRight:10,marginTop:(0,v.responsiveHeight)(1),width:(0,v.responsiveWidth)(98),height:(0,v.responsiveHeight)(50),alignSelf:'center',justifyContent:'space-between'}})},1566,[4,1,273,8,9,10,12,13,15,18,524,950,527,528,696,531,709,806,743,719,711,1149,1149,1001,1029,712,1008,807]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),l=n(r(d[3])),u=n(r(d[4])),s=n(r(d[5])),c=n(r(d[6])),f=n(r(d[7])),h=n(r(d[8])),p=t(r(d[9])),v=r(d[10]),b=r(d[11]),y=(t(r(d[12])),n(r(d[13]))),S=n(r(d[14])),C=r(d[15]),k=r(d[16]),w=(t(r(d[17])),n(r(d[18]))),x=r(d[19]),E=r(d[20]);r(d[21]);r(d[22]);var T=(function(t){function n(t){var o;return(0,l.default)(this,n),(o=(0,u.default)(this,(0,s.default)(n).call(this,t))).state=o.generateState(),x.IlinkEmitter.on("langueChange",o.updateLangue.bind((0,c.default)(o))),o}return(0,h.default)(n,t),(0,f.default)(n,[{key:"updateLangue",value:function(){this.props.navigation.setParams({name:y.default.t('CHANGE_INFORMATION')}),this.forceUpdate()}}],[{key:"options",value:function(t){return{topBar:{title:{text:""},backButton:{visible:!0,color:"white"},buttonsRight:[],buttonColor:"white",background:{color:E.primaryDark}}}}}]),(0,f.default)(n,[{key:"generateState",value:function(){return{isLoading:!1,notifi:!1}}},{key:"render",value:function(){var t=this;return p.default.createElement(v.View,{style:A.container},p.default.createElement(v.StatusBar,{backgroundColor:"#00000030",barStyle:"light-content",translucent:!0}),p.default.createElement(v.ScrollView,{style:{flex:1,paddingTop:30}},p.default.createElement(v.View,{style:A.appContainer},p.default.createElement(v.Image,{source:r(d[23]),style:{width:(0,k.responsiveWidth)(90),resizeMode:"contain"}})),p.default.createElement(v.Text,{style:A.title},y.default.t('ADD_NETWORK')),p.default.createElement(b.Fumi,{iconClass:S.default,iconName:"code",labelStyle:A.labelInput,inputStyle:{color:'black'},value:this.state.validateCode,label:y.default.t('SPONSOR_CODE'),onChangeText:function(n){return t.setState({validateCode:n})},style:A.input}),p.default.createElement(b.Fumi,{label:y.default.t('PHONE'),iconClass:S.default,iconName:'phone',iconColor:'white',style:A.input,autoCapitalize:'none',keyboardType:"phone-pad",autoCorrect:!1,value:this.state.enterPhone,inputStyle:{color:'black'},ref:function(n){t.numberRef=n},onChangeText:function(n){return t.setState({enterPhone:n})},labelStyle:A.labelInput}),p.default.createElement(w.default,{style:A.btnStyle,textStyle:A.btnTextStyle,isLoading:this.state.isLoading,onPress:function(){return t.validateNetwork()}},y.default.t('VALIDATE'))))}},{key:"validateNetwork",value:function(){var t,n,l,u,s=this;return o.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:if(t=this.state,n=t.validateCode,t.isLoading,l=t.enterPhone,void 0===n||null===n||null===l){c.next=8;break}return this.setState({isLoading:!0}),c.next=5,o.default.awrap((0,C.AssignAgentGeo)(n,l));case 5:u=c.sent,this.setState({isLoading:!1}),u&&(void 0!==u.success?v.Alert.alert(y.default.t('ADD_SUCCES'),y.default.t('ADD_SUCCESS_TEXT'),[{text:'OK',onPress:function(){s.setState({validateCode:"",enterPhone:""})}}]):u.error?(u.error,v.Alert.alert("Une erreur est survenu",u.error_msg,[{text:"Ok",onPress:function(){}}])):u.error&&(u.error,v.Alert.alert("Une erreur est survenu","Verifier que les champs sont bien rempli",[{text:"Ok",onPress:function(){}}])));case 8:case"end":return c.stop()}},null,this,null,Promise)}}]),n})(p.Component);e.default=T,T.navigatorStyle={navBarBackgroundColor:E.primaryDark,navBarTextColor:'white',navBarButtonColor:'white',drawUnderStatusBar:!1,statusBarColor:E.primaryDarkAdvanced,statusBarTextColorScheme:'light'},T.navigationOptions=function(t){return{drawerLabel:t.navigation.getParam("name",y.default.t('ADD_NETWORK')),drawerIcon:function(t){t.tintColor;return p.default.createElement(S.default,{name:'user',size:24})}}};var A=v.StyleSheet.create({btnHelpText:{color:'white',fontWeight:'bold'},btnHelp:{width:(0,k.responsiveWidth)(10),marginTop:(0,k.responsiveHeight)(10),alignSelf:'flex-end',marginRight:20,borderColor:'transparent',backgroundColor:E.primaryDark},btnTextStyle:{color:"white",fontWeight:'bold'},btnStyle:{alignSelf:'center',width:(0,k.responsiveWidth)(95),marginTop:20,borderColor:'transparent',backgroundColor:E.primaryDarkAdvanced,height:(0,k.responsiveHeight)(8)},appContainer:{flexDirection:'row',justifyContent:'center',alignItems:'center'},container:{alignItems:'center',justifyContent:'center',alignSelf:'center',flex:1,width:(0,k.responsiveWidth)(100),height:(0,k.responsiveHeight)(100),backgroundColor:E.primary},input:{height:(0,k.responsiveHeight)(10),width:(0,k.responsiveWidth)(90),borderRadius:10,marginTop:20,color:"black"},logo:{width:128,height:128},nameApp:{fontSize:27,fontWeight:'bold',color:'white'},title:{fontSize:22,fontWeight:'bold',margin:10,color:'white'},subtitle:{fontSize:20,margin:10,color:'white'}})},1567,[4,1,273,8,10,12,11,9,13,15,18,696,743,712,1002,711,527,950,709,766,806,808,807,814]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),s=n(r(d[4])),u=n(r(d[5])),c=n(r(d[6])),f=t(r(d[7])),h=r(d[8]),y=n(r(d[9])),S=n(r(d[10])),p=r(d[11]),E=r(d[12]),v=(r(d[13]),r(d[14])),b=(n(r(d[15])),n(r(d[16])),n(r(d[17]))),D=r(d[18]),T=n(r(d[19]));r(d[20]),r(d[21]);n(r(d[22]));var k=r(d[23]),L=r(d[24]),_=n(r(d[25])),C=(r(d[26]),r(d[27]),r(d[28]),n(r(d[29]))),x=r(d[30]),M=r(d[13]),I=r(d[23]);r(d[31]);var w=(function(t){function n(t){var o;return(0,l.default)(this,n),(o=(0,s.default)(this,(0,u.default)(n).call(this,t,!0)))._populateIcons=function(){return new Promise(function(t,n){Promise.all([S.default.getImageSource('sort',30),S.default.getImageSource('layer-group',30)]).then(function(n){n[0],n[1],t(!0)}).catch(function(t){console.log(t),n(t)}).done()})},o._openMenu=function(){return o.setState({visibleMenu:!0})},o._closeMenu=function(){return o.setState({visibleMenu:!1})},o._showDateTimePicker=function(t){1===t?o.setState({isDateTimePickerVisible:!0}):o.setState({isDateEndTimePickerVisible:!0})},o._showDateEndPicker=function(){return o.setState({isDateEndTimePickerVisible:!0})},o._hideDateTimePicker=function(){return o.setState({isDateTimePickerVisible:!1,isDateEndTimePickerVisible:!1})},o.state=o.initState(),(0,D.readUser)().then(function(t){o.setState({user:t})}),o._populateIcons().then(function(){}),o.navigation=o.props.navigation,o}return(0,c.default)(n,t),(0,o.default)(n,[{key:"navigationButtonPressed",value:function(t){var n=t.buttonId;'id'===n?this.showFilter():'sectionned'===n&&this.setState({isSectionned:!this.state.isSectionned})}},{key:"showFilter",value:function(){}},{key:"initState",value:function(){return{user:{},listdata:[],listdataSend:[],conserve:[],count:0,translateAnim:new h.Animated.Value(0),visibleMenu:!1,appState:h.AppState.currentState,filter:!1,sortIcons:null,panelVisible:!1,filder_disable:!0,datestartformated:'La date de debut',dateendformated:'La date de fin',datestart:null,dateend:null,isLoaded:!1,isSectionned:!1,isDateTimePickerVisible:!1,isDateEndTimePickerVisible:!1}}},{key:"updateList",value:function(t){if(!this.state.filter){var n=t.reverse();this.setState({listdata:n,conserve:n,isLoaded:!0})}}},{key:"updateMyList",value:function(t){if(!this.state.filter){var n=t.reverse();this.setState({listdataSend:n,conserve:n,isLoaded:!0})}}},{key:"componentDidMount",value:function(){var t=this,n=this.navigation.state.routeName;this.setState({position:"myDemand"===n?0:1}),this.refreshData(),this.animateSlidingUp(!1),this.props.navigation.addListener("didFocus",function(){t.refreshData(!1),console.warn("loading")})}},{key:"componentWillUnmount",value:function(){clearInterval(this.intervaller)}},{key:"renderList",value:function(t){var n=this;if(this.state.isLoaded&&t instanceof Array){var l=t;return null!==l?l.length>0?f.default.createElement(E.HistoryListItem,{list:t,refreshing:function(){n.refreshData()},isRefreshing:this.state.isRefreshing,navigator:this.props.navigation,style:P.listbackground}):this.state.filter?f.default.createElement(h.View,{style:P.emptyListe},f.default.createElement(h.Text,null,_.default.t('NO_ITEM_REQUEST'))):0===l.length?f.default.createElement(h.View,{style:P.emptyListe},f.default.createElement(h.Text,null,_.default.t('NO_ITEM_REQUEST'))):f.default.createElement(h.View,{style:P.emptyListe},f.default.createElement(h.ProgressBarAndroid,null),f.default.createElement(h.Text,null,_.default.t('LOADING_DOTS'))):f.default.createElement(h.View,{style:P.emptyListe},f.default.createElement(h.Text,null,_.default.t('EMPTY_LIST_REQUEST')," "))}if(0===t.length)return f.default.createElement(h.View,{style:P.emptyListe},f.default.createElement(h.Text,null,_.default.t('NO_ITEM_REQUEST')))}},{key:"renderOptionsMenu",value:function(){var t=this;return f.default.createElement(h.View,{style:{position:"absolute",zIndex:100,paddingTop:50,right:10,flexDirection:'row',visible:this.state.visibleMenu,justifyContent:'center'}},f.default.createElement(x.Menu,{visible:this.state.visibleMenu,onDismiss:this._closeMenu,anchor:f.default.createElement(b.default,{onPress:this._openMenu},"Show menu")},f.default.createElement(x.Menu.Item,{onPress:function(){t.setState({isSectionned:!t.state.isSectionned}),t._closeMenu()},title:"Section"}),f.default.createElement(x.Divider,null),f.default.createElement(x.Menu.Item,{onPress:function(){t.animateSlidingUp(!t.state.isSliding),t._closeMenu()},title:_.default.t("FILTER_DATE")})))}},{key:"animateSlidingUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=(0,p.responsiveHeight)(100),l=t?n:0,o=t?0:n;this.setState({isSliding:t}),this.state.translateAnim.setValue(l),h.Animated.timing(this.state.translateAnim,{toValue:o,duration:500,useNativeDriver:!0}).start()}},{key:"render",value:function(){var t=this;return f.default.createElement(x.Provider,null,f.default.createElement(h.View,{style:{flex:1}},f.default.createElement(h.StatusBar,{backgroundColor:I.primaryDark,barStyle:"light-content",translucent:!1}),this.renderSliding(),f.default.createElement(x.Appbar.Header,{dark:!0,style:{backgroundColor:I.primary}},f.default.createElement(x.Appbar.BackAction,{onPress:function(){t.props.navigation.pop()}}),f.default.createElement(x.Appbar.Content,{title:_.default.t('CREDIT_MANAGE'),subtitle:0===this.state.position?_.default.t('MY_DEMAND'):_.default.t('DEMAND_RECEIVE')}),f.default.createElement(x.Appbar.Action,{icon:"refresh",onPress:function(){t.refreshData()}}),f.default.createElement(x.Appbar.Action,{icon:"more-vert",onPress:function(){t._openMenu(),t.renderSliding()}})),this.renderOptionsMenu(),0===this.state.position?this._renderListDemandsSend():this._renderListDemandReceive()))}},{key:"renderSliding",value:function(){return f.default.createElement(h.Animated.View,{style:[P.slidingup,{translateY:this.state.translateAnim}]},f.default.createElement(T.default,{onChange:function(t){return console.log(t)},minDate:"2018-04-20",startDate:"2018-04-30",endDate:"2018-05-05",theme:{activeDayColor:{},monthTitleTextStyle:{color:'#6d95da',fontWeight:'300',fontSize:16},emptyMonthContainerStyle:{},emptyMonthTextStyle:{fontWeight:'200'},weekColumnsContainerStyle:{},weekColumnStyle:{paddingVertical:10},weekColumnTextStyle:{color:'#b6c1cd',fontSize:13},nonTouchableDayContainerStyle:{},nonTouchableDayTextStyle:{},startDateContainerStyle:{},endDateContainerStyle:{},dayContainerStyle:{},dayTextStyle:{color:'#2d4150',fontWeight:'200',fontSize:15},dayOutOfRangeContainerStyle:{},dayOutOfRangeTextStyle:{},todayContainerStyle:{},todayTextStyle:{color:'#6d95da'},activeDayContainerStyle:{backgroundColor:'#6d95da'},activeDayTextStyle:{color:'white'},nonTouchableLastMonthDayTextStyle:{}},style:{height:(0,p.responsiveHeight)(60)}}),f.default.createElement(h.View,{style:{flexDirection:'row'}},f.default.createElement(b.default,null,_.default.t('QUIT')),f.default.createElement(b.default,null,_.default.t('FILTER'))))}},{key:"renderSectionnedList",value:function(t){if(this.state.isLoaded){return null!==t?t.length>0?f.default.createElement(E.HistoryItemSectionned,{list:t,navigator:this.props.navigator,style:P.listbackground}):this.state.filter?f.default.createElement(h.View,{style:P.emptyListe},f.default.createElement(h.Text,null,_.default.t('NO_ITEMS_REQUEST'))):f.default.createElement(h.View,{style:P.emptyListe},f.default.createElement(h.ProgressBarAndroid,null),f.default.createElement(h.Text,null,_.default.t('LOADING_DOTS'))):f.default.createElement(h.View,{style:P.emptyListe},f.default.createElement(h.Text,null,_.default.t('EMPTY_LIST_REQUEST')))}}},{key:"renderLoading",value:function(){return f.default.createElement(h.View,null,f.default.createElement(h.ProgressBarAndroid,null),f.default.createElement(h.Text,null,_.default.t('LOADING_DOTS')))}},{key:"showSlidingUpPanel",value:function(){}},{key:"printOptions",value:function(){var t=this;return"hyper"===this.state.user.category?f.default.createElement(y.default,{buttonColor:k.accent},f.default.createElement(y.default.Item,{buttonColor:k.purpleLight,title:_.default.t('SAVE_HISTORY'),onPress:function(){}},f.default.createElement(S.default,{name:"save",style:P.actionButtonIcon}))):f.default.createElement(y.default,{buttonColor:k.accent},f.default.createElement(y.default.Item,{buttonColor:k.primary,title:_.default.t('MAKE_REQUEST'),onPress:function(){t.props.navigation.navigate(M.credrequester)}},f.default.createElement(S.default,{name:"edit",style:P.actionButtonIcon})),f.default.createElement(y.default.Item,{buttonColor:k.purpleLight,title:_.default.t('SAVE_HISTORY'),onPress:function(){}},f.default.createElement(S.default,{name:"save",style:P.actionButtonIcon})))}},{key:"_renderListDemandsSend",value:function(){return f.default.createElement(h.View,{style:P.container},this.state.isLoaded?this.state.isSectionned?this.renderSectionnedList(this.state.listdataSend):this.renderList(this.state.listdataSend):this.renderLoading(),this.printOptions(),this.showSlidingUpPanel())}},{key:"_renderListDemandReceive",value:function(){return f.default.createElement(h.View,{style:P.container},this.state.isLoaded?this.state.isSectionned?this.renderSectionnedList(this.state.listdata):this.renderList(this.state.listdata):this.renderLoading(),this.printOptions(),this.showSlidingUpPanel())}},{key:"_renderTabGeolocated",value:function(){var t=[{text:_.default.t('DEMAND_SEND')}];return f.default.createElement(L.PagerTabIndicator,{style:{height:(0,p.responsiveHeight)(8)},tabs:t})}},{key:"_renderTabHyper",value:function(){var t=[{text:_.default.t('DEMAND_RECEIVE')}];return f.default.createElement(L.PagerTabIndicator,{style:{height:(0,p.responsiveHeight)(8)},tabs:t})}},{key:"_renderTabs",value:function(){var t=[{text:_.default.t('MY_DEMAND'),iconSource:this.state.usersicon},{text:_.default.t('DEMAND_RECEIVE'),iconSource:this.state.charticon}];return f.default.createElement(L.PagerTabIndicator,{style:{height:(0,p.responsiveHeight)(8)},tabs:t})}},{key:"refreshData",value:function(){var t=this;(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&this.setState({isRefreshing:!0}),(0,v.loadDemandeCredit)().then(function(n){void 0!==n.success&&(t.setState({listdata:[]}),t.updateList(n.demands),0!==t.state.position&&t.props.navigation.setParams({count:n.demands.length}),t.setState({isRefreshing:!1}))}).catch(function(t){console.warn(t)}),(0,v.loadMyDemandeCredit)().then(function(n){void 0!==n.success&&(t.setState({listdataSend:[]}),t.setState({isRefreshing:!1}),0===t.state.position&&t.props.navigation.setParams({count:n.demands.length}),t.updateMyList(n.demands))}).catch(function(t){console.warn(t)})}}]),n})(f.default.Component);w.navigatorStyle={navBarBackgroundColor:k.primary,statusBarColor:k.primaryDark,navBarTextColor:'#FFFFFF',navBarButtonColor:'#FFFFFF',contextualMenuStatusBarColor:I.accent,contextualMenuBackgroundColor:I.accentLight,contextualMenuButtonsColor:'#ffffff'},w.navigationOptions=function(t){var n=t.navigation,l=n.state.routeName;return{tabBarLabel:"myDemand"===l?_.default.t('MY_DEMAND'):_.default.t('DEMAND_RECEIVE'),tabBarIcon:function(t){var o=t.focused,s=(t.horizontal,t.tintColor);return f.default.createElement(C.default,{badgeCount:n.getParam("count",0),size:20,name:"myDemand"===l?"mail":"inbox",color:o?s:"grey"})},drawerLabel:_.default.t('CREDIT_MANAGE'),drawerIcon:function(t){t.tintColor;return f.default.createElement(S.default,{name:'credit-card',size:24})}}};var A=w;e.default=A;h.StyleSheet.create({titleHeader:{fontSize:20,fontWeight:'bold',color:'black',flex:1},datetitle:{fontSize:17,color:'black',marginLeft:(0,p.responsiveWidth)(2)},datetext:{fontSize:16,marginLeft:(0,p.responsiveWidth)(5)},content:{flex:2},btnContainer:{flexDirection:'row',width:(0,p.responsiveWidth)(100),alignSelf:'flex-end',flex:2},btn:{flex:1,borderColor:'transparent',borderRadius:0},btntext:{fontWeight:'bold',color:k.accent},container:{flex:1,justifyContent:'space-evenly'}});var P=h.StyleSheet.create({slidingup:{position:"absolute",height:(0,p.responsiveHeight)(84),bottom:0,backgroundColor:'white',width:(0,p.responsiveWidth)(100),zIndex:1e3},root:{flex:1},container:{flex:1,backgroundColor:'white',justifyContent:'center',alignItems:'center'},emptylist:{flex:1,justifyContent:'center',alignItems:'center'},backgroundd_drawer:{backgroundColor:'#000'},listbackground:{},actionButtonIcon:{fontSize:20,height:22,color:'white'},welcome:{fontSize:20,textAlign:'center',margin:10},instructions:{textAlign:'center',color:'#333333',marginBottom:5},dateText:{marginTop:20,marginLeft:(0,p.responsiveWidth)(13),marginBottom:20,fontSize:17},titlecontent:{fontSize:17,marginLeft:(0,p.responsiveWidth)(10),color:'black'},content:{flex:8},title:{fontSize:20,marginLeft:20,marginTop:20,color:'black',fontWeight:'bold'}})},1568,[4,1,8,9,10,12,13,15,18,524,827,527,1140,807,1149,1002,815,709,711,1023,1024,1142,1134,806,937,712,768,840,405,1569,1029,808]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),u=n(r(d[4])),f=n(r(d[5])),s=n(r(d[6])),c=t(r(d[7])),h=r(d[8]),p=n(r(d[9])),y=(function(t){function n(){return(0,l.default)(this,n),(0,u.default)(this,(0,f.default)(n).apply(this,arguments))}return(0,s.default)(n,t),(0,o.default)(n,[{key:"render",value:function(){var t=this.props,n=t.name,l=t.badgeCount,o=t.color,u=t.size;return c.default.createElement(h.View,{style:{width:3*u/2,height:3*u/2,margin:5}},c.default.createElement(p.default,{name:n,size:u,color:o}),l>0&&c.default.createElement(h.View,{style:{position:'absolute',right:-6,top:-3,backgroundColor:'red',borderRadius:4*u/5,width:3*u/5,height:3*u/5,justifyContent:'center',alignItems:'center'}},c.default.createElement(h.Text,{style:{color:'white',fontSize:10,fontWeight:'bold'}},l)))}}]),n})(c.default.Component);e.default=y},1569,[4,1,8,9,10,12,13,15,18,827]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),l=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(r(d[2])),u=l(r(d[3])),o=l(r(d[4])),f=l(r(d[5])),s=l(r(d[6])),v=t(r(d[7])),c=r(d[8]),h=l(r(d[9])),b=l(r(d[10])),p=(r(d[11]),r(d[12]),r(d[13])),k=(function(t){function l(t){var u;return(0,n.default)(this,l),(u=(0,o.default)(this,(0,f.default)(l).call(this,t))).state={valuePosition:0},u.mounted=!1,u.filterOptions=[{value:5,label:"5 km"},{value:15,label:"15 km"},{value:20,label:"20 km"},{value:25,label:"25 km"}],u}return(0,s.default)(l,t),(0,u.default)(l,[{key:"geInitialState",value:function(){return{valuePosition:0}}},{key:"render",value:function(){var t=this;return v.default.createElement(c.View,{style:{flex:1}},v.default.createElement(p,{items:this.filterOptions,defaultItem:this.state.valuePosition,labelPosition:"bottom",onSlidingComplete:function(l){return t.slidingComplete(l)}}),v.default.createElement(c.Text,null,v.default.createElement(c.Text,{style:{fontWeight:"bold"}},void 0===this.state.value?0:this.state.value)," km ",b.default.t("DISTANCE_ARROUND")))}},{key:"slidingComplete",value:function(t){this.setState({value:this.filterOptions[t].value,valuePosition:t})}}]),l})(v.Component);e.default=k,k.navigationOptions=function(t){var l=t.navigation;return{drawerLabel:function(){return null},title:"Filtre",tabBarIcon:function(t){t.focused,t.horizontal;var n=t.tintColor;return v.default.createElement(h.default,{badgeCount:l.getParam("count",0),size:24,name:"filter-list",color:n})}}}},1570,[4,1,8,9,10,12,13,15,18,827,712,1029,806,1378]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"createMaterialBottomTabNavigator",{enumerable:!0,get:function(){return n.default}});var n=t(r(d[1]))},1571,[1,1572]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),o=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(d[2])),l=o(r(d[3])),c=o(r(d[4])),s=o(r(d[5])),u=o(r(d[6])),v=o(r(d[7])),p=o(r(d[8])),f=t(r(d[9])),C=r(d[10]),h=r(d[11]),b=r(d[12]),y=(function(t){function o(){var t,n;(0,c.default)(this,o);for(var l=arguments.length,s=new Array(l),p=0;p1){var o=n.map(function(t,n){return n});return b.default.interpolate(t,{inputRange:o,outputRange:o.map(function(t){return t===l?1:0})})}return 1})),w((0,s.default)(o),"getInactiveOpacity",(0,h.default)(function(t,n,l){if(n.length>1){var o=n.map(function(t,n){return n});return b.default.interpolate(t,{inputRange:o,outputRange:o.map(function(t){return t===l?0:1})})}return 0})),o}return(0,f.default)(n,t),(0,o.default)(n,[{key:"render",value:function(){var t=this.props,n=t.route,l=t.position,o=t.navigationState,u=t.renderLabel,c=t.renderIcon,s=t.renderBadge,f=t.getLabelText,h=t.getTestID,w=t.getAccessibilityLabel,E=t.getAccessible,O=t.activeColor,C=void 0===O?"rgba(255, 255, 255, 1)":O,L=t.inactiveColor,V=void 0===L?"rgba(255, 255, 255, 0.7)":L,I=t.pressColor,P=t.pressOpacity,x=t.labelStyle,T=t.style,A=t.onLayout,R=t.onPress,_=t.onLongPress,j=o.routes.indexOf(n),k=o.index===j,D=this.getActiveOpacity(l,o.routes,j),F=this.getInactiveOpacity(l,o.routes,j),B=null,H=null;if(c){var M=c({route:n,focused:!0,color:C}),q=c({route:n,focused:!1,color:V});null!=q&&null!=M&&(B=y.createElement(p.View,{style:S.icon},y.createElement(b.default.View,{style:{opacity:F}},q),y.createElement(b.default.View,{style:[p.StyleSheet.absoluteFill,{opacity:D}]},M)))}var z=void 0!==u?u:function(t){var n=t.route,l=t.color,o=f({route:n});return'string'==typeof o?y.createElement(b.default.Text,{style:[S.label,B?{marginTop:0}:null,{color:l},x]},o):o};if(z){var G=z({route:n,focused:!0,color:C}),J=z({route:n,focused:!1,color:V});H=y.createElement(p.View,null,y.createElement(b.default.View,{style:{opacity:F}},J),y.createElement(b.default.View,{style:[p.StyleSheet.absoluteFill,{opacity:D}]},G))}var K=p.StyleSheet.flatten(T),N=void 0!==(null===K||void 0===K?void 0:K.width)?null:{flex:1},Q={route:n},U=w(Q);U=void 0!==U?U:f(Q);var W=s?s(Q):null;return y.createElement(v.default,{borderless:!0,testID:h(Q),accessible:E(Q),accessibilityLabel:U,accessibilityTraits:k?['button','selected']:'button',accessibilityComponentType:"button",accessibilityRole:"tab",accessibilityStates:k?['selected']:[],pressColor:I,pressOpacity:P,delayPressIn:0,onLayout:A,onPress:R,onLongPress:_,style:N},y.createElement(p.View,{pointerEvents:"none",style:[S.item,K]},B,H,null!=W?y.createElement(p.View,{style:S.badge},W):null))}}]),n})(y.Component);e.default=E;var S=p.StyleSheet.create({label:{margin:4,backgroundColor:'transparent'},icon:{margin:2},item:{flex:1,alignItems:'center',justifyContent:'center',padding:10,minHeight:48},badge:{position:'absolute',top:0,right:0}})},1576,[4,1,8,9,10,12,11,13,15,18,1577,1385,1578]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),u=n(r(d[4])),c=n(r(d[5])),s=n(r(d[6])),f=t(r(d[7])),p=r(d[8]);function b(){return(b=Object.assign||function(t){for(var n=1;n=0||Object.prototype.propertyIsEnumerable.call(t,l)&&(u[l]=t[l])}return u}function O(t,n){if(null==t)return{};var l,o,u={},c=Object.keys(t);for(o=0;o=0||(u[l]=t[l]);return u}var v,h,j,P=(function(t){function n(){return(0,l.default)(this,n),(0,u.default)(this,(0,c.default)(n).apply(this,arguments))}return(0,s.default)(n,t),(0,o.default)(n,[{key:"render",value:function(){var t=this.props,n=t.style,l=t.pressOpacity,o=t.pressColor,u=t.borderless,c=t.children,s=y(t,["style","pressOpacity","pressColor","borderless","children"]);return'android'===p.Platform.OS&&p.Platform.Version>=21?f.createElement(p.TouchableNativeFeedback,b({},s,{background:p.TouchableNativeFeedback.Ripple(o,u)}),f.createElement(p.View,{style:n},f.Children.only(c))):f.createElement(p.TouchableOpacity,b({},s,{style:n,activeOpacity:l}),c)}}]),n})(f.Component);e.default=P,j={pressColor:'rgba(255, 255, 255, .4)'},(h="defaultProps")in(v=P)?Object.defineProperty(v,h,{value:j,enumerable:!0,configurable:!0,writable:!0}):v[h]=j},1577,[4,1,8,9,10,12,13,15,18]); -__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(n){var t,f;return function(){for(var l=!1,o=arguments.length,u=new Array(o),v=0;v1?this.getTranslateX(n,p,u):0,v='auto'===l?p.length>1?this.getWidth(n,p,u):u(0):l;return h.createElement(y.default.View,{style:[T.indicator,{width:v},c.width?{transform:[{translateX:s}]}:{left:"".concat(100/p.length*o.index,"%")},'auto'===l?{opacity:this.opacity}:null,f]})}}]),n})(h.Component);e.default=R;var T=v.StyleSheet.create({indicator:{backgroundColor:'#ffeb3b',position:'absolute',left:0,bottom:0,right:0,height:2}})},1579,[4,1,33,8,9,10,12,11,13,15,18,1385,1578]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),l=n(r(d[3])),u=n(r(d[4])),s=n(r(d[5])),p=n(r(d[6])),c=n(r(d[7])),f=t(r(d[8])),y=r(d[9]),v=r(d[10]),h=n(r(d[11])),b=n(r(d[12])),w=n(r(d[13])),P=n(r(d[14]));function S(){return(S=Object.assign||function(t){for(var n=1;nl.props.lazyPreloadDistance}),v((0,h.default)(l),"handleEnter",function(t){t===l.props.index&&l.state.loading&&l.setState({loading:!1})}),l}return(0,p.default)(n,t),(0,l.default)(n,[{key:"componentDidMount",value:function(){var t=this;this.props.lazy?this.props.addListener('enter',this.handleEnter):this.state.loading&&setTimeout(function(){return t.setState({loading:!1})},0)}},{key:"componentDidUpdate",value:function(t,n){this.props.lazy===t.lazy&&this.state.loading===n.loading||(this.props.lazy&&this.state.loading?this.props.addListener('enter',this.handleEnter):this.props.removeListener('enter',this.handleEnter))}},{key:"componentWillUnmount",value:function(){this.props.removeListener('enter',this.handleEnter)}},{key:"render",value:function(){var t=this.props,n=t.navigationState,o=t.index,l=t.layout,s=t.style,u=this.state.loading,h=n.index===o;return c.createElement(f.View,{accessibilityElementsHidden:!h,importantForAccessibility:h?'auto':'no-hide-descendants',style:[b.route,l.width?{width:l.width}:h?f.StyleSheet.absoluteFill:null,s]},h||l.width?this.props.children({loading:u}):null)}}],[{key:"getDerivedStateFromProps",value:function(t,n){return n.loading&&Math.abs(t.navigationState.index-t.index)<=t.lazyPreloadDistance?{loading:!1}:null}}]),n})(c.Component);e.default=y;var b=f.StyleSheet.create({route:{flex:1,overflow:'hidden'}})},1581,[4,1,8,9,10,12,11,13,15,18]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=n(r(d[2])),o=n(r(d[3])),l=n(r(d[4])),u=n(r(d[5])),p=n(r(d[6])),f=n(r(d[7])),c=n(r(d[8])),h=n(r(d[9])),v=t(r(d[10])),w=r(d[11]),x=r(d[12]),y=t(r(d[13])),S=n(r(d[14]));function I(){return(I=Object.assign||function(t){for(var n=1;n-1&&u.enterListeners.splice(s,1)}}),V((0,c.default)(u),"handleEnteredIndexChange",function(t){var n=(0,s.default)(t,1)[0],o=Math.max(0,Math.min(n,u.props.navigationState.routes.length-1));u.enterListeners.forEach(function(t){return t(o)})}),V((0,c.default)(u),"transitionTo",function(t){var n=new E(0),s=new E(0),o={position:u.progress,time:new E(0),finished:new E(ae)};return L([G(D(u.clock),se,[J(n,N(t,u.layoutWidth,le)),J(s,0),J(o.time,0),J(o.finished,ae),J(u.index,t)]),G(u.isSwipeGesture,[G(z(D(u.clock)),w.I18nManager.isRTL?J(u.initialVelocityForSpring,N(-1,u.velocityX,u.springVelocityScale)):J(u.initialVelocityForSpring,N(u.velocityX,u.springVelocityScale))),Q(u.clock,T({},o,{velocity:u.initialVelocityForSpring}),T({},pe,{},u.springConfig,{toValue:n}))],te(u.clock,T({},o,{frameTime:s}),T({},ce,{},u.timingConfig,{toValue:n}))),G(z(D(u.clock)),Z(u.clock)),G(o.finished,[J(u.isSwipeGesture,ae),J(u.gestureX,0),J(u.velocityX,0),$(u.clock)])])}),V((0,c.default)(u),"handleGestureEvent",W([{nativeEvent:{translationX:u.gestureX,velocityX:u.velocityX,state:u.gestureState}}])),V((0,c.default)(u),"extrapolatedPosition",P(u.gestureX,N(u.velocityX,u.swipeVelocityImpact))),V((0,c.default)(u),"toggleEnabled",function(){u.state.enabled&&u.setState({enabled:!1},function(){u.setState({enabled:!0})})}),V((0,c.default)(u),"maybeCancel",L([G(H(u.gesturesEnabled,O(H(F(u.index,ee(u.routesLength,1)),_(u.gestureX,0)),H(F(u.index,0),U(u.gestureX,0)))),J(u.gesturesEnabled,0))])),V((0,c.default)(u),"translateX",L([X(u.gesturesEnabled,G(z(u.gesturesEnabled),j([u.gesturesEnabled],u.toggleEnabled))),X(u.index,j([u.index],function(t){var n=(0,s.default)(t,1)[0];u.currentIndexValue=n,n!==u.props.navigationState.index&&(u.props.onIndexChange(n),u.pendingIndexValue=n,u.forceUpdate())})),X(u.position,G(w.I18nManager.isRTL?_(u.gestureX,0):U(u.gestureX,0),G(Y(A(u.position),u.lastEnteredIndex),[J(u.lastEnteredIndex,A(u.position)),j([A(u.position)],u.handleEnteredIndexChange)]),G(Y(R(u.position),u.lastEnteredIndex),[J(u.lastEnteredIndex,R(u.position)),j([R(u.position)],u.handleEnteredIndexChange)]))),X(u.isSwiping,[G(z(u.isSwiping),J(u.gesturesEnabled,1)),j([u.isSwiping,u.indexAtSwipeEnd,u.index],function(t){var n=(0,s.default)(t,3),o=n[0],l=n[1],p=n[2],f=u.props,c=f.keyboardDismissMode,h=f.onSwipeStart,v=f.onSwipeEnd;if(o===ie)if(null===h||void 0===h||h(),u.interactionHandle=w.InteractionManager.createInteractionHandle(),'auto'===c){var x=w.TextInput.State.currentlyFocusedField();w.TextInput.State.blurTextInput(x),u.previouslyFocusedTextInput=x}else'on-drag'===c&&w.Keyboard.dismiss();else if(null===v||void 0===v||v(),null!==u.interactionHandle&&w.InteractionManager.clearInteractionHandle(u.interactionHandle),'auto'===c){if(l===p){var y=u.previouslyFocusedTextInput;y&&w.TextInput.State.focusTextInput(y)}u.previouslyFocusedTextInput=null}})]),X(u.nextIndex,G(Y(u.nextIndex,re),[G(D(u.clock),$(u.clock)),J(u.gestureX,0),J(u.index,u.nextIndex),J(u.nextIndex,re)])),G(F(u.gestureState,x.State.ACTIVE),[u.maybeCancel,G(u.isSwiping,se,[J(u.isSwiping,ie),J(u.isSwipeGesture,ie),J(u.offsetX,u.progress)]),J(u.progress,w.I18nManager.isRTL?ee(u.offsetX,u.gestureX):P(u.offsetX,u.gestureX)),$(u.clock)],[J(u.isSwiping,ae),J(u.indexAtSwipeEnd,u.index),u.transitionTo(G(H(U(k(u.gestureX),de),U(k(u.extrapolatedPosition),M(u.layoutWidth,2))),B(K(q(0,ee(u.index,G(U(u.extrapolatedPosition,0),w.I18nManager.isRTL?le:oe,w.I18nManager.isRTL?oe:le))),ee(u.routesLength,1))),u.index))]),u.progress])),V((0,c.default)(u),"getTranslateX",(0,S.default)(function(t,n,s){return N(K(q(N(t,ee(n,1),le),s),0),w.I18nManager.isRTL?-1:1)})),u}return(0,h.default)(n,t),(0,u.default)(n,[{key:"componentDidMount",value:function(){this.context&&this.context.addGestureHandlerRef&&this.context.addGestureHandlerRef(this.gestureHandlerRef)}},{key:"componentDidUpdate",value:function(t){var n=this.props,s=n.navigationState,o=n.layout,l=n.swipeVelocityImpact,u=n.springVelocityScale,p=n.springConfig,f=n.timingConfig,c=s.index,h=s.routes;(c!==t.navigationState.index&&c!==this.currentIndexValue||'number'==typeof this.pendingIndexValue&&c!==this.pendingIndexValue)&&this.jumpToIndex(c),this.pendingIndexValue=void 0,t.navigationState.routes.length!==h.length&&this.routesLength.setValue(h.length),t.layout.width!==o.width&&(this.progress.setValue(-c*o.width),this.layoutWidth.setValue(o.width)),t.swipeVelocityImpact!==l&&this.swipeVelocityImpact.setValue(void 0!==l?l:ue),t.springVelocityScale!==u&&this.springVelocityScale.setValue(void 0!==u?u:fe),t.springConfig!==p&&(this.springConfig.damping.setValue(void 0!==p.damping?p.damping:pe.damping),this.springConfig.mass.setValue(void 0!==p.mass?p.mass:pe.mass),this.springConfig.stiffness.setValue(void 0!==p.stiffness?p.stiffness:pe.stiffness),this.springConfig.restSpeedThreshold.setValue(void 0!==p.restSpeedThreshold?p.restSpeedThreshold:pe.restSpeedThreshold),this.springConfig.restDisplacementThreshold.setValue(void 0!==p.restDisplacementThreshold?p.restDisplacementThreshold:pe.restDisplacementThreshold)),t.timingConfig!==f&&this.timingConfig.duration.setValue(void 0!==f.duration?f.duration:ce.duration)}},{key:"componentWillUnmount",value:function(){null!==this.interactionHandle&&w.InteractionManager.clearInteractionHandle(this.interactionHandle)}},{key:"render",value:function(){var t=this,n=this.props,s=n.layout,o=n.navigationState,l=n.swipeEnabled,u=n.children,p=n.removeClippedSubviews,f=n.gestureHandlerProps,c=this.getTranslateX(this.layoutWidth,this.routesLength,this.translateX);return u({position:this.position,addListener:this.addListener,removeListener:this.removeListener,jumpTo:this.jumpTo,render:function(n){return v.createElement(x.PanGestureHandler,I({ref:t.gestureHandlerRef,simultaneousHandlers:t.state.childPanGestureHandlerRefs,waitFor:t.state.childPanGestureHandlerRefs,enabled:0!==s.width&&l&&t.state.enabled,onGestureEvent:t.handleGestureEvent,onHandlerStateChange:t.handleGestureEvent,activeOffsetX:[-20,de],failOffsetY:[-20,de]},f),v.createElement(y.default.View,{removeClippedSubviews:p,style:[he.container,s.width?{width:s.width*o.routes.length,transform:[{translateX:c}]}:null]},v.createElement(ne.Provider,{value:t.providerVal},n)))}})}}]),n})(v.Component);e.default=ge,V(ge,"defaultProps",{swipeVelocityImpact:ue,springVelocityScale:fe}),V(ge,"contextType",ne);var he=w.StyleSheet.create({container:{flex:1,flexDirection:'row'}})},1582,[4,1,27,33,8,9,10,12,11,13,15,18,2,1385,1578]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(n){var o=n.route,u=n.jumpTo,l=n.position;return p.createElement(v,{key:o.key,component:t[o.key],route:o,jumpTo:u,position:l})}};var o=n(r(d[2])),u=n(r(d[3])),l=n(r(d[4])),f=n(r(d[5])),c=n(r(d[6])),p=t(r(d[7]));function y(t,n){if(null==t)return{};var o,u,l=s(t,n);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(t);for(u=0;u=0||Object.prototype.propertyIsEnumerable.call(t,o)&&(l[o]=t[o])}return l}function s(t,n){if(null==t)return{};var o,u,l={},f=Object.keys(t);for(u=0;u=0||(l[o]=t[o]);return l}var v=(function(t){function n(){return(0,o.default)(this,n),(0,l.default)(this,(0,f.default)(n).apply(this,arguments))}return(0,c.default)(n,t),(0,u.default)(n,[{key:"render",value:function(){var t=this.props,n=t.component,o=y(t,["component"]);return p.createElement(n,o)}}]),n})(p.PureComponent)},1583,[4,1,8,9,10,12,13,15]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),l=n(r(d[3])),s=n(r(d[4])),u=n(r(d[5])),c=n(r(d[6])),f=n(r(d[7])),p=n(r(d[8])),h=t(r(d[9])),v=r(d[10]),y=n(r(d[11]));function w(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var S=y.default.event,x=y.default.divide,b=y.default.onChange,T=y.default.cond,E=y.default.eq,I=y.default.round,L=y.default.call,H=y.default.Value,P=(function(t){function n(){var t,o;(0,l.default)(this,n);for(var s=arguments.length,p=new Array(s),b=0;b1&&void 0!==arguments[1])||arguments[1];o.scrollViewRef.current&&o.scrollViewRef.current.getNode().scrollTo({x:t,animated:n})}),w((0,f.default)(o),"enterListeners",[]),w((0,f.default)(o),"addListener",function(t,n){switch(t){case'enter':o.enterListeners.push(n)}}),w((0,f.default)(o),"removeListener",function(t,n){switch(t){case'enter':var l=o.enterListeners.indexOf(n);l>-1&&o.enterListeners.splice(l,1)}}),w((0,f.default)(o),"position",new y.default.Value(o.props.navigationState.index*o.props.layout.width)),w((0,f.default)(o),"onScroll",S([{nativeEvent:{contentOffset:{x:o.position}}}])),w((0,f.default)(o),"layoutWidthNode",new H(o.props.layout.width)),w((0,f.default)(o),"relativePosition",x(o.position,o.layoutWidthNode)),o}return(0,p.default)(n,t),(0,s.default)(n,[{key:"componentDidMount",value:function(){this.props.layout.width&&this.scrollTo(this.props.navigationState.index*this.props.layout.width,!1)}},{key:"componentDidUpdate",value:function(t){var n=this.props.navigationState.index*this.props.layout.width;t.navigationState.routes.length!==this.props.navigationState.routes.length||t.layout.width!==this.props.layout.width?this.scrollTo(n,!1):t.navigationState.index!==this.props.navigationState.index&&this.scrollTo(n),t.layout.width!==this.props.layout.width&&this.layoutWidthNode.setValue(this.props.layout.width)}},{key:"componentWillUnmount",value:function(){null!==this.interactionHandle&&v.InteractionManager.clearInteractionHandle(this.interactionHandle)}},{key:"render",value:function(){var t=this,n=this.props,l=n.children,s=n.layout,u=n.onSwipeStart,c=n.onSwipeEnd,f=n.overscroll,p=n.onIndexChange,w=n.navigationState,S=function(){null===u||void 0===u||u(),t.interactionHandle=v.InteractionManager.createInteractionHandle()},x=function(){null===c||void 0===c||c(),null!==t.interactionHandle&&v.InteractionManager.clearInteractionHandle(t.interactionHandle)};return l({position:this.relativePosition,addListener:this.addListener,removeListener:this.removeListener,jumpTo:this.jumpTo,render:function(n){return h.createElement(y.default.ScrollView,{pagingEnabled:!0,directionalLockEnabled:!0,keyboardDismissMode:"on-drag",keyboardShouldPersistTaps:"always",overScrollMode:"never",scrollToOverflowEnabled:!0,scrollEnabled:t.props.swipeEnabled,automaticallyAdjustContentInsets:!1,bounces:f,scrollsToTop:!1,showsHorizontalScrollIndicator:!1,scrollEventThrottle:1,onScroll:t.onScroll,onScrollBeginDrag:S,onScrollEndDrag:x,onMomentumScrollEnd:t.onScroll,contentOffset:t.initialOffset,style:k.container,contentContainerStyle:s.width?{flexDirection:'row',width:s.width*w.routes.length,flex:1}:null,ref:t.scrollViewRef},n,h.createElement(y.default.Code,{exec:b(t.relativePosition,T(E(I(t.relativePosition),t.relativePosition),[L([t.relativePosition],function(t){var n=(0,o.default)(t,1)[0];return p(n)})]))}))}})}}]),n})(h.Component);e.default=P,w(P,"defaultProps",{bounces:!0});var k=v.StyleSheet.create({container:{flex:1}})},1584,[4,1,27,8,9,10,12,11,13,15,18,1385]); -__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.scrollEnabled=e.getHeightDevice=e.getWidthDevice=e.heightTabView=e.heightHeader=e.scaleWithPixel=e.enableExperimental=void 0;var t=r(d[0]),n=t.PixelRatio.get()/2;e.enableExperimental=function(){'android'===t.Platform.OS&&t.UIManager.setLayoutAnimationEnabledExperimental(!0),t.LayoutAnimation.configureNext(t.LayoutAnimation.Presets.easeInEaseOut)};e.scaleWithPixel=function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1.2;return t*(n>o?o:n)};var o=function(){var n=t.Dimensions.get('window').width,o=t.Dimensions.get('window').height,s=n>o;if('android'===t.Platform.OS)return 45;if(t.Platform.isPad)return 65;switch(o){case 375:case 414:case 812:case 896:return s?45:88;default:return s?45:65}};e.heightHeader=o;e.heightTabView=function(){var n=t.Dimensions.get('window').height,s=n-o();switch(n){case 375:case 414:case 812:case 896:s-=30}return s};e.getWidthDevice=function(){return t.Dimensions.get('window').width};e.getHeightDevice=function(){return t.Dimensions.get('window').height};e.scrollEnabled=function(n,s){return s>t.Dimensions.get('window').height-o()}},1585,[18]); -__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.Images=void 0;var o={userAvatar:r(d[0]),bgprimarycolor:r(d[1]),logo:r(d[2]),room6:r(d[3])};e.Images=o},1586,[1018,1587,1137,1588]); -__d(function(g,r,i,a,m,e,d){m.exports=r(d[0]).registerAsset({__packager_asset:!0,httpServerLocation:"/assets/datas/img",width:1920,height:1280,scales:[1],hash:"e6ade7cb50f92b48c551a0e51bbb5cff",name:"bgprimarycolor",type:"png"})},1587,[175]); -__d(function(a,e,s,t,r,h,i){r.exports=e(i[0]).registerAsset({__packager_asset:!0,httpServerLocation:"/assets/datas/img",width:1920,height:1280,scales:[1],hash:"8a6b70645b2552a2a8ff53ee313a20a0",name:"room-6",type:"jpg"})},1588,[175]); -__d(function(g,r,i,a,m,e,d){var l=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=C;var o=l(r(d[1])),t=l(r(d[2])),u=l(r(d[3])),n=r(d[4]),f=r(d[5]),c=l(r(d[6])),y=l(r(d[7])),s=l(r(d[8]));function C(l){var c=l.style,C=l.styleCustomText,p=l.icon,b=l.outline,h=l.full,v=l.round,O=l.loading,T=l.children,S=(0,t.default)(l,["style","styleCustomText","icon","outline","full","round","loading","children"]);return u.default.createElement(n.TouchableOpacity,(0,o.default)({},S,{style:n.StyleSheet.flatten([[s.default.default,{backgroundColor:f.Color.primaryColor}],b&&[s.default.outline,{backgroundColor:f.Color.cardBackgroundColor,borderColor:f.Color.primaryColor}],h&&s.default.full,v&&s.default.round,c]),activeOpacity:.9}),p||null,u.default.createElement(y.default,{style:n.StyleSheet.flatten([s.default.textDefault,b&&{color:f.Color.primaryColor},C]),numberOfLines:1},T||"CustomButton"),O?u.default.createElement(n.ActivityIndicator,{size:"small",color:b?f.Color.primaryColor:f.Color.whiteColor,style:{paddingLeft:5}}):null)}C.propTypes={style:c.default.oneOfType([c.default.object,c.default.array]),icon:c.default.node,outline:c.default.bool,full:c.default.bool,round:c.default.bool,loading:c.default.bool},C.defaultProps={style:{},icon:null,outline:!1,full:!1,round:!1,loading:!1}},1589,[1,6,57,15,18,1590,68,1591,1595]); -__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.Color=void 0;e.Color={primaryColor:"#6784B1",primaryLightColor:"#7698CC",primaryDarkColor:"#637EA5",containerBackgroundColor:"#EEEEEE",primaryDarkAdvancedColor:"#637B9E",cardBackgroundColor:"#ffffff",accentColor:"#D86F22",accentLightColor:"#e27833",purpleLightColor:"#9b59b6",reddeconnectColor:"#ba000d",grayColor:'#9B9B9B',dividerColor:'#BDBDBD',whiteColor:'#FFFFFF',fieldColor:'#F5F5F5',yellowColor:'#FDC60A',navyBlue:'#3C5A99',kashmir:'#5D6D7E',orangeColor:'#E5634D',blueColor:'#5DADE2',pinkColor:'#A569BD',greenColor:'#58D68D',yellowColor:'#FDC60A',textColor:'#212121',borderColor:'#c7c7cc'}},1590,[]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var l=t(r(d[1])),o=t(r(d[2])),n=r(d[3]),h=t(r(d[4])),f=r(d[5]);t(r(d[6]));function u(t){var h=t.header,u=t.title1,y=t.title2,b=t.title3,p=t.headline,c=t.body1,s=t.body2,S=t.callout,W=t.subhead,T=t.footnote,v=t.caption1,F=t.caption2,L=t.overline,O=t.thin,k=t.ultraLight,x=t.light,_=t.regular,A=t.medium,j=t.semibold,P=t.bold,E=t.heavy,M=t.black,q=t.numberOfLines,w=(t.textAlign,t.style),z=t.children;return o.default.createElement(n.Text,(0,l.default)({style:n.StyleSheet.flatten([h&&f.Typography.header,u&&f.Typography.title1,y&&f.Typography.title2,b&&f.Typography.title3,p&&f.Typography.headline,c&&f.Typography.body1,s&&f.Typography.body2,S&&f.Typography.callout,W&&f.Typography.subhead,T&&f.Typography.footnote,v&&f.Typography.caption1,F&&f.Typography.caption2,L&&f.Typography.overline,O&&n.StyleSheet.flatten({fontWeight:f.FontWeight.thin}),k&&n.StyleSheet.flatten({fontWeight:f.FontWeight.ultraLight}),x&&n.StyleSheet.flatten({fontWeight:f.FontWeight.light}),_&&n.StyleSheet.flatten({fontWeight:f.FontWeight.regular}),A&&n.StyleSheet.flatten({fontWeight:f.FontWeight.medium}),j&&n.StyleSheet.flatten({fontWeight:f.FontWeight.semibold}),P&&n.StyleSheet.flatten({fontWeight:f.FontWeight.bold}),E&&n.StyleSheet.flatten({fontWeight:f.FontWeight.heavy}),M&&n.StyleSheet.flatten({fontWeight:f.FontWeight.black}),w&&w])},t,{numberOfLines:q}),z)}u.propTypes={header:h.default.bool,title1:h.default.bool,title2:h.default.bool,title3:h.default.bool,headline:h.default.bool,body1:h.default.bool,body2:h.default.bool,callout:h.default.bool,subhead:h.default.bool,footnote:h.default.bool,caption1:h.default.bool,caption2:h.default.bool,overline:h.default.bool,thin:h.default.bool,ultraLight:h.default.bool,light:h.default.bool,regular:h.default.bool,medium:h.default.bool,semibold:h.default.bool,bold:h.default.bool,heavy:h.default.bool,black:h.default.bool,numberOfLines:h.default.number,textAlign:h.default.string,style:h.default.oneOfType([h.default.object,h.default.array]),children:h.default.node},u.defaultProps={header:!1,title1:!1,title2:!1,title3:!1,headline:!1,body1:!1,body2:!1,callout:!1,subhead:!1,footnote:!1,caption1:!1,caption2:!1,overline:!1,thin:!1,ultraLight:!1,light:!1,regular:!1,medium:!1,semibold:!1,bold:!1,heavy:!1,black:!1,numberOfLines:10,textAlign:'left',style:{},children:''}},1591,[1,6,15,18,68,1592,1593]); -__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.Typography=e.FontWeight=void 0;var t=r(d[0]),o={thin:"100",ultraLight:"200",light:"300",regular:"400",medium:"500",semibold:"600",bold:"700",heavy:"800",black:"900"};e.FontWeight=o;var n=t.StyleSheet.create({header:{fontSize:34,fontWeight:o.regular},title1:{fontSize:28,fontWeight:o.regular},title2:{fontSize:22,fontWeight:o.regular},title3:{fontSize:20,fontWeight:o.regular},headline:{fontSize:17,fontWeight:o.regular},body1:{fontSize:17,fontWeight:o.regular},body2:{fontSize:14,fontWeight:o.regular},callout:{fontSize:17,fontWeight:o.regular},subhead:{fontSize:15,fontWeight:o.regular},footnote:{fontSize:13,fontWeight:o.regular},caption1:{fontSize:12,fontWeight:o.regular},caption2:{fontSize:11,fontWeight:o.regular},overline:{fontSize:10,fontWeight:o.regular}});e.Typography=n},1592,[18]); -__d(function(g,r,i,a,m,e,d){var l=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=p;var o=l(r(d[1])),t=l(r(d[2])),u=l(r(d[3])),n=r(d[4]),c=l(r(d[5])),f=l(r(d[6])),y=l(r(d[7])),C=r(d[8]);function p(l){var c=l.style,p=l.textStyle,b=l.icon,s=l.primary,S=l.primaryIcon,h=l.outline,x=l.outlineIcon,I=l.outlineSecondary,k=l.outlineSecondaryIcon,O=l.small,L=l.light,v=l.gray,T=l.chip,P=l.status,_=l.rate,j=l.rateSmall,E=l.sale,R=l.children,B=(0,t.default)(l,["style","textStyle","icon","primary","primaryIcon","outline","outlineIcon","outlineSecondary","outlineSecondaryIcon","small","light","gray","chip","status","rate","rateSmall","sale","children"]);return u.default.createElement(n.TouchableOpacity,(0,o.default)({},B,{style:n.StyleSheet.flatten([y.default.default,s&&[y.default.primary,{backgroundColor:C.Color.primaryColor}],S&&y.default.primary,h&&[y.default.outline,{borderColor:C.Color.primary,backgroundColor:C.Color.cardBackgroundColor}],x&&y.default.outline,I&&y.default.outlineSecondary,k&&[y.default.outlineSecondary,{borderColor:C.Color.accentColor}],O&&[y.default.small,{backgroundColor:C.Color.primaryColor}],L&&[y.default.light,{backgroundColor:C.Color.primaryColor}],v&&y.default.gray,T&&[y.default.chip,{backgroundColor:C.Color.card,borderColor:C.Color.accentColor}],P&&[y.default.status,{backgroundColor:C.Color.primaryColor}],_&&[y.default.rate,{backgroundColor:C.Color.primaryLightColor}],j&&[y.default.rateSmall,{backgroundColor:C.Color.primaryLightColor}],E&&[y.default.sale,{backgroundColor:C.Color.primaryLightColor}],c]),activeOpacity:.9}),b||null,u.default.createElement(f.default,{style:n.StyleSheet.flatten([s&&y.default.textPrimary,S&&y.default.textPrimary,h&&[y.default.textOutline,{color:C.Color.primaryColor}],x&&[y.default.textOutline,{color:C.Color.primaryColor}],I&&[y.default.textOutlineSecondary,{color:C.Color.accentColor}],k&&[y.default.textOutlineSecondary,{color:C.Color.accentColor}],O&&y.default.textSmall,L&&[y.default.textLight,{color:C.Color.primaryLightColor}],v&&y.default.textGray,T&&[y.default.textChip,{color:C.Color.accentColor}],P&&y.default.textStatus,_&&y.default.textRate,j&&y.default.textRateSmall,E&&y.default.textSale,p]),numberOfLines:1},R||'Tag'))}p.propTypes={style:c.default.oneOfType([c.default.object,c.default.array]),textStyle:c.default.oneOfType([c.default.object,c.default.array]),icon:c.default.node,primary:c.default.bool,primaryIcon:c.default.bool,outline:c.default.bool,outlineIcon:c.default.bool,outlineSecondary:c.default.bool,outlineSecondaryIcon:c.default.bool,small:c.default.bool,light:c.default.bool,gray:c.default.bool,chip:c.default.bool,rate:c.default.bool,rateSmall:c.default.bool,status:c.default.bool,sale:c.default.bool},p.defaultProps={style:{},textStyle:{},icon:null,primary:!1,primaryIcon:!1,outline:!1,outlineIcon:!1,outlineSecondary:!1,outlineSecondaryIcon:!1,small:!1,light:!1,gray:!1,chip:!1,status:!1,rate:!1,rateSmall:!1,sale:!1}},1593,[1,6,57,15,18,68,1591,1594,1590]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;t(r(d[1]));var o=r(d[2]),n=r(d[3]),l=r(d[4]),c=o.StyleSheet.create({default:{flexDirection:'row'},primary:{paddingVertical:5,paddingHorizontal:10,borderRadius:17,alignItems:'center',justifyContent:'center'},textPrimary:o.StyleSheet.flatten([n.Typography.caption1,{color:l.Color.whiteColor}]),outline:{paddingVertical:5,paddingHorizontal:10,borderRadius:16,borderWidth:1,alignItems:'center',justifyContent:'center'},textOutline:n.Typography.caption1,outlineSecondary:{paddingVertical:5,paddingHorizontal:10,borderRadius:17,backgroundColor:l.Color.whiteColor,alignItems:'center',justifyContent:'center'},textOutlineSecondary:n.Typography.caption1,small:{paddingHorizontal:5,borderRadius:5,alignItems:'center',justifyContent:'center'},textSmall:o.StyleSheet.flatten([n.Typography.caption2,{color:l.Color.whiteColor}]),light:{padding:5,borderRadius:5,alignItems:'center',justifyContent:'center'},textLight:n.Typography.caption2,gray:{padding:5,backgroundColor:l.Color.fieldColor,borderColor:l.Color.fieldColor,alignItems:'center',justifyContent:'center'},textGray:o.StyleSheet.flatten([n.Typography.caption2]),chip:{paddingVertical:4,paddingHorizontal:6,borderRadius:16,alignItems:'center',justifyContent:'center',borderWidth:.5},textChip:n.Typography.overline,status:{paddingVertical:3,paddingHorizontal:5,borderRadius:5,alignItems:'center',justifyContent:'center'},textStatus:o.StyleSheet.flatten([n.Typography.caption2,{color:l.Color.whiteColor,fontWeight:n.FontWeight.bold}]),rate:{paddingVertical:5,paddingHorizontal:10,borderTopLeftRadius:5,borderBottomLeftRadius:5,borderBottomRightRadius:5,alignItems:'center',justifyContent:'center'},textRate:o.StyleSheet.flatten([n.Typography.headline,{color:l.Color.whiteColor,fontWeight:n.FontWeight.bold}]),rateSmall:{borderRadius:3,paddingHorizontal:5,alignItems:'center',justifyContent:'center'},textRateSmall:o.StyleSheet.flatten([n.Typography.caption2,{color:l.Color.whiteColor,fontWeight:n.FontWeight.bold}]),sale:{width:50,height:50,borderRadius:25,alignItems:'center',justifyContent:'center'},textSale:o.StyleSheet.flatten([n.Typography.headline,{color:l.Color.whiteColor,fontWeight:n.FontWeight.bold}])});e.default=c},1594,[1,15,18,1592,1590]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=t(r(d[1])),n=r(d[2]),c=r(d[3]),l=r(d[4]);function u(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);o&&(c=c.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,c)}return n}var f=n.StyleSheet.create({default:{height:56,borderRadius:8,flexDirection:"row",justifyContent:"center",alignItems:"center",paddingHorizontal:20},textDefault:(function(t){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:"number";t.setState({focused:o})},t._displayedFields=function(){var o=t.props,u=o.requiresName,n=o.requiresCVC,s=o.requiresPostalCode;return(0,y.default)(["number","expiry",n?"cvc":null,u?"name":null,s?"postalCode":null])},t._focusPreviousField=function(o){var u=t._displayedFields(),n=u.indexOf(o),s=u[n-1];s&&t.focus(s)},t._focusNextField=function(o){if("name"!==o){var u=t._displayedFields(),n=u.indexOf(o),s=u[n+1];s&&t.focus(s)}},t._change=function(o,u){t.setValues((0,n.default)({},o,u))},t._onFocus=function(o){t.focus(o),t.props.onFocus(o)},t.state={focused:"",values:{},status:{}},t}return(0,p.default)(b,o),(0,l.default)(b,[{key:"render",value:function(){return v.default.createElement(t,(0,u.default)({},this.props,this.state,{onFocus:this._onFocus,onChange:this._change,onBecomeEmpty:this._focusPreviousField,onBecomeValid:this._focusNextField}))}}]),b})(v.Component);return o.propTypes={autoFocus:b.default.bool,onChange:b.default.func.isRequired,onFocus:b.default.func,requiresName:b.default.bool,requiresCVC:b.default.bool,requiresPostalCode:b.default.bool,validatePostalCode:b.default.func},o.defaultProps={autoFocus:!1,onChange:function(){},onFocus:function(){},requiresName:!1,requiresCVC:!0,requiresPostalCode:!1,validatePostalCode:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.match(/^\d{6}$/)?"valid":t.length>6?"invalid":"incomplete"}},o},e.InjectedProps=void 0;var u=o(r(d[2])),n=o(r(d[3])),s=o(r(d[4])),l=o(r(d[5])),c=o(r(d[6])),f=o(r(d[7])),p=o(r(d[8])),v=t(r(d[9])),b=o(r(d[10])),h=o(r(d[11])),C=o(r(d[12])),y=o(r(d[13]));function P(t,o){var u=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);o&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),u.push.apply(u,n)}return u}function O(t){for(var o=1;o0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return t.substr(0,n)},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,o=[0].concat(n).concat([t.length]);return o.map(function(n,u){if(0===u)return"";var s=o[u-1];return t.substr(s,n-s)}).filter(function(t){return""!==t}).join(" ")},v={gaps:[4,8,12],lengths:[16],code:{size:3}};e.default=function t(h){var p=this;(0,o.default)(this,t),this.formatValues=function(t){var n=u.default.number(t.number).card||v;return(0,l.default)({type:n.type,number:p._formatNumber(t.number,n),expiry:p._formatExpiry(t.expiry),cvc:p._formatCVC(t.cvc,n),name:(0,s.removeLeadingSpaces)(t.name),postalCode:(0,s.removeNonNumber)(t.postalCode)},p._displayedFields)},this._formatNumber=function(t,n){var o=(0,s.removeNonNumber)(t),u=n.lengths[n.lengths.length-1],l=c(o,u);return f(l,n.gaps)},this._formatExpiry=function(t){var n=c((0,s.removeNonNumber)(t),4);return n.match(/^[2-9]$/)?"0"+n:n.length>2?n.substr(0,2)+"/"+n.substr(2,n.length):n},this._formatCVC=function(t,n){var o=n.code.size;return c((0,s.removeNonNumber)(t),o)},this._displayedFields=[].concat((0,n.default)(h),["type"])}},1599,[1,33,8,1600,1636,1637]); -__d(function(g,r,i,a,m,e,d){'use strict';m.exports={number:r(d[0]),expirationDate:r(d[1]),expirationMonth:r(d[2]),expirationYear:r(d[3]),cvv:r(d[4]),postalCode:r(d[5])}},1600,[1601,1630,1633,1632,1634,1635]); -__d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),t=r(d[1]),l=r(d[2]),u=r(d[3]),h=r(d[4]);function s(n,l,u){return t({},{card:n,isPotentiallyValid:l,isValid:u})}m.exports=function(t){var f,o,c,p,y;if(h(t)&&(t=String(t)),!n(t))return s(null,!1,!1);if(t=t.replace(/\-|\s/g,''),!/^\d*$/.test(t))return s(null,!1,!1);if(0===(f=u(t)).length)return s(null,!1,!1);if(1!==f.length)return s(null,!0,!1);for(c='unionpay'===(o=f[0]).type||l(t),y=Math.max.apply(null,o.lengths),p=0;p-1&&t%1==0&&t<=n}},1614,[]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]),o=r(d[2]),p=r(d[3]),c=r(d[4]),h=Object.prototype.hasOwnProperty;m.exports=function(l){for(var u=c(l),f=u.length,s=f&&l.length,v=!!s&&p(s)&&(n(l)||t(l)),y=-1,O=[];++y-1&&u%1==0&&u0;++y2?u[c-2]:void 0,p=c>2?u[2]:void 0,y=c>1?u[c-1]:void 0;for('function'==typeof l?(l=n(l,y,5),c-=2):c-=(l='function'==typeof y?y:void 0)?1:0,p&&o(u[0],u[1],p)&&(l=c<3?void 0:l,c=1);++v=0;)n=parseInt(t.charAt(s),10),o&&(n*=2)>9&&(n=n%10+1),o=!o,c+=n,s--;return c%10==0}},1627,[]); -__d(function(g,r,i,a,m,e,d){'use strict';var t={},n=["visa","master-card","american-express","diners-club","discover","jcb","unionpay","maestro"];function s(t){var n,s,c;return t?(n=t.prefixPattern.source,s=t.exactPattern.source,(c=JSON.parse(JSON.stringify(t))).prefixPattern=n,c.exactPattern=s,c):null}function c(c){var p,o,x,y=[],P=[];if(!('string'==typeof c||c instanceof String))return[];for(x=0;x5?2:1,'1'===n[0]&&(u=n.substr(1),t(u).isPotentiallyValid||(o=2)),{month:l=n.substr(0,o),year:n.substr(l.length)})}},1631,[1632,1617]); -__d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=19;function s(t,n,s){return{isValid:t,isPotentiallyValid:n,isCurrentYear:s||!1}}m.exports=function(l){var u,c,o,f,p;return t(l)?''===l.replace(/\s/g,'')?s(!1,!0):/^\d*$/.test(l)?(c=l.length)<2?s(!1,!0):(u=(new Date).getFullYear(),3===c?s(!1,l.slice(0,2)===String(u).slice(0,2)):c>4?s(!1,!1):(l=parseInt(l,10),o=Number(String(u).substr(2,2)),2===c?(p=o===l,f=l>=o&&l<=o+n):4===c&&(p=u===l,f=l>=u&&l<=u+n),s(f,f,p))):s(!1,!1):s(!1,!1)}},1632,[1602]); -__d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);function n(t,n,s){return{isValid:t,isPotentiallyValid:n,isValidForThisYear:s||!1}}m.exports=function(s){var o,l,u=(new Date).getMonth()+1;return t(s)?''===s.replace(/\s/g,'')||'0'===s?n(!1,!0):/^\d*$/.test(s)?(o=parseInt(s,10),isNaN(s)?n(!1,!1):n(l=o>0&&o<13,l,l&&o>=u)):n(!1,!1):n(!1,!1)}},1633,[1602]); -__d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),t=3;function l(n,t){for(var l=0;ll?n[u]:l;return l}function o(n,t){return{isValid:n,isPotentiallyValid:t}}m.exports=function(f,c){return c=(c=c||t)instanceof Array?c:[c],n(f)&&/^\d*$/.test(f)?l(c,f.length)?o(!0,!0):f.lengthu(c)?o(!1,!1):o(!0,!0):o(!1,!1)}},1634,[1602]); -__d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=3;function u(t,n){return{isValid:t,isPotentiallyValid:n}}m.exports=function(l){return t(l)?l.length0&&void 0!==arguments[0]?arguments[0]:"").replace(/[^\d]/g,"")};e.removeLeadingSpaces=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/^\s+/g,"")}},1636,[]); -__d(function(g,r,i,a,m,e,d){var t=9007199254740991,n='[object Arguments]',o='[object Function]',c='[object GeneratorFunction]',u='[object Symbol]',l='object'==typeof g&&g&&g.Object===Object&&g,f='object'==typeof self&&self&&self.Object===Object&&self,b=l||f||Function('return this')();function s(t,n,o){switch(o.length){case 0:return t.call(n);case 1:return t.call(n,o[0]);case 2:return t.call(n,o[0],o[1]);case 3:return t.call(n,o[0],o[1],o[2])}return t.apply(n,o)}function y(t,n){for(var o=-1,c=t?t.length:0,u=Array(c);++o0&&o(b)?n>1?w(b,n-1,o,c,u):p(u,b):c||(u[u.length]=b)}return u}function x(t,n){return C(t=Object(t),n,function(n,o){return o in t})}function C(t,n,o){for(var c=-1,u=n.length,l={};++c-1&&n%1==0&&n<=t}function z(t){var n=typeof t;return!!t&&('object'==n||'function'==n)}function B(t){return!!t&&'object'==typeof t}function D(t){return'symbol'==typeof t||B(t)&&j.call(t)==u}var H,J,K=(H=function(t,n){return null==t?{}:x(t,y(w(n,1),E))},J=F(void 0===J?H.length-1:J,0),function(){for(var t=arguments,n=-1,o=F(t.length-J,0),c=Array(o);++n-1&&t%1==0&&t-1&&t%1==0&&t<=n}function I(n){var t=typeof n;return!!n&&('object'==t||'function'==t)}function P(n){return!!n&&'object'==typeof n}function $(n){return w(n)?O(n):F(n)}m.exports=function(n){return n?p(n,$(n)):[]}},1639,[]); -__d(function(g,r,i,a,m,e,d){var t='Expected a function',n='__lodash_hash_undefined__',o=1,u=2,c=9007199254740991,f='[object Arguments]',l='[object Array]',s='[object Boolean]',p='[object Date]',_='[object Error]',v='[object Function]',h='[object GeneratorFunction]',y='[object Map]',b='[object Number]',j='[object Object]',w='[object RegExp]',O='[object Set]',A='[object String]',k='[object Symbol]',S='[object ArrayBuffer]',$='[object DataView]',E=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,x=/^\w*$/,F=/^\./,M=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,P=/\\(\\)?/g,I=/^\[object .+?Constructor\]$/,T=/^(?:0|[1-9]\d*)$/,U={};U['[object Float32Array]']=U['[object Float64Array]']=U['[object Int8Array]']=U['[object Int16Array]']=U['[object Int32Array]']=U['[object Uint8Array]']=U['[object Uint8ClampedArray]']=U['[object Uint16Array]']=U['[object Uint32Array]']=!0,U[f]=U[l]=U[S]=U[s]=U[$]=U[p]=U[_]=U[v]=U[y]=U[b]=U[j]=U[w]=U[O]=U[A]=U["[object WeakMap]"]=!1;var z='object'==typeof g&&g&&g.Object===Object&&g,C='object'==typeof self&&self&&self.Object===Object&&self,L=z||C||Function('return this')(),W='object'==typeof e&&e&&!e.nodeType&&e,B=W&&'object'==typeof m&&m&&!m.nodeType&&m,D=B&&B.exports===W&&z.process,R=(function(){try{return D&&D.binding('util')}catch(t){}})(),V=R&&R.isTypedArray;function G(t,n){for(var o=-1,u=t?t.length:0;++o-1},xt.prototype.set=function(t,n){var o=this.__data__,u=Tt(o,t);return u<0?o.push([t,n]):o[u][1]=n,this},Ft.prototype.clear=function(){this.__data__={hash:new Et,map:new(ht||xt),string:new Et}},Ft.prototype.delete=function(t){return tr(this,t).delete(t)},Ft.prototype.get=function(t){return tr(this,t).get(t)},Ft.prototype.has=function(t){return tr(this,t).has(t)},Ft.prototype.set=function(t,n){return tr(this,t).set(t,n),this},Mt.prototype.add=Mt.prototype.push=function(t){return this.__data__.set(t,n),this},Mt.prototype.has=function(t){return this.__data__.has(t)},Pt.prototype.clear=function(){this.__data__=new xt},Pt.prototype.delete=function(t){return this.__data__.delete(t)},Pt.prototype.get=function(t){return this.__data__.get(t)},Pt.prototype.has=function(t){return this.__data__.has(t)},Pt.prototype.set=function(t,n){var o=this.__data__;if(o instanceof xt){var u=o.__data__;if(!ht||u.length<199)return u.push([t,n]),this;o=this.__data__=new Ft(u)}return o.set(t,n),this};var Ut,zt,Ct=(Ut=function(t,n){return t&&Wt(t,n,$r)},function(t,n){if(null==t)return t;if(!br(t))return Ut(t,n);for(var o=t.length,u=zt?o:-1,c=Object(t);(zt?u--:++u_))return!1;var h=s.get(t);if(h&&s.get(n))return h==n;var y=-1,b=!0,j=l&o?new Mt:void 0;for(s.set(t,n),s.set(n,t);++y<_;){var w=t[y],O=n[y];if(f)var A=p?f(O,w,y,n,t,s):f(w,O,y,t,n,s);if(void 0!==A){if(A)continue;b=!1;break}if(j){if(!N(n,function(t,n){if(!j.has(n)&&(w===t||c(w,t,f,l,s)))return j.add(n)})){b=!1;break}}else if(w!==O&&!c(w,O,f,l,s)){b=!1;break}}return s.delete(t),s.delete(n),b}function Yt(t,n,c,f,l,v,h){switch(c){case $:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case S:return!(t.byteLength!=n.byteLength||!f(new lt(t),new lt(n)));case s:case p:case b:return vr(+t,+n);case _:return t.name==n.name&&t.message==n.message;case w:case A:return t==n+'';case y:var j=K;case O:var E=v&u;if(j||(j=Q),t.size!=n.size&&!E)return!1;var x=h.get(t);if(x)return x==n;v|=o,h.set(t,n);var F=Xt(j(t),j(n),f,l,v,h);return h.delete(t),F;case k:if(St)return St.call(t)==St.call(n)}return!1}function Zt(t,n,o,c,f,l){var s=f&u,p=$r(t),_=p.length;if(_!=$r(n).length&&!s)return!1;for(var v=_;v--;){var h=p[v];if(!(s?h in n:it.call(n,h)))return!1}var y=l.get(t);if(y&&l.get(n))return y==n;var b=!0;l.set(t,n),l.set(n,t);for(var j=s;++v<_;){var w=t[h=p[v]],O=n[h];if(c)var A=s?c(O,w,h,n,t,l):c(w,O,h,t,n,l);if(!(void 0===A?w===O||o(w,O,c,f,l):A)){b=!1;break}j||(j='constructor'==h)}if(b&&!j){var k=t.constructor,S=n.constructor;k!=S&&'constructor'in t&&'constructor'in n&&!('function'==typeof k&&k instanceof k&&'function'==typeof S&&S instanceof S)&&(b=!1)}return l.delete(t),l.delete(n),b}function tr(t,n){var o,u,c=t.__data__;return('string'==(u=typeof(o=n))||'number'==u||'symbol'==u||'boolean'==u?'__proto__'!==o:null===o)?c['string'==typeof n?'string':'hash']:c.map}function rr(t){for(var n=$r(t),o=n.length;o--;){var u=n[o],c=t[u];n[o]=[u,c,cr(c)]}return n}function nr(t,n){var o=H(t,n);return Nt(o)?o:void 0}var er=function(t){return at.call(t)};function or(t,n,o){for(var u,c=-1,f=(n=ar(n,t)?[n]:Qt(n)).length;++c-1&&t%1==0&&t-1&&t%1==0&&t<=c}function wr(t){var n=typeof t;return!!t&&('object'==n||'function'==n)}function mr(t){return!!t&&'object'==typeof t}function Or(t){return'symbol'==typeof t||mr(t)&&at.call(t)==k}var Ar=V?(function(t){return function(n){return t(n)}})(V):function(t){return mr(t)&&jr(t.length)&&!!U[at.call(t)]};function kr(t,n,o){var u=null==t?void 0:Bt(t,n);return void 0===u?o:u}function Sr(t,n){return null!=t&&or(t,n,Dt)}function $r(t){return br(t)?It(t):qt(t)}function Er(t){return t}m.exports=function(t,n,o){var u,c,f,l,s,p=yr(t)?G:Lt;return o&&ir(t,n,o)&&(n=void 0),p(t,'function'==typeof(f=n)?f:null==f?Er:'object'==typeof f?yr(f)?Ht(f[0],f[1]):1==(c=rr(u=f)).length&&c[0][2]?fr(c[0][0],c[0][1]):function(t){return t===u||Gt(t,u,c)}:ar(s=f)?(l=sr(s),function(t){return null==t?void 0:t[l]}):Jt(s))}},1640,[]); -__d(function(g,r,i,a,m,e,d){m.exports=function(n){for(var t=-1,o=n?n.length:0,f=0,u=[];++t0&&{height:this.state.height},this.state.width>0&&{width:this.state.width}],flipHorizontal:this.props.flipHorizontal,flipVertical:this.props.flipVertical,perspective:this.props.perspective,onLayout:function(s){var p=s.nativeEvent.layout,o=(p.x,p.y,p.width),n=p.height,h=(0,l.default)(t.state.back,{width:o,height:n});t.setState({back:h}),t.state.mesured&&(t.props.alignHeight&&t.setState({height:Math.max(t.state.face.height,t.state.back.height)}),t.props.alignWidth&&t.setState({width:Math.max(t.state.face.width,t.state.back.width)}))}},s[1]):f.default.createElement(w,{style:[this.state.height>0&&{height:this.state.height},this.state.width>0&&{width:this.state.width}],onLayout:function(s){var p=s.nativeEvent.layout,o=(p.x,p.y,p.width),n=p.height,h=(0,l.default)(t.state.face,{width:o,height:n});t.setState({face:h}),t.state.mesured&&(t.props.alignHeight&&t.setState({height:Math.max(t.state.face.height,t.state.back.height)}),t.props.alignWidth&&t.setState({width:Math.max(t.state.face.width,t.state.back.width)}))}},s[0]),this.props.clickable){var n=0;return((this.props.alignHeight||this.props.alignWidth)&&this.state.mesured||!this.props.alignHeight&&!this.props.alignWidth)&&(n=1),f.default.createElement(v.TouchableOpacity,{style:{flex:1},testID:this.props.testID,activeOpacity:1,onPress:function(){t._toggleCard()}},f.default.createElement(v.Animated.View,(0,l.default)({},this.props,{style:[y.default.flipCard,{transform:p,opacity:n},this.props.style]}),o))}return f.default.createElement(v.Animated.View,(0,l.default)({},this.props,{style:[y.default.flipCard,{transform:p},this.props.style]}),o)}}]),s})(f.Component);e.default=b,b.propTypes={style:v.ViewPropTypes.style},b.propTypes={flip:c.default.bool,friction:c.default.number,perspective:c.default.number,flipHorizontal:c.default.bool,flipVertical:c.default.bool,clickable:c.default.bool,onFlipEnd:c.default.func,onFlipStart:c.default.func,alignHeight:c.default.bool,alignWidth:c.default.bool,useNativeDriver:c.default.bool,children:function(t,s,l){var p=t[s];if(2!==f.default.Children.count(p))return new Error('`'+l+"` should contain exactly two children. The first child represents the front of the card. The second child represents the back of the card.")}},b.defaultProps={flip:!1,friction:6,perspective:1e3,flipHorizontal:!1,flipVertical:!0,clickable:!0,onFlipEnd:function(){},onFlipStart:function(){},alignHeight:!1,alignWidth:!1,useNativeDriver:!0};var w=(function(t){function s(){return(0,p.default)(this,s),(0,n.default)(this,(0,h.default)(s).apply(this,arguments))}return(0,u.default)(s,t),(0,o.default)(s,[{key:"render",value:function(){return f.default.createElement(v.View,{style:[y.default.face,this.props.style],onLayout:this.props.onLayout},this.props.children)}}]),s})(f.Component);e.Face=w,w.propTypes={children:function(t,s,l){}};var k=(function(t){function s(){return(0,p.default)(this,s),(0,n.default)(this,(0,h.default)(s).apply(this,arguments))}return(0,u.default)(s,t),(0,o.default)(s,[{key:"render",value:function(){var t=[];return this.props.flipHorizontal&&(t.push({scaleX:-1}),"android"===v.Platform.OS&&t.push({perspective:this.props.perspective})),this.props.flipVertical&&(t.push({scaleY:-1}),"android"===v.Platform.OS&&t.push({perspective:this.props.perspective})),f.default.createElement(v.View,{style:[y.default.back,this.props.style,{transform:t}],onLayout:this.props.onLayout},this.props.children)}}]),s})(f.Component);e.Back=k,k.defaultProps={flipHorizontal:!1,flipVertical:!0,perspective:1e3},k.propTypes={flipHorizontal:c.default.bool,flipVertical:c.default.bool,perspective:c.default.number,children:function(t,s,l){}}},1655,[4,1,6,8,9,10,12,13,15,68,18,1656]); -__d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(d[0]).StyleSheet.create({flipCard:{flex:1},face:{flex:1},back:{flex:1}});e.default=t},1656,[18]); -__d(function(g,r,i,a,m,e,d){m.exports=r(d[0]).registerAsset({__packager_asset:!0,httpServerLocation:"/assets/node_modules/react-native-credit-card-input/images",width:456,height:292,scales:[1],hash:"51f117706ff4cfc614abbc45a67afc4f",name:"card-front",type:"png"})},1657,[175]); -__d(function(g,r,i,a,m,e,d){m.exports=r(d[0]).registerAsset({__packager_asset:!0,httpServerLocation:"/assets/node_modules/react-native-credit-card-input/images",width:456,height:292,scales:[1],hash:"45c1d3c823f2e173bcd56271ce49848e",name:"card-back",type:"png"})},1658,[175]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),l=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=l(r(d[2])),n=l(r(d[3])),u=l(r(d[4])),p=l(r(d[5])),s=l(r(d[6])),c=l(r(d[7])),f=t(r(d[8])),y=l(r(d[9])),v=r(d[10]),h=v.StyleSheet.create({baseInputStyle:{color:"black"}}),C=(function(t){function l(){var t,o;(0,n.default)(this,l);for(var u=arguments.length,c=new Array(u),f=0;f":"greater","|":"or","\xa2":"cent","\xa3":"pound","\xa4":"currency","\xa5":"yen","\xa9":"(c)","\xaa":"a","\xae":"(r)","\xba":"o","\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xc6":"AE","\xc7":"C","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xd0":"D","\xd1":"N","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xdd":"Y","\xde":"TH","\xdf":"ss","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xe6":"ae","\xe7":"c","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xf0":"d","\xf1":"n","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xfd":"y","\xfe":"th","\xff":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010c":"C","\u010d":"c","\u010e":"D","\u010f":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011a":"E","\u011b":"e","\u011e":"G","\u011f":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012a":"i","\u012b":"i","\u012e":"I","\u012f":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013b":"L","\u013c":"l","\u013d":"L","\u013e":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015a":"S","\u015b":"s","\u015e":"S","\u015f":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016a":"u","\u016b":"u","\u016e":"U","\u016f":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017a":"z","\u017b":"Z","\u017c":"z","\u017d":"Z","\u017e":"z","\u0192":"f","\u01a0":"O","\u01a1":"o","\u01af":"U","\u01b0":"u","\u01c8":"LJ","\u01c9":"lj","\u01cb":"NJ","\u01cc":"nj","\u0218":"S","\u0219":"s","\u021a":"T","\u021b":"t","\u02da":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038a":"I","\u038c":"O","\u038e":"Y","\u038f":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039a":"K","\u039b":"L","\u039c":"M","\u039d":"N","\u039e":"3","\u039f":"O","\u03a0":"P","\u03a1":"R","\u03a3":"S","\u03a4":"T","\u03a5":"Y","\u03a6":"F","\u03a7":"X","\u03a8":"PS","\u03a9":"W","\u03aa":"I","\u03ab":"Y","\u03ac":"a","\u03ad":"e","\u03ae":"h","\u03af":"i","\u03b0":"y","\u03b1":"a","\u03b2":"b","\u03b3":"g","\u03b4":"d","\u03b5":"e","\u03b6":"z","\u03b7":"h","\u03b8":"8","\u03b9":"i","\u03ba":"k","\u03bb":"l","\u03bc":"m","\u03bd":"n","\u03be":"3","\u03bf":"o","\u03c0":"p","\u03c1":"r","\u03c2":"s","\u03c3":"s","\u03c4":"t","\u03c5":"y","\u03c6":"f","\u03c7":"x","\u03c8":"ps","\u03c9":"w","\u03ca":"i","\u03cb":"y","\u03cc":"o","\u03cd":"y","\u03ce":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040a":"NJ","\u040b":"C","\u040f":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041a":"K","\u041b":"L","\u041c":"M","\u041d":"N","\u041e":"O","\u041f":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042a":"U","\u042b":"Y","\u042c":"","\u042d":"E","\u042e":"Yu","\u042f":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043a":"k","\u043b":"l","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044a":"u","\u044b":"y","\u044c":"","\u044d":"e","\u044e":"yu","\u044f":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045a":"nj","\u045b":"c","\u045d":"u","\u045f":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049a":"KH","\u049b":"kh","\u04a2":"NG","\u04a3":"ng","\u04ae":"UE","\u04af":"ue","\u04b0":"U","\u04b1":"u","\u04ba":"H","\u04bb":"h","\u04d8":"AE","\u04d9":"ae","\u04e8":"OE","\u04e9":"oe","\u0e3f":"baht","\u10d0":"a","\u10d1":"b","\u10d2":"g","\u10d3":"d","\u10d4":"e","\u10d5":"v","\u10d6":"z","\u10d7":"t","\u10d8":"i","\u10d9":"k","\u10da":"l","\u10db":"m","\u10dc":"n","\u10dd":"o","\u10de":"p","\u10df":"zh","\u10e0":"r","\u10e1":"s","\u10e2":"t","\u10e3":"u","\u10e4":"f","\u10e5":"k","\u10e6":"gh","\u10e7":"q","\u10e8":"sh","\u10e9":"ch","\u10ea":"ts","\u10eb":"dz","\u10ec":"ts","\u10ed":"ch","\u10ee":"kh","\u10ef":"j","\u10f0":"h","\u1e80":"W","\u1e81":"w","\u1e82":"W","\u1e83":"w","\u1e84":"W","\u1e85":"w","\u1e9e":"SS","\u1ea0":"A","\u1ea1":"a","\u1ea2":"A","\u1ea3":"a","\u1ea4":"A","\u1ea5":"a","\u1ea6":"A","\u1ea7":"a","\u1ea8":"A","\u1ea9":"a","\u1eaa":"A","\u1eab":"a","\u1eac":"A","\u1ead":"a","\u1eae":"A","\u1eaf":"a","\u1eb0":"A","\u1eb1":"a","\u1eb2":"A","\u1eb3":"a","\u1eb4":"A","\u1eb5":"a","\u1eb6":"A","\u1eb7":"a","\u1eb8":"E","\u1eb9":"e","\u1eba":"E","\u1ebb":"e","\u1ebc":"E","\u1ebd":"e","\u1ebe":"E","\u1ebf":"e","\u1ec0":"E","\u1ec1":"e","\u1ec2":"E","\u1ec3":"e","\u1ec4":"E","\u1ec5":"e","\u1ec6":"E","\u1ec7":"e","\u1ec8":"I","\u1ec9":"i","\u1eca":"I","\u1ecb":"i","\u1ecc":"O","\u1ecd":"o","\u1ece":"O","\u1ecf":"o","\u1ed0":"O","\u1ed1":"o","\u1ed2":"O","\u1ed3":"o","\u1ed4":"O","\u1ed5":"o","\u1ed6":"O","\u1ed7":"o","\u1ed8":"O","\u1ed9":"o","\u1eda":"O","\u1edb":"o","\u1edc":"O","\u1edd":"o","\u1ede":"O","\u1edf":"o","\u1ee0":"O","\u1ee1":"o","\u1ee2":"O","\u1ee3":"o","\u1ee4":"U","\u1ee5":"u","\u1ee6":"U","\u1ee7":"u","\u1ee8":"U","\u1ee9":"u","\u1eea":"U","\u1eeb":"u","\u1eec":"U","\u1eed":"u","\u1eee":"U","\u1eef":"u","\u1ef0":"U","\u1ef1":"u","\u1ef2":"Y","\u1ef3":"y","\u1ef4":"Y","\u1ef5":"y","\u1ef6":"Y","\u1ef7":"y","\u1ef8":"Y","\u1ef9":"y","\u2018":"\'","\u2019":"\'","\u201c":"\\"","\u201d":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20a0":"ecu","\u20a2":"cruzeiro","\u20a3":"french franc","\u20a4":"lira","\u20a5":"mill","\u20a6":"naira","\u20a7":"peseta","\u20a8":"rupee","\u20a9":"won","\u20aa":"new shequel","\u20ab":"dong","\u20ac":"euro","\u20ad":"kip","\u20ae":"tugrik","\u20af":"drachma","\u20b0":"penny","\u20b1":"peso","\u20b2":"guarani","\u20b3":"austral","\u20b4":"hryvnia","\u20b5":"cedi","\u20b8":"kazakhstani tenge","\u20b9":"indian rupee","\u20bd":"russian ruble","\u20bf":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221e":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\ufdfc":"rial"}'),o=JSON.parse('{"vi":{"\u0110":"D","\u0111":"d"}}');function t(t,u){if('string'!=typeof t)throw new Error('slugify: string argument expected');var s=o[(u='string'==typeof u?{replacement:u}:u||{}).locale]||{},c=u.replacement||'-',l=t.split('').reduce(function(o,t){return o+(s[t]||n[t]||t)},'').replace(u.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,'').trim().replace(new RegExp('[\\s'+c+']+','g'),c);return u.lower&&(l=l.toLowerCase()),u.strict&&(l=l.replace(new RegExp('[^a-zA-Z0-9'+c+']','g'),'')),l}return t.extend=function(o){for(var t in o)n[t]=o[t]},t},'object'==typeof e?(m.exports=o(),m.exports.default=o()):'function'==typeof define&&define.amd?define(o):n.slugify=o()},1661,[]); -__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),u=n(r(d[4])),c=n(r(d[5])),f=n(r(d[6])),s=n(r(d[7])),p=t(r(d[8])),y=r(d[9]),E=n(r(d[10])),h=n(r(d[11])),C=(t(r(d[12])),r(d[13]),r(d[14])),v=r(d[15]),w=r(d[16]),b=r(d[17]),T=n(r(d[18])),A=r(d[19]),I=r(d[20]),L=r(d[21]),k=r(d[22]),x=(r(d[23]),r(d[24])),D=(function(t){function n(t){var o;return(0,l.default)(this,n),(o=(0,u.default)(this,(0,c.default)(n).call(this,t))).renderLoader=function(){return p.default.createElement(y.View,{style:{flex:1,justifyContent:'center',alignItems:'center'}},'android'===y.Platform.OS?p.default.createElement(p.default.Fragment,null,p.default.createElement(y.ProgressBarAndroid,null),p.default.createElement(y.Text,null,h.default.t('LOADING_DOTS'))):p.default.createElement(p.default.Fragment,null,p.default.createElement(y.ActivityIndicator,{size:"large",color:'#ccc'}),p.default.createElement(y.Text,null,h.default.t('LOADING_DOTS'))))},o.renderWalletItem=function(t){var n=v.baseUrl+"/datas/img/network/"+x(t.network,{lower:!0})+"-logo.png";return p.default.createElement(y.TouchableOpacity,{key:t.id,style:[W.paymentItem,{borderBottomColor:C.Color.borderColor}],onPress:function(){return o.props.navigation.push('walletDetail',{wallet:t})}},p.default.createElement(y.View,{style:{flexDirection:'row',alignItems:'center'}},p.default.createElement(y.View,{style:W.iconContent},p.default.createElement(y.Image,{style:{width:48,height:48},source:{uri:n}})),p.default.createElement(y.View,null,p.default.createElement(y.Text,{style:k.Typography.body1},t.network),p.default.createElement(y.Text,{style:[k.Typography.footnote,C.Color.grayColor],style:{marginTop:5}},h.default.t('COUNTRY'),": ",t.country))))},o.renderWalletList=function(){var t=o.props,n=t.result,l=t.error;return null!==l?p.default.createElement(y.View,{style:{flex:1,justifyContent:'center',alignItems:'center'}},p.default.createElement(y.Text,{style:k.Typography.body1},l)):null!==n&&null!==n.response?Array.isArray(n.response)&&n.response.length>0?p.default.createElement(y.ScrollView,{style:{flex:1,padding:20}},n.response.map(function(t){return o.renderWalletItem(t)})):p.default.createElement(y.View,{style:{flex:1,justifyContent:'center',alignItems:'center'}},p.default.createElement(y.Text,{style:k.Typography.body1},h.default.t('NO_WALLET_ACTIVED'))):void 0},x.extend({'+':'plus'}),w.IlinkEmitter.on("langueChange",o.updateLangue.bind((0,f.default)(o))),o.state={result:null,isDataLoaded:!1},o}return(0,s.default)(n,t),(0,o.default)(n,[{key:"componentDidMount",value:function(){var t=this;(0,I.readUser)().then(function(n){n&&void 0!==n&&void 0!==n.phone&&t.props.getWalletActivated(n.agentId)})}},{key:"updateLangue",value:function(){this.props.navigation.setParams({name:h.default.t('WALLET')}),this.forceUpdate()}},{key:"render",value:function(){var t=this;return p.default.createElement(b.Provider,null,p.default.createElement(y.View,{style:{flex:1}},p.default.createElement(y.StatusBar,{backgroundColor:C.Color.primaryDarkColor,barStyle:"light-content",translucent:!1}),p.default.createElement(b.Appbar.Header,{dark:!0,style:{backgroundColor:C.Color.primaryColor}},p.default.createElement(b.Appbar.BackAction,{onPress:function(){t.props.navigation.pop()}}),p.default.createElement(b.Appbar.Content,{title:h.default.t('WALLET'),subtitle:h.default.t('SELECT_YOUR_WALLET')})),this.props.loading?this.renderLoader():this.renderWalletList()))}}]),n})(p.Component);D.navigationOptions=function(t){t.navigation;return{header:null,headerMode:'none',headerTitle:null,activeColor:'#f0edf6',inactiveColor:'#3e2465',barStyle:{backgroundColor:'#694fad'},drawerLabel:h.default.t('CREDIT_MANAGE'),drawerIcon:function(t){t.tintColor;return p.default.createElement(E.default,{name:'credit-card',size:24})}}};var O=(0,A.connect)(function(t){return{loading:t.walletReducer.loading,result:t.walletReducer.result,error:t.walletReducer.error}},function(t){return(0,L.bindActionCreators)({getWalletActivated:T.default},t)})(D);e.default=O;var W=y.StyleSheet.create({container:{flex:1,backgroundColor:C.Color.containerBackgroundColor},paymentItem:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottomWidth:1,paddingVertical:5,width:"100%",marginBottom:15},iconContent:{width:60,marginRight:10,alignItems:"center"}})},1662,[4,1,8,9,10,12,11,13,15,18,869,712,1585,1586,1590,736,766,1029,1537,1504,711,1472,1592,807,1661]); -__d(function(g,r,i,a,m,e,d){"use strict";e.__esModule=!0,e.PersistGate=void 0;var t=(function(t){if(t&&t.__esModule)return t;var o={};if(null!=t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var s=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,n):{};s.get||s.set?Object.defineProperty(o,n,s):o[n]=t[n]}return o.default=t,o})(r(d[0]));function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof("function"==typeof Symbol?Symbol.iterator:"@@iterator")?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==("function"==typeof Symbol?Symbol.prototype:"@@prototype")?"symbol":typeof t})(t)}function n(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}function s(t,o){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:c,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case o.DEPOSIT_PENDING:return u({},t,{loading:!0});case o.DEPOSIT_SUCCESS:return u({},t,{loading:!1,result:n.result.data,error:null});case o.DEPOSIT_ERROR:return u({},t,{loading:!1,result:null,error:n.result});default:return t}}},1558,[1,7,1539,1559]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.DEPOSIT_ERROR=e.DEPOSIT_SUCCESS=e.DEPOSIT_PENDING=void 0;e.DEPOSIT_PENDING='DEPOSIT_PENDING';e.DEPOSIT_SUCCESS='DEPOSIT_SUCCESS';e.DEPOSIT_ERROR='DEPOSIT_ERROR'},1559,[]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(r(d[1])),o=r(d[2]);function c(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);n&&(c=c.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),o.push.apply(o,c)}return o}function l(t){for(var o=1;o0&&void 0!==arguments[0]?arguments[0]:u,n=arguments.length>1?arguments[1]:void 0;switch(n.type){case o.WALLET_HISTORY_PENDING:return l({},t,{loadingTransaction:!0});case o.WALLET_HISTORY_SUCCESS:return l({},t,{loadingTransaction:!1,resultTransaction:n.result.data,errorTransaction:null});case o.WALLET_HISTORY_ERROR:return l({},t,{loadingTransaction:!1,resultTransaction:null,errorTransaction:n.result});default:return t}}},1560,[1,7,1539]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),s=n(r(d[3])),o=n(r(d[4])),c=n(r(d[5])),f=n(r(d[6])),u=n(r(d[7])),y=t(r(d[8])),h=r(d[9]),E=n(r(d[10])),x=n(r(d[11])),p=r(d[12]),w=n(r(d[13])),T=r(d[14]),v=r(d[15]),b=n(r(d[16])),C=r(d[17]),D=(n(r(d[18])),r(d[19]),r(d[20])),L='white',S=r(d[21]),A=(r(d[22]),(function(t){function n(t){var o;(0,s.default)(this,n),(o=(0,c.default)(this,(0,f.default)(n).call(this,t))).styles=h.StyleSheet.create({container:{flex:1},btnstyle:{},simpleuser:{marginLeft:(0,p.responsiveWidth)(2),fontSize:16,color:'#3E3E3E'},textbtnstyle:{color:"white",fontWeight:"bold",fontSize:18},cardcontainer1:{justifyContent:'space-evenly',flex:2,marginRight:3,marginLeft:3},cardcontainer:{justifyContent:'space-evenly',flex:3,margin:3}}),o.item=o.props.navigation.getParam("item",null);var u='';return'1'===o.item.status?(1,L='#AEAEAE',u=b.default.t('TREAT_DEMAND')):(L='green',2,u=b.default.t('ACTION_TREAT_DEMAND')),o.state={statut:u,user:null,networks:[],loadingTreat:!1,color:L},(0,v.readUser)().then(function(t){var n;return l.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return n=[],s.next=3,l.default.awrap((0,C.getAgentNetworksList)(t.agentId));case 3:n=s.sent,o.setState({user:t,networks:n.networks});case 5:case"end":return s.stop()}},null,null,null,Promise)}),o}return(0,u.default)(n,t),(0,o.default)(n,[{key:"render",value:function(){var t=D.tz(this.item.date_creation,'Etc/GMT+0').format();return t=D(t),y.default.createElement(h.View,{style:this.styles.container},y.default.createElement(E.default,{style:this.styles.cardcontainer1},y.default.createElement(h.Text,{style:{fontSize:17,fontWeight:'bold',color:'black',marginLeft:(0,p.responsiveWidth)(5)}},b.default.t('MEMBER_INFO')),y.default.createElement(h.View,{style:{flexDirection:'row',justifyContent:'flex-start'}},y.default.createElement(w.default,{name:"md-call",size:28,color:S.accent,style:{marginLeft:20}}),y.default.createElement(h.Text,{style:this.styles.simpleuser},this.item.phone)),y.default.createElement(h.View,{style:{flexDirection:'row',justifyContent:'flex-start'}},y.default.createElement(w.default,{name:"md-person",size:28,color:S.accent,style:{marginLeft:20}}),y.default.createElement(h.Text,{style:this.styles.simpleuser},this.item.code_membre))),y.default.createElement(E.default,{style:this.styles.cardcontainer},y.default.createElement(h.Text,{style:{fontSize:17,fontWeight:'bold',color:'black',marginLeft:(0,p.responsiveWidth)(5)}},b.default.t('DEMAND_INFO')),y.default.createElement(h.View,{style:{flexDirection:'row',justifyContent:'flex-start'}},y.default.createElement(w.default,{name:"md-git-branch",size:28,color:S.accent,style:{marginLeft:20}}),y.default.createElement(h.Text,{style:this.styles.simpleuser},this.item.code_parrain)),y.default.createElement(h.View,{style:{flexDirection:'row',justifyContent:'flex-start'}},y.default.createElement(w.default,{name:"md-code-working",size:28,color:S.accent,style:{marginLeft:20}}),y.default.createElement(h.Text,{style:this.styles.simpleuser},this.item.reseau)),y.default.createElement(h.View,{style:{flexDirection:'row',justifyContent:'flex-start'}},y.default.createElement(w.default,{name:"md-wallet",size:28,color:S.accent,style:{marginLeft:20}}),y.default.createElement(h.Text,{style:this.styles.simpleuser},this.item.montant)),y.default.createElement(h.View,{style:{flexDirection:'row',justifyContent:'flex-start'}},y.default.createElement(w.default,{name:"md-calendar",size:28,color:S.accent,style:{marginLeft:20}}),y.default.createElement(h.Text,{style:this.styles.simpleuser},t.format(" Do MMMM YYYY \xe0 HH:mm"))),y.default.createElement(h.View,{style:{flexDirection:'row',alignSelf:'flex-end',marginRight:20,justifyContent:'flex-start'}},y.default.createElement(w.default,{name:"md-time",size:28,color:S.accent}),y.default.createElement(h.Text,{style:{marginLeft:(0,p.responsiveWidth)(2),fontSize:16,color:S.accent}},t.fromNow()))),this.state.user?this.renderBtn():null)}},{key:"onTreatDemand",value:function(){var t=this;"1"!==this.item&&(this.setState({loadingTreat:!0}),console.warn(this.item),(0,T.updateCreditDemand)(this.item.phone,this.item.id).then(function(n){t.setState({loadingTreat:!1}),console.log(n),1===n.success?t.setState({statut:b.default.t('TREAT_DEMAND'),color:"#AEAEAE"}):console.log(n)}))}},{key:"renderBtn",value:function(){var t=this,n=this.state.user;if(console.warn("ITEM ITEM",this.item),n&&this.item.code_parrain===n.code_membre)return'1'===this.item.status?y.default.createElement(x.default,{style:{borderColor:'transparent',borderRadius:6,marginLeft:5,marginRight:5,backgroundColor:this.state.color},isLoading:this.state.loadingTreat,onPress:function(){t.onTreatDemand()},textStyle:this.styles.textbtnstyle},this.state.statut):y.default.createElement(h.View,{style:{flexDirection:'row',paddingTop:10}},y.default.createElement(h.View,{style:{flex:1,alignItems:'center'}},y.default.createElement(x.default,{style:{borderColor:'transparent',borderRadius:6,marginLeft:5,marginRight:5,backgroundColor:this.state.color},isLoading:this.state.loadingTreat,onPress:function(){t.onTreatDemand()},textStyle:this.styles.textbtnstyle},this.state.statut)),y.default.createElement(h.View,{style:{flex:1,alignItems:'center'}},y.default.createElement(x.default,{style:{borderColor:'transparent',borderRadius:6,marginLeft:5,marginRight:5,backgroundColor:'#ccc'},isLoading:this.state.loadingTreat,onPress:function(){t.props.navigation.pop()},textStyle:this.styles.textbtnstyle},b.default.t('QUIT'))))}}]),n})(y.Component));e.default=A,A.navigatorStyle={navBarBackgroundColor:S.accentLight,statusBarColor:S.accent,navBarTextColor:'#FFFFFF',navBarButtonColor:'#FFFFFF'},A.navigationOptions=function(t){return{drawerLabel:function(){return null},title:"Transaction N\xb0"+t.navigation.getParam("item",{id:"-"}).id}}},1561,[4,1,273,8,9,10,12,13,15,18,528,709,527,871,1149,711,712,1001,1139,840,1134,806,807]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),s=n(r(d[4])),u=n(r(d[5])),c=n(r(d[6])),f=n(r(d[7])),h=t(r(d[8])),E=r(d[9]),y=n(r(d[10])),C=r(d[11]),b=r(d[12]),T=r(d[13]),p=r(d[14]),_=n(r(d[15])),x=(n(r(d[16])),r(d[17])),v=n(r(d[18])),I=n(r(d[19])),L=r(d[20]),S=r(d[21]);r(d[22]),r(d[23]),r(d[24]),r(d[25]),r(d[26]),r(d[27]),r(d[28]);r(d[29]);var w=r(d[30]);r(d[31]);r(d[32]);var k=r(d[33]),A=(function(t){function n(t){var c;return(0,l.default)(this,n),(c=(0,o.default)(this,(0,s.default)(n).call(this,t,!0)))._populateIcons=function(){return new Promise(function(t,n){Promise.all([_.default.getImageSource('users',30),_.default.getImageSource('chart-pie',30)]).then(function(n){n[0],n[0],t(n)}).catch(function(t){console.log(t),n(t)}).done()})},c.state=n.initState(),(0,p.readUser)().then(function(t){c.setState({user:t}),(0,T.listFreeCodesSuperViseur)(t.code_membre).then(function(t){console.log("codes",t),void 0!=t.success&&c.setState({freeCodes:t.networks})})}),(0,b.listAllMembers)().then(function(t){console.log(t),null!==t&&c.setState({listmembers:t,isLoading:!1,isRefreshing:!1})}),c._populateIcons().then(function(t){c.setState({usersicon:t[0],charticon:t[1]})}),(0,p.listDemandAdhesion)().then(function(t){console.log(t);var n=[];t.forEach(function(t){var l=!1;n.forEach(function(n){n.code_membre===t.code_membre&&(l=!0)}),l||n.push(t)}),console.log('filtered',n),void 0!==t&&c.setState({demands:n,isLoadingDemand:!1})}),w.IlinkEmitter.on("langueChange",c.updateLangue.bind((0,u.default)(c))),c}return(0,f.default)(n,t),(0,c.default)(n,null,[{key:"options",value:function(t){return{topBar:{rightButtons:[]}}}}]),(0,c.default)(n,[{key:"updateLangue",value:function(){this.props.navigation.setParams({name:v.default.t('GROUP_MANAGE')}),this.forceUpdate()}},{key:"render",value:function(){return h.default.createElement(E.View,{style:{flex:1,marginBottom:10}},h.default.createElement(E.StatusBar,{backgroundColor:"#00000030",barStyle:"light-content",translucent:!1}),h.default.createElement(L.IndicatorViewPager,{style:{flex:1},indicator:'hyper'===this.state.user.category?this._renderTabIndicatorAdmin():this._renderTabIndicator()},this.state.isLoading?this._renderLoadingItems():this._renderListMembers(),this.state.isLoadingDemand?this._renderLoadingItems():'hyper'===this.state.user.category?this._renderListDemandAdhesion():this._renderListCodeUnused()))}},{key:"_renderTabIndicatorAdmin",value:function(){var t=[{text:v.default.t('MEMBER_LIST'),iconSource:this.state.usersicon},{text:v.default.t('MEMBERSHIP_REQUEST'),iconSource:this.state.charticon}];return h.default.createElement(L.PagerTabIndicator,{style:{height:(0,C.responsiveHeight)(8)},tabs:t})}},{key:"_renderTabIndicator",value:function(){var t=[{text:v.default.t('MEMBER_LIST'),iconSource:this.state.usersicon}];return h.default.createElement(L.PagerTabIndicator,{style:{height:(0,C.responsiveHeight)(8)},tabs:t})}},{key:"_renderListMembers",value:function(){var t=this;return h.default.createElement(E.View,null,h.default.createElement(E.FlatList,{style:{flex:1,backgroundColor:'#EEE'},data:this.state.listmembers instanceof Array?this.state.listmembers:this.state.listmembers.datas?this.state.listmembers.datas:[],ListEmptyComponent:function(){return h.default.createElement(E.View,{style:{flex:1}},h.default.createElement(E.View,{style:{justifyContent:"center",alignItems:'center',marginTop:100}},h.default.createElement(I.default,{style:R.lottie,source:r(d[34]),autoPlay:!0,loop:!0}),h.default.createElement(E.Text,{style:R.text},v.default.t('NO_MEMBERS'))))},refreshControl:h.default.createElement(E.RefreshControl,{refreshing:this.state.isRefreshing,colors:[x.theme.primary,x.theme.purpleLight,x.theme.reddeconnect,x.theme.accentLight],onRefresh:function(){t.setState({isRefreshing:!0}),(0,b.listAllMembers)().then(function(n){console.log("from refresh",n),null!==n&&n.datas&&t.setState({listmembers:n,isLoading:!1,isRefreshing:!1})})}}),renderItem:function(n){var l=n.item;return t.renderMembers(l)}}))}},{key:"_renderLoadingItems",value:function(){return h.default.createElement(E.View,{style:{flex:1,justifyContent:'center',alignItems:'center'}},h.default.createElement(E.ProgressBarAndroid,null))}},{key:"renderMembers",value:function(t){var n=this,l=k.tz(t.created_at,'Etc/GMT+0').format();return l=k(l).fromNow(),h.default.createElement(S.Card,null,h.default.createElement(S.CardTitle,{title:t.lastname,subtitle:t.adresse}),h.default.createElement(S.CardContent,null,h.default.createElement(E.View,{Style:{flex:1,flexDirection:'row'}},h.default.createElement(E.View,{Style:{flex:1}}),h.default.createElement(E.View,{style:{flexDirection:'row',backgroundColor:x.theme.primary,marginRight:10,width:150,justifyContent:'center',alignItems:'center',borderRadius:10}},h.default.createElement(_.default,{name:"phone",color:"white",size:24,style:R.callIcon}),h.default.createElement(E.Text,{style:R.phone},t.phone)))),h.default.createElement(S.CardAction,{separator:!0,inColumn:!1},h.default.createElement(S.CardButton,{onPress:function(){E.Alert.alert(v.default.t("TITLE_SUPPRESS_CONFIRM"),v.default.t("TEXT_SUPPRESS_CONFIRM"),[{text:v.default.t('NO'),onPress:function(){}},{text:v.default.t('YES'),onPress:function(){(0,p.deleteUser)(t).then(function(){n.setState({isLoading:!0}),(0,b.listAllMembers)().then(function(t){console.log(t),null!==t&&n.setState({listmembers:t,isLoading:!1,isRefreshing:!1})})})},style:'cancel'}])},title:v.default.t('DELETE_GEOLOCATED_USER'),color:"crimson"})))}},{key:"_renderListDemandAdhesion",value:function(){var t=this;if('hyper'===this.state.user.category)return this.state.demands.length>0?h.default.createElement(E.View,{style:{backgroundColor:'#EEEEEE',flex:1}},h.default.createElement(E.FlatList,{data:this.state.demands,renderItem:function(n){var l=n.item;return t._renderAddhesionItem(l)},refreshControl:h.default.createElement(E.RefreshControl,{refreshing:this.state.isRefreshing,colors:[x.theme.primary,x.theme.purpleLight,x.theme.reddeconnect,x.theme.accentLight],onRefresh:function(){t.setState({isRefreshing:!0}),(0,b.listAllMembers)().then(function(n){console.log("from refresh",n),null!==n&&n.datas&&t.setState({listmembers:n,isLoading:!1,isRefreshing:!1})})}}),ListEmptyComponent:function(){return h.default.createElement(E.View,{style:{flex:1}},h.default.createElement(E.View,{style:{justifyContent:"center",alignItems:'center',marginTop:100}},h.default.createElement(I.default,{style:R.lottie,source:r(d[34]),autoPlay:!0,loop:!0}),h.default.createElement(E.Text,{style:R.text},v.default.t('NO_MEMBERS'))))}})):h.default.createElement(E.View,{style:{backgroundColor:'white',flex:1,justifyContent:'center',alignItems:'center'}},h.default.createElement(E.Text,null,v.default.t('NO_DEMAND_ADHESION')))}},{key:"_renderLoadingDemandItems",value:function(){var t=this;return this.state.freeCodes.length>0?h.default.createElement(E.View,{style:{backgroundColor:'#EEEEEE',flex:1}},h.default.createElement(E.FlatList,{data:this.state.freeCodes,renderItem:function(n){var l=n.item;return t._renderAddhesionItem(l)}})):h.default.createElement(E.View,{style:{backgroundColor:'white',flex:1,justifyContent:'center',alignItems:'center'}},h.default.createElement(E.Text,null,v.default.t('NO_GEO_POINT_CODE')))}},{key:"_renderAddhesionItem",value:function(t){var n=this;return h.default.createElement(S.Card,{style:{flex:1,height:(0,C.responsiveHeight)(30),backgroundColor:"white",marginBottom:10}},h.default.createElement(S.CardContent,{style:{height:(0,C.responsiveHeight)(20),flex:1,justifyContent:'space-evenly'}},h.default.createElement(E.View,null,h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},v.default.t('NAME')," :")," ",t.lastname),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},v.default.t('PHONE_NUMBER')," :")," ",t.phone),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},v.default.t('EMAIL')," :")," ",t.email),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},v.default.t('NETWORK')," :")," ",t.network))),h.default.createElement(S.CardAction,{separator:!0,inColumn:!1},h.default.createElement(S.CardButton,{title:v.default.t('ACTIVE_USER'),onPress:function(){(0,p.acceptDemandAdhesion)(t).then(function(l){E.Alert.alert(v.default.t('ACTIVATE_ACCOUNT'),v.default.t('THE_ACCOUNT')+' '+t.lastname+" "+v.default.t('ACTIVATED'),[{text:"Ok"}]);var o=n.state.demands;o.splice(o.indexOf(t),1),n.setState({demands:o})})},color:"green"}),h.default.createElement(S.CardButton,{title:v.default.t('DELETE_GEOLOCATED_USER'),color:"red",onPress:function(){}})))}},{key:"_renderListCodeUnused",value:function(){var t=this;return this.state.freeCodes.length>0?h.default.createElement(E.View,{style:{backgroundColor:'#EEEEEE',flex:1}},h.default.createElement(E.FlatList,{data:this.state.freeCodes,renderItem:function(n){var l=n.item;return t._renderFreeCodeItem(l)}})):h.default.createElement(E.View,{style:{backgroundColor:'white',flex:1,justifyContent:'center',alignItems:'center'}},h.default.createElement(E.Text,null,v.default.t('NO_GEO_POINT_CODE')))}},{key:"_renderFreeCodeItem",value:function(t){return console.log(t),h.default.createElement(E.View,{style:{flex:1,height:(0,C.responsiveHeight)(30),backgroundColor:"white",marginBottom:10}},h.default.createElement(E.View,{style:{height:(0,C.responsiveHeight)(20),flex:1,justifyContent:'space-evenly'}},h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},"Contact :")," ",t.phone),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},"code Membre :")," ",t.code_membre),h.default.createElement(E.Text,{style:{marginLeft:10}},h.default.createElement(E.Text,{style:{color:"black"}},"code Validation :")," ",t.validation_code)))}}],[{key:"initState",value:function(){return{enabledListMembers:!0,listmembers:[],usersicon:null,isLoadingDemand:!0,charticon:null,isRefreshing:!1,user:{},freeCodes:[],isLoading:!0}}}]),n})(y.default);e.default=A,A.navigatorStyle={tabBarHidden:!1,topTabTextColor:'#ffffff',topTabsHeight:70,topTabTextFontFamily:'BioRhyme-Bold',selectedTopTabTextColor:'#ff505c',statusBarColor:x.theme.primaryDark,navBarBackgroundColor:x.theme.primary,navBarTextColor:'white',navBarButtonColor:'white',topTabIconColor:'#ffffff',selectedTopTabIconColor:'#ff505c',selectedTopTabIndicatorHeight:2*E.PixelRatio.get(),selectedTopTabIndicatorColor:'#ff505c'},A.navigationOptions=function(t){var n=t.navigation;return{title:v.default.t("GROUP_MANAGE"),drawerLabel:n.getParam("name",v.default.t('GROUP_MANAGE')),drawerIcon:function(t){t.tintColor;return h.default.createElement(_.default,{name:'people',size:24})}}};var R=E.StyleSheet.create({container:{flex:1,backgroundColor:'white'},fromNow:{color:x.theme.accentLight},callIcon:{marginRight:5},phone:{textAlign:'center',color:"white"},balanceMember:{marginLeft:7,fontSize:18,fontWeight:"bold",color:x.theme.primary},balanceIcon:{},name:{color:'black',fontSize:20,margin:20,fontWeight:'bold'},surname:{fontSize:17,marginLeft:20},text:{fontSize:17,fontWeight:'bold'},lottie:{width:248,height:248}})},1562,[4,1,8,10,12,11,9,13,15,18,815,527,1563,1001,711,827,1564,815,712,832,937,1008,1142,1143,1144,1145,1146,1147,1148,840,766,808,807,1134,1568]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.listAllMembers=void 0;var l=n(r(d[2])),o=(t(r(d[3])),r(d[4])),s=n(r(d[5])),c=r(d[6]);r(d[7]).DBEvents,r(d[8]);e.listAllMembers=function(){var t,n,u,p,b,f;return l.default.async(function(v){for(;;)switch(v.prev=v.next){case 0:return v.next=2,l.default.awrap((0,o.readUser)());case 2:if(null===(t=v.sent)){v.next=23;break}return n=s.default.currentLocale(),u={tag:"member",id:t.member_code,la:n,test:c.isDebugMode,codeparrain:t.code_membre,type:'all_geolocated'},v.next=8,l.default.awrap(fetch(c.memberActionUrl,{method:'POST',headers:{Accept:'application/json','Content-Type':'application/json'},body:JSON.stringify(u)}));case 8:return p=v.sent,b="",v.prev=10,v.next=13,l.default.awrap(p.text());case 13:return b=v.sent,v.abrupt("return",JSON.parse(b));case 17:return v.prev=17,v.t0=v.catch(10),console.log(v.t0),console.log("error when liste member",b),f={error:-3,content:v.t0,text:b},v.abrupt("return",f);case 23:return v.abrupt("return",null);case 24:case"end":return v.stop()}},null,null,[[10,17]],Promise)}},1563,[4,1,273,15,711,712,736,738,714]); +__d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,"__esModule",{value:!0});var t=Object.assign||function(t){for(var n=1;nt.props.sensitivity&&Math.abs(o.dy)<=t.props.sensitivity},onPanResponderGrant:this._handlePanResponderGrant,onPanResponderMove:this._handlePanResponderMove,onPanResponderRelease:this._handlePanResponderEnd,onPanResponderTerminate:this._handlePanResponderEnd,onShouldBlockNativeResponder:function(t,n){return!1},onPanResponderTerminationRequest:function(){return!1}})},componentWillReceiveProps:function(t){t.close&&this._close(),t.openRight&&this._openRight(),t.openLeft&&this._openLeft()},_handlePanResponderGrant:function(t,n){var o=this;this.props.disabled||(this.state.openedLeft||this.state.openedRight?this._callOnClose():this._callOnOpen(),this.refs.swipeoutContent.measure(function(t,n,s,h){var p=o.props.buttonWidth||s/5;o.setState({btnWidth:p,btnsLeftWidth:o.props.left?p*o.props.left.length:0,btnsRightWidth:o.props.right?p*o.props.right.length:0,swiping:!0,timeStart:(new Date).getTime()})}))},_handlePanResponderMove:function(t,n){if(!this.props.disabled){var o=n.dx,s=n.dy,h=this.state.btnsLeftWidth,p=this.state.btnsRightWidth;if(this.state.openedRight)o=n.dx-p;else if(this.state.openedLeft)o=n.dx+h;var l=Math.abs(o)>Math.abs(s);this.props.scroll&&(l?this.props.scroll(!1):this.props.scroll(!0)),this.state.swiping&&(o<0&&this.props.right?this.setState({contentPos:Math.min(o,0)}):o>0&&this.props.left&&this.setState({contentPos:Math.max(o,0)}))}},_handlePanResponderEnd:function(t,n){if(!this.props.disabled){var o=n.dx,s=this.state.contentPos,h=this.state.contentWidth,p=this.state.btnsLeftWidth,l=this.state.btnsRightWidth,u=.33*h,f=o>u||o>p/2,c=o<-u||o<-l/2;if(this.state.openedRight)c=o-u<-u;if(this.state.openedLeft)f=o+u>u;if((new Date).getTime()-this.state.timeStart<200)c=o<-u/10&&!this.state.openedLeft,f=o>u/10&&!this.state.openedRight;this.state.swiping&&(c&&s<0&&o<0?this._open(-l,'right'):f&&s>0&&o>0?this._open(p,'left'):this._close()),this.props.scroll&&this.props.scroll(!0)}},_tweenContent:function(t,o){this.tweenState(t,{easing:n.default.easingTypes.easeInOutQuad,duration:0===o?1.5*this.state.tweenDuration:this.state.tweenDuration,endValue:o})},_rubberBandEasing:function(t,n){return t<0&&t0&&t>n?n+Math.pow(t-n,.85):t},_autoClose:function(t){this.state.autoClose&&this._close();var n=t.onPress;n&&n()},_open:function(t,n){var o='left'===n,s=this.props,h=s.sectionID,p=s.rowID,l=s.onOpen;l&&l(h,p,n),this._tweenContent('contentPos',t),this.setState({contentPos:t,openedLeft:o,openedRight:!o,swiping:!1})},_close:function(){var t=this.props,n=t.sectionID,o=t.rowID,s=t.onClose;s&&(this.state.openedLeft||this.state.openedRight)&&s(n,o,this.state.openedRight?'right':'left');this._tweenContent('contentPos',0),this._callOnClose(),this.setState({openedRight:!1,openedLeft:!1,swiping:!1})},_callOnClose:function(){this.props.onClose&&this.props.onClose(this.props.sectionID,this.props.rowID)},_callOnOpen:function(){this.props.onOpen&&this.props.onOpen(this.props.sectionID,this.props.rowID)},_openRight:function(){var t=this;this.refs.swipeoutContent.measure(function(n,o,s,h){var p=t.props.buttonWidth||s/5;t.setState({btnWidth:p,btnsRightWidth:t.props.right?p*t.props.right.length:0},function(){t._tweenContent('contentPos',-t.state.btnsRightWidth),t._callOnOpen(),t.setState({contentPos:-t.state.btnsRightWidth,openedLeft:!1,openedRight:!0,swiping:!1})})})},_openLeft:function(){var t=this;this.refs.swipeoutContent.measure(function(n,o,s,h){var p=t.props.buttonWidth||s/5;t.setState({btnWidth:p,btnsLeftWidth:t.props.left?p*t.props.left.length:0},function(){t._tweenContent('contentPos',t.state.btnsLeftWidth),t._callOnOpen(),t.setState({contentPos:t.state.btnsLeftWidth,openedLeft:!0,openedRight:!1,swiping:!1})})})},render:function(){var n=this.state.contentWidth,o=this.getTweeningValue('contentPos'),p=[s.default.swipeout,this.props.style];this.props.backgroundColor&&p.push([{backgroundColor:this.props.backgroundColor}]);var l=-this.state.btnsRightWidth;if(o>0)l=this.state.btnsLeftWidth;var f={left:{left:0,overflow:'hidden',width:Math.min(l*(o/l),l)}},c={right:{left:Math.abs(n+Math.max(l,o)),right:0}},b={content:{transform:[{translateX:this._rubberBandEasing(o,l)}]}},w=[s.default.swipeoutContent];w.push(b.content);var y=[s.default.swipeoutBtns];y.push(c.right);var _=[s.default.swipeoutBtns];_.push(f.left);var R=o<0,v=o>0;return h.default.createElement(u.View,{style:p},h.default.createElement(u.View,t({ref:'swipeoutContent',style:w,onLayout:this._onLayout},this._panResponder.panHandlers),this.props.children),this._renderButtons(this.props.right,R,y),this._renderButtons(this.props.left,v,_))},_onLayout:function(t){var n=t.nativeEvent.layout,o=n.width,s=n.height;this.setState({contentWidth:o,contentHeight:s})},_renderButtons:function(t,n,o){return t&&n?h.default.createElement(u.View,{style:o},t.map(this._renderButton)):h.default.createElement(u.View,null)},_renderButton:function(t,n){var o=this;return h.default.createElement(c,{backgroundColor:t.backgroundColor,color:t.color,component:t.component,disabled:t.disabled,height:this.state.contentHeight,key:n,onPress:function(){return o._autoClose(t)},text:t.text,type:t.type,underlayColor:t.underlayColor,width:this.state.btnWidth})}});b.NativeButton=o.default,b.SwipeoutButton=c,e.default=b},1564,[1565,1566,1567,15,68,212,18]); +__d(function(g,r,i,a,m,e,d){var n,t;n=this,t=function(){return(function(n){function t(o){if(u[o])return u[o].exports;var c=u[o]={exports:{},id:o,loaded:!1};return n[o].call(c.exports,c,c.exports,t),c.loaded=!0,c.exports}var u={};return t.m=n,t.c=u,t.p="",t(0)})({0:function(n,t,u){n.exports=u(90)},1:function(n,t){function u(){v=!1,f.length?h=f.concat(h):p=-1,h.length&&o()}function o(){if(!v){var n=setTimeout(u);v=!0;for(var t=h.length;t;){for(f=h,h=[];++p1)for(var u=1;uv.duration?v.duration:Math.max(0,s-h);u+=(0===v.duration?v.endValue:v.easing(p,v.beginValue,v.endValue,v.duration))-v.endValue}}return u},_rafCb:function(){var n=this.state;if(0!==n.tweenQueue.length){for(var t=Date.now(),u=[],o=0;on?c*Math.pow(2,10*(n-=1))*Math.sin((n*o-f)*(2*Math.PI)/s)*-.5+t:c*Math.pow(2,-10*(n-=1))*Math.sin((n*o-f)*(2*Math.PI)/s)*.5+l+t)},easeInBack:function(n,t,u,o,c){return void 0===c&&(c=1.70158),(u-t)*(n/=o)*n*((c+1)*n-c)+t},easeOutBack:function(n,t,u,o,c){return void 0===c&&(c=1.70158),(u-t)*((n=n/o-1)*n*((c+1)*n+c)+1)+t},easeInOutBack:function(n,t,u,o,c){var s=u-t;return void 0===c&&(c=1.70158),(n/=o/2)<1?s/2*(n*n*((1+(c*=1.525))*n-c))+t:s/2*((n-=2)*n*((1+(c*=1.525))*n+c)+2)+t},easeInBounce:function(n,t,o,c){var s=o-t;return s-u.easeOutBounce(c-n,0,s,c)+t},easeOutBounce:function(n,t,u,o){var c=u-t;return(n/=o)<.36363636363636365?c*(7.5625*n*n)+t:.7272727272727273>n?c*(7.5625*(n-=.5454545454545454)*n+.75)+t:.9090909090909091>n?c*(7.5625*(n-=.8181818181818182)*n+.9375)+t:c*(7.5625*(n-=.9545454545454546)*n+.984375)+t},easeInOutBounce:function(n,t,o,c){var s=o-t;return c/2>n?.5*u.easeInBounce(2*n,0,s,c)+t:.5*u.easeOutBounce(2*n-c,0,s,c)+.5*s+t}};n.exports=u}})},"object"==typeof e&&"object"==typeof m?m.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof e?e.tweenState=t():n.tweenState=t()},1565,[]); +__d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(t){for(var s=1;s1e6)&&(n=!1),this.setState({visibleError:!n}),n){this.setState({isSending:!0});var l="",o="";(0,T.sendDemandeSpecificque)(this.state.montant,this.state.user.phoneTransaction,this.state.user.code_membre).then(function(n){void 0!==n.success&&1===n.success?(l=D.default.t('DEMAND_SEND'),o=D.default.t('DEMAND_SEND_SUCCESFUL')):(l="Erreur survenu lors de l'envoie ",o="Une erreur est survenu lors de l'envoie de la demande"),p.Alert.alert(l,o,[{text:'Ok',onPress:function(){t.setState({montant:""})}}]),setTimeout(function(){t.setState({isSending:!1})},800)}).catch(function(t){l="Erreur survenu lors de l'envoie ",o="Une erreur est survenu lors de l'envoie de la demande",p.Alert.alert(l,o,[{text:'Ok'}])})}else this.montantView.shake(800),setTimeout(function(){t.setState({visibleError:!1})},3e3)}},{key:"render",value:function(){var t=this.state.user;return h.default.createElement(p.View,{style:{flex:1,alignItems:'center',backgroundColor:"lightgrey",paddingTop:(0,v.responsiveHeight)(10)}},h.default.createElement(p.StatusBar,{translucent:!1}),t?"geolocated"===t.category?this.multiNetwork():this.simpleAgent():h.default.createElement(p.ProgressBarAndroid,null))}},{key:"simpleAgent",value:function(){var t=this;return h.default.createElement(p.View,{style:{height:200}},h.default.createElement(A.Card,{style:{width:(0,v.responsiveWidth)(96),paddingTop:20}},h.default.createElement(A.CardContent,null,h.default.createElement(p.View,null,h.default.createElement(w.View,{ref:this.handleMontantRef},h.default.createElement(x.TextInput,{label:D.default.t('AMOUNT'),keyboardType:"numeric",style:I.selfitem,ref:function(n){t.refInp=n},mode:"outlined",inputStyle:I.style,onChangeText:function(n){try{var l=parseInt(n);t.setState({montant:l,isDisabled:isNaN(l)})}catch(t){}},value:this.state.montant}),h.default.createElement(x.HelperText,{type:"error",visible:this.state.visibleError},D.default.t('INVALID_MONTANT'))))),h.default.createElement(A.CardAction,{separator:!0,inColumn:!1},h.default.createElement(A.CardButton,{onPress:function(){t.onUserCancel()},title:D.default.t('CANCEL'),color:"crimson"}),h.default.createElement(A.CardButton,{onPress:function(){t.onUserSend()},title:D.default.t('SEND'),color:"steelblue"}))))}},{key:"multiNetwork",value:function(){var t=this;return h.default.createElement(p.View,{style:{height:250,justifyContent:'center'}},h.default.createElement(A.Card,{style:{width:(0,v.responsiveWidth)(96),justifyContent:'center'}},h.default.createElement(A.CardContent,null,h.default.createElement(p.View,{style:{flex:1}},h.default.createElement(p.View,{style:{flexDirection:'row'}},h.default.createElement(p.Picker,{selectedValue:this.state.currentNetwork,prompt:D.default.t("SELECT_NETWORK"),style:{height:50,flex:1,marginLeft:20},itemStyle:U.subtitle,onValueChange:function(n,l){return t.setState({currentNetwork:n})}},this.state.networks.map(function(t,n){return h.default.createElement(p.Picker.Item,{label:t.nt?D.default.t("SELECT_NETWORK"):D.default.t("FOR_NUMB")+t.phone+" ("+t.name+")",value:t})}))),h.default.createElement(w.View,{ref:this.handleMontantRef},h.default.createElement(x.TextInput,{label:D.default.t('AMOUNT'),keyboardType:"numeric",style:I.selfitem,ref:function(n){t.refInp=n},mode:"outlined",inputStyle:I.style,onChangeText:function(n){try{var l=parseInt(n);t.setState({montant:l,isDisabled:isNaN(l)})}catch(t){}},value:this.state.montant}),h.default.createElement(x.HelperText,{type:"error",visible:this.state.visibleError},D.default.t('INVALID_MONTANT'))))),h.default.createElement(A.CardAction,{separator:!0,inColumn:!1},h.default.createElement(A.CardButton,{onPress:function(){t.onUserCancel()},title:D.default.t('CANCEL'),color:"crimson"}),h.default.createElement(A.CardButton,{onPress:function(){var n=t.state,l=n.currentNetwork,o=n.montant;void 0!==l&&void 0===l.nt&&t.onNetworkSend(l.phone,l.code_membre,o)},title:D.default.t('SEND'),color:"steelblue"}))))}},{key:"renderSingleNetwork",value:function(t){var n=this,l=t.item;console.log(t);var o=null,s=null,u=0;return h.default.createElement(p.View,{style:U.container2},h.default.createElement(E.default,{style:U.cardInput2},h.default.createElement(p.View,null,h.default.createElement(p.Text,{style:U.title},D.default.t('ASK_CREDIT')),h.default.createElement(p.Text,{style:U.subtitle},D.default.t("FOR_NUMB")," ",l.phone," (",l.name,")"),h.default.createElement(w.View,{ref:this.handleMontantRef},h.default.createElement(S.Sae,{label:D.default.t('AMOUNT'),iconClass:y.default,iconName:'dollar',iconColor:C.primary,ref:function(t){o=t,n.setState({refIn:o})},inputStyle:I.style,value:this.state.montant,keyboardType:"numeric",onChangeText:function(t){if(t.length>0)try{u=parseFloat(t),n.setStat({montant:u}),s&&(s.setState({isDisabled:u>0}),s.isDisabled=u>0)}catch(t){}},style:I.selfitem,labelStyle:I.label,autoCapitalize:'none',autoCorrect:!1}))),h.default.createElement(p.View,{style:U.btnContainer},h.default.createElement(b.default,{style:U.button_1,textStyle:U.button_1_text,onPress:function(){return n.onUserCancel()}},D.default.t('CANCEL')),h.default.createElement(b.default,{ref:function(t){s=t},style:U.button_2,textStyle:U.button_2_text,onPress:function(){n.onNetworkSend(l.phone,l.code_membre,o.state.value,o,s)}},D.default.t('SEND')))))}},{key:"onNetworkSend",value:function(t,n,l){var o=this,s=!0,u=parseFloat(l);(null===u||!(0,N.isNumber)(u)||u>1e6)&&(s=!1),this.setState({visibleError:!s}),s?(0,T.sendDemandeSpecificque)(u,t,n).then(function(t){var n="",l="";void 0!==t.success&&1===t.success?(n=D.default.t("DEMAND_SEND"),l=D.default.t('DEMAND_SEND_SUCCESFUL')):(n="Erreur survenu lors de l'envoie ",l="Une erreur est survenu lors de l'envoie de la demande"),p.Alert.alert(n,l,[{text:"Ok",onPress:function(){o.setState({montant:""})}}])}):(this.montantView.shake(800),setTimeout(function(){o.setState({visibleError:!1})},3e3))}},{key:"updateState",value:function(){var t,n,o;return l.default.async(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,l.default.awrap((0,k.readUser)());case 2:if("geolocated"!==(t=s.sent).category){s.next=9;break}return s.next=6,l.default.awrap((0,_.getAgentNetworksList)(t.agentId));case 6:n=s.sent,console.log(n),1===n.success&&(o=[this.state.currentNetwork],n.networks.forEach(function(t){o.push(t)}),this.setState({networks:o}));case 9:this.setState({user:t});case 10:case"end":return s.stop()}},null,this,null,Promise)}}]),n})(h.Component));e.default=V,V.navigatorStyle={navBarHidden:!0},V.navigationOptions={drawerLabel:function(){return null},headerTitle:D.default.t('ASK_CREDIT'),title:D.default.t('ASK_CREDIT')};var I=p.StyleSheet.create({selfitem:{width:(0,v.responsiveWidth)(70),alignSelf:'center',marginBottom:20},label:{color:C.primary},style:{color:'black'}}),U=p.StyleSheet.create({title:{backgroundColor:C.primary,color:'white',paddingLeft:20,paddingTop:10,fontWeight:'bold',fontSize:(0,v.responsiveFontSize)(3),height:(0,v.responsiveHeight)(10)},subtitle:{color:'black',paddingLeft:20,paddingTop:10,marginBottom:(0,v.responsiveHeight)(3),fontWeight:'bold',fontSize:(0,v.responsiveFontSize)(2)},container:{flex:1,backgroundColor:'#EEE',justifyContent:'space-between'},container2:{flex:1,height:(0,v.responsiveHeight)(20),backgroundColor:'#EEE'},btnContainer:{flexDirection:'row',paddingRight:5,paddingLeft:5,paddingTop:5,marginBottom:-2.5},button_1:{flex:1,borderColor:'transparent'},button_2:{flex:1,borderColor:'transparent',backgroundColor:C.primary,borderRadius:0},button_1_text:{color:C.primary,fontWeight:'bold'},button_2_text:{color:'white',fontWeight:'bold'},cardInput:{marginLeft:10,marginRight:10,marginTop:(0,v.responsiveHeight)(5),width:(0,v.responsiveWidth)(98),alignSelf:'center',justifyContent:'space-between',height:(0,v.responsiveHeight)(40)},cardInput2:{marginLeft:10,marginRight:10,marginTop:(0,v.responsiveHeight)(1),width:(0,v.responsiveWidth)(98),height:(0,v.responsiveHeight)(50),alignSelf:'center',justifyContent:'space-between'}})},1569,[4,1,273,8,9,10,12,13,15,18,524,950,527,528,696,531,709,806,743,719,711,1149,1149,1001,1029,712,1008,807]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),l=n(r(d[3])),u=n(r(d[4])),s=n(r(d[5])),c=n(r(d[6])),f=n(r(d[7])),h=n(r(d[8])),p=t(r(d[9])),v=r(d[10]),b=r(d[11]),y=(t(r(d[12])),n(r(d[13]))),S=n(r(d[14])),C=r(d[15]),k=r(d[16]),w=(t(r(d[17])),n(r(d[18]))),x=r(d[19]),E=r(d[20]);r(d[21]);r(d[22]);var T=(function(t){function n(t){var o;return(0,l.default)(this,n),(o=(0,u.default)(this,(0,s.default)(n).call(this,t))).state=o.generateState(),x.IlinkEmitter.on("langueChange",o.updateLangue.bind((0,c.default)(o))),o}return(0,h.default)(n,t),(0,f.default)(n,[{key:"updateLangue",value:function(){this.props.navigation.setParams({name:y.default.t('CHANGE_INFORMATION')}),this.forceUpdate()}}],[{key:"options",value:function(t){return{topBar:{title:{text:""},backButton:{visible:!0,color:"white"},buttonsRight:[],buttonColor:"white",background:{color:E.primaryDark}}}}}]),(0,f.default)(n,[{key:"generateState",value:function(){return{isLoading:!1,notifi:!1}}},{key:"render",value:function(){var t=this;return p.default.createElement(v.View,{style:A.container},p.default.createElement(v.StatusBar,{backgroundColor:"#00000030",barStyle:"light-content",translucent:!0}),p.default.createElement(v.ScrollView,{style:{flex:1,paddingTop:30}},p.default.createElement(v.View,{style:A.appContainer},p.default.createElement(v.Image,{source:r(d[23]),style:{width:(0,k.responsiveWidth)(90),resizeMode:"contain"}})),p.default.createElement(v.Text,{style:A.title},y.default.t('ADD_NETWORK')),p.default.createElement(b.Fumi,{iconClass:S.default,iconName:"code",labelStyle:A.labelInput,inputStyle:{color:'black'},value:this.state.validateCode,label:y.default.t('SPONSOR_CODE'),onChangeText:function(n){return t.setState({validateCode:n})},style:A.input}),p.default.createElement(b.Fumi,{label:y.default.t('PHONE'),iconClass:S.default,iconName:'phone',iconColor:'white',style:A.input,autoCapitalize:'none',keyboardType:"phone-pad",autoCorrect:!1,value:this.state.enterPhone,inputStyle:{color:'black'},ref:function(n){t.numberRef=n},onChangeText:function(n){return t.setState({enterPhone:n})},labelStyle:A.labelInput}),p.default.createElement(w.default,{style:A.btnStyle,textStyle:A.btnTextStyle,isLoading:this.state.isLoading,onPress:function(){return t.validateNetwork()}},y.default.t('VALIDATE'))))}},{key:"validateNetwork",value:function(){var t,n,l,u,s=this;return o.default.async(function(c){for(;;)switch(c.prev=c.next){case 0:if(t=this.state,n=t.validateCode,t.isLoading,l=t.enterPhone,void 0===n||null===n||null===l){c.next=8;break}return this.setState({isLoading:!0}),c.next=5,o.default.awrap((0,C.AssignAgentGeo)(n,l));case 5:u=c.sent,this.setState({isLoading:!1}),u&&(void 0!==u.success?v.Alert.alert(y.default.t('ADD_SUCCES'),y.default.t('ADD_SUCCESS_TEXT'),[{text:'OK',onPress:function(){s.setState({validateCode:"",enterPhone:""})}}]):u.error?(u.error,v.Alert.alert("Une erreur est survenu",u.error_msg,[{text:"Ok",onPress:function(){}}])):u.error&&(u.error,v.Alert.alert("Une erreur est survenu","Verifier que les champs sont bien rempli",[{text:"Ok",onPress:function(){}}])));case 8:case"end":return c.stop()}},null,this,null,Promise)}}]),n})(p.Component);e.default=T,T.navigatorStyle={navBarBackgroundColor:E.primaryDark,navBarTextColor:'white',navBarButtonColor:'white',drawUnderStatusBar:!1,statusBarColor:E.primaryDarkAdvanced,statusBarTextColorScheme:'light'},T.navigationOptions=function(t){return{drawerLabel:t.navigation.getParam("name",y.default.t('ADD_NETWORK')),drawerIcon:function(t){t.tintColor;return p.default.createElement(S.default,{name:'user',size:24})}}};var A=v.StyleSheet.create({btnHelpText:{color:'white',fontWeight:'bold'},btnHelp:{width:(0,k.responsiveWidth)(10),marginTop:(0,k.responsiveHeight)(10),alignSelf:'flex-end',marginRight:20,borderColor:'transparent',backgroundColor:E.primaryDark},btnTextStyle:{color:"white",fontWeight:'bold'},btnStyle:{alignSelf:'center',width:(0,k.responsiveWidth)(95),marginTop:20,borderColor:'transparent',backgroundColor:E.primaryDarkAdvanced,height:(0,k.responsiveHeight)(8)},appContainer:{flexDirection:'row',justifyContent:'center',alignItems:'center'},container:{alignItems:'center',justifyContent:'center',alignSelf:'center',flex:1,width:(0,k.responsiveWidth)(100),height:(0,k.responsiveHeight)(100),backgroundColor:E.primary},input:{height:(0,k.responsiveHeight)(10),width:(0,k.responsiveWidth)(90),borderRadius:10,marginTop:20,color:"black"},logo:{width:128,height:128},nameApp:{fontSize:27,fontWeight:'bold',color:'white'},title:{fontSize:22,fontWeight:'bold',margin:10,color:'white'},subtitle:{fontSize:20,margin:10,color:'white'}})},1570,[4,1,273,8,10,12,11,9,13,15,18,696,743,712,1002,711,527,950,709,766,806,808,807,814]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),s=n(r(d[4])),u=n(r(d[5])),c=n(r(d[6])),f=t(r(d[7])),h=r(d[8]),y=n(r(d[9])),p=n(r(d[10])),S=r(d[11]),E=r(d[12]),v=(r(d[13]),r(d[14])),b=(n(r(d[15])),n(r(d[16])),n(r(d[17]))),D=r(d[18]),T=n(r(d[19]));r(d[20]),r(d[21]);n(r(d[22]));var k=r(d[23]),L=r(d[24]),_=n(r(d[25])),C=(r(d[26]),r(d[27]),r(d[28]),n(r(d[29]))),x=r(d[30]),M=r(d[13]),I=r(d[23]);r(d[31]);var w=(function(t){function n(t){var o;return(0,l.default)(this,n),(o=(0,s.default)(this,(0,u.default)(n).call(this,t,!0)))._populateIcons=function(){return new Promise(function(t,n){Promise.all([p.default.getImageSource('sort',30),p.default.getImageSource('layer-group',30)]).then(function(n){n[0],n[1],t(!0)}).catch(function(t){console.log(t),n(t)}).done()})},o._openMenu=function(){return o.setState({visibleMenu:!0})},o._closeMenu=function(){return o.setState({visibleMenu:!1})},o._showDateTimePicker=function(t){1===t?o.setState({isDateTimePickerVisible:!0}):o.setState({isDateEndTimePickerVisible:!0})},o._showDateEndPicker=function(){return o.setState({isDateEndTimePickerVisible:!0})},o._hideDateTimePicker=function(){return o.setState({isDateTimePickerVisible:!1,isDateEndTimePickerVisible:!1})},o.state=o.initState(),(0,D.readUser)().then(function(t){o.setState({user:t})}),o._populateIcons().then(function(){}),o.navigation=o.props.navigation,o}return(0,c.default)(n,t),(0,o.default)(n,[{key:"navigationButtonPressed",value:function(t){var n=t.buttonId;'id'===n?this.showFilter():'sectionned'===n&&this.setState({isSectionned:!this.state.isSectionned})}},{key:"showFilter",value:function(){}},{key:"initState",value:function(){return{user:{},listdata:[],listdataSend:[],conserve:[],count:0,translateAnim:new h.Animated.Value(0),visibleMenu:!1,appState:h.AppState.currentState,filter:!1,sortIcons:null,panelVisible:!1,filder_disable:!0,datestartformated:'La date de debut',dateendformated:'La date de fin',datestart:null,dateend:null,isLoaded:!1,isSectionned:!1,isDateTimePickerVisible:!1,isDateEndTimePickerVisible:!1}}},{key:"updateList",value:function(t){if(!this.state.filter){var n=t.reverse();this.setState({listdata:n,conserve:n,isLoaded:!0})}}},{key:"updateMyList",value:function(t){if(!this.state.filter){var n=t.reverse();this.setState({listdataSend:n,conserve:n,isLoaded:!0})}}},{key:"componentDidMount",value:function(){var t=this,n=this.navigation.state.routeName;this.setState({position:"myDemand"===n?0:1}),this.refreshData(),this.animateSlidingUp(!1),this.props.navigation.addListener("didFocus",function(){t.refreshData(!1),console.warn("loading")})}},{key:"componentWillUnmount",value:function(){clearInterval(this.intervaller)}},{key:"renderList",value:function(t){var n=this;if(this.state.isLoaded&&t instanceof Array){var l=t;return null!==l?l.length>0?f.default.createElement(E.HistoryListItem,{list:t,refreshing:function(){n.refreshData()},isRefreshing:this.state.isRefreshing,navigator:this.props.navigation,style:P.listbackground}):this.state.filter?f.default.createElement(h.View,{style:P.emptyListe},f.default.createElement(h.Text,null,_.default.t('NO_ITEM_REQUEST'))):0===l.length?f.default.createElement(h.View,{style:P.emptyListe},f.default.createElement(h.Text,null,_.default.t('NO_ITEM_REQUEST'))):f.default.createElement(h.View,{style:P.emptyListe},f.default.createElement(h.ProgressBarAndroid,null),f.default.createElement(h.Text,null,_.default.t('LOADING_DOTS'))):f.default.createElement(h.View,{style:P.emptyListe},f.default.createElement(h.Text,null,_.default.t('EMPTY_LIST_REQUEST')," "))}if(0===t.length)return f.default.createElement(h.View,{style:P.emptyListe},f.default.createElement(h.Text,null,_.default.t('NO_ITEM_REQUEST')))}},{key:"renderOptionsMenu",value:function(){var t=this;return f.default.createElement(h.View,{style:{position:"absolute",zIndex:100,paddingTop:50,right:10,flexDirection:'row',visible:this.state.visibleMenu,justifyContent:'center'}},f.default.createElement(x.Menu,{visible:this.state.visibleMenu,onDismiss:this._closeMenu,anchor:f.default.createElement(b.default,{onPress:this._openMenu},"Show menu")},f.default.createElement(x.Menu.Item,{onPress:function(){t.setState({isSectionned:!t.state.isSectionned}),t._closeMenu()},title:"Section"}),f.default.createElement(x.Divider,null),f.default.createElement(x.Menu.Item,{onPress:function(){t.animateSlidingUp(!t.state.isSliding),t._closeMenu()},title:_.default.t("FILTER_DATE")})))}},{key:"animateSlidingUp",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=(0,S.responsiveHeight)(100),l=t?n:0,o=t?0:n;this.setState({isSliding:t}),this.state.translateAnim.setValue(l),h.Animated.timing(this.state.translateAnim,{toValue:o,duration:500,useNativeDriver:!0}).start()}},{key:"render",value:function(){var t=this;return f.default.createElement(x.Provider,null,f.default.createElement(h.View,{style:{flex:1}},f.default.createElement(h.StatusBar,{backgroundColor:I.primaryDark,barStyle:"light-content",translucent:!1}),this.renderSliding(),f.default.createElement(x.Appbar.Header,{dark:!0,style:{backgroundColor:I.primary}},f.default.createElement(x.Appbar.BackAction,{onPress:function(){t.props.navigation.pop()}}),f.default.createElement(x.Appbar.Content,{title:_.default.t('CREDIT_MANAGE'),subtitle:0===this.state.position?_.default.t('MY_DEMAND'):_.default.t('DEMAND_RECEIVE')}),f.default.createElement(x.Appbar.Action,{icon:"refresh",onPress:function(){t.refreshData()}}),f.default.createElement(x.Appbar.Action,{icon:"more-vert",onPress:function(){t._openMenu(),t.renderSliding()}})),this.renderOptionsMenu(),0===this.state.position?this._renderListDemandsSend():this._renderListDemandReceive()))}},{key:"renderSliding",value:function(){return f.default.createElement(h.Animated.View,{style:[P.slidingup,{translateY:this.state.translateAnim}]},f.default.createElement(T.default,{onChange:function(t){return console.log(t)},minDate:"2018-04-20",startDate:"2018-04-30",endDate:"2018-05-05",theme:{activeDayColor:{},monthTitleTextStyle:{color:'#6d95da',fontWeight:'300',fontSize:16},emptyMonthContainerStyle:{},emptyMonthTextStyle:{fontWeight:'200'},weekColumnsContainerStyle:{},weekColumnStyle:{paddingVertical:10},weekColumnTextStyle:{color:'#b6c1cd',fontSize:13},nonTouchableDayContainerStyle:{},nonTouchableDayTextStyle:{},startDateContainerStyle:{},endDateContainerStyle:{},dayContainerStyle:{},dayTextStyle:{color:'#2d4150',fontWeight:'200',fontSize:15},dayOutOfRangeContainerStyle:{},dayOutOfRangeTextStyle:{},todayContainerStyle:{},todayTextStyle:{color:'#6d95da'},activeDayContainerStyle:{backgroundColor:'#6d95da'},activeDayTextStyle:{color:'white'},nonTouchableLastMonthDayTextStyle:{}},style:{height:(0,S.responsiveHeight)(60)}}),f.default.createElement(h.View,{style:{flexDirection:'row'}},f.default.createElement(b.default,null,_.default.t('QUIT')),f.default.createElement(b.default,null,_.default.t('FILTER'))))}},{key:"renderSectionnedList",value:function(t){if(this.state.isLoaded){return null!==t?t.length>0?f.default.createElement(E.HistoryItemSectionned,{list:t,navigator:this.props.navigator,style:P.listbackground}):this.state.filter?f.default.createElement(h.View,{style:P.emptyListe},f.default.createElement(h.Text,null,_.default.t('NO_ITEMS_REQUEST'))):f.default.createElement(h.View,{style:P.emptyListe},f.default.createElement(h.ProgressBarAndroid,null),f.default.createElement(h.Text,null,_.default.t('LOADING_DOTS'))):f.default.createElement(h.View,{style:P.emptyListe},f.default.createElement(h.Text,null,_.default.t('EMPTY_LIST_REQUEST')))}}},{key:"renderLoading",value:function(){return f.default.createElement(h.View,null,f.default.createElement(h.ProgressBarAndroid,null),f.default.createElement(h.Text,null,_.default.t('LOADING_DOTS')))}},{key:"showSlidingUpPanel",value:function(){}},{key:"printOptions",value:function(){var t=this;return"hyper"===this.state.user.category?f.default.createElement(y.default,{buttonColor:k.accent},f.default.createElement(y.default.Item,{buttonColor:k.purpleLight,title:_.default.t('SAVE_HISTORY'),onPress:function(){}},f.default.createElement(p.default,{name:"save",style:P.actionButtonIcon}))):f.default.createElement(y.default,{buttonColor:k.accent},f.default.createElement(y.default.Item,{buttonColor:k.primary,title:_.default.t('MAKE_REQUEST'),onPress:function(){t.props.navigation.push(M.credrequester,{onGoBack:function(){return t.refreshData()}})}},f.default.createElement(p.default,{name:"edit",style:P.actionButtonIcon})),f.default.createElement(y.default.Item,{buttonColor:k.purpleLight,title:_.default.t('SAVE_HISTORY'),onPress:function(){}},f.default.createElement(p.default,{name:"save",style:P.actionButtonIcon})))}},{key:"_renderListDemandsSend",value:function(){return f.default.createElement(h.View,{style:P.container},this.state.isLoaded?this.state.isSectionned?this.renderSectionnedList(this.state.listdataSend):this.renderList(this.state.listdataSend):this.renderLoading(),this.printOptions(),this.showSlidingUpPanel())}},{key:"_renderListDemandReceive",value:function(){return f.default.createElement(h.View,{style:P.container},this.state.isLoaded?this.state.isSectionned?this.renderSectionnedList(this.state.listdata):this.renderList(this.state.listdata):this.renderLoading(),this.printOptions(),this.showSlidingUpPanel())}},{key:"_renderTabGeolocated",value:function(){var t=[{text:_.default.t('DEMAND_SEND')}];return f.default.createElement(L.PagerTabIndicator,{style:{height:(0,S.responsiveHeight)(8)},tabs:t})}},{key:"_renderTabHyper",value:function(){var t=[{text:_.default.t('DEMAND_RECEIVE')}];return f.default.createElement(L.PagerTabIndicator,{style:{height:(0,S.responsiveHeight)(8)},tabs:t})}},{key:"_renderTabs",value:function(){var t=[{text:_.default.t('MY_DEMAND'),iconSource:this.state.usersicon},{text:_.default.t('DEMAND_RECEIVE'),iconSource:this.state.charticon}];return f.default.createElement(L.PagerTabIndicator,{style:{height:(0,S.responsiveHeight)(8)},tabs:t})}},{key:"refreshData",value:function(){var t=this;(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&this.setState({isRefreshing:!0}),(0,v.loadDemandeCredit)().then(function(n){void 0!==n.success&&(t.setState({listdata:[]}),t.updateList(n.demands),0!==t.state.position&&t.props.navigation.setParams({count:n.demands.length}),t.setState({isRefreshing:!1}))}).catch(function(t){console.warn(t)}),(0,v.loadMyDemandeCredit)().then(function(n){void 0!==n.success&&(t.setState({listdataSend:[]}),t.setState({isRefreshing:!1}),0===t.state.position&&t.props.navigation.setParams({count:n.demands.length}),t.updateMyList(n.demands))}).catch(function(t){console.warn(t)})}}]),n})(f.default.Component);w.navigatorStyle={navBarBackgroundColor:k.primary,statusBarColor:k.primaryDark,navBarTextColor:'#FFFFFF',navBarButtonColor:'#FFFFFF',contextualMenuStatusBarColor:I.accent,contextualMenuBackgroundColor:I.accentLight,contextualMenuButtonsColor:'#ffffff'},w.navigationOptions=function(t){var n=t.navigation,l=n.state.routeName;return{tabBarLabel:"myDemand"===l?_.default.t('MY_DEMAND'):_.default.t('DEMAND_RECEIVE'),tabBarIcon:function(t){var o=t.focused,s=(t.horizontal,t.tintColor);return f.default.createElement(C.default,{badgeCount:n.getParam("count",0),size:20,name:"myDemand"===l?"mail":"inbox",color:o?s:"grey"})},drawerLabel:_.default.t('CREDIT_MANAGE'),drawerIcon:function(t){t.tintColor;return f.default.createElement(p.default,{name:'credit-card',size:24})}}};var A=w;e.default=A;h.StyleSheet.create({titleHeader:{fontSize:20,fontWeight:'bold',color:'black',flex:1},datetitle:{fontSize:17,color:'black',marginLeft:(0,S.responsiveWidth)(2)},datetext:{fontSize:16,marginLeft:(0,S.responsiveWidth)(5)},content:{flex:2},btnContainer:{flexDirection:'row',width:(0,S.responsiveWidth)(100),alignSelf:'flex-end',flex:2},btn:{flex:1,borderColor:'transparent',borderRadius:0},btntext:{fontWeight:'bold',color:k.accent},container:{flex:1,justifyContent:'space-evenly'}});var P=h.StyleSheet.create({slidingup:{position:"absolute",height:(0,S.responsiveHeight)(84),bottom:0,backgroundColor:'white',width:(0,S.responsiveWidth)(100),zIndex:1e3},root:{flex:1},container:{flex:1,backgroundColor:'white',justifyContent:'center',alignItems:'center'},emptylist:{flex:1,justifyContent:'center',alignItems:'center'},backgroundd_drawer:{backgroundColor:'#000'},listbackground:{},actionButtonIcon:{fontSize:20,height:22,color:'white'},welcome:{fontSize:20,textAlign:'center',margin:10},instructions:{textAlign:'center',color:'#333333',marginBottom:5},dateText:{marginTop:20,marginLeft:(0,S.responsiveWidth)(13),marginBottom:20,fontSize:17},titlecontent:{fontSize:17,marginLeft:(0,S.responsiveWidth)(10),color:'black'},content:{flex:8},title:{fontSize:20,marginLeft:20,marginTop:20,color:'black',fontWeight:'bold'}})},1571,[4,1,8,9,10,12,13,15,18,524,827,527,1140,807,1149,1002,815,709,711,1023,1024,1142,1134,806,937,712,768,840,405,1572,1029,808]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),u=n(r(d[4])),f=n(r(d[5])),s=n(r(d[6])),c=t(r(d[7])),h=r(d[8]),p=n(r(d[9])),y=(function(t){function n(){return(0,l.default)(this,n),(0,u.default)(this,(0,f.default)(n).apply(this,arguments))}return(0,s.default)(n,t),(0,o.default)(n,[{key:"render",value:function(){var t=this.props,n=t.name,l=t.badgeCount,o=t.color,u=t.size;return c.default.createElement(h.View,{style:{width:3*u/2,height:3*u/2,margin:5}},c.default.createElement(p.default,{name:n,size:u,color:o}),l>0&&c.default.createElement(h.View,{style:{position:'absolute',right:-6,top:-3,backgroundColor:'red',borderRadius:4*u/5,width:3*u/5,height:3*u/5,justifyContent:'center',alignItems:'center'}},c.default.createElement(h.Text,{style:{color:'white',fontSize:10,fontWeight:'bold'}},l)))}}]),n})(c.default.Component);e.default=y},1572,[4,1,8,9,10,12,13,15,18,827]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),l=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=l(r(d[2])),u=l(r(d[3])),o=l(r(d[4])),f=l(r(d[5])),s=l(r(d[6])),v=t(r(d[7])),c=r(d[8]),h=l(r(d[9])),b=l(r(d[10])),p=(r(d[11]),r(d[12]),r(d[13])),k=(function(t){function l(t){var u;return(0,n.default)(this,l),(u=(0,o.default)(this,(0,f.default)(l).call(this,t))).state={valuePosition:0},u.mounted=!1,u.filterOptions=[{value:5,label:"5 km"},{value:15,label:"15 km"},{value:20,label:"20 km"},{value:25,label:"25 km"}],u}return(0,s.default)(l,t),(0,u.default)(l,[{key:"geInitialState",value:function(){return{valuePosition:0}}},{key:"render",value:function(){var t=this;return v.default.createElement(c.View,{style:{flex:1}},v.default.createElement(p,{items:this.filterOptions,defaultItem:this.state.valuePosition,labelPosition:"bottom",onSlidingComplete:function(l){return t.slidingComplete(l)}}),v.default.createElement(c.Text,null,v.default.createElement(c.Text,{style:{fontWeight:"bold"}},void 0===this.state.value?0:this.state.value)," km ",b.default.t("DISTANCE_ARROUND")))}},{key:"slidingComplete",value:function(t){this.setState({value:this.filterOptions[t].value,valuePosition:t})}}]),l})(v.Component);e.default=k,k.navigationOptions=function(t){var l=t.navigation;return{drawerLabel:function(){return null},title:"Filtre",tabBarIcon:function(t){t.focused,t.horizontal;var n=t.tintColor;return v.default.createElement(h.default,{badgeCount:l.getParam("count",0),size:24,name:"filter-list",color:n})}}}},1573,[4,1,8,9,10,12,13,15,18,827,712,1029,806,1378]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"createMaterialBottomTabNavigator",{enumerable:!0,get:function(){return n.default}});var n=t(r(d[1]))},1574,[1,1575]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),o=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(r(d[2])),l=o(r(d[3])),c=o(r(d[4])),s=o(r(d[5])),u=o(r(d[6])),v=o(r(d[7])),p=o(r(d[8])),f=t(r(d[9])),C=r(d[10]),h=r(d[11]),b=r(d[12]),y=(function(t){function o(){var t,n;(0,c.default)(this,o);for(var l=arguments.length,s=new Array(l),p=0;p0?l.response.map(function(t){return c.renderHistoryTransactionItem(t)}):y.default.createElement(h.View,{style:{flex:1,justifyContent:'center',alignItems:'center'}},y.default.createElement(h.Text,{style:O.Typography.body1},C.default.t('NO_WALLET_HISTORY'))):void 0},c.renderHistoryTransaction=function(){return y.default.createElement(y.default.Fragment,null,y.default.createElement(h.View,{style:[_.checkDefault,{borderBottomColor:I.Color.borderColor}]},y.default.createElement(h.Text,{style:[O.Typography.title3,O.Typography.semibold]},C.default.t('TRANSACTION_HISTORY'))),y.default.createElement(h.ScrollView,{style:_.transactionContainer},c.props.loadingTransaction?y.default.createElement(h.View,{style:{flex:1,justifyContent:'center',alignItems:'center'}},'android'===h.Platform.OS?y.default.createElement(y.default.Fragment,null,y.default.createElement(h.ProgressBarAndroid,null),y.default.createElement(h.Text,null,C.default.t('LOADING_DOTS'))):y.default.createElement(y.default.Fragment,null,y.default.createElement(h.ActivityIndicator,{size:"large",color:'#ccc'}),y.default.createElement(h.Text,null,C.default.t('LOADING_DOTS')))):c.renderHistoryTransactionList()))},c.state={index:0,routes:[{key:'depot',title:C.default.t('DEPOSIT')},{key:'retrait',title:C.default.t('WITHDRAWAL')}],heightHeader:E.heightHeader()},B.extend({'+':'plus'}),c.scrollY=new h.Animated.Value(0),c.deltaY=new h.Animated.Value(0),c.heightImageBanner=E.scaleWithPixel(250,1),c.marginTopBanner=c.heightImageBanner-c.state.heightHeader-40,v.IlinkEmitter.on("langueChange",c.updateLangue.bind((0,f.default)(c))),c.props.navigation.state.params.hasOwnProperty('agentId')){var p=c.props.navigation.state.params.agentId;console.log("AGENT id",p),c.props.getWalletActivated(p)}else c.props.getWalletTransactionHistory(c.props.navigation.state.params.wallet.id);return c}return(0,p.default)(l,t),(0,c.default)(l,[{key:"componentDidMount",value:function(){var t=this.props.result;if(this.props.navigation.state.params.hasOwnProperty('agentId')&&null!==t){console.log("AGENT PROPS",this.props);var l=Array.isArray(t)?t[0]:t;this.props.getWalletTransactionHistory(l.id)}}},{key:"updateLangue",value:function(){this.props.navigation.setParams({name:C.default.t('WALLET')}),this.forceUpdate()}},{key:"render",value:function(){console.log('Wallet Detail props',this.props);var t=this.props.navigation.state.params.hasOwnProperty('agentId');return console.log("WALLET PARAMS",this.props.navigation.state.params.wallet),t?this.props.loading?this.renderLoader():null!==this.props.result&&this.renderDetailWallet(this.props.result.response):this.renderDetailWallet(this.props.navigation.state.params.wallet)}}],[{key:"options",value:function(t){return{topBar:{drawBehind:!1,visible:!0,animate:!0,buttonColor:'white',background:{color:'white'},rightButtons:[]},backButton:{visible:!0,color:"white"},buttonColor:"white",background:{color:I.Color.primaryDarkColor},statusBar:{drawBehind:!1,visible:!0}}}}]),l})(y.Component);N.navigationOptions=function(t){t.navigation;return{headerStyle:{backgroundColor:I.Color.primaryColor,paddingTop:10},headerTitleStyle:{color:"white"}}};var P=(0,R.connect)(function(t){return{loading:t.walletReducer.loading,result:t.walletReducer.result,error:t.walletReducer.error,loadingTransaction:t.walletHistoryReducer.loadingTransaction,resultTransaction:t.walletHistoryReducer.resultTransaction,errorTransaction:t.walletHistoryReducer.errorTransaction}},function(t){return(0,L.bindActionCreators)({getWalletActivated:D.default,getWalletTransactionHistory:V.default},t)})(N);e.default=P;var _=h.StyleSheet.create({container:{flex:1,backgroundColor:I.Color.containerBackgroundColor},indicator:{height:2},tab:{width:E.getWidthDevice()/2},tabbar:{height:40},imgBanner:{width:'100%',height:250,position:'absolute'},containField:{padding:10,marginBottom:20,borderWidth:.5,shadowOffset:{width:1.5,height:1.5},shadowOpacity:1,elevation:5,flexDirection:"row",height:140,borderRadius:10},paymentItem:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottomWidth:1,paddingVertical:5,width:(0,A.responsiveWidth)(100),marginBottom:15},iconContent:{width:60,marginRight:10,alignItems:"center"},contentLeftItem:{flex:1,paddingTop:40,paddingLeft:10,paddingRight:10,alignItems:"center"},tagFollow:{width:150,margin:10},profileItem:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",paddingBottom:20,paddingTop:20},checkDefault:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderBottomWidth:1,paddingVertical:10,marginTop:5},blockView:{paddingVertical:10,borderBottomWidth:.5},circlePoint:{width:50,height:50,borderRadius:25,marginRight:5,alignItems:'center',justifyContent:'center'},transactionContainer:{flexDirection:'row',paddingTop:10},containerTouch:{flex:1,flexDirection:'row',alignItems:'center',shadowColor:I.Color.borderColor,borderColor:I.Color.borderColor,borderWidth:.5,shadowOffset:{width:1.5,height:1.5},shadowOpacity:1,elevation:5,borderRadius:10,backgroundColor:I.Color.cardBackgroundColor},contain:{flexDirection:'row',justifyContent:'space-between'},imageBanner:{marginTop:15,marginLeft:5,width:E.scaleWithPixel(30),height:E.scaleWithPixel(30)},content:{height:E.scaleWithPixel(60),paddingHorizontal:10,justifyContent:'space-between',alignItems:'flex-start',flex:1},contentTitle:{paddingTop:5}})},1576,[4,1,6,8,9,10,12,11,13,15,18,869,712,1577,1588,871,1589,1592,1593,1596,766,1599,1595,527,1537,1664,736,1142,1143,1144,1145,1146,1147,1148,1504,1472,1134,807,1665,808]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"TabBar",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(e,"TabView",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(e,"TabBarIndicator",{enumerable:!0,get:function(){return f.default}}),Object.defineProperty(e,"SceneMap",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(e,"ScrollPager",{enumerable:!0,get:function(){return o.default}});var n=t(r(d[1])),u=t(r(d[2])),f=t(r(d[3])),c=t(r(d[4])),o=t(r(d[5]))},1577,[1,1578,1583,1582,1586,1587]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),l=n(r(d[3])),u=n(r(d[4])),s=n(r(d[5])),c=n(r(d[6])),f=n(r(d[7])),h=t(r(d[8])),b=r(d[9]),y=n(r(d[10])),p=n(r(d[11])),v=n(r(d[12])),w=n(r(d[13]));function S(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);n&&(l=l.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),o.push.apply(o,l)}return o}function T(t){for(var n=1;n1){var o=n.map(function(t,n){return n});return b.default.interpolate(t,{inputRange:o,outputRange:o.map(function(t){return t===l?1:0})})}return 1})),w((0,s.default)(o),"getInactiveOpacity",(0,h.default)(function(t,n,l){if(n.length>1){var o=n.map(function(t,n){return n});return b.default.interpolate(t,{inputRange:o,outputRange:o.map(function(t){return t===l?0:1})})}return 0})),o}return(0,f.default)(n,t),(0,o.default)(n,[{key:"render",value:function(){var t=this.props,n=t.route,l=t.position,o=t.navigationState,u=t.renderLabel,c=t.renderIcon,s=t.renderBadge,f=t.getLabelText,h=t.getTestID,w=t.getAccessibilityLabel,E=t.getAccessible,O=t.activeColor,C=void 0===O?"rgba(255, 255, 255, 1)":O,L=t.inactiveColor,V=void 0===L?"rgba(255, 255, 255, 0.7)":L,I=t.pressColor,P=t.pressOpacity,x=t.labelStyle,T=t.style,A=t.onLayout,R=t.onPress,_=t.onLongPress,j=o.routes.indexOf(n),k=o.index===j,D=this.getActiveOpacity(l,o.routes,j),F=this.getInactiveOpacity(l,o.routes,j),B=null,H=null;if(c){var M=c({route:n,focused:!0,color:C}),q=c({route:n,focused:!1,color:V});null!=q&&null!=M&&(B=y.createElement(p.View,{style:S.icon},y.createElement(b.default.View,{style:{opacity:F}},q),y.createElement(b.default.View,{style:[p.StyleSheet.absoluteFill,{opacity:D}]},M)))}var z=void 0!==u?u:function(t){var n=t.route,l=t.color,o=f({route:n});return'string'==typeof o?y.createElement(b.default.Text,{style:[S.label,B?{marginTop:0}:null,{color:l},x]},o):o};if(z){var G=z({route:n,focused:!0,color:C}),J=z({route:n,focused:!1,color:V});H=y.createElement(p.View,null,y.createElement(b.default.View,{style:{opacity:F}},J),y.createElement(b.default.View,{style:[p.StyleSheet.absoluteFill,{opacity:D}]},G))}var K=p.StyleSheet.flatten(T),N=void 0!==(null===K||void 0===K?void 0:K.width)?null:{flex:1},Q={route:n},U=w(Q);U=void 0!==U?U:f(Q);var W=s?s(Q):null;return y.createElement(v.default,{borderless:!0,testID:h(Q),accessible:E(Q),accessibilityLabel:U,accessibilityTraits:k?['button','selected']:'button',accessibilityComponentType:"button",accessibilityRole:"tab",accessibilityStates:k?['selected']:[],pressColor:I,pressOpacity:P,delayPressIn:0,onLayout:A,onPress:R,onLongPress:_,style:N},y.createElement(p.View,{pointerEvents:"none",style:[S.item,K]},B,H,null!=W?y.createElement(p.View,{style:S.badge},W):null))}}]),n})(y.Component);e.default=E;var S=p.StyleSheet.create({label:{margin:4,backgroundColor:'transparent'},icon:{margin:2},item:{flex:1,alignItems:'center',justifyContent:'center',padding:10,minHeight:48},badge:{position:'absolute',top:0,right:0}})},1579,[4,1,8,9,10,12,11,13,15,18,1580,1385,1581]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),u=n(r(d[4])),c=n(r(d[5])),s=n(r(d[6])),f=t(r(d[7])),p=r(d[8]);function b(){return(b=Object.assign||function(t){for(var n=1;n=0||Object.prototype.propertyIsEnumerable.call(t,l)&&(u[l]=t[l])}return u}function O(t,n){if(null==t)return{};var l,o,u={},c=Object.keys(t);for(o=0;o=0||(u[l]=t[l]);return u}var v,h,j,P=(function(t){function n(){return(0,l.default)(this,n),(0,u.default)(this,(0,c.default)(n).apply(this,arguments))}return(0,s.default)(n,t),(0,o.default)(n,[{key:"render",value:function(){var t=this.props,n=t.style,l=t.pressOpacity,o=t.pressColor,u=t.borderless,c=t.children,s=y(t,["style","pressOpacity","pressColor","borderless","children"]);return'android'===p.Platform.OS&&p.Platform.Version>=21?f.createElement(p.TouchableNativeFeedback,b({},s,{background:p.TouchableNativeFeedback.Ripple(o,u)}),f.createElement(p.View,{style:n},f.Children.only(c))):f.createElement(p.TouchableOpacity,b({},s,{style:n,activeOpacity:l}),c)}}]),n})(f.Component);e.default=P,j={pressColor:'rgba(255, 255, 255, .4)'},(h="defaultProps")in(v=P)?Object.defineProperty(v,h,{value:j,enumerable:!0,configurable:!0,writable:!0}):v[h]=j},1580,[4,1,8,9,10,12,13,15,18]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(n){var t,f;return function(){for(var l=!1,o=arguments.length,u=new Array(o),v=0;v1?this.getTranslateX(n,p,u):0,v='auto'===l?p.length>1?this.getWidth(n,p,u):u(0):l;return h.createElement(y.default.View,{style:[T.indicator,{width:v},c.width?{transform:[{translateX:s}]}:{left:"".concat(100/p.length*o.index,"%")},'auto'===l?{opacity:this.opacity}:null,f]})}}]),n})(h.Component);e.default=R;var T=v.StyleSheet.create({indicator:{backgroundColor:'#ffeb3b',position:'absolute',left:0,bottom:0,right:0,height:2}})},1582,[4,1,33,8,9,10,12,11,13,15,18,1385,1581]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),l=n(r(d[3])),u=n(r(d[4])),s=n(r(d[5])),p=n(r(d[6])),c=n(r(d[7])),f=t(r(d[8])),y=r(d[9]),v=r(d[10]),h=n(r(d[11])),b=n(r(d[12])),w=n(r(d[13])),P=n(r(d[14]));function S(){return(S=Object.assign||function(t){for(var n=1;nl.props.lazyPreloadDistance}),v((0,h.default)(l),"handleEnter",function(t){t===l.props.index&&l.state.loading&&l.setState({loading:!1})}),l}return(0,p.default)(n,t),(0,l.default)(n,[{key:"componentDidMount",value:function(){var t=this;this.props.lazy?this.props.addListener('enter',this.handleEnter):this.state.loading&&setTimeout(function(){return t.setState({loading:!1})},0)}},{key:"componentDidUpdate",value:function(t,n){this.props.lazy===t.lazy&&this.state.loading===n.loading||(this.props.lazy&&this.state.loading?this.props.addListener('enter',this.handleEnter):this.props.removeListener('enter',this.handleEnter))}},{key:"componentWillUnmount",value:function(){this.props.removeListener('enter',this.handleEnter)}},{key:"render",value:function(){var t=this.props,n=t.navigationState,o=t.index,l=t.layout,s=t.style,u=this.state.loading,h=n.index===o;return c.createElement(f.View,{accessibilityElementsHidden:!h,importantForAccessibility:h?'auto':'no-hide-descendants',style:[b.route,l.width?{width:l.width}:h?f.StyleSheet.absoluteFill:null,s]},h||l.width?this.props.children({loading:u}):null)}}],[{key:"getDerivedStateFromProps",value:function(t,n){return n.loading&&Math.abs(t.navigationState.index-t.index)<=t.lazyPreloadDistance?{loading:!1}:null}}]),n})(c.Component);e.default=y;var b=f.StyleSheet.create({route:{flex:1,overflow:'hidden'}})},1584,[4,1,8,9,10,12,11,13,15,18]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=n(r(d[2])),o=n(r(d[3])),l=n(r(d[4])),u=n(r(d[5])),p=n(r(d[6])),f=n(r(d[7])),c=n(r(d[8])),h=n(r(d[9])),v=t(r(d[10])),w=r(d[11]),x=r(d[12]),y=t(r(d[13])),S=n(r(d[14]));function I(){return(I=Object.assign||function(t){for(var n=1;n-1&&u.enterListeners.splice(s,1)}}),V((0,c.default)(u),"handleEnteredIndexChange",function(t){var n=(0,s.default)(t,1)[0],o=Math.max(0,Math.min(n,u.props.navigationState.routes.length-1));u.enterListeners.forEach(function(t){return t(o)})}),V((0,c.default)(u),"transitionTo",function(t){var n=new E(0),s=new E(0),o={position:u.progress,time:new E(0),finished:new E(ae)};return L([G(D(u.clock),se,[J(n,N(t,u.layoutWidth,le)),J(s,0),J(o.time,0),J(o.finished,ae),J(u.index,t)]),G(u.isSwipeGesture,[G(z(D(u.clock)),w.I18nManager.isRTL?J(u.initialVelocityForSpring,N(-1,u.velocityX,u.springVelocityScale)):J(u.initialVelocityForSpring,N(u.velocityX,u.springVelocityScale))),Q(u.clock,T({},o,{velocity:u.initialVelocityForSpring}),T({},pe,{},u.springConfig,{toValue:n}))],te(u.clock,T({},o,{frameTime:s}),T({},ce,{},u.timingConfig,{toValue:n}))),G(z(D(u.clock)),Z(u.clock)),G(o.finished,[J(u.isSwipeGesture,ae),J(u.gestureX,0),J(u.velocityX,0),$(u.clock)])])}),V((0,c.default)(u),"handleGestureEvent",W([{nativeEvent:{translationX:u.gestureX,velocityX:u.velocityX,state:u.gestureState}}])),V((0,c.default)(u),"extrapolatedPosition",P(u.gestureX,N(u.velocityX,u.swipeVelocityImpact))),V((0,c.default)(u),"toggleEnabled",function(){u.state.enabled&&u.setState({enabled:!1},function(){u.setState({enabled:!0})})}),V((0,c.default)(u),"maybeCancel",L([G(H(u.gesturesEnabled,O(H(F(u.index,ee(u.routesLength,1)),_(u.gestureX,0)),H(F(u.index,0),U(u.gestureX,0)))),J(u.gesturesEnabled,0))])),V((0,c.default)(u),"translateX",L([X(u.gesturesEnabled,G(z(u.gesturesEnabled),j([u.gesturesEnabled],u.toggleEnabled))),X(u.index,j([u.index],function(t){var n=(0,s.default)(t,1)[0];u.currentIndexValue=n,n!==u.props.navigationState.index&&(u.props.onIndexChange(n),u.pendingIndexValue=n,u.forceUpdate())})),X(u.position,G(w.I18nManager.isRTL?_(u.gestureX,0):U(u.gestureX,0),G(Y(A(u.position),u.lastEnteredIndex),[J(u.lastEnteredIndex,A(u.position)),j([A(u.position)],u.handleEnteredIndexChange)]),G(Y(R(u.position),u.lastEnteredIndex),[J(u.lastEnteredIndex,R(u.position)),j([R(u.position)],u.handleEnteredIndexChange)]))),X(u.isSwiping,[G(z(u.isSwiping),J(u.gesturesEnabled,1)),j([u.isSwiping,u.indexAtSwipeEnd,u.index],function(t){var n=(0,s.default)(t,3),o=n[0],l=n[1],p=n[2],f=u.props,c=f.keyboardDismissMode,h=f.onSwipeStart,v=f.onSwipeEnd;if(o===ie)if(null===h||void 0===h||h(),u.interactionHandle=w.InteractionManager.createInteractionHandle(),'auto'===c){var x=w.TextInput.State.currentlyFocusedField();w.TextInput.State.blurTextInput(x),u.previouslyFocusedTextInput=x}else'on-drag'===c&&w.Keyboard.dismiss();else if(null===v||void 0===v||v(),null!==u.interactionHandle&&w.InteractionManager.clearInteractionHandle(u.interactionHandle),'auto'===c){if(l===p){var y=u.previouslyFocusedTextInput;y&&w.TextInput.State.focusTextInput(y)}u.previouslyFocusedTextInput=null}})]),X(u.nextIndex,G(Y(u.nextIndex,re),[G(D(u.clock),$(u.clock)),J(u.gestureX,0),J(u.index,u.nextIndex),J(u.nextIndex,re)])),G(F(u.gestureState,x.State.ACTIVE),[u.maybeCancel,G(u.isSwiping,se,[J(u.isSwiping,ie),J(u.isSwipeGesture,ie),J(u.offsetX,u.progress)]),J(u.progress,w.I18nManager.isRTL?ee(u.offsetX,u.gestureX):P(u.offsetX,u.gestureX)),$(u.clock)],[J(u.isSwiping,ae),J(u.indexAtSwipeEnd,u.index),u.transitionTo(G(H(U(k(u.gestureX),de),U(k(u.extrapolatedPosition),M(u.layoutWidth,2))),B(K(q(0,ee(u.index,G(U(u.extrapolatedPosition,0),w.I18nManager.isRTL?le:oe,w.I18nManager.isRTL?oe:le))),ee(u.routesLength,1))),u.index))]),u.progress])),V((0,c.default)(u),"getTranslateX",(0,S.default)(function(t,n,s){return N(K(q(N(t,ee(n,1),le),s),0),w.I18nManager.isRTL?-1:1)})),u}return(0,h.default)(n,t),(0,u.default)(n,[{key:"componentDidMount",value:function(){this.context&&this.context.addGestureHandlerRef&&this.context.addGestureHandlerRef(this.gestureHandlerRef)}},{key:"componentDidUpdate",value:function(t){var n=this.props,s=n.navigationState,o=n.layout,l=n.swipeVelocityImpact,u=n.springVelocityScale,p=n.springConfig,f=n.timingConfig,c=s.index,h=s.routes;(c!==t.navigationState.index&&c!==this.currentIndexValue||'number'==typeof this.pendingIndexValue&&c!==this.pendingIndexValue)&&this.jumpToIndex(c),this.pendingIndexValue=void 0,t.navigationState.routes.length!==h.length&&this.routesLength.setValue(h.length),t.layout.width!==o.width&&(this.progress.setValue(-c*o.width),this.layoutWidth.setValue(o.width)),t.swipeVelocityImpact!==l&&this.swipeVelocityImpact.setValue(void 0!==l?l:ue),t.springVelocityScale!==u&&this.springVelocityScale.setValue(void 0!==u?u:fe),t.springConfig!==p&&(this.springConfig.damping.setValue(void 0!==p.damping?p.damping:pe.damping),this.springConfig.mass.setValue(void 0!==p.mass?p.mass:pe.mass),this.springConfig.stiffness.setValue(void 0!==p.stiffness?p.stiffness:pe.stiffness),this.springConfig.restSpeedThreshold.setValue(void 0!==p.restSpeedThreshold?p.restSpeedThreshold:pe.restSpeedThreshold),this.springConfig.restDisplacementThreshold.setValue(void 0!==p.restDisplacementThreshold?p.restDisplacementThreshold:pe.restDisplacementThreshold)),t.timingConfig!==f&&this.timingConfig.duration.setValue(void 0!==f.duration?f.duration:ce.duration)}},{key:"componentWillUnmount",value:function(){null!==this.interactionHandle&&w.InteractionManager.clearInteractionHandle(this.interactionHandle)}},{key:"render",value:function(){var t=this,n=this.props,s=n.layout,o=n.navigationState,l=n.swipeEnabled,u=n.children,p=n.removeClippedSubviews,f=n.gestureHandlerProps,c=this.getTranslateX(this.layoutWidth,this.routesLength,this.translateX);return u({position:this.position,addListener:this.addListener,removeListener:this.removeListener,jumpTo:this.jumpTo,render:function(n){return v.createElement(x.PanGestureHandler,I({ref:t.gestureHandlerRef,simultaneousHandlers:t.state.childPanGestureHandlerRefs,waitFor:t.state.childPanGestureHandlerRefs,enabled:0!==s.width&&l&&t.state.enabled,onGestureEvent:t.handleGestureEvent,onHandlerStateChange:t.handleGestureEvent,activeOffsetX:[-20,de],failOffsetY:[-20,de]},f),v.createElement(y.default.View,{removeClippedSubviews:p,style:[he.container,s.width?{width:s.width*o.routes.length,transform:[{translateX:c}]}:null]},v.createElement(ne.Provider,{value:t.providerVal},n)))}})}}]),n})(v.Component);e.default=ge,V(ge,"defaultProps",{swipeVelocityImpact:ue,springVelocityScale:fe}),V(ge,"contextType",ne);var he=w.StyleSheet.create({container:{flex:1,flexDirection:'row'}})},1585,[4,1,27,33,8,9,10,12,11,13,15,18,2,1385,1581]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(n){var o=n.route,u=n.jumpTo,l=n.position;return p.createElement(v,{key:o.key,component:t[o.key],route:o,jumpTo:u,position:l})}};var o=n(r(d[2])),u=n(r(d[3])),l=n(r(d[4])),f=n(r(d[5])),c=n(r(d[6])),p=t(r(d[7]));function y(t,n){if(null==t)return{};var o,u,l=s(t,n);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(t);for(u=0;u=0||Object.prototype.propertyIsEnumerable.call(t,o)&&(l[o]=t[o])}return l}function s(t,n){if(null==t)return{};var o,u,l={},f=Object.keys(t);for(u=0;u=0||(l[o]=t[o]);return l}var v=(function(t){function n(){return(0,o.default)(this,n),(0,l.default)(this,(0,f.default)(n).apply(this,arguments))}return(0,c.default)(n,t),(0,u.default)(n,[{key:"render",value:function(){var t=this.props,n=t.component,o=y(t,["component"]);return p.createElement(n,o)}}]),n})(p.PureComponent)},1586,[4,1,8,9,10,12,13,15]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(r(d[2])),l=n(r(d[3])),s=n(r(d[4])),u=n(r(d[5])),c=n(r(d[6])),f=n(r(d[7])),p=n(r(d[8])),h=t(r(d[9])),v=r(d[10]),y=n(r(d[11]));function w(t,n,o){return n in t?Object.defineProperty(t,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[n]=o,t}var S=y.default.event,x=y.default.divide,b=y.default.onChange,T=y.default.cond,E=y.default.eq,I=y.default.round,L=y.default.call,H=y.default.Value,P=(function(t){function n(){var t,o;(0,l.default)(this,n);for(var s=arguments.length,p=new Array(s),b=0;b1&&void 0!==arguments[1])||arguments[1];o.scrollViewRef.current&&o.scrollViewRef.current.getNode().scrollTo({x:t,animated:n})}),w((0,f.default)(o),"enterListeners",[]),w((0,f.default)(o),"addListener",function(t,n){switch(t){case'enter':o.enterListeners.push(n)}}),w((0,f.default)(o),"removeListener",function(t,n){switch(t){case'enter':var l=o.enterListeners.indexOf(n);l>-1&&o.enterListeners.splice(l,1)}}),w((0,f.default)(o),"position",new y.default.Value(o.props.navigationState.index*o.props.layout.width)),w((0,f.default)(o),"onScroll",S([{nativeEvent:{contentOffset:{x:o.position}}}])),w((0,f.default)(o),"layoutWidthNode",new H(o.props.layout.width)),w((0,f.default)(o),"relativePosition",x(o.position,o.layoutWidthNode)),o}return(0,p.default)(n,t),(0,s.default)(n,[{key:"componentDidMount",value:function(){this.props.layout.width&&this.scrollTo(this.props.navigationState.index*this.props.layout.width,!1)}},{key:"componentDidUpdate",value:function(t){var n=this.props.navigationState.index*this.props.layout.width;t.navigationState.routes.length!==this.props.navigationState.routes.length||t.layout.width!==this.props.layout.width?this.scrollTo(n,!1):t.navigationState.index!==this.props.navigationState.index&&this.scrollTo(n),t.layout.width!==this.props.layout.width&&this.layoutWidthNode.setValue(this.props.layout.width)}},{key:"componentWillUnmount",value:function(){null!==this.interactionHandle&&v.InteractionManager.clearInteractionHandle(this.interactionHandle)}},{key:"render",value:function(){var t=this,n=this.props,l=n.children,s=n.layout,u=n.onSwipeStart,c=n.onSwipeEnd,f=n.overscroll,p=n.onIndexChange,w=n.navigationState,S=function(){null===u||void 0===u||u(),t.interactionHandle=v.InteractionManager.createInteractionHandle()},x=function(){null===c||void 0===c||c(),null!==t.interactionHandle&&v.InteractionManager.clearInteractionHandle(t.interactionHandle)};return l({position:this.relativePosition,addListener:this.addListener,removeListener:this.removeListener,jumpTo:this.jumpTo,render:function(n){return h.createElement(y.default.ScrollView,{pagingEnabled:!0,directionalLockEnabled:!0,keyboardDismissMode:"on-drag",keyboardShouldPersistTaps:"always",overScrollMode:"never",scrollToOverflowEnabled:!0,scrollEnabled:t.props.swipeEnabled,automaticallyAdjustContentInsets:!1,bounces:f,scrollsToTop:!1,showsHorizontalScrollIndicator:!1,scrollEventThrottle:1,onScroll:t.onScroll,onScrollBeginDrag:S,onScrollEndDrag:x,onMomentumScrollEnd:t.onScroll,contentOffset:t.initialOffset,style:k.container,contentContainerStyle:s.width?{flexDirection:'row',width:s.width*w.routes.length,flex:1}:null,ref:t.scrollViewRef},n,h.createElement(y.default.Code,{exec:b(t.relativePosition,T(E(I(t.relativePosition),t.relativePosition),[L([t.relativePosition],function(t){var n=(0,o.default)(t,1)[0];return p(n)})]))}))}})}}]),n})(h.Component);e.default=P,w(P,"defaultProps",{bounces:!0});var k=v.StyleSheet.create({container:{flex:1}})},1587,[4,1,27,8,9,10,12,11,13,15,18,1385]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.scrollEnabled=e.getHeightDevice=e.getWidthDevice=e.heightTabView=e.heightHeader=e.scaleWithPixel=e.enableExperimental=void 0;var t=r(d[0]),n=t.PixelRatio.get()/2;e.enableExperimental=function(){'android'===t.Platform.OS&&t.UIManager.setLayoutAnimationEnabledExperimental(!0),t.LayoutAnimation.configureNext(t.LayoutAnimation.Presets.easeInEaseOut)};e.scaleWithPixel=function(t){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1.2;return t*(n>o?o:n)};var o=function(){var n=t.Dimensions.get('window').width,o=t.Dimensions.get('window').height,s=n>o;if('android'===t.Platform.OS)return 45;if(t.Platform.isPad)return 65;switch(o){case 375:case 414:case 812:case 896:return s?45:88;default:return s?45:65}};e.heightHeader=o;e.heightTabView=function(){var n=t.Dimensions.get('window').height,s=n-o();switch(n){case 375:case 414:case 812:case 896:s-=30}return s};e.getWidthDevice=function(){return t.Dimensions.get('window').width};e.getHeightDevice=function(){return t.Dimensions.get('window').height};e.scrollEnabled=function(n,s){return s>t.Dimensions.get('window').height-o()}},1588,[18]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.Images=void 0;var o={userAvatar:r(d[0]),bgprimarycolor:r(d[1]),logo:r(d[2]),room6:r(d[3])};e.Images=o},1589,[1018,1590,1137,1591]); +__d(function(g,r,i,a,m,e,d){m.exports=r(d[0]).registerAsset({__packager_asset:!0,httpServerLocation:"/assets/datas/img",width:1920,height:1280,scales:[1],hash:"e6ade7cb50f92b48c551a0e51bbb5cff",name:"bgprimarycolor",type:"png"})},1590,[175]); +__d(function(a,e,s,t,r,h,i){r.exports=e(i[0]).registerAsset({__packager_asset:!0,httpServerLocation:"/assets/datas/img",width:1920,height:1280,scales:[1],hash:"8a6b70645b2552a2a8ff53ee313a20a0",name:"room-6",type:"jpg"})},1591,[175]); +__d(function(g,r,i,a,m,e,d){var l=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=C;var o=l(r(d[1])),t=l(r(d[2])),u=l(r(d[3])),n=r(d[4]),f=r(d[5]),c=l(r(d[6])),y=l(r(d[7])),s=l(r(d[8]));function C(l){var c=l.style,C=l.styleCustomText,p=l.icon,b=l.outline,h=l.full,v=l.round,O=l.loading,T=l.children,S=(0,t.default)(l,["style","styleCustomText","icon","outline","full","round","loading","children"]);return u.default.createElement(n.TouchableOpacity,(0,o.default)({},S,{style:n.StyleSheet.flatten([[s.default.default,{backgroundColor:f.Color.primaryColor}],b&&[s.default.outline,{backgroundColor:f.Color.cardBackgroundColor,borderColor:f.Color.primaryColor}],h&&s.default.full,v&&s.default.round,c]),activeOpacity:.9}),p||null,u.default.createElement(y.default,{style:n.StyleSheet.flatten([s.default.textDefault,b&&{color:f.Color.primaryColor},C]),numberOfLines:1},T||"CustomButton"),O?u.default.createElement(n.ActivityIndicator,{size:"small",color:b?f.Color.primaryColor:f.Color.whiteColor,style:{paddingLeft:5}}):null)}C.propTypes={style:c.default.oneOfType([c.default.object,c.default.array]),icon:c.default.node,outline:c.default.bool,full:c.default.bool,round:c.default.bool,loading:c.default.bool},C.defaultProps={style:{},icon:null,outline:!1,full:!1,round:!1,loading:!1}},1592,[1,6,57,15,18,1593,68,1594,1598]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.Color=void 0;e.Color={primaryColor:"#6784B1",primaryLightColor:"#7698CC",primaryDarkColor:"#637EA5",containerBackgroundColor:"#EEEEEE",primaryDarkAdvancedColor:"#637B9E",cardBackgroundColor:"#ffffff",accentColor:"#D86F22",accentLightColor:"#e27833",purpleLightColor:"#9b59b6",reddeconnectColor:"#ba000d",grayColor:'#9B9B9B',dividerColor:'#BDBDBD',whiteColor:'#FFFFFF',fieldColor:'#F5F5F5',yellowColor:'#FDC60A',navyBlue:'#3C5A99',kashmir:'#5D6D7E',orangeColor:'#E5634D',blueColor:'#5DADE2',pinkColor:'#A569BD',greenColor:'#58D68D',yellowColor:'#FDC60A',textColor:'#212121',borderColor:'#c7c7cc'}},1593,[]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var l=t(r(d[1])),o=t(r(d[2])),n=r(d[3]),h=t(r(d[4])),f=r(d[5]);t(r(d[6]));function u(t){var h=t.header,u=t.title1,y=t.title2,b=t.title3,p=t.headline,c=t.body1,s=t.body2,S=t.callout,W=t.subhead,T=t.footnote,v=t.caption1,F=t.caption2,L=t.overline,O=t.thin,k=t.ultraLight,x=t.light,_=t.regular,A=t.medium,j=t.semibold,P=t.bold,E=t.heavy,M=t.black,q=t.numberOfLines,w=(t.textAlign,t.style),z=t.children;return o.default.createElement(n.Text,(0,l.default)({style:n.StyleSheet.flatten([h&&f.Typography.header,u&&f.Typography.title1,y&&f.Typography.title2,b&&f.Typography.title3,p&&f.Typography.headline,c&&f.Typography.body1,s&&f.Typography.body2,S&&f.Typography.callout,W&&f.Typography.subhead,T&&f.Typography.footnote,v&&f.Typography.caption1,F&&f.Typography.caption2,L&&f.Typography.overline,O&&n.StyleSheet.flatten({fontWeight:f.FontWeight.thin}),k&&n.StyleSheet.flatten({fontWeight:f.FontWeight.ultraLight}),x&&n.StyleSheet.flatten({fontWeight:f.FontWeight.light}),_&&n.StyleSheet.flatten({fontWeight:f.FontWeight.regular}),A&&n.StyleSheet.flatten({fontWeight:f.FontWeight.medium}),j&&n.StyleSheet.flatten({fontWeight:f.FontWeight.semibold}),P&&n.StyleSheet.flatten({fontWeight:f.FontWeight.bold}),E&&n.StyleSheet.flatten({fontWeight:f.FontWeight.heavy}),M&&n.StyleSheet.flatten({fontWeight:f.FontWeight.black}),w&&w])},t,{numberOfLines:q}),z)}u.propTypes={header:h.default.bool,title1:h.default.bool,title2:h.default.bool,title3:h.default.bool,headline:h.default.bool,body1:h.default.bool,body2:h.default.bool,callout:h.default.bool,subhead:h.default.bool,footnote:h.default.bool,caption1:h.default.bool,caption2:h.default.bool,overline:h.default.bool,thin:h.default.bool,ultraLight:h.default.bool,light:h.default.bool,regular:h.default.bool,medium:h.default.bool,semibold:h.default.bool,bold:h.default.bool,heavy:h.default.bool,black:h.default.bool,numberOfLines:h.default.number,textAlign:h.default.string,style:h.default.oneOfType([h.default.object,h.default.array]),children:h.default.node},u.defaultProps={header:!1,title1:!1,title2:!1,title3:!1,headline:!1,body1:!1,body2:!1,callout:!1,subhead:!1,footnote:!1,caption1:!1,caption2:!1,overline:!1,thin:!1,ultraLight:!1,light:!1,regular:!1,medium:!1,semibold:!1,bold:!1,heavy:!1,black:!1,numberOfLines:10,textAlign:'left',style:{},children:''}},1594,[1,6,15,18,68,1595,1596]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.Typography=e.FontWeight=void 0;var t=r(d[0]),o={thin:"100",ultraLight:"200",light:"300",regular:"400",medium:"500",semibold:"600",bold:"700",heavy:"800",black:"900"};e.FontWeight=o;var n=t.StyleSheet.create({header:{fontSize:34,fontWeight:o.regular},title1:{fontSize:28,fontWeight:o.regular},title2:{fontSize:22,fontWeight:o.regular},title3:{fontSize:20,fontWeight:o.regular},headline:{fontSize:17,fontWeight:o.regular},body1:{fontSize:17,fontWeight:o.regular},body2:{fontSize:14,fontWeight:o.regular},callout:{fontSize:17,fontWeight:o.regular},subhead:{fontSize:15,fontWeight:o.regular},footnote:{fontSize:13,fontWeight:o.regular},caption1:{fontSize:12,fontWeight:o.regular},caption2:{fontSize:11,fontWeight:o.regular},overline:{fontSize:10,fontWeight:o.regular}});e.Typography=n},1595,[18]); +__d(function(g,r,i,a,m,e,d){var l=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=p;var o=l(r(d[1])),t=l(r(d[2])),u=l(r(d[3])),n=r(d[4]),c=l(r(d[5])),f=l(r(d[6])),y=l(r(d[7])),C=r(d[8]);function p(l){var c=l.style,p=l.textStyle,b=l.icon,s=l.primary,S=l.primaryIcon,h=l.outline,x=l.outlineIcon,I=l.outlineSecondary,k=l.outlineSecondaryIcon,O=l.small,L=l.light,v=l.gray,T=l.chip,P=l.status,_=l.rate,j=l.rateSmall,E=l.sale,R=l.children,B=(0,t.default)(l,["style","textStyle","icon","primary","primaryIcon","outline","outlineIcon","outlineSecondary","outlineSecondaryIcon","small","light","gray","chip","status","rate","rateSmall","sale","children"]);return u.default.createElement(n.TouchableOpacity,(0,o.default)({},B,{style:n.StyleSheet.flatten([y.default.default,s&&[y.default.primary,{backgroundColor:C.Color.primaryColor}],S&&y.default.primary,h&&[y.default.outline,{borderColor:C.Color.primary,backgroundColor:C.Color.cardBackgroundColor}],x&&y.default.outline,I&&y.default.outlineSecondary,k&&[y.default.outlineSecondary,{borderColor:C.Color.accentColor}],O&&[y.default.small,{backgroundColor:C.Color.primaryColor}],L&&[y.default.light,{backgroundColor:C.Color.primaryColor}],v&&y.default.gray,T&&[y.default.chip,{backgroundColor:C.Color.card,borderColor:C.Color.accentColor}],P&&[y.default.status,{backgroundColor:C.Color.primaryColor}],_&&[y.default.rate,{backgroundColor:C.Color.primaryLightColor}],j&&[y.default.rateSmall,{backgroundColor:C.Color.primaryLightColor}],E&&[y.default.sale,{backgroundColor:C.Color.primaryLightColor}],c]),activeOpacity:.9}),b||null,u.default.createElement(f.default,{style:n.StyleSheet.flatten([s&&y.default.textPrimary,S&&y.default.textPrimary,h&&[y.default.textOutline,{color:C.Color.primaryColor}],x&&[y.default.textOutline,{color:C.Color.primaryColor}],I&&[y.default.textOutlineSecondary,{color:C.Color.accentColor}],k&&[y.default.textOutlineSecondary,{color:C.Color.accentColor}],O&&y.default.textSmall,L&&[y.default.textLight,{color:C.Color.primaryLightColor}],v&&y.default.textGray,T&&[y.default.textChip,{color:C.Color.accentColor}],P&&y.default.textStatus,_&&y.default.textRate,j&&y.default.textRateSmall,E&&y.default.textSale,p]),numberOfLines:1},R||'Tag'))}p.propTypes={style:c.default.oneOfType([c.default.object,c.default.array]),textStyle:c.default.oneOfType([c.default.object,c.default.array]),icon:c.default.node,primary:c.default.bool,primaryIcon:c.default.bool,outline:c.default.bool,outlineIcon:c.default.bool,outlineSecondary:c.default.bool,outlineSecondaryIcon:c.default.bool,small:c.default.bool,light:c.default.bool,gray:c.default.bool,chip:c.default.bool,rate:c.default.bool,rateSmall:c.default.bool,status:c.default.bool,sale:c.default.bool},p.defaultProps={style:{},textStyle:{},icon:null,primary:!1,primaryIcon:!1,outline:!1,outlineIcon:!1,outlineSecondary:!1,outlineSecondaryIcon:!1,small:!1,light:!1,gray:!1,chip:!1,status:!1,rate:!1,rateSmall:!1,sale:!1}},1596,[1,6,57,15,18,68,1594,1597,1593]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;t(r(d[1]));var o=r(d[2]),n=r(d[3]),l=r(d[4]),c=o.StyleSheet.create({default:{flexDirection:'row'},primary:{paddingVertical:5,paddingHorizontal:10,borderRadius:17,alignItems:'center',justifyContent:'center'},textPrimary:o.StyleSheet.flatten([n.Typography.caption1,{color:l.Color.whiteColor}]),outline:{paddingVertical:5,paddingHorizontal:10,borderRadius:16,borderWidth:1,alignItems:'center',justifyContent:'center'},textOutline:n.Typography.caption1,outlineSecondary:{paddingVertical:5,paddingHorizontal:10,borderRadius:17,backgroundColor:l.Color.whiteColor,alignItems:'center',justifyContent:'center'},textOutlineSecondary:n.Typography.caption1,small:{paddingHorizontal:5,borderRadius:5,alignItems:'center',justifyContent:'center'},textSmall:o.StyleSheet.flatten([n.Typography.caption2,{color:l.Color.whiteColor}]),light:{padding:5,borderRadius:5,alignItems:'center',justifyContent:'center'},textLight:n.Typography.caption2,gray:{padding:5,backgroundColor:l.Color.fieldColor,borderColor:l.Color.fieldColor,alignItems:'center',justifyContent:'center'},textGray:o.StyleSheet.flatten([n.Typography.caption2]),chip:{paddingVertical:4,paddingHorizontal:6,borderRadius:16,alignItems:'center',justifyContent:'center',borderWidth:.5},textChip:n.Typography.overline,status:{paddingVertical:3,paddingHorizontal:5,borderRadius:5,alignItems:'center',justifyContent:'center'},textStatus:o.StyleSheet.flatten([n.Typography.caption2,{color:l.Color.whiteColor,fontWeight:n.FontWeight.bold}]),rate:{paddingVertical:5,paddingHorizontal:10,borderTopLeftRadius:5,borderBottomLeftRadius:5,borderBottomRightRadius:5,alignItems:'center',justifyContent:'center'},textRate:o.StyleSheet.flatten([n.Typography.headline,{color:l.Color.whiteColor,fontWeight:n.FontWeight.bold}]),rateSmall:{borderRadius:3,paddingHorizontal:5,alignItems:'center',justifyContent:'center'},textRateSmall:o.StyleSheet.flatten([n.Typography.caption2,{color:l.Color.whiteColor,fontWeight:n.FontWeight.bold}]),sale:{width:50,height:50,borderRadius:25,alignItems:'center',justifyContent:'center'},textSale:o.StyleSheet.flatten([n.Typography.headline,{color:l.Color.whiteColor,fontWeight:n.FontWeight.bold}])});e.default=c},1597,[1,15,18,1595,1593]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=t(r(d[1])),n=r(d[2]),c=r(d[3]),l=r(d[4]);function u(t,o){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(t);o&&(c=c.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,c)}return n}var f=n.StyleSheet.create({default:{height:56,borderRadius:8,flexDirection:"row",justifyContent:"center",alignItems:"center",paddingHorizontal:20},textDefault:(function(t){for(var n=1;n0&&void 0!==arguments[0]?arguments[0]:"number";t.setState({focused:o})},t._displayedFields=function(){var o=t.props,u=o.requiresName,n=o.requiresCVC,s=o.requiresPostalCode;return(0,y.default)(["number","expiry",n?"cvc":null,u?"name":null,s?"postalCode":null])},t._focusPreviousField=function(o){var u=t._displayedFields(),n=u.indexOf(o),s=u[n-1];s&&t.focus(s)},t._focusNextField=function(o){if("name"!==o){var u=t._displayedFields(),n=u.indexOf(o),s=u[n+1];s&&t.focus(s)}},t._change=function(o,u){t.setValues((0,n.default)({},o,u))},t._onFocus=function(o){t.focus(o),t.props.onFocus(o)},t.state={focused:"",values:{},status:{}},t}return(0,p.default)(b,o),(0,l.default)(b,[{key:"render",value:function(){return v.default.createElement(t,(0,u.default)({},this.props,this.state,{onFocus:this._onFocus,onChange:this._change,onBecomeEmpty:this._focusPreviousField,onBecomeValid:this._focusNextField}))}}]),b})(v.Component);return o.propTypes={autoFocus:b.default.bool,onChange:b.default.func.isRequired,onFocus:b.default.func,requiresName:b.default.bool,requiresCVC:b.default.bool,requiresPostalCode:b.default.bool,validatePostalCode:b.default.func},o.defaultProps={autoFocus:!1,onChange:function(){},onFocus:function(){},requiresName:!1,requiresCVC:!0,requiresPostalCode:!1,validatePostalCode:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.match(/^\d{6}$/)?"valid":t.length>6?"invalid":"incomplete"}},o},e.InjectedProps=void 0;var u=o(r(d[2])),n=o(r(d[3])),s=o(r(d[4])),l=o(r(d[5])),c=o(r(d[6])),f=o(r(d[7])),p=o(r(d[8])),v=t(r(d[9])),b=o(r(d[10])),h=o(r(d[11])),C=o(r(d[12])),y=o(r(d[13]));function P(t,o){var u=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);o&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),u.push.apply(u,n)}return u}function O(t){for(var o=1;o0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return t.substr(0,n)},f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,o=[0].concat(n).concat([t.length]);return o.map(function(n,u){if(0===u)return"";var s=o[u-1];return t.substr(s,n-s)}).filter(function(t){return""!==t}).join(" ")},v={gaps:[4,8,12],lengths:[16],code:{size:3}};e.default=function t(h){var p=this;(0,o.default)(this,t),this.formatValues=function(t){var n=u.default.number(t.number).card||v;return(0,l.default)({type:n.type,number:p._formatNumber(t.number,n),expiry:p._formatExpiry(t.expiry),cvc:p._formatCVC(t.cvc,n),name:(0,s.removeLeadingSpaces)(t.name),postalCode:(0,s.removeNonNumber)(t.postalCode)},p._displayedFields)},this._formatNumber=function(t,n){var o=(0,s.removeNonNumber)(t),u=n.lengths[n.lengths.length-1],l=c(o,u);return f(l,n.gaps)},this._formatExpiry=function(t){var n=c((0,s.removeNonNumber)(t),4);return n.match(/^[2-9]$/)?"0"+n:n.length>2?n.substr(0,2)+"/"+n.substr(2,n.length):n},this._formatCVC=function(t,n){var o=n.code.size;return c((0,s.removeNonNumber)(t),o)},this._displayedFields=[].concat((0,n.default)(h),["type"])}},1602,[1,33,8,1603,1639,1640]); +__d(function(g,r,i,a,m,e,d){'use strict';m.exports={number:r(d[0]),expirationDate:r(d[1]),expirationMonth:r(d[2]),expirationYear:r(d[3]),cvv:r(d[4]),postalCode:r(d[5])}},1603,[1604,1633,1636,1635,1637,1638]); +__d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),t=r(d[1]),l=r(d[2]),u=r(d[3]),h=r(d[4]);function s(n,l,u){return t({},{card:n,isPotentiallyValid:l,isValid:u})}m.exports=function(t){var f,o,c,p,y;if(h(t)&&(t=String(t)),!n(t))return s(null,!1,!1);if(t=t.replace(/\-|\s/g,''),!/^\d*$/.test(t))return s(null,!1,!1);if(0===(f=u(t)).length)return s(null,!1,!1);if(1!==f.length)return s(null,!0,!1);for(c='unionpay'===(o=f[0]).type||l(t),y=Math.max.apply(null,o.lengths),p=0;p-1&&t%1==0&&t<=n}},1617,[]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]),o=r(d[2]),p=r(d[3]),c=r(d[4]),h=Object.prototype.hasOwnProperty;m.exports=function(l){for(var u=c(l),f=u.length,s=f&&l.length,v=!!s&&p(s)&&(n(l)||t(l)),y=-1,O=[];++y-1&&u%1==0&&u0;++y2?u[c-2]:void 0,p=c>2?u[2]:void 0,y=c>1?u[c-1]:void 0;for('function'==typeof l?(l=n(l,y,5),c-=2):c-=(l='function'==typeof y?y:void 0)?1:0,p&&o(u[0],u[1],p)&&(l=c<3?void 0:l,c=1);++v=0;)n=parseInt(t.charAt(s),10),o&&(n*=2)>9&&(n=n%10+1),o=!o,c+=n,s--;return c%10==0}},1630,[]); +__d(function(g,r,i,a,m,e,d){'use strict';var t={},n=["visa","master-card","american-express","diners-club","discover","jcb","unionpay","maestro"];function s(t){var n,s,c;return t?(n=t.prefixPattern.source,s=t.exactPattern.source,(c=JSON.parse(JSON.stringify(t))).prefixPattern=n,c.exactPattern=s,c):null}function c(c){var p,o,x,y=[],P=[];if(!('string'==typeof c||c instanceof String))return[];for(x=0;x5?2:1,'1'===n[0]&&(u=n.substr(1),t(u).isPotentiallyValid||(o=2)),{month:l=n.substr(0,o),year:n.substr(l.length)})}},1634,[1635,1620]); +__d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=19;function s(t,n,s){return{isValid:t,isPotentiallyValid:n,isCurrentYear:s||!1}}m.exports=function(l){var u,c,o,f,p;return t(l)?''===l.replace(/\s/g,'')?s(!1,!0):/^\d*$/.test(l)?(c=l.length)<2?s(!1,!0):(u=(new Date).getFullYear(),3===c?s(!1,l.slice(0,2)===String(u).slice(0,2)):c>4?s(!1,!1):(l=parseInt(l,10),o=Number(String(u).substr(2,2)),2===c?(p=o===l,f=l>=o&&l<=o+n):4===c&&(p=u===l,f=l>=u&&l<=u+n),s(f,f,p))):s(!1,!1):s(!1,!1)}},1635,[1605]); +__d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]);function n(t,n,s){return{isValid:t,isPotentiallyValid:n,isValidForThisYear:s||!1}}m.exports=function(s){var o,l,u=(new Date).getMonth()+1;return t(s)?''===s.replace(/\s/g,'')||'0'===s?n(!1,!0):/^\d*$/.test(s)?(o=parseInt(s,10),isNaN(s)?n(!1,!1):n(l=o>0&&o<13,l,l&&o>=u)):n(!1,!1):n(!1,!1)}},1636,[1605]); +__d(function(g,r,i,a,m,e,d){'use strict';var n=r(d[0]),t=3;function l(n,t){for(var l=0;ll?n[u]:l;return l}function o(n,t){return{isValid:n,isPotentiallyValid:t}}m.exports=function(f,c){return c=(c=c||t)instanceof Array?c:[c],n(f)&&/^\d*$/.test(f)?l(c,f.length)?o(!0,!0):f.lengthu(c)?o(!1,!1):o(!0,!0):o(!1,!1)}},1637,[1605]); +__d(function(g,r,i,a,m,e,d){'use strict';var t=r(d[0]),n=3;function u(t,n){return{isValid:t,isPotentiallyValid:n}}m.exports=function(l){return t(l)?l.length0&&void 0!==arguments[0]?arguments[0]:"").replace(/[^\d]/g,"")};e.removeLeadingSpaces=function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(/^\s+/g,"")}},1639,[]); +__d(function(g,r,i,a,m,e,d){var t=9007199254740991,n='[object Arguments]',o='[object Function]',c='[object GeneratorFunction]',u='[object Symbol]',l='object'==typeof g&&g&&g.Object===Object&&g,f='object'==typeof self&&self&&self.Object===Object&&self,b=l||f||Function('return this')();function s(t,n,o){switch(o.length){case 0:return t.call(n);case 1:return t.call(n,o[0]);case 2:return t.call(n,o[0],o[1]);case 3:return t.call(n,o[0],o[1],o[2])}return t.apply(n,o)}function y(t,n){for(var o=-1,c=t?t.length:0,u=Array(c);++o0&&o(b)?n>1?w(b,n-1,o,c,u):p(u,b):c||(u[u.length]=b)}return u}function x(t,n){return C(t=Object(t),n,function(n,o){return o in t})}function C(t,n,o){for(var c=-1,u=n.length,l={};++c-1&&n%1==0&&n<=t}function z(t){var n=typeof t;return!!t&&('object'==n||'function'==n)}function B(t){return!!t&&'object'==typeof t}function D(t){return'symbol'==typeof t||B(t)&&j.call(t)==u}var H,J,K=(H=function(t,n){return null==t?{}:x(t,y(w(n,1),E))},J=F(void 0===J?H.length-1:J,0),function(){for(var t=arguments,n=-1,o=F(t.length-J,0),c=Array(o);++n-1&&t%1==0&&t-1&&t%1==0&&t<=n}function I(n){var t=typeof n;return!!n&&('object'==t||'function'==t)}function P(n){return!!n&&'object'==typeof n}function $(n){return w(n)?O(n):F(n)}m.exports=function(n){return n?p(n,$(n)):[]}},1642,[]); +__d(function(g,r,i,a,m,e,d){var t='Expected a function',n='__lodash_hash_undefined__',o=1,u=2,c=9007199254740991,f='[object Arguments]',l='[object Array]',s='[object Boolean]',p='[object Date]',_='[object Error]',v='[object Function]',h='[object GeneratorFunction]',y='[object Map]',b='[object Number]',j='[object Object]',w='[object RegExp]',O='[object Set]',A='[object String]',k='[object Symbol]',S='[object ArrayBuffer]',$='[object DataView]',E=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,x=/^\w*$/,F=/^\./,M=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,P=/\\(\\)?/g,I=/^\[object .+?Constructor\]$/,T=/^(?:0|[1-9]\d*)$/,U={};U['[object Float32Array]']=U['[object Float64Array]']=U['[object Int8Array]']=U['[object Int16Array]']=U['[object Int32Array]']=U['[object Uint8Array]']=U['[object Uint8ClampedArray]']=U['[object Uint16Array]']=U['[object Uint32Array]']=!0,U[f]=U[l]=U[S]=U[s]=U[$]=U[p]=U[_]=U[v]=U[y]=U[b]=U[j]=U[w]=U[O]=U[A]=U["[object WeakMap]"]=!1;var z='object'==typeof g&&g&&g.Object===Object&&g,C='object'==typeof self&&self&&self.Object===Object&&self,L=z||C||Function('return this')(),W='object'==typeof e&&e&&!e.nodeType&&e,B=W&&'object'==typeof m&&m&&!m.nodeType&&m,D=B&&B.exports===W&&z.process,R=(function(){try{return D&&D.binding('util')}catch(t){}})(),V=R&&R.isTypedArray;function G(t,n){for(var o=-1,u=t?t.length:0;++o-1},xt.prototype.set=function(t,n){var o=this.__data__,u=Tt(o,t);return u<0?o.push([t,n]):o[u][1]=n,this},Ft.prototype.clear=function(){this.__data__={hash:new Et,map:new(ht||xt),string:new Et}},Ft.prototype.delete=function(t){return tr(this,t).delete(t)},Ft.prototype.get=function(t){return tr(this,t).get(t)},Ft.prototype.has=function(t){return tr(this,t).has(t)},Ft.prototype.set=function(t,n){return tr(this,t).set(t,n),this},Mt.prototype.add=Mt.prototype.push=function(t){return this.__data__.set(t,n),this},Mt.prototype.has=function(t){return this.__data__.has(t)},Pt.prototype.clear=function(){this.__data__=new xt},Pt.prototype.delete=function(t){return this.__data__.delete(t)},Pt.prototype.get=function(t){return this.__data__.get(t)},Pt.prototype.has=function(t){return this.__data__.has(t)},Pt.prototype.set=function(t,n){var o=this.__data__;if(o instanceof xt){var u=o.__data__;if(!ht||u.length<199)return u.push([t,n]),this;o=this.__data__=new Ft(u)}return o.set(t,n),this};var Ut,zt,Ct=(Ut=function(t,n){return t&&Wt(t,n,$r)},function(t,n){if(null==t)return t;if(!br(t))return Ut(t,n);for(var o=t.length,u=zt?o:-1,c=Object(t);(zt?u--:++u_))return!1;var h=s.get(t);if(h&&s.get(n))return h==n;var y=-1,b=!0,j=l&o?new Mt:void 0;for(s.set(t,n),s.set(n,t);++y<_;){var w=t[y],O=n[y];if(f)var A=p?f(O,w,y,n,t,s):f(w,O,y,t,n,s);if(void 0!==A){if(A)continue;b=!1;break}if(j){if(!N(n,function(t,n){if(!j.has(n)&&(w===t||c(w,t,f,l,s)))return j.add(n)})){b=!1;break}}else if(w!==O&&!c(w,O,f,l,s)){b=!1;break}}return s.delete(t),s.delete(n),b}function Yt(t,n,c,f,l,v,h){switch(c){case $:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case S:return!(t.byteLength!=n.byteLength||!f(new lt(t),new lt(n)));case s:case p:case b:return vr(+t,+n);case _:return t.name==n.name&&t.message==n.message;case w:case A:return t==n+'';case y:var j=K;case O:var E=v&u;if(j||(j=Q),t.size!=n.size&&!E)return!1;var x=h.get(t);if(x)return x==n;v|=o,h.set(t,n);var F=Xt(j(t),j(n),f,l,v,h);return h.delete(t),F;case k:if(St)return St.call(t)==St.call(n)}return!1}function Zt(t,n,o,c,f,l){var s=f&u,p=$r(t),_=p.length;if(_!=$r(n).length&&!s)return!1;for(var v=_;v--;){var h=p[v];if(!(s?h in n:it.call(n,h)))return!1}var y=l.get(t);if(y&&l.get(n))return y==n;var b=!0;l.set(t,n),l.set(n,t);for(var j=s;++v<_;){var w=t[h=p[v]],O=n[h];if(c)var A=s?c(O,w,h,n,t,l):c(w,O,h,t,n,l);if(!(void 0===A?w===O||o(w,O,c,f,l):A)){b=!1;break}j||(j='constructor'==h)}if(b&&!j){var k=t.constructor,S=n.constructor;k!=S&&'constructor'in t&&'constructor'in n&&!('function'==typeof k&&k instanceof k&&'function'==typeof S&&S instanceof S)&&(b=!1)}return l.delete(t),l.delete(n),b}function tr(t,n){var o,u,c=t.__data__;return('string'==(u=typeof(o=n))||'number'==u||'symbol'==u||'boolean'==u?'__proto__'!==o:null===o)?c['string'==typeof n?'string':'hash']:c.map}function rr(t){for(var n=$r(t),o=n.length;o--;){var u=n[o],c=t[u];n[o]=[u,c,cr(c)]}return n}function nr(t,n){var o=H(t,n);return Nt(o)?o:void 0}var er=function(t){return at.call(t)};function or(t,n,o){for(var u,c=-1,f=(n=ar(n,t)?[n]:Qt(n)).length;++c-1&&t%1==0&&t-1&&t%1==0&&t<=c}function wr(t){var n=typeof t;return!!t&&('object'==n||'function'==n)}function mr(t){return!!t&&'object'==typeof t}function Or(t){return'symbol'==typeof t||mr(t)&&at.call(t)==k}var Ar=V?(function(t){return function(n){return t(n)}})(V):function(t){return mr(t)&&jr(t.length)&&!!U[at.call(t)]};function kr(t,n,o){var u=null==t?void 0:Bt(t,n);return void 0===u?o:u}function Sr(t,n){return null!=t&&or(t,n,Dt)}function $r(t){return br(t)?It(t):qt(t)}function Er(t){return t}m.exports=function(t,n,o){var u,c,f,l,s,p=yr(t)?G:Lt;return o&&ir(t,n,o)&&(n=void 0),p(t,'function'==typeof(f=n)?f:null==f?Er:'object'==typeof f?yr(f)?Ht(f[0],f[1]):1==(c=rr(u=f)).length&&c[0][2]?fr(c[0][0],c[0][1]):function(t){return t===u||Gt(t,u,c)}:ar(s=f)?(l=sr(s),function(t){return null==t?void 0:t[l]}):Jt(s))}},1643,[]); +__d(function(g,r,i,a,m,e,d){m.exports=function(n){for(var t=-1,o=n?n.length:0,f=0,u=[];++t0&&{height:this.state.height},this.state.width>0&&{width:this.state.width}],flipHorizontal:this.props.flipHorizontal,flipVertical:this.props.flipVertical,perspective:this.props.perspective,onLayout:function(s){var p=s.nativeEvent.layout,o=(p.x,p.y,p.width),n=p.height,h=(0,l.default)(t.state.back,{width:o,height:n});t.setState({back:h}),t.state.mesured&&(t.props.alignHeight&&t.setState({height:Math.max(t.state.face.height,t.state.back.height)}),t.props.alignWidth&&t.setState({width:Math.max(t.state.face.width,t.state.back.width)}))}},s[1]):f.default.createElement(w,{style:[this.state.height>0&&{height:this.state.height},this.state.width>0&&{width:this.state.width}],onLayout:function(s){var p=s.nativeEvent.layout,o=(p.x,p.y,p.width),n=p.height,h=(0,l.default)(t.state.face,{width:o,height:n});t.setState({face:h}),t.state.mesured&&(t.props.alignHeight&&t.setState({height:Math.max(t.state.face.height,t.state.back.height)}),t.props.alignWidth&&t.setState({width:Math.max(t.state.face.width,t.state.back.width)}))}},s[0]),this.props.clickable){var n=0;return((this.props.alignHeight||this.props.alignWidth)&&this.state.mesured||!this.props.alignHeight&&!this.props.alignWidth)&&(n=1),f.default.createElement(v.TouchableOpacity,{style:{flex:1},testID:this.props.testID,activeOpacity:1,onPress:function(){t._toggleCard()}},f.default.createElement(v.Animated.View,(0,l.default)({},this.props,{style:[y.default.flipCard,{transform:p,opacity:n},this.props.style]}),o))}return f.default.createElement(v.Animated.View,(0,l.default)({},this.props,{style:[y.default.flipCard,{transform:p},this.props.style]}),o)}}]),s})(f.Component);e.default=b,b.propTypes={style:v.ViewPropTypes.style},b.propTypes={flip:c.default.bool,friction:c.default.number,perspective:c.default.number,flipHorizontal:c.default.bool,flipVertical:c.default.bool,clickable:c.default.bool,onFlipEnd:c.default.func,onFlipStart:c.default.func,alignHeight:c.default.bool,alignWidth:c.default.bool,useNativeDriver:c.default.bool,children:function(t,s,l){var p=t[s];if(2!==f.default.Children.count(p))return new Error('`'+l+"` should contain exactly two children. The first child represents the front of the card. The second child represents the back of the card.")}},b.defaultProps={flip:!1,friction:6,perspective:1e3,flipHorizontal:!1,flipVertical:!0,clickable:!0,onFlipEnd:function(){},onFlipStart:function(){},alignHeight:!1,alignWidth:!1,useNativeDriver:!0};var w=(function(t){function s(){return(0,p.default)(this,s),(0,n.default)(this,(0,h.default)(s).apply(this,arguments))}return(0,u.default)(s,t),(0,o.default)(s,[{key:"render",value:function(){return f.default.createElement(v.View,{style:[y.default.face,this.props.style],onLayout:this.props.onLayout},this.props.children)}}]),s})(f.Component);e.Face=w,w.propTypes={children:function(t,s,l){}};var k=(function(t){function s(){return(0,p.default)(this,s),(0,n.default)(this,(0,h.default)(s).apply(this,arguments))}return(0,u.default)(s,t),(0,o.default)(s,[{key:"render",value:function(){var t=[];return this.props.flipHorizontal&&(t.push({scaleX:-1}),"android"===v.Platform.OS&&t.push({perspective:this.props.perspective})),this.props.flipVertical&&(t.push({scaleY:-1}),"android"===v.Platform.OS&&t.push({perspective:this.props.perspective})),f.default.createElement(v.View,{style:[y.default.back,this.props.style,{transform:t}],onLayout:this.props.onLayout},this.props.children)}}]),s})(f.Component);e.Back=k,k.defaultProps={flipHorizontal:!1,flipVertical:!0,perspective:1e3},k.propTypes={flipHorizontal:c.default.bool,flipVertical:c.default.bool,perspective:c.default.number,children:function(t,s,l){}}},1658,[4,1,6,8,9,10,12,13,15,68,18,1659]); +__d(function(g,r,i,a,m,e,d){'use strict';Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(d[0]).StyleSheet.create({flipCard:{flex:1},face:{flex:1},back:{flex:1}});e.default=t},1659,[18]); +__d(function(g,r,i,a,m,e,d){m.exports=r(d[0]).registerAsset({__packager_asset:!0,httpServerLocation:"/assets/node_modules/react-native-credit-card-input/images",width:456,height:292,scales:[1],hash:"51f117706ff4cfc614abbc45a67afc4f",name:"card-front",type:"png"})},1660,[175]); +__d(function(g,r,i,a,m,e,d){m.exports=r(d[0]).registerAsset({__packager_asset:!0,httpServerLocation:"/assets/node_modules/react-native-credit-card-input/images",width:456,height:292,scales:[1],hash:"45c1d3c823f2e173bcd56271ce49848e",name:"card-back",type:"png"})},1661,[175]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),l=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=l(r(d[2])),n=l(r(d[3])),u=l(r(d[4])),p=l(r(d[5])),s=l(r(d[6])),c=l(r(d[7])),f=t(r(d[8])),y=l(r(d[9])),v=r(d[10]),h=v.StyleSheet.create({baseInputStyle:{color:"black"}}),C=(function(t){function l(){var t,o;(0,n.default)(this,l);for(var u=arguments.length,c=new Array(u),f=0;f":"greater","|":"or","\xa2":"cent","\xa3":"pound","\xa4":"currency","\xa5":"yen","\xa9":"(c)","\xaa":"a","\xae":"(r)","\xba":"o","\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xc6":"AE","\xc7":"C","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xd0":"D","\xd1":"N","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xdd":"Y","\xde":"TH","\xdf":"ss","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xe6":"ae","\xe7":"c","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xf0":"d","\xf1":"n","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xfd":"y","\xfe":"th","\xff":"y","\u0100":"A","\u0101":"a","\u0102":"A","\u0103":"a","\u0104":"A","\u0105":"a","\u0106":"C","\u0107":"c","\u010c":"C","\u010d":"c","\u010e":"D","\u010f":"d","\u0110":"DJ","\u0111":"dj","\u0112":"E","\u0113":"e","\u0116":"E","\u0117":"e","\u0118":"e","\u0119":"e","\u011a":"E","\u011b":"e","\u011e":"G","\u011f":"g","\u0122":"G","\u0123":"g","\u0128":"I","\u0129":"i","\u012a":"i","\u012b":"i","\u012e":"I","\u012f":"i","\u0130":"I","\u0131":"i","\u0136":"k","\u0137":"k","\u013b":"L","\u013c":"l","\u013d":"L","\u013e":"l","\u0141":"L","\u0142":"l","\u0143":"N","\u0144":"n","\u0145":"N","\u0146":"n","\u0147":"N","\u0148":"n","\u0150":"O","\u0151":"o","\u0152":"OE","\u0153":"oe","\u0154":"R","\u0155":"r","\u0158":"R","\u0159":"r","\u015a":"S","\u015b":"s","\u015e":"S","\u015f":"s","\u0160":"S","\u0161":"s","\u0162":"T","\u0163":"t","\u0164":"T","\u0165":"t","\u0168":"U","\u0169":"u","\u016a":"u","\u016b":"u","\u016e":"U","\u016f":"u","\u0170":"U","\u0171":"u","\u0172":"U","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017a":"z","\u017b":"Z","\u017c":"z","\u017d":"Z","\u017e":"z","\u0192":"f","\u01a0":"O","\u01a1":"o","\u01af":"U","\u01b0":"u","\u01c8":"LJ","\u01c9":"lj","\u01cb":"NJ","\u01cc":"nj","\u0218":"S","\u0219":"s","\u021a":"T","\u021b":"t","\u02da":"o","\u0386":"A","\u0388":"E","\u0389":"H","\u038a":"I","\u038c":"O","\u038e":"Y","\u038f":"W","\u0390":"i","\u0391":"A","\u0392":"B","\u0393":"G","\u0394":"D","\u0395":"E","\u0396":"Z","\u0397":"H","\u0398":"8","\u0399":"I","\u039a":"K","\u039b":"L","\u039c":"M","\u039d":"N","\u039e":"3","\u039f":"O","\u03a0":"P","\u03a1":"R","\u03a3":"S","\u03a4":"T","\u03a5":"Y","\u03a6":"F","\u03a7":"X","\u03a8":"PS","\u03a9":"W","\u03aa":"I","\u03ab":"Y","\u03ac":"a","\u03ad":"e","\u03ae":"h","\u03af":"i","\u03b0":"y","\u03b1":"a","\u03b2":"b","\u03b3":"g","\u03b4":"d","\u03b5":"e","\u03b6":"z","\u03b7":"h","\u03b8":"8","\u03b9":"i","\u03ba":"k","\u03bb":"l","\u03bc":"m","\u03bd":"n","\u03be":"3","\u03bf":"o","\u03c0":"p","\u03c1":"r","\u03c2":"s","\u03c3":"s","\u03c4":"t","\u03c5":"y","\u03c6":"f","\u03c7":"x","\u03c8":"ps","\u03c9":"w","\u03ca":"i","\u03cb":"y","\u03cc":"o","\u03cd":"y","\u03ce":"w","\u0401":"Yo","\u0402":"DJ","\u0404":"Ye","\u0406":"I","\u0407":"Yi","\u0408":"J","\u0409":"LJ","\u040a":"NJ","\u040b":"C","\u040f":"DZ","\u0410":"A","\u0411":"B","\u0412":"V","\u0413":"G","\u0414":"D","\u0415":"E","\u0416":"Zh","\u0417":"Z","\u0418":"I","\u0419":"J","\u041a":"K","\u041b":"L","\u041c":"M","\u041d":"N","\u041e":"O","\u041f":"P","\u0420":"R","\u0421":"S","\u0422":"T","\u0423":"U","\u0424":"F","\u0425":"H","\u0426":"C","\u0427":"Ch","\u0428":"Sh","\u0429":"Sh","\u042a":"U","\u042b":"Y","\u042c":"","\u042d":"E","\u042e":"Yu","\u042f":"Ya","\u0430":"a","\u0431":"b","\u0432":"v","\u0433":"g","\u0434":"d","\u0435":"e","\u0436":"zh","\u0437":"z","\u0438":"i","\u0439":"j","\u043a":"k","\u043b":"l","\u043c":"m","\u043d":"n","\u043e":"o","\u043f":"p","\u0440":"r","\u0441":"s","\u0442":"t","\u0443":"u","\u0444":"f","\u0445":"h","\u0446":"c","\u0447":"ch","\u0448":"sh","\u0449":"sh","\u044a":"u","\u044b":"y","\u044c":"","\u044d":"e","\u044e":"yu","\u044f":"ya","\u0451":"yo","\u0452":"dj","\u0454":"ye","\u0456":"i","\u0457":"yi","\u0458":"j","\u0459":"lj","\u045a":"nj","\u045b":"c","\u045d":"u","\u045f":"dz","\u0490":"G","\u0491":"g","\u0492":"GH","\u0493":"gh","\u049a":"KH","\u049b":"kh","\u04a2":"NG","\u04a3":"ng","\u04ae":"UE","\u04af":"ue","\u04b0":"U","\u04b1":"u","\u04ba":"H","\u04bb":"h","\u04d8":"AE","\u04d9":"ae","\u04e8":"OE","\u04e9":"oe","\u0e3f":"baht","\u10d0":"a","\u10d1":"b","\u10d2":"g","\u10d3":"d","\u10d4":"e","\u10d5":"v","\u10d6":"z","\u10d7":"t","\u10d8":"i","\u10d9":"k","\u10da":"l","\u10db":"m","\u10dc":"n","\u10dd":"o","\u10de":"p","\u10df":"zh","\u10e0":"r","\u10e1":"s","\u10e2":"t","\u10e3":"u","\u10e4":"f","\u10e5":"k","\u10e6":"gh","\u10e7":"q","\u10e8":"sh","\u10e9":"ch","\u10ea":"ts","\u10eb":"dz","\u10ec":"ts","\u10ed":"ch","\u10ee":"kh","\u10ef":"j","\u10f0":"h","\u1e80":"W","\u1e81":"w","\u1e82":"W","\u1e83":"w","\u1e84":"W","\u1e85":"w","\u1e9e":"SS","\u1ea0":"A","\u1ea1":"a","\u1ea2":"A","\u1ea3":"a","\u1ea4":"A","\u1ea5":"a","\u1ea6":"A","\u1ea7":"a","\u1ea8":"A","\u1ea9":"a","\u1eaa":"A","\u1eab":"a","\u1eac":"A","\u1ead":"a","\u1eae":"A","\u1eaf":"a","\u1eb0":"A","\u1eb1":"a","\u1eb2":"A","\u1eb3":"a","\u1eb4":"A","\u1eb5":"a","\u1eb6":"A","\u1eb7":"a","\u1eb8":"E","\u1eb9":"e","\u1eba":"E","\u1ebb":"e","\u1ebc":"E","\u1ebd":"e","\u1ebe":"E","\u1ebf":"e","\u1ec0":"E","\u1ec1":"e","\u1ec2":"E","\u1ec3":"e","\u1ec4":"E","\u1ec5":"e","\u1ec6":"E","\u1ec7":"e","\u1ec8":"I","\u1ec9":"i","\u1eca":"I","\u1ecb":"i","\u1ecc":"O","\u1ecd":"o","\u1ece":"O","\u1ecf":"o","\u1ed0":"O","\u1ed1":"o","\u1ed2":"O","\u1ed3":"o","\u1ed4":"O","\u1ed5":"o","\u1ed6":"O","\u1ed7":"o","\u1ed8":"O","\u1ed9":"o","\u1eda":"O","\u1edb":"o","\u1edc":"O","\u1edd":"o","\u1ede":"O","\u1edf":"o","\u1ee0":"O","\u1ee1":"o","\u1ee2":"O","\u1ee3":"o","\u1ee4":"U","\u1ee5":"u","\u1ee6":"U","\u1ee7":"u","\u1ee8":"U","\u1ee9":"u","\u1eea":"U","\u1eeb":"u","\u1eec":"U","\u1eed":"u","\u1eee":"U","\u1eef":"u","\u1ef0":"U","\u1ef1":"u","\u1ef2":"Y","\u1ef3":"y","\u1ef4":"Y","\u1ef5":"y","\u1ef6":"Y","\u1ef7":"y","\u1ef8":"Y","\u1ef9":"y","\u2018":"\'","\u2019":"\'","\u201c":"\\"","\u201d":"\\"","\u2020":"+","\u2022":"*","\u2026":"...","\u20a0":"ecu","\u20a2":"cruzeiro","\u20a3":"french franc","\u20a4":"lira","\u20a5":"mill","\u20a6":"naira","\u20a7":"peseta","\u20a8":"rupee","\u20a9":"won","\u20aa":"new shequel","\u20ab":"dong","\u20ac":"euro","\u20ad":"kip","\u20ae":"tugrik","\u20af":"drachma","\u20b0":"penny","\u20b1":"peso","\u20b2":"guarani","\u20b3":"austral","\u20b4":"hryvnia","\u20b5":"cedi","\u20b8":"kazakhstani tenge","\u20b9":"indian rupee","\u20bd":"russian ruble","\u20bf":"bitcoin","\u2120":"sm","\u2122":"tm","\u2202":"d","\u2206":"delta","\u2211":"sum","\u221e":"infinity","\u2665":"love","\u5143":"yuan","\u5186":"yen","\ufdfc":"rial"}'),o=JSON.parse('{"vi":{"\u0110":"D","\u0111":"d"}}');function t(t,u){if('string'!=typeof t)throw new Error('slugify: string argument expected');var s=o[(u='string'==typeof u?{replacement:u}:u||{}).locale]||{},c=u.replacement||'-',l=t.split('').reduce(function(o,t){return o+(s[t]||n[t]||t)},'').replace(u.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,'').trim().replace(new RegExp('[\\s'+c+']+','g'),c);return u.lower&&(l=l.toLowerCase()),u.strict&&(l=l.replace(new RegExp('[^a-zA-Z0-9'+c+']','g'),'')),l}return t.extend=function(o){for(var t in o)n[t]=o[t]},t},'object'==typeof e?(m.exports=o(),m.exports.default=o()):'function'==typeof define&&define.amd?define(o):n.slugify=o()},1665,[]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),u=n(r(d[4])),c=n(r(d[5])),s=n(r(d[6])),f=n(r(d[7])),p=t(r(d[8])),y=r(d[9]),E=n(r(d[10])),h=n(r(d[11])),C=(t(r(d[12])),r(d[13]),r(d[14])),v=r(d[15]),w=r(d[16]),T=r(d[17]),I=n(r(d[18])),b=r(d[19]),A=r(d[20]),L=r(d[21]),x=r(d[22]),k=(r(d[23]),r(d[24])),D=(function(t){function n(t){var o;return(0,l.default)(this,n),(o=(0,u.default)(this,(0,c.default)(n).call(this,t))).renderLoader=function(){return p.default.createElement(y.View,{style:{flex:1,justifyContent:'center',alignItems:'center'}},'android'===y.Platform.OS?p.default.createElement(p.default.Fragment,null,p.default.createElement(y.ProgressBarAndroid,null),p.default.createElement(y.Text,null,h.default.t('LOADING_DOTS'))):p.default.createElement(p.default.Fragment,null,p.default.createElement(y.ActivityIndicator,{size:"large",color:'#ccc'}),p.default.createElement(y.Text,null,h.default.t('LOADING_DOTS'))))},o.renderWalletItem=function(t){var n=v.baseUrl+"/datas/img/network/"+k(t.network,{lower:!0})+"-logo.png",l=t;return l.agentId=o.state.agentId,p.default.createElement(y.TouchableOpacity,{key:t.id,style:[S.paymentItem,{borderBottomColor:C.Color.borderColor}],onPress:function(){return o.props.navigation.navigate('walletDetail',{wallet:l})}},p.default.createElement(y.View,{style:{flexDirection:'row',alignItems:'center'}},p.default.createElement(y.View,{style:S.iconContent},p.default.createElement(y.Image,{style:{width:48,height:48},source:{uri:n}})),p.default.createElement(y.View,null,p.default.createElement(y.Text,{style:x.Typography.body1},t.network),p.default.createElement(y.Text,{style:[x.Typography.footnote,C.Color.grayColor],style:{marginTop:5}},h.default.t('COUNTRY'),": ",t.country))))},o.renderWalletList=function(){var t=o.props,n=t.result,l=t.error;return null!==l?void 0!==l.data?p.default.createElement(y.View,{style:{flex:1,justifyContent:'center',alignItems:'center'}},p.default.createElement(y.Text,{style:x.Typography.body1},l.data.error)):p.default.createElement(y.View,{style:{flex:1,justifyContent:'center',alignItems:'center'}},p.default.createElement(y.Text,{style:x.Typography.body1},l)):null!==n&&null!==n.response?Array.isArray(n.response)&&n.response.length>0?p.default.createElement(y.ScrollView,{style:{flex:1,padding:20}},n.response.map(function(t){return o.renderWalletItem(t)})):p.default.createElement(y.View,{style:{flex:1,justifyContent:'center',alignItems:'center'}},p.default.createElement(y.Text,{style:x.Typography.body1},h.default.t('NO_WALLET_ACTIVED'))):void 0},k.extend({'+':'plus'}),w.IlinkEmitter.on("langueChange",o.updateLangue.bind((0,s.default)(o))),o.state={result:null,isDataLoaded:!1,agentId:null},o}return(0,f.default)(n,t),(0,o.default)(n,[{key:"componentDidMount",value:function(){var t=this;(0,A.readUser)().then(function(n){n&&void 0!==n&&void 0!==n.phone&&(t.props.getWalletActivated(n.agentId),t.setState({agentId:n.agentId}))})}},{key:"updateLangue",value:function(){this.props.navigation.setParams({name:h.default.t('WALLET')}),this.forceUpdate()}},{key:"render",value:function(){var t=this;return console.log("WALLET PROPS",this.props),p.default.createElement(T.Provider,null,p.default.createElement(y.View,{style:{flex:1}},p.default.createElement(y.StatusBar,{backgroundColor:C.Color.primaryDarkColor,barStyle:"light-content",translucent:!1}),p.default.createElement(T.Appbar.Header,{dark:!0,style:{backgroundColor:C.Color.primaryColor}},p.default.createElement(T.Appbar.BackAction,{onPress:function(){t.props.navigation.pop()}}),p.default.createElement(T.Appbar.Content,{title:h.default.t('WALLET'),subtitle:h.default.t('SELECT_YOUR_WALLET')})),this.props.loading?this.renderLoader():this.renderWalletList()))}}]),n})(p.Component);D.navigationOptions=function(t){t.navigation;return{header:null,headerMode:'none',headerTitle:null,activeColor:'#f0edf6',inactiveColor:'#3e2465',barStyle:{backgroundColor:'#694fad'},drawerLabel:h.default.t('CREDIT_MANAGE'),drawerIcon:function(t){t.tintColor;return p.default.createElement(E.default,{name:'credit-card',size:24})}}};var O=(0,b.connect)(function(t){return{loading:t.walletReducer.loading,result:t.walletReducer.result,error:t.walletReducer.error}},function(t){return(0,L.bindActionCreators)({getWalletActivated:I.default},t)})(D);e.default=O;var S=y.StyleSheet.create({container:{flex:1,backgroundColor:C.Color.containerBackgroundColor},paymentItem:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",borderBottomWidth:1,paddingVertical:5,width:"100%",marginBottom:15},iconContent:{width:60,marginRight:10,alignItems:"center"}})},1666,[4,1,8,9,10,12,11,13,15,18,869,712,1588,1589,1593,736,766,1029,1537,1504,711,1472,1595,807,1665]); +__d(function(g,r,i,a,m,e,d){"use strict";e.__esModule=!0,e.PersistGate=void 0;var t=(function(t){if(t&&t.__esModule)return t;var o={};if(null!=t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var s=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,n):{};s.get||s.set?Object.defineProperty(o,n,s):o[n]=t[n]}return o.default=t,o})(r(d[0]));function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof("function"==typeof Symbol?Symbol.iterator:"@@iterator")?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==("function"==typeof Symbol?Symbol.prototype:"@@prototype")?"symbol":typeof t})(t)}function n(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")}function s(t,o){for(var n=0;n\/?~]/.test(t)},o.isMontantValid=function(){var t=o.state.montant;return 0==parseInt(t)||t<0?{errorMessage:E.default.t('ENTER_AMOUNT_SUPERIOR_ZEROR'),isValid:!1}:o.isNormalInteger(t)?t>parseInt(o.state.comptePrincipal)?{errorMessage:E.default.t('AMOUNT_SUPERIOR_TO_PRINCIPAL_ACCOUNT'),isValid:!1}:{errorMessage:'',isValid:!0}:{errorMessage:E.default.t('ENTER_VALID_AMOUNT'),isValid:!1}},o.isCreditCardValid=function(){var t=o.state.creditCardInput,n=[];return void 0!==t.status?('incomplete'===t.status.cvc&&n.push(E.default.t('CVC_CARD_ERROR')),'incomplete'===t.status.expiry&&n.push(E.default.t('EXPIRY_CARD_ERROR')),'incomplete'===t.status.number&&n.push(E.default.t('CARD_NUMBER_ERROR'))):n.push(E.default.t('THIS_FIELD_IS_REQUIRED')),n},o.commissionsFees=function(t,n,l){var o=t*n/100;return Math.round(o+l)},o.modalConfirmTransaction=function(){var t=o.props.navigation.state.params.wallet,n=t.frais_min_banque_depot,l=t.taux_com_client_depot;return p.default.createElement(x.default,{visible:o.state.isModalConfirmVisible,onTouchOutside:function(){o.setState({isModalConfirmVisible:!1})},width:.7,dialogTitle:p.default.createElement(x.DialogTitle,{title:E.default.t('CONFIRM_DEPOSIT')}),footer:p.default.createElement(x.DialogFooter,null,p.default.createElement(x.DialogButton,{text:E.default.t('CANCEL_LABEL'),onPress:function(){o.setState({isModalConfirmVisible:!1})}}),p.default.createElement(x.DialogButton,{text:E.default.t('SUBMIT_LABEL'),onPress:function(){o.setState({isModalConfirmVisible:!1,isDataSubmit:!0}),o.props.depositAction({numCarte:parseInt(o.state.creditCardInput.values.number.replace(/ /g,' ')),cvv:o.state.creditCardInput.values.cvc,expiration_date:o.state.creditCardInput.values.expiry,type:"credit",montant:o.state.montant,id_wallet:o.state.id})}}))},p.default.createElement(x.DialogContent,null,p.default.createElement(C.View,{style:[D.blockView,{borderBottomColor:T.Color.borderColor}]},p.default.createElement(C.View,{style:{flexDirection:'row',marginTop:10}},p.default.createElement(C.View,{style:{flex:1}},p.default.createElement(C.Text,{style:[A.default.body2]},E.default.t('AMOUNT'))),p.default.createElement(C.View,{style:{flex:1,alignItems:'flex-end'}},p.default.createElement(C.Text,{style:[b.Typography.caption1,T.Color.grayColor]},o.state.montant))),p.default.createElement(C.View,{style:{flexDirection:'row',marginTop:10}},p.default.createElement(C.View,{style:{flex:1}},p.default.createElement(C.Text,{tyle:[b.Typography.body2]},E.default.t('COMMISSION_FEES'))),p.default.createElement(C.View,{style:{flex:1,alignItems:'flex-end'}},p.default.createElement(C.Text,{style:[b.Typography.caption1,T.Color.grayColor]},o.commissionsFees(o.state.montant,l,n))))),p.default.createElement(C.View,{style:{paddingVertical:10}},p.default.createElement(C.View,{style:{flexDirection:'row',marginTop:10}},p.default.createElement(C.View,{style:{flex:1}},p.default.createElement(C.Text,{tyle:[b.Typography.body2]},E.default.t('TOTAL'))),p.default.createElement(C.View,{style:{flex:1,alignItems:'flex-end'}},p.default.createElement(C.Text,{style:[b.Typography.caption1,T.Color.grayColor]},o.state.montant-o.commissionsFees(o.state.montant,l,n)))))))},o.onSubmitDeposit=function(){var t=o.state.creditCardInput;o.isMontantValid().isValid&&t.valid?o.setState({numCarte:parseInt(t.values.number.replace(/ /g,' ')),cvv:t.values.cvc,expiration_date:t.values.expiry,isModalConfirmVisible:!0}):t.valid||o.setState({displayCardError:!0}),o.setState({isSubmitClick:!0})},o.isHasError=function(){var t=o.props,n=t.error,l=t.result;if(o.state.isDataSubmit)return null!==n?(void 0!==n.data&&(C.Alert.alert(E.default.t("ERROR_LABEL"),n.data.error,[{text:E.default.t("OK"),onPress:function(){}}],{cancelable:!1}),o.props.navigation.state.params.onGoBack(),o.props.navigation.pop()),null):null!==l?(setTimeout(function(){o.props.navigation.state.params.onGoBack(),o.props.navigation.pop()},1500),p.default.createElement(C.View,{style:{position:"absolute",zIndex:1,backgroundColor:"#00000050",width:(0,M.responsiveWidth)(100),height:(0,M.responsiveHeight)(100),flex:1,justifyContent:'center',alignItems:'center'}},p.default.createElement(y.default,{style:D.lottie,source:r(d[37]),autoPlay:!0,loop:!0}))):null},o.state={type:"credit",montant:null,numCarte:0,cvv:0,expiration_date:'',creditCardInput:{},comptePrincipal:o.props.navigation.state.params.wallet.balance_princ,id:o.props.navigation.state.params.wallet.id,isModalConfirmVisible:!1,isDataSubmit:!1,isSubmitClick:!1,displayCardError:!1},console.log("Wallet Params",o.props.navigation.state.params.wallet),_.IlinkEmitter.on("langueChange",o.updateLangue.bind((0,c.default)(o))),o}return(0,f.default)(n,t),(0,o.default)(n,[{key:"updateLangue",value:function(){this.props.navigation.setParams({name:E.default.t('WALLET')}),this.forceUpdate()}},{key:"render",value:function(){var t=this;this.props.error;return p.default.createElement(C.View,{style:[D.container]},this.isHasError(),this.modalConfirmTransaction(),p.default.createElement(C.ScrollView,{style:{padding:20}},p.default.createElement(C.View,{style:{marginTop:10}},p.default.createElement(V.CreditCardInput,{validColor:this.state.creditCardInput.valid?'green':'',invalidColor:this.state.creditCardInput.valid?'':'red',onChange:this.onCreditCardChange,labels:{number:E.default.t('CARD_NUMBER_LABEL'),expiry:E.default.t('CARD_EXPIRY_LABEL'),cvc:E.default.t('CARD_CVC_LABEL')}}),this.state.displayCardError&&this.isCreditCardValid().map(function(t){return p.default.createElement(C.Text,{style:{color:'red',marginLeft:15}},t)})),p.default.createElement(C.View,{style:{margin:20}},p.default.createElement(h.default,{borderBottomColor:this.isMontantValid.isValid?'red':'black',value:this.state.montant,keyboardType:"numeric",label:E.default.t('AMOUNT_LABEL'),style:{marginTop:10},placeholder:E.default.t('AMOUNT_LABEL'),onChangeText:function(n){t.setState({montant:n}),t.isMontantValid()}}),!this.isMontantValid().isValid&&p.default.createElement(C.Text,{style:{color:'red',marginTop:2}},this.isMontantValid().errorMessage),this.state.isSubmitClick&&null===this.state.montant&&p.default.createElement(C.Text,{style:{color:'red',marginTop:2}},E.default.t('PLEASE_ENTER_THE_AMOUNT')),p.default.createElement(C.Text,null)),p.default.createElement(C.View,{style:{margin:10}},p.default.createElement(v.default,{loading:this.props.loading,outline:!0,onPress:function(){return t.onSubmitDeposit()}},E.default.t('VALIDATE')))))}}]),n})(p.Component));S.navigatorStyle={navBarBackgroundColor:T.Color.accentLightColor,statusBarColor:T.Color.accentColor,navBarTextColor:'#FFFFFF',navBarButtonColor:'#FFFFFF'},S.navigationOptions=function(t){t.navigation;return{drawerLabel:function(){return null},title:E.default.t('MAKE_DEPOSIT')}};var L=(0,w.connect)(function(t){return{loading:t.depositReducer.loading,result:t.depositReducer.result,error:t.depositReducer.error}},function(t){return(0,R.bindActionCreators)({depositAction:I.default},t)})(S);e.default=L;var D=C.StyleSheet.create({container:{flex:1,backgroundColor:T.Color.containerBackgroundColor},checkDefault:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderBottomWidth:1,paddingVertical:15,marginTop:10},contentButtonBottom:{borderTopWidth:1,paddingVertical:10,paddingHorizontal:20,flexDirection:"row",justifyContent:"space-between",alignItems:"center"},blockView:{paddingVertical:10,borderBottomWidth:1},lottie:{width:248,height:248}})},1668,[4,1,8,9,10,12,11,13,15,18,869,712,832,1588,871,1589,1592,1669,1593,1596,766,1599,1595,1670,1672,1142,1143,1144,1145,1146,1147,1148,1504,1472,1688,527,1134,1689]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var o=t(r(d[1])),l=r(d[2]),n=t(r(d[3])),u=r(d[4]);r(d[5]);function c(t){u.Color.cardBackgroundColor,t.style;var n=t.onChangeText,c=t.onFocus,f=t.placeholder,s=t.value,y=t.success,p=t.secureTextEntry,b=t.keyboardType,C=t.textAlignVertical,T=t.label,h=t.onSubmitEditing,x=t.borderBottomColor;return o.default.createElement(l.TouchableOpacity,{activeOpacity:.99},o.default.createElement(l.View,{style:{borderBottomWidth:1,borderBottomColor:x}},!!T&&o.default.createElement(l.Text,{style:{fontWeight:'bold'}},T),o.default.createElement(l.TextInput,{keyboardType:b,autoCapitalise:"words",autoCorrect:!1,style:{height:40,color:"black",fontFamily:'Raleway',flex:1,height:'100%',color:u.Color.textColor,paddingTop:5,paddingBottom:5},underlineColorAndroid:"transparent",placeholderTextColor:y?u.Color.grayColor:u.Color.primaryColor,placeholder:f,secureTextEntry:p,value:s,onChangeText:function(t){return n(t)},onFocus:function(){return c()},textAlignVertical:C,onSubmitEditing:h})))}c.propTypes={style:n.default.oneOfType([n.default.object,n.default.array]),onChangeText:n.default.func,onFocus:n.default.func,placeholder:n.default.string,value:n.default.string,success:n.default.bool,label:n.default.string,secureTextEntry:n.default.bool,keyboardType:n.default.string,textAlignVertical:n.default.string,icon:n.default.node,onSubmitEditing:n.default.func},c.defaultProps={style:{},onChangeText:function(t){},onFocus:function(){},placeholder:'Placeholder',value:'',label:'',borderBottomColor:"black",success:!0,secureTextEntry:!1,keyboardType:'default',textAlignVertical:'center',icon:null,onSubmitEditing:function(){}}},1669,[1,15,18,68,1593,1595]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=r(d[1]),s=r(d[2]),n=r(d[3]),u=t(r(d[4])),c=function(t){var c=n.store.getState().authKeyReducer,f=null!==c?c.authKey.token_type+" "+c.authKey.access_token:'';return function(n){n((0,s.fetchDepositPending)()),(0,u.default)({url:o.transactionUrl,method:'POST',headers:{Authorization:f},data:t}).then(function(t){n((0,s.fetchDepositSuccess)(t))}).catch(function(t){n((0,s.fetchDepositError)(t.message)),t.response?n((0,s.fetchDepositError)(t.response)):t.request?n((0,s.fetchDepositError)(t.request)):n((0,s.fetchDepositError)(t.message))})}};e.default=c},1670,[1,736,1671,1540,1476]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.fetchDepositError=e.fetchDepositSuccess=e.fetchDepositPending=void 0;var t=r(d[0]);e.fetchDepositPending=function(){return{type:t.DEPOSIT_PENDING}};e.fetchDepositSuccess=function(n){return{type:t.DEPOSIT_SUCCESS,result:n}};e.fetchDepositError=function(n){return{type:t.DEPOSIT_ERROR,result:n}}},1671,[1559]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.OverlayProps=e.DialogContentProps=e.DialogTitleProps=e.DialogButtonProps=e.DialogFooterActionList=e.DialogFooterProps=e.DialogProps=e.SlideAnimation=e.ScaleAnimation=e.FadeAnimation=e.Animation=e.DialogFooter=e.DialogTitle=e.DialogContent=e.DialogButton=e.Overlay=e.Dialog=void 0;var o=r(d[0]),t=c(r(d[1])),l=c(r(d[2])),n=c(r(d[3])),D=c(r(d[4])),u=c(r(d[5])),s=c(r(d[6])),p=c(r(d[7])),P=c(r(d[8])),f=c(r(d[9])),A=c(r(d[10])),F=c(r(d[11]));function c(o){return o&&o.__esModule?o:{default:o}}e.Dialog=p.default,e.Overlay=l.default,e.DialogButton=u.default,e.DialogContent=s.default,e.DialogTitle=n.default,e.DialogFooter=D.default,e.Animation=P.default,e.FadeAnimation=f.default,e.ScaleAnimation=A.default,e.SlideAnimation=F.default,e.DialogProps=o.DialogProps,e.DialogFooterProps=o.DialogFooterProps,e.DialogFooterActionList=o.DialogFooterActionList,e.DialogButtonProps=o.DialogButtonProps,e.DialogTitleProps=o.DialogTitleProps,e.DialogContentProps=o.DialogContentProps,e.OverlayProps=o.OverlayProps,e.default=t.default},1672,[1673,1676,1680,1683,1684,1674,1685,1679,1681,1682,1686,1687]); +__d(function(g,r,i,a,m,e,d){r(d[0]);var o,n=r(d[1]);(o=n)&&o.__esModule;var t={visible:r(d[2]).bool.isRequired,children:function(o,n,t){if(!Object.prototype.hasOwnProperty.call(o,n))throw new Error('Prop `'+n+'` has type \'any\' or \'mixed\', but was not provided to `'+t+'`. Pass undefined or any other value.')},width:r(d[2]).number,height:r(d[2]).number,rounded:r(d[2]).bool,hasOverlay:r(d[2]).bool,overlayPointerEvents:r(d[2]).oneOf(['auto','none']),overlayBackgroundColor:r(d[2]).string,overlayOpacity:r(d[2]).number,dialogTitle:'function'==typeof Element?r(d[2]).instanceOf(Element):r(d[2]).any,dialogAnimation:r(d[2]).object,dialogStyle:r(d[2]).any,containerStyle:r(d[2]).any,animationDuration:r(d[2]).number,onTouchOutside:r(d[2]).func,onHardwareBackPress:r(d[2]).func,onShow:r(d[2]).func,onDismiss:r(d[2]).func,footer:'function'==typeof Node?r(d[2]).instanceOf(Node):r(d[2]).any,useNativeDriver:r(d[2]).bool};void 0!==e&&Object.defineProperty(e,'babelPluginFlowReactPropTypes_proptype_DialogProps',{value:t,configurable:!0,enumerable:!0});var l=r(d[2]).arrayOf('function'==typeof Element?r(d[2]).instanceOf(Element):r(d[2]).any);void 0!==e&&Object.defineProperty(e,'babelPluginFlowReactPropTypes_proptype_DialogFooterActionList',{value:l,configurable:!0,enumerable:!0});var u={children:r(d[2]).arrayOf('function'==typeof Element?r(d[2]).instanceOf(Element):r(d[2]).any).isRequired,style:r(d[2]).any,bordered:r(d[2]).bool};void 0!==e&&Object.defineProperty(e,'babelPluginFlowReactPropTypes_proptype_DialogFooterProps',{value:u,configurable:!0,enumerable:!0});var p={text:r(d[2]).string.isRequired,onPress:r(d[2]).func.isRequired,align:r(d[2]).string,style:r(d[2]).any,textStyle:r(d[2]).any,disabled:r(d[2]).bool,activeOpacity:r(d[2]).number,bordered:r(d[2]).bool};void 0!==e&&Object.defineProperty(e,'babelPluginFlowReactPropTypes_proptype_DialogButtonProps',{value:p,configurable:!0,enumerable:!0});var y={title:function(o,n,t){if(!Object.prototype.hasOwnProperty.call(o,n))throw new Error('Prop `'+n+'` has type \'any\' or \'mixed\', but was not provided to `'+t+'`. Pass undefined or any other value.')},style:r(d[2]).any,textStyle:r(d[2]).any,align:r(d[2]).string,hasTitleBar:r(d[2]).bool};void 0!==e&&Object.defineProperty(e,'babelPluginFlowReactPropTypes_proptype_DialogTitleProps',{value:y,configurable:!0,enumerable:!0});var s={children:function(o,n,t){if(!Object.prototype.hasOwnProperty.call(o,n))throw new Error('Prop `'+n+'` has type \'any\' or \'mixed\', but was not provided to `'+t+'`. Pass undefined or any other value.')},style:r(d[2]).any};void 0!==e&&Object.defineProperty(e,'babelPluginFlowReactPropTypes_proptype_DialogContentProps',{value:s,configurable:!0,enumerable:!0});var b={visible:r(d[2]).bool.isRequired,opacity:r(d[2]).number.isRequired,onPress:r(d[2]).func,backgroundColor:r(d[2]).string,animationDuration:r(d[2]).number,pointerEvents:r(d[2]).string,useNativeDriver:r(d[2]).bool};void 0!==e&&Object.defineProperty(e,'babelPluginFlowReactPropTypes_proptype_OverlayProps',{value:b,configurable:!0,enumerable:!0})},1673,[15,1674,68]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0});var t,l='src/components/DialogButton.js',o=r(d[0]),n=(t=o)&&t.__esModule?t:{default:t},s=r(d[1]),u=r(d[2]);var c=r(d[3]).babelPluginFlowReactPropTypes_proptype_DialogButtonProps||r(d[4]).any,f='android'===s.Platform.OS,y=s.StyleSheet.create({button:{flex:1,width:'100%',justifyContent:'center',alignItems:'center',paddingTop:16,paddingBottom:16},border:{borderLeftColor:'#CCD0D5',borderLeftWidth:1/s.PixelRatio.get()},text:{fontWeight:f?'400':'500',fontFamily:f?'sans-serif-medium':'System',fontSize:f?19:16,color:'#044DE0'},disable:{color:'#C5C6C5'}});function b(t){var o=t.text,c=t.activeOpacity,f=t.align,b=t.onPress,p=t.style,_=t.textStyle,P=t.disabled,x=t.bordered,C={alignSelf:u.Positions[f]},S=P?y.disable:null,h=x?y.border:null;return n.default.createElement(s.TouchableHighlight,{underlayColor:'#F1F2F2',onPress:b,disabled:P,activeOpacity:c,style:[y.button,C,h,p],__source:{fileName:l,lineNumber:49}},n.default.createElement(s.Text,{style:[y.text,S,_],__source:{fileName:l,lineNumber:56}},o))}b.propTypes=c===r(d[4]).any?{}:c,b.defaultProps={activeOpacity:.6,disabled:!1,bordered:!1,align:'center',style:null,textStyle:null},e.default=b},1674,[15,18,1675,1673,68]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0});e.Positions={left:'flex-start',right:'flex-end',center:'center'}},1675,[]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0});var t=Object.assign||function(t){for(var n=1;n0&&s<=1&&(s*=n),c&&c>0&&c<=1&&(c*=o),{width:s,height:c}}}]),p})();O.defaultProps={rounded:!0,dialogTitle:null,visible:!1,containerStyle:null,animationDuration:150,dialogStyle:null,width:null,height:null,onTouchOutside:function(){},onHardwareBackPress:function(){return!1},hasOverlay:!0,overlayOpacity:.5,overlayPointerEvents:null,overlayBackgroundColor:'#000',onShow:function(){},onDismiss:function(){},footer:null,useNativeDriver:!0},O.propTypes=b,e.default=O},1679,[15,18,1680,1681,1682,1673,68]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0});var t,o=(function(){function t(t,o){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},l=n.initialValue,v=void 0===l?0:l,f=n.useNativeDriver,c=void 0===f||f;o(this,u),this.animate=new t.Animated.Value(v),this.useNativeDriver=c}return n(u,[{key:'in',value:function(n){throw Error('not implemented yet')}},{key:'out',value:function(n){throw Error('not implemented yet')}},{key:'getAnimations',value:function(){throw Error('not implemented yet')}}]),u})();e.default=l},1681,[18,68]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0});var t,n=(function(){function t(t,n){for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{},n=t.initialValue,o=void 0===n?0:n,l=t.useNativeDriver,s=void 0===l||l,v=t.animationDuration,p=void 0===v?200:v;f(this,u);var h=c(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,{initialValue:o,useNativeDriver:s}));return h.animationDuration=p,h}return s(u,l.default),n(u,[{key:'in',value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};o.Animated.timing(this.animate,{toValue:1,duration:this.animationDuration,useNativeDriver:this.useNativeDriver}).start(t)}},{key:'out',value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};o.Animated.timing(this.animate,{toValue:0,duration:this.animationDuration,useNativeDriver:this.useNativeDriver}).start(t)}},{key:'getAnimations',value:function(){return{opacity:this.animate}}}]),u})();e.default=v},1682,[18,1681]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0});var t,l='src/components/DialogTitle.js',o=r(d[0]),n=(t=o)&&t.__esModule?t:{default:t},s=r(d[1]),u=r(d[2]);var p=r(d[3]).babelPluginFlowReactPropTypes_proptype_DialogTitleProps||r(d[4]).any,f='android'===s.Platform.OS,y=s.StyleSheet.create({title:{padding:24,paddingLeft:18,paddingRight:18,borderTopLeftRadius:8,borderTopRightRadius:8},titleBar:{padding:14,borderBottomWidth:1/s.PixelRatio.get(),backgroundColor:'#F9F9FB',borderColor:'#DAD9DC'},text:{fontWeight:f?'400':'500',fontFamily:f?'sans-serif-medium':'System',fontSize:f?19:15,color:'#151822'}});function c(t){var o=t.title,p=t.style,f=t.textStyle,c=t.hasTitleBar,_=t.align,b=c?y.titleBar:null,T={alignItems:u.Positions[_]};return n.default.createElement(s.View,{style:[y.title,T,b,p],__source:{fileName:l,lineNumber:43}},n.default.createElement(s.Text,{style:[y.text,f],__source:{fileName:l,lineNumber:44}},o))}c.propTypes=p===r(d[4]).any?{}:p,c.defaultProps={align:'center',style:null,textStyle:null,hasTitleBar:!0},e.default=c},1683,[15,18,1675,1673,68]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0});var o,t='src/components/DialogFooter.js',l=r(d[0]),n=(o=l)&&o.__esModule?o:{default:o},c=r(d[1]);var u=r(d[2]).babelPluginFlowReactPropTypes_proptype_DialogFooterProps||r(d[3]).any,s=c.StyleSheet.create({border:{borderColor:'#CCD0D5',borderTopWidth:1/c.PixelRatio.get()},actionsVertical:{height:200,flexDirection:'column'},actionsHorizontal:{flexDirection:'row'}});function p(o){var u=o.style,p=o.bordered,b=o.children,f=b.length>2?s.actionsVertical:s.actionsHorizontal,y=p?s.border:null,_=2===b.length?l.Children.map(b,function(o,t){return(0,l.cloneElement)(o,{bordered:1%t==0&&p})}):b;return n.default.createElement(c.View,{style:[f,y,u],__source:{fileName:t,lineNumber:42}},_)}p.propTypes=u===r(d[3]).any?{}:u,p.defaultProps={style:null,bordered:!0},e.default=p},1684,[15,18,1673,68]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0});var t,n='src/components/DialogContent.js',l=r(d[0]),o=(t=l)&&t.__esModule?t:{default:t},p=r(d[1]);var u=r(d[2]).babelPluginFlowReactPropTypes_proptype_DialogContentProps||r(d[3]).any,s=p.StyleSheet.create({content:{paddingLeft:18,paddingRight:18,paddingBottom:24}});function c(t){var l=t.style,u=t.children;return o.default.createElement(p.View,{style:[s.content,l],__source:{fileName:n,lineNumber:17}},u)}c.propTypes=u===r(d[3]).any?{}:u,c.defaultProps={style:null},e.default=c},1685,[15,18,1673,68]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0});var t,n=(function(){function t(t,n){for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:function(){};o.Animated.spring(this.animate,{toValue:1,velocity:0,tension:65,friction:7,useNativeDriver:this.useNativeDriver}).start(t)}},{key:'out',value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};o.Animated.timing(this.animate,{toValue:0,duration:200,useNativeDriver:this.useNativeDriver}).start(t)}},{key:'getAnimations',value:function(){return{transform:[{scale:this.animate.interpolate({inputRange:[0,1],outputRange:[0,1]})}]}}}]),u})();e.default=p},1686,[18,1681]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0});var t,n=(function(){function t(t,n){for(var o=0;o0&&void 0!==arguments[0]?arguments[0]:{},n=t.initialValue,o=void 0===n?0:n,s=t.useNativeDriver,p=void 0===s||s,c=t.slideFrom,h=void 0===c?u.SLIDE_FROM_BOTTOM:c;l(this,u);var v=f(this,(u.__proto__||Object.getPrototypeOf(u)).call(this,{initialValue:o,useNativeDriver:p}));return v.slideFrom=h,v}return p(u,s.default),n(u,[{key:'in',value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};o.Animated.spring(this.animate,{toValue:1,velocity:0,tension:65,friction:10,useNativeDriver:this.useNativeDriver}).start(t)}},{key:'out',value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};o.Animated.spring(this.animate,{toValue:0,velocity:0,tension:65,friction:10,useNativeDriver:this.useNativeDriver}).start(t)}},{key:'getAnimations',value:function(){var t=[];if(this.slideFrom===u.SLIDE_FROM_TOP)t.push({translateY:this.animate.interpolate({inputRange:[0,1],outputRange:[-v,0]})});else if(this.slideFrom===u.SLIDE_FROM_BOTTOM)t.push({translateY:this.animate.interpolate({inputRange:[0,1],outputRange:[v,0]})});else if(this.slideFrom===u.SLIDE_FROM_LEFT)t.push({translateX:this.animate.interpolate({inputRange:[0,1],outputRange:[-h,0]})});else{if(this.slideFrom!==u.SLIDE_FROM_RIGHT)throw new Error('\n slideFrom: '+this.slideFrom+' not supported. \'slideFrom\' must be \'top\' | \'bottom\' | \'left\' | \'right\'\n ');t.push({translateX:this.animate.interpolate({inputRange:[0,1],outputRange:[h,0]})})}return{transform:t}}}]),u})();_.SLIDE_FROM_TOP='top',_.SLIDE_FROM_BOTTOM='bottom',_.SLIDE_FROM_LEFT='left',_.SLIDE_FROM_RIGHT='right',e.default=_},1687,[18,1681]); +__d(function(g,r,i,a,m,e,d){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=r(d[0]),n=(r(d[1]),r(d[2]),t.StyleSheet.create({textInput:{height:46,borderRadius:5,paddingHorizontal:10,width:'100%',justifyContent:'space-between',alignItems:'center',flexDirection:'row'}}));e.default=n},1688,[18,1595,1593]); +__d(function(i,a,x,t,s,r,k){s.exports={v:"5.6.3",fr:29.9700012207031,ip:0,op:47.0000019143492,w:1920,h:1080,nm:"Successful",ddd:0,assets:[],fonts:{list:[{fName:"SFUIDisplay-Bold",fFamily:"SF UI Display",fStyle:"Bold",ascent:73.828125}]},layers:[{ddd:0,ind:1,ty:5,nm:"Payment Successful",sr:1,ks:{o:{a:1,k:[{i:{x:[.833],y:[.833]},o:{x:[.167],y:[.167]},t:27,s:[0]},{t:37.0000015070409,s:[100]}],ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[664.641,864,0],ix:2},a:{a:0,k:[0,0,0],ix:1},s:{a:0,k:[100,100,100],ix:6}},ao:0,t:{d:{k:[{s:{s:64,f:"SFUIDisplay-Bold",t:"",j:0,tr:0,lh:76.8,ls:0,fc:[0,1,.592]},t:0}]},p:{},m:{g:1,a:{a:0,k:[0,0],ix:2}},a:[]},ip:0,op:47.0000019143492,st:0,bm:0},{ddd:0,ind:2,ty:4,nm:"check",sr:1,ks:{o:{a:0,k:100,ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[961.141,540,0],ix:2},a:{a:0,k:[0,0,0],ix:1},s:{a:0,k:[376.304,376.304,100],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0]],v:[[-23,-3.5],[-7.5,12],[20.5,-16]],c:!1},ix:2},nm:"Path 1",mn:"ADBE Vector Shape - Group",hd:!1},{ty:"st",c:{a:0,k:[1,1,1,1],ix:3},o:{a:0,k:100,ix:4},w:{a:0,k:12,ix:5},lc:2,lj:1,ml:4,bm:0,nm:"Stroke 1",mn:"ADBE Vector Graphic - Stroke",hd:!1},{ty:"tr",p:{a:0,k:[0,0],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Shape 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"tm",s:{a:0,k:0,ix:1},e:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:14,s:[0]},{t:27.0000010997325,s:[100]}],ix:2},o:{a:0,k:0,ix:3},m:1,ix:2,nm:"Trim Paths 1",mn:"ADBE Vector Filter - Trim",hd:!1}],ip:0,op:47.0000019143492,st:0,bm:0},{ddd:0,ind:3,ty:4,nm:"elipse bold",sr:1,ks:{o:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:0,s:[0]},{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:14,s:[81]},{t:27.0000010997325,s:[100]}],ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[960,535.5,0],ix:2},a:{a:0,k:[-62,-4.5,0],ix:1},s:{a:1,k:[{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:0,s:[41.25,41.25,100]},{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:14,s:[532.5,532.5,100]},{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:21,s:[413.25,413.25,100]},{t:27.0000010997325,s:[508.75,508.75,100]}],ix:6}},ao:0,shapes:[{ty:"gr",it:[{d:1,ty:"el",s:{a:0,k:[80,80],ix:2},p:{a:0,k:[0,0],ix:3},nm:"Ellipse Path 1",mn:"ADBE Vector Shape - Ellipse",hd:!1},{ty:"fl",c:{a:0,k:[0,1,.590551338944,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[-62,-4.5],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Ellipse 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:0,op:47.0000019143492,st:0,bm:0},{ddd:0,ind:4,ty:4,nm:"elipse light",sr:1,ks:{o:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:0,s:[0]},{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:14,s:[80]},{t:27.0000010997325,s:[0]}],ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[960,535.5,0],ix:2},a:{a:0,k:[-60.75,-4.5,0],ix:1},s:{a:1,k:[{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:0,s:[100,100,100]},{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:14,s:[530,530,100]},{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:21,s:[431,431,100]},{t:27.0000010997325,s:[535,535,100]}],ix:6}},ao:0,shapes:[{ty:"gr",it:[{d:1,ty:"el",s:{a:0,k:[122.5,122.5],ix:2},p:{a:0,k:[0,0],ix:3},nm:"Ellipse Path 1",mn:"ADBE Vector Shape - Ellipse",hd:!1},{ty:"fl",c:{a:0,k:[.501960754395,1,.794924986596,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[-60.75,-4.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Ellipse 1",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}],ip:0,op:47.0000019143492,st:0,bm:0},{ddd:0,ind:5,ty:4,nm:"stars",sr:1,ks:{o:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:9,s:[0]},{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:21,s:[100]},{t:33.0000013441176,s:[0]}],ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[960,540,0],ix:2},a:{a:0,k:[0,0,0],ix:1},s:{a:1,k:[{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:9,s:[89.979,89.979,100]},{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:21,s:[440.397,440.397,100]},{t:33.0000013441176,s:[554.944,554.944,100]}],ix:6}},ao:0,shapes:[{ty:"gr",it:[{ty:"sr",sy:1,d:1,pt:{a:0,k:5,ix:3},p:{a:0,k:[0,0],ix:4},r:{a:0,k:0,ix:5},ir:{a:0,k:4.301,ix:6},is:{a:0,k:0,ix:8},or:{a:0,k:8.602,ix:7},os:{a:0,k:0,ix:9},ix:1,nm:"Polystar Path 1",mn:"ADBE Vector Shape - Star",hd:!1},{ty:"fl",c:{a:0,k:[.011764706817,1,.596078431373,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[2.5,81],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Polystar 7",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ty:"sr",sy:1,d:1,pt:{a:0,k:5,ix:3},p:{a:0,k:[0,0],ix:4},r:{a:0,k:0,ix:5},ir:{a:0,k:2.761,ix:6},is:{a:0,k:0,ix:8},or:{a:0,k:5.523,ix:7},os:{a:0,k:0,ix:9},ix:1,nm:"Polystar Path 1",mn:"ADBE Vector Shape - Star",hd:!1},{ty:"fl",c:{a:0,k:[.011764706817,1,.596078431373,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[-3.5,-91.75],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Polystar 6",np:3,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ty:"sr",sy:1,d:1,pt:{a:0,k:5,ix:3},p:{a:0,k:[0,0],ix:4},r:{a:0,k:0,ix:5},ir:{a:0,k:4.301,ix:6},is:{a:0,k:0,ix:8},or:{a:0,k:8.602,ix:7},os:{a:0,k:0,ix:9},ix:1,nm:"Polystar Path 1",mn:"ADBE Vector Shape - Star",hd:!1},{ty:"fl",c:{a:0,k:[.011764706817,1,.596078431373,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[-82,-12],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Polystar 4",np:3,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{ty:"sr",sy:1,d:1,pt:{a:0,k:5,ix:3},p:{a:0,k:[0,0],ix:4},r:{a:0,k:0,ix:5},ir:{a:0,k:3.64,ix:6},is:{a:0,k:0,ix:8},or:{a:0,k:7.28,ix:7},os:{a:0,k:0,ix:9},ix:1,nm:"Polystar Path 1",mn:"ADBE Vector Shape - Star",hd:!1},{ty:"fl",c:{a:0,k:[.011764706817,1,.596078431373,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[89.5,-14.5],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Polystar 2",np:3,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1}],ip:0,op:47.0000019143492,st:0,bm:0},{ddd:0,ind:6,ty:4,nm:"circle",sr:1,ks:{o:{a:1,k:[{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:9,s:[0]},{i:{x:[.667],y:[1]},o:{x:[.333],y:[0]},t:21,s:[100]},{t:33.0000013441176,s:[0]}],ix:11},r:{a:0,k:0,ix:10},p:{a:0,k:[960,540,0],ix:2},a:{a:0,k:[0,0,0],ix:1},s:{a:1,k:[{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:9,s:[139.752,139.752,100]},{i:{x:[.667,.667,.667],y:[1,1,1]},o:{x:[.333,.333,.333],y:[0,0,0]},t:21,s:[535.117,535.117,100]},{t:33.0000013441176,s:[785.336,785.336,100]}],ix:6}},ao:0,shapes:[{ty:"gr",it:[{d:1,ty:"el",s:{a:0,k:[7.5,7.5],ix:2},p:{a:0,k:[0,0],ix:3},nm:"Ellipse Path 1",mn:"ADBE Vector Shape - Ellipse",hd:!1},{ty:"fl",c:{a:0,k:[.011764706817,1,.596078431373,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[-.25,58.75],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Ellipse 8",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{d:1,ty:"el",s:{a:0,k:[6.5,6.5],ix:2},p:{a:0,k:[0,0],ix:3},nm:"Ellipse Path 1",mn:"ADBE Vector Shape - Ellipse",hd:!1},{ty:"fl",c:{a:0,k:[.011764706817,1,.596078431373,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[-4.25,-61.75],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Ellipse 7",np:3,cix:2,bm:0,ix:2,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{d:1,ty:"el",s:{a:0,k:[7,7],ix:2},p:{a:0,k:[0,0],ix:3},nm:"Ellipse Path 1",mn:"ADBE Vector Shape - Ellipse",hd:!1},{ty:"fl",c:{a:0,k:[.011764706817,1,.596078431373,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[55,-14],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Ellipse 6",np:3,cix:2,bm:0,ix:3,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{d:1,ty:"el",s:{a:0,k:[6,6],ix:2},p:{a:0,k:[0,0],ix:3},nm:"Ellipse Path 1",mn:"ADBE Vector Shape - Ellipse",hd:!1},{ty:"fl",c:{a:0,k:[.011764706817,1,.596078431373,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[-56.5,9.5],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Ellipse 5",np:3,cix:2,bm:0,ix:4,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{d:1,ty:"el",s:{a:0,k:[11.5,11.5],ix:2},p:{a:0,k:[0,0],ix:3},nm:"Ellipse Path 1",mn:"ADBE Vector Shape - Ellipse",hd:!1},{ty:"fl",c:{a:0,k:[.011764706817,1,.596078431373,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[54.25,32.75],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Ellipse 4",np:3,cix:2,bm:0,ix:5,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{d:1,ty:"el",s:{a:0,k:[14.5,14.5],ix:2},p:{a:0,k:[0,0],ix:3},nm:"Ellipse Path 1",mn:"ADBE Vector Shape - Ellipse",hd:!1},{ty:"fl",c:{a:0,k:[.011764706817,1,.596078431373,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[-50.25,41.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Ellipse 3",np:3,cix:2,bm:0,ix:6,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{d:1,ty:"el",s:{a:0,k:[12.5,12.5],ix:2},p:{a:0,k:[0,0],ix:3},nm:"Ellipse Path 1",mn:"ADBE Vector Shape - Ellipse",hd:!1},{ty:"fl",c:{a:0,k:[.011764706817,1,.596078431373,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[-46.75,-50.25],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Ellipse 2",np:3,cix:2,bm:0,ix:7,mn:"ADBE Vector Group",hd:!1},{ty:"gr",it:[{d:1,ty:"el",s:{a:0,k:[15.5,15.5],ix:2},p:{a:0,k:[0,0],ix:3},nm:"Ellipse Path 1",mn:"ADBE Vector Shape - Ellipse",hd:!1},{ty:"fl",c:{a:0,k:[.011764706817,1,.596078431373,1],ix:4},o:{a:0,k:100,ix:5},r:1,bm:0,nm:"Fill 1",mn:"ADBE Vector Graphic - Fill",hd:!1},{ty:"tr",p:{a:0,k:[45.25,-60.75],ix:2},a:{a:0,k:[0,0],ix:1},s:{a:0,k:[100,100],ix:3},r:{a:0,k:0,ix:6},o:{a:0,k:100,ix:7},sk:{a:0,k:0,ix:4},sa:{a:0,k:0,ix:5},nm:"Transform"}],nm:"Ellipse 1",np:3,cix:2,bm:0,ix:8,mn:"ADBE Vector Group",hd:!1}],ip:0,op:47.0000019143492,st:0,bm:0}],markers:[],chars:[{ch:"P",size:64,style:"Bold",w:62.5,data:{shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,14.453],[14.453,0]],o:[[0,0],[0,0],[0,0],[0,0],[14.844,0],[0,-14.502],[0,0]],v:[[5.859,-70.459],[5.859,0],[20.605,0],[20.605,-22.217],[34.521,-22.217],[59.668,-46.338],[35.254,-70.459]],c:!0},ix:2},nm:"P",mn:"ADBE Vector Shape - Group",hd:!1},{ind:1,ty:"sh",ix:2,ks:{a:0,k:{i:[[0,0],[0,0],[0,-8.008],[8.447,0],[0,0]],o:[[0,0],[8.447,0],[0,8.057],[0,0],[0,0]],v:[[20.605,-58.789],[31.348,-58.789],[44.678,-46.289],[31.299,-33.74],[20.605,-33.74]],c:!0},ix:2},nm:"P",mn:"ADBE Vector Shape - Group",hd:!1}],nm:"P",np:5,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}]},fFamily:"SF UI Display"},{ch:"a",size:64,style:"Bold",w:56.01,data:{shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[6.592,0],[0,3.955],[-5.957,.391],[0,0],[0,0]],o:[[-5.176,0],[0,-3.955],[0,0],[0,0],[0,5.859]],v:[[25.391,-9.766],[16.846,-16.211],[25.977,-22.9],[37.256,-23.682],[37.256,-19.727]],c:!0},ix:2},nm:"a",mn:"ADBE Vector Shape - Group",hd:!1},{ind:1,ty:"sh",ix:2,ks:{a:0,k:{i:[[-10.352,0],[-2.93,5.615],[0,0],[0,0],[0,0],[0,0],[13.818,0],[.391,-10.254],[0,0],[-5.176,0],[0,-5.176],[0,0],[0,0],[0,-9.766]],o:[[6.885,0],[0,0],[0,0],[0,0],[0,0],[0,-10.742],[-13.428,0],[0,0],[.684,-3.906],[5.859,0],[0,0],[0,0],[-13.721,.83],[0,9.619]],v:[[20.752,.635],[37.207,-8.301],[37.5,-8.301],[37.5,0],[51.27,0],[51.27,-36.865],[28.418,-54.688],[5.322,-37.354],[18.359,-37.354],[27.832,-43.994],[37.256,-35.986],[37.256,-32.422],[23.828,-31.592],[2.637,-15.479]],c:!0},ix:2},nm:"a",mn:"ADBE Vector Shape - Group",hd:!1}],nm:"a",np:5,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}]},fFamily:"SF UI Display"},{ch:"y",size:64,style:"Bold",w:56.2,data:{shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-.537,0],[-4.59,13.721],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[5.322,0],[.488,.098],[0,0]],o:[[13.428,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-1.123,4.297],[-.586,0],[0,0],[.537,.098]],v:[[11.67,19.629],[36.279,1.074],[54.883,-53.76],[39.844,-53.76],[28.174,-11.572],[27.881,-11.572],[16.26,-53.76],[.635,-53.76],[19.482,.342],[18.994,2.393],[9.473,8.545],[6.25,8.398],[6.25,19.434]],c:!0},ix:2},nm:"y",mn:"ADBE Vector Shape - Group",hd:!1}],nm:"y",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}]},fFamily:"SF UI Display"},{ch:"m",size:64,style:"Bold",w:88.43,data:{shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[-5.615,0],[0,-5.762],[0,0],[0,0],[0,0],[-5.615,0],[0,-6.299],[0,0],[0,0],[0,0],[10.547,0],[2.441,-6.738],[0,0],[7.715,0],[2.295,-6.494],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,-6.104],[5.518,0],[0,0],[0,0],[0,0],[0,-6.104],[5.811,0],[0,0],[0,0],[0,0],[0,-10.84],[-7.813,0],[0,0],[-1.807,-7.031],[-7.178,0],[0,0],[0,0],[0,0],[0,0]],v:[[4.834,0],[19.092,0],[19.092,-32.324],[28.613,-42.725],[37.451,-33.496],[37.451,0],[51.221,0],[51.221,-32.52],[60.596,-42.725],[69.58,-32.959],[69.58,0],[83.838,0],[83.838,-36.523],[66.211,-54.541],[49.512,-43.555],[49.219,-43.555],[34.229,-54.541],[18.896,-43.994],[18.604,-43.994],[18.604,-53.76],[4.834,-53.76]],c:!0},ix:2},nm:"m",mn:"ADBE Vector Shape - Group",hd:!1}],nm:"m",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}]},fFamily:"SF UI Display"},{ch:"e",size:64,style:"Bold",w:56.84,data:{shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[-6.494,0],[-.244,-7.031],[0,0]],o:[[6.592,0],[0,0],[.488,-6.885]],v:[[28.809,-44.043],[40.234,-32.422],[17.041,-32.422]],c:!0},ix:2},nm:"e",mn:"ADBE Vector Shape - Group",hd:!1},{ind:1,ty:"sh",ix:2,ks:{a:0,k:{i:[[0,0],[5.371,0],[0,7.764],[0,0],[0,0],[0,0],[15.479,0],[0,-17.09],[-16.357,0],[-1.563,10.4]],o:[[-1.367,4.15],[-7.52,0],[0,0],[0,0],[0,0],[0,-16.357],[-15.771,0],[0,17.09],[13.086,0],[0,0]],v:[[40.43,-16.406],[29.443,-9.717],[16.895,-22.705],[16.895,-23.584],[54.004,-23.584],[54.004,-27.979],[28.662,-54.688],[2.832,-26.66],[29.199,.928],[53.564,-16.406]],c:!0},ix:2},nm:"e",mn:"ADBE Vector Shape - Group",hd:!1}],nm:"e",np:5,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}]},fFamily:"SF UI Display"},{ch:"n",size:64,style:"Bold",w:58.94,data:{shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[-6.836,0],[0,-7.129],[0,0],[0,0],[0,0],[11.914,0],[3.076,-6.787],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,-7.129],[6.738,0],[0,0],[0,0],[0,0],[0,-12.549],[-8.252,0],[0,0],[0,0],[0,0],[0,0]],v:[[4.834,0],[19.092,0],[19.092,-30.664],[30.029,-42.676],[40.088,-31.494],[40.088,0],[54.346,0],[54.346,-34.473],[35.693,-54.541],[18.896,-44.141],[18.604,-44.141],[18.604,-53.76],[4.834,-53.76]],c:!0},ix:2},nm:"n",mn:"ADBE Vector Shape - Group",hd:!1}],nm:"n",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}]},fFamily:"SF UI Display"},{ch:"t",size:64,style:"Bold",w:36.18,data:{shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-12.451,0],[-1.465,.293],[0,0],[1.27,0],[0,4.15],[0,0],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,10.498],[2.881,0],[0,0],[-.879,.146],[-4.346,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[8.643,-65.723],[8.643,-53.76],[1.367,-53.76],[1.367,-42.969],[8.643,-42.969],[8.643,-14.502],[25.977,.195],[32.861,-.391],[32.861,-10.938],[29.297,-10.693],[22.9,-16.846],[22.9,-42.969],[32.861,-42.969],[32.861,-53.76],[22.9,-53.76],[22.9,-65.723]],c:!0},ix:2},nm:"t",mn:"ADBE Vector Shape - Group",hd:!1}],nm:"t",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}]},fFamily:"SF UI Display"},{ch:" ",size:64,style:"Bold",w:21.48,data:{},fFamily:"SF UI Display"},{ch:"S",size:64,style:"Bold",w:63.13,data:{shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[-16.943,0],[0,13.672],[14.111,3.027],[0,0],[0,4.346],[-7.275,0],[-.488,-5.957],[0,0],[16.406,0],[0,-12.988],[-12.988,-2.783],[0,0],[0,-4.59],[7.861,0],[.684,5.811]],o:[[.439,13.232],[17.48,0],[0,-10.742],[0,0],[-8.105,-1.855],[0,-5.225],[7.373,0],[0,0],[-.244,-12.744],[-15.723,0],[0,10.303],[0,0],[8.496,1.904],[0,5.176],[-7.813,0],[0,0]],v:[[3.223,-20.068],[31.396,1.221],[59.961,-21.094],[39.697,-40.918],[31.152,-42.725],[19.629,-51.367],[31.787,-60.059],[44.873,-50.488],[58.691,-50.488],[31.738,-71.68],[4.785,-50.098],[24.17,-30.42],[33.35,-28.418],[45.215,-19.385],[31.982,-10.449],[17.432,-20.068]],c:!0},ix:2},nm:"S",mn:"ADBE Vector Shape - Group",hd:!1}],nm:"S",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}]},fFamily:"SF UI Display"},{ch:"u",size:64,style:"Bold",w:58.94,data:{shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[6.641,0],[0,7.275],[0,0],[0,0],[0,0],[-11.621,0],[-2.734,6.738],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,7.275],[-6.592,0],[0,0],[0,0],[0,0],[0,12.5],[8.154,0],[0,0],[0,0],[0,0],[0,0]],v:[[54.102,-53.76],[39.844,-53.76],[39.844,-23.145],[29.053,-11.084],[18.848,-22.266],[18.848,-53.76],[4.59,-53.76],[4.59,-19.287],[23.877,.781],[40.039,-9.717],[40.332,-9.717],[40.332,0],[54.102,0]],c:!0},ix:2},nm:"u",mn:"ADBE Vector Shape - Group",hd:!1}],nm:"u",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}]},fFamily:"SF UI Display"},{ch:"c",size:64,style:"Bold",w:55.76,data:{shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[14.453,0],[0,-17.041],[-16.064,0],[-.83,12.5],[0,0],[6.006,0],[0,10.498],[-7.324,0],[-.781,-5.566]],o:[[-.684,-11.963],[-15.967,0],[0,17.285],[14.111,0],[0,0],[-.928,5.908],[-7.373,0],[0,-10.303],[6.201,0],[0,0]],v:[[53.418,-33.936],[29.053,-54.688],[2.832,-26.904],[29.15,.928],[53.467,-19.531],[40.186,-19.531],[29.297,-10.352],[17.285,-26.904],[29.248,-43.457],[40.137,-33.936]],c:!0},ix:2},nm:"c",mn:"ADBE Vector Shape - Group",hd:!1}],nm:"c",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}]},fFamily:"SF UI Display"},{ch:"s",size:64,style:"Bold",w:52.64,data:{shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,-10.107],[-10.107,-2.295],[0,0],[0,-2.783],[5.664,0],[.684,4.541],[0,0],[-14.16,0],[0,10.449],[10.791,2.441],[0,0],[0,2.686],[-5.127,0],[-.293,-4.248],[0,0],[13.281,0]],o:[[0,7.861],[0,0],[4.883,1.172],[0,3.516],[-5.908,0],[0,0],[.732,10.352],[14.063,0],[0,-8.008],[0,0],[-4.834,-1.123],[0,-3.467],[5.469,0],[0,0],[-.195,-10.254],[-13.623,0]],v:[[3.906,-37.939],[19.238,-22.559],[29.15,-20.313],[35.889,-14.893],[26.758,-9.18],[16.504,-16.26],[2.588,-16.26],[26.367,.928],[50.049,-16.406],[34.961,-31.006],[24.854,-33.203],[17.676,-38.818],[26.221,-44.58],[35.547,-37.646],[48.73,-37.646],[26.416,-54.688]],c:!0},ix:2},nm:"s",mn:"ADBE Vector Shape - Group",hd:!1}],nm:"s",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}]},fFamily:"SF UI Display"},{ch:"f",size:64,style:"Bold",w:35.84,data:{shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[-4.297,0],[-1.025,-.195],[0,0],[2.441,0],[0,-10.352],[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[.049,-3.76],[1.563,0],[0,0],[-1.953,-.293],[-12.451,0],[0,0],[0,0],[0,0],[0,0],[0,0]],v:[[8.643,0],[22.9,0],[22.9,-42.969],[32.666,-42.969],[32.666,-53.76],[22.607,-53.76],[22.607,-57.715],[28.711,-63.086],[32.617,-62.744],[32.617,-72.656],[26.025,-73.145],[8.643,-58.545],[8.643,-53.76],[1.367,-53.76],[1.367,-42.969],[8.643,-42.969]],c:!0},ix:2},nm:"f",mn:"ADBE Vector Shape - Group",hd:!1}],nm:"f",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}]},fFamily:"SF UI Display"},{ch:"l",size:64,style:"Bold",w:24.66,data:{shapes:[{ty:"gr",it:[{ind:0,ty:"sh",ix:1,ks:{a:0,k:{i:[[0,0],[0,0],[0,0],[0,0]],o:[[0,0],[0,0],[0,0],[0,0]],v:[[5.225,0],[19.482,0],[19.482,-73.828],[5.225,-73.828]],c:!0},ix:2},nm:"l",mn:"ADBE Vector Shape - Group",hd:!1}],nm:"l",np:3,cix:2,bm:0,ix:1,mn:"ADBE Vector Group",hd:!1}]},fFamily:"SF UI Display"}]}},1689,[]); +__d(function(g,r,i,a,m,e,d){var t=r(d[0]),n=r(d[1]);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var l=n(r(d[2])),o=n(r(d[3])),s=n(r(d[4])),u=n(r(d[5])),c=n(r(d[6])),f=n(r(d[7])),p=t(r(d[8])),C=r(d[9]),E=(n(r(d[10])),n(r(d[11]))),y=n(r(d[12])),v=(t(r(d[13])),n(r(d[14])),r(d[15]),n(r(d[16]))),h=n(r(d[17])),T=r(d[18]),V=(n(r(d[19])),r(d[20])),_=r(d[21]),b=r(d[22]),I=n(r(d[23])),x=t(r(d[24]));r(d[25]),r(d[26]),r(d[27]),r(d[28]),r(d[29]),r(d[30]),r(d[31]);var R=r(d[32]),w=r(d[33]),A=n(r(d[34])),M=r(d[35]),L=(r(d[36]),C.Dimensions.get("window").width,(function(t){function n(t){var o;return(0,l.default)(this,n),(o=(0,s.default)(this,(0,u.default)(n).call(this,t))).onCreditCardChange=function(t){console.log(t),o.setState({creditCardInput:t,displayCardError:!1})},o.isNormalInteger=function(t){return!/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(t)},o.isMontantValid=function(){var t=o.state.montant;return 0==parseInt(t)||t<0?{errorMessage:E.default.t('ENTER_AMOUNT_SUPERIOR_ZEROR'),isValid:!1}:o.isNormalInteger(t)?t>parseInt(o.state.comptePrincipal)?{errorMessage:E.default.t('AMOUNT_SUPERIOR_TO_PRINCIPAL_ACCOUNT'),isValid:!1}:{errorMessage:'',isValid:!0}:{errorMessage:E.default.t('ENTER_VALID_AMOUNT'),isValid:!1}},o.isCreditCardValid=function(){var t=o.state.creditCardInput,n=[];return void 0!==t.status?('incomplete'===t.status.cvc&&n.push(E.default.t('CVC_CARD_ERROR')),'incomplete'===t.status.expiry&&n.push(E.default.t('EXPIRY_CARD_ERROR')),'incomplete'===t.status.number&&n.push(E.default.t('CARD_NUMBER_ERROR'))):n.push(E.default.t('THIS_FIELD_IS_REQUIRED')),n},o.commissionsFees=function(t,n){var l=t*n/100;return Math.round(l+l)},o.modalConfirmTransaction=function(){var t=o.props.navigation.state.params.wallet.taux_com_client_retrait;return p.default.createElement(x.default,{visible:o.state.isModalConfirmVisible,onTouchOutside:function(){o.setState({isModalConfirmVisible:!1})},width:.7,dialogTitle:p.default.createElement(x.DialogTitle,{title:E.default.t('CONFIRM_DEPOSIT')}),footer:p.default.createElement(x.DialogFooter,null,p.default.createElement(x.DialogButton,{text:E.default.t('CANCEL_LABEL'),onPress:function(){o.setState({isModalConfirmVisible:!1})}}),p.default.createElement(x.DialogButton,{text:E.default.t('SUBMIT_LABEL'),onPress:function(){o.setState({isModalConfirmVisible:!1,isDataSubmit:!0}),o.props.depositAction({numCarte:parseInt(o.state.creditCardInput.values.number.replace(/ /g,' ')),cvv:o.state.creditCardInput.values.cvc,expiration_date:o.state.creditCardInput.values.expiry,type:"credit",montant:o.state.montant,id_wallet:o.state.id})}}))},p.default.createElement(x.DialogContent,null,p.default.createElement(C.View,{style:[D.blockView,{borderBottomColor:T.Color.borderColor}]},p.default.createElement(C.View,{style:{flexDirection:'row',marginTop:10}},p.default.createElement(C.View,{style:{flex:1}},p.default.createElement(C.Text,{style:[A.default.body2]},E.default.t('AMOUNT'))),p.default.createElement(C.View,{style:{flex:1,alignItems:'flex-end'}},p.default.createElement(C.Text,{style:[b.Typography.caption1,T.Color.grayColor]},o.state.montant))),p.default.createElement(C.View,{style:{flexDirection:'row',marginTop:10}},p.default.createElement(C.View,{style:{flex:1}},p.default.createElement(C.Text,{tyle:[b.Typography.body2]},E.default.t('COMMISSION_FEES'))),p.default.createElement(C.View,{style:{flex:1,alignItems:'flex-end'}},p.default.createElement(C.Text,{style:[b.Typography.caption1,T.Color.grayColor]},o.commissionsFees(o.state.montant,t))))),p.default.createElement(C.View,{style:{paddingVertical:10}},p.default.createElement(C.View,{style:{flexDirection:'row',marginTop:10}},p.default.createElement(C.View,{style:{flex:1}},p.default.createElement(C.Text,{tyle:[b.Typography.body2]},E.default.t('TOTAL'))),p.default.createElement(C.View,{style:{flex:1,alignItems:'flex-end'}},p.default.createElement(C.Text,{style:[b.Typography.caption1,T.Color.grayColor]},o.state.montant-o.commissionsFees(o.state.montant,t)))))))},o.onSubmitDeposit=function(){var t=o.state.creditCardInput;o.isMontantValid().isValid&&t.valid?o.setState({numCarte:parseInt(t.values.number.replace(/ /g,' ')),cvv:t.values.cvc,expiration_date:t.values.expiry,isModalConfirmVisible:!0}):t.valid||o.setState({displayCardError:!0}),o.setState({isSubmitClick:!0})},o.isHasError=function(){var t=o.props,n=t.error,l=t.result;if(o.state.isDataSubmit)return null!==n?(void 0!==n.data&&(C.Alert.alert(E.default.t("ERROR_LABEL"),n.data.error,[{text:E.default.t("OK"),onPress:function(){}}],{cancelable:!1}),o.props.navigation.state.params.onGoBack(),o.props.navigation.pop()),null):null!==l?(setTimeout(function(){o.props.navigation.state.params.onGoBack(),o.props.navigation.pop()},1500),p.default.createElement(C.View,{style:{position:"absolute",zIndex:1,backgroundColor:"#00000050",width:(0,M.responsiveWidth)(100),height:(0,M.responsiveHeight)(100),flex:1,justifyContent:'center',alignItems:'center'}},p.default.createElement(y.default,{style:D.lottie,source:r(d[37]),autoPlay:!0,loop:!0}))):null},o.state={type:"debit",montant:null,numCarte:0,cvv:0,expiration_date:'',creditCardInput:{},comptePrincipal:o.props.navigation.state.params.wallet.balance_princ,id:o.props.navigation.state.params.wallet.id,isModalConfirmVisible:!1,isDataSubmit:!1,isSubmitClick:!1,displayCardError:!1},console.log("Wallet Params",o.props.navigation.state.params.wallet),V.IlinkEmitter.on("langueChange",o.updateLangue.bind((0,c.default)(o))),o}return(0,f.default)(n,t),(0,o.default)(n,[{key:"updateLangue",value:function(){this.props.navigation.setParams({name:E.default.t('WALLET')}),this.forceUpdate()}},{key:"render",value:function(){var t=this;this.props.error;return p.default.createElement(C.View,{style:[D.container]},this.isHasError(),this.modalConfirmTransaction(),p.default.createElement(C.ScrollView,{style:{padding:20}},p.default.createElement(C.View,{style:{marginTop:10}},p.default.createElement(_.CreditCardInput,{validColor:this.state.creditCardInput.valid?'green':'',invalidColor:this.state.creditCardInput.valid?'':'red',onChange:this.onCreditCardChange,labels:{number:E.default.t('CARD_NUMBER_LABEL'),expiry:E.default.t('CARD_EXPIRY_LABEL'),cvc:E.default.t('CARD_CVC_LABEL')}}),this.state.displayCardError&&this.isCreditCardValid().map(function(t){return p.default.createElement(C.Text,{style:{color:'red',marginLeft:15}},t)})),p.default.createElement(C.View,{style:{margin:20}},p.default.createElement(h.default,{borderBottomColor:this.isMontantValid.isValid?'red':'black',value:this.state.montant,keyboardType:"numeric",label:E.default.t('AMOUNT_LABEL'),style:{marginTop:10},placeholder:E.default.t('AMOUNT_LABEL'),onChangeText:function(n){t.setState({montant:n}),t.isMontantValid()}}),!this.isMontantValid().isValid&&p.default.createElement(C.Text,{style:{color:'red',marginTop:2}},this.isMontantValid().errorMessage),this.state.isSubmitClick&&null===this.state.montant&&p.default.createElement(C.Text,{style:{color:'red',marginTop:2}},E.default.t('PLEASE_ENTER_THE_AMOUNT')),p.default.createElement(C.Text,null)),p.default.createElement(C.View,{style:{margin:10}},p.default.createElement(v.default,{loading:this.props.loading,outline:!0,onPress:function(){return t.onSubmitDeposit()}},E.default.t('VALIDATE')))))}}]),n})(p.Component));L.navigatorStyle={navBarBackgroundColor:T.Color.accentLightColor,statusBarColor:T.Color.accentColor,navBarTextColor:'#FFFFFF',navBarButtonColor:'#FFFFFF'},L.navigationOptions=function(t){t.navigation;return{drawerLabel:function(){return null},title:E.default.t('MAKE_WITHDRAWAL')}};var S=(0,R.connect)(function(t){return{loading:t.depositReducer.loading,result:t.depositReducer.result,error:t.depositReducer.error}},function(t){return(0,w.bindActionCreators)({depositAction:I.default},t)})(L);e.default=S;var D=C.StyleSheet.create({container:{flex:1,backgroundColor:T.Color.containerBackgroundColor},checkDefault:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",borderBottomWidth:1,paddingVertical:15,marginTop:10},contentButtonBottom:{borderTopWidth:1,paddingVertical:10,paddingHorizontal:20,flexDirection:"row",justifyContent:"space-between",alignItems:"center"},blockView:{paddingVertical:10,borderBottomWidth:1},lottie:{width:248,height:248}})},1690,[4,1,8,9,10,12,11,13,15,18,869,712,832,1588,871,1589,1592,1669,1593,1596,766,1599,1595,1670,1672,1142,1143,1144,1145,1146,1147,1148,1504,1472,1688,527,1134,1689]); +__d(function(i,n,d,o,a,e,l){a.exports={name:"iLinkWorld",displayName:"iLinkWorld"}},1691,[]); __r(87); __r(0); \ No newline at end of file diff --git a/redux/actions/WalletActions.js b/redux/actions/WalletActions.js index ffdb8222..5c146b95 100644 --- a/redux/actions/WalletActions.js +++ b/redux/actions/WalletActions.js @@ -1,4 +1,14 @@ -import { WALLET_LIST_PENDING, WALLET_LIST_SUCCESS, WALLET_LIST_ERROR } from "../types/WalletType"; +import { + WALLET_LIST_PENDING, + WALLET_LIST_SUCCESS, + WALLET_LIST_ERROR, + WALLET_HISTORY_PENDING, + WALLET_HISTORY_SUCCESS, + WALLET_HISTORY_ERROR, + WALLET_TRANSFER_COMMISSION_PENDING, + WALLET_TRANSFER_COMMISSION_SUCCESS, + WALLET_TRANSFER_COMMISSION_ERROR +} from "../types/WalletType"; export const fetchWalletListPending = () => ({ @@ -13,4 +23,32 @@ export const fetchWalletListSuccess = (res) => ({ export const fetchWalletListError = (error) => ({ type: WALLET_LIST_ERROR, result: error +}); + +export const fetchWalletHistoryPending = () => ({ + type: WALLET_HISTORY_PENDING +}); + +export const fetchWalletHistorySuccess = (res) => ({ + type: WALLET_HISTORY_SUCCESS, + result: res, +}); + +export const fetchWalletHistoryError = (error) => ({ + type: WALLET_HISTORY_ERROR, + result: error +}); + +export const fetchWalletTransferCommissionPending = () => ({ + type: WALLET_TRANSFER_COMMISSION_PENDING +}); + +export const fetchWalletTransferCommissionSuccess = (res) => ({ + type: WALLET_TRANSFER_COMMISSION_SUCCESS, + result: res, +}); + +export const fetchWalletTransferCommssionError = (error) => ({ + type: WALLET_TRANSFER_COMMISSION_ERROR, + result: error }); \ No newline at end of file diff --git a/redux/reducers/WalletTransactionHistoryReducer.js b/redux/reducers/WalletTransactionHistoryReducer.js new file mode 100644 index 00000000..5c6226e8 --- /dev/null +++ b/redux/reducers/WalletTransactionHistoryReducer.js @@ -0,0 +1,33 @@ +import { WALLET_HISTORY_PENDING, WALLET_HISTORY_SUCCESS, WALLET_HISTORY_ERROR } from "../types/WalletType"; + +const initialState = { + loadingTransaction: false, + resultTransaction: null, + errorTransaction: null, +}; + +export default (state = initialState, action) => { + switch (action.type) { + case WALLET_HISTORY_PENDING: return { + ...state, + loadingTransaction: true + } + case WALLET_HISTORY_SUCCESS: return { + ...state, + loadingTransaction: false, + resultTransaction: action.result.data, + errorTransaction: null + } + case WALLET_HISTORY_ERROR: return { + ...state, + loadingTransaction: false, + resultTransaction: null, + errorTransaction: action.result + } + + default: { + return state; + } + + } +}; diff --git a/redux/reducers/WalletTransferCommission.js b/redux/reducers/WalletTransferCommission.js new file mode 100644 index 00000000..35dc5f24 --- /dev/null +++ b/redux/reducers/WalletTransferCommission.js @@ -0,0 +1,33 @@ +import { WALLET_TRANSFER_COMMISSION_PENDING, WALLET_TRANSFER_COMMISSION_SUCCESS, WALLET_TRANSFER_COMMISSION_ERROR } from "../types/WalletType"; + +const initialState = { + loadingTransferCommission: false, + resultTransferCommission: null, + errorTransferCommission: null, +}; + +export default (state = initialState, action) => { + switch (action.type) { + case WALLET_TRANSFER_COMMISSION_PENDING: return { + ...state, + loadingTransferCommission: true + } + case WALLET_TRANSFER_COMMISSION_SUCCESS: return { + ...state, + loadingTransferCommission: false, + resultTransferCommission: action.result.data, + errorTransferCommission: null + } + case WALLET_TRANSFER_COMMISSION_ERROR: return { + ...state, + loadingTransferCommission: false, + resultTransferCommission: null, + errorTransferCommission: action.result + } + + default: { + return state; + } + + } +}; diff --git a/redux/reducers/index.js b/redux/reducers/index.js index dfff3940..aa83c6f9 100644 --- a/redux/reducers/index.js +++ b/redux/reducers/index.js @@ -2,6 +2,8 @@ import { combineReducers } from "redux"; import walletReducer from "./WalletReducer"; import authKeyReducer from "./AuthKeyReducer"; import depositReducer from "./DepositReducer"; +import walletHistoryReducer from "./WalletTransactionHistoryReducer"; +import walletTransferCommissionReducer from "./WalletTransferCommission"; import { persistCombineReducers } from "redux-persist"; import { AsyncStorage } from "react-native"; @@ -15,7 +17,9 @@ const persistConfig = { const rootReducer = persistCombineReducers(persistConfig, { walletReducer: walletReducer, authKeyReducer: authKeyReducer, - depositReducer: depositReducer + depositReducer: depositReducer, + walletHistoryReducer: walletHistoryReducer, + walletTransferCommissionReducer: walletTransferCommissionReducer }); export default rootReducer; \ No newline at end of file diff --git a/redux/types/WalletType.js b/redux/types/WalletType.js index 72b3c6ba..5436b5fa 100644 --- a/redux/types/WalletType.js +++ b/redux/types/WalletType.js @@ -1,3 +1,11 @@ export const WALLET_LIST_PENDING = 'WALLET_LIST_PENDING'; export const WALLET_LIST_SUCCESS = 'WALLET_LIST_SUCCESS'; -export const WALLET_LIST_ERROR = 'WALLET_LIST_ERROR'; \ No newline at end of file +export const WALLET_LIST_ERROR = 'WALLET_LIST_ERROR'; + +export const WALLET_HISTORY_PENDING = 'WALLET_HISTORY_PENDING'; +export const WALLET_HISTORY_SUCCESS = 'WALLET_HISTORY_SUCCESS'; +export const WALLET_HISTORY_ERROR = 'WALLET_HISTORY_ERROR'; + +export const WALLET_TRANSFER_COMMISSION_PENDING = 'WALLET_TRANSFER_COMMISSION_PENDING'; +export const WALLET_TRANSFER_COMMISSION_SUCCESS = 'WALLET_TRANSFER_COMMISSION_SUCCESS'; +export const WALLET_TRANSFER_COMMISSION_ERROR = 'WALLET_TRANSFER_COMMISSION_ERROR'; \ No newline at end of file diff --git a/screens/history-request/History.js b/screens/history-request/History.js index 457e472f..93ea2dfd 100644 --- a/screens/history-request/History.js +++ b/screens/history-request/History.js @@ -540,7 +540,9 @@ class History extends BaseScreen { return ( { - this.props.navigation.navigate(route.credrequester) + this.props.navigation.push(route.credrequester, { + onGoBack: () => this.refreshData() + }) }} > diff --git a/screens/history-request/HistoryItemDetails.js b/screens/history-request/HistoryItemDetails.js index 42b8f7c1..21b1acb2 100644 --- a/screens/history-request/HistoryItemDetails.js +++ b/screens/history-request/HistoryItemDetails.js @@ -232,26 +232,78 @@ export default class HistoryItemDetails extends Component { renderBtn() { const { user } = this.state - console.warn(this.item) + console.warn("ITEM ITEM", this.item); if (user) { if (this.item.code_parrain === user.code_membre) { - return ( - ) + if (this.item.status === '1') { + return ( + ) + } else { + return ( + + + + + + + + + ) + } } } } diff --git a/screens/history-request/HistoryRequester.js b/screens/history-request/HistoryRequester.js index 296eb01f..4fbbe6db 100644 --- a/screens/history-request/HistoryRequester.js +++ b/screens/history-request/HistoryRequester.js @@ -6,599 +6,608 @@ * @flow */ -import React, {Component} from 'react'; -import {Platform, StyleSheet, Text, View,ScrollView, - Alert, - FlatList,ProgressViewIOS,ProgressBarAndroid,Picker,StatusBar} from 'react-native'; +import React, { Component } from 'react'; +import { + Platform, StyleSheet, Text, View, ScrollView, + Alert, + FlatList, ProgressViewIOS, ProgressBarAndroid, Picker, StatusBar +} from 'react-native'; import ActionButton from 'react-native-action-button'; import MapView from 'react-native-maps'; -import {responsiveHeight,responsiveWidth, responsiveFontSize} from 'react-native-responsive-dimensions'; +import { responsiveHeight, responsiveWidth, responsiveFontSize } from 'react-native-responsive-dimensions'; import CardView from 'react-native-cardview'; -import {Sae} from 'react-native-textinput-effects'; +import { Sae } from 'react-native-textinput-effects'; import FontAwesomeIcon from 'react-native-vector-icons/FontAwesome'; import Button from 'apsl-react-native-button'; -import {primary,primaryDark,accent} from '../../utils/theme.json'; +import { primary, primaryDark, accent } from '../../utils/theme.json'; import * as Animatable from 'react-native-animatable'; import { isNumber } from 'util'; -import {readUser} from './../../webservice/AuthApi' -import {sendDemande} from './../../webservice/HistoryRequestApi' -import {sendDemandeSpecificque} from "../../webservice/HistoryRequestApi"; -import {getAgentNetworksList} from "../../webservice/NetworkApi"; -import {HelperText,TextInput,TextInputMask} from 'react-native-paper' +import { readUser } from './../../webservice/AuthApi' +import { sendDemande } from './../../webservice/HistoryRequestApi' +import { sendDemandeSpecificque } from "../../webservice/HistoryRequestApi"; +import { getAgentNetworksList } from "../../webservice/NetworkApi"; +import { HelperText, TextInput, TextInputMask } from 'react-native-paper' import I18n from "react-native-i18n" type Props = {} -const route=require('../../route.json') -import { Card, CardTitle, CardContent, CardAction, CardButton, CardImage,Title } from 'react-native-material-cards' -export default class HistoryRequester extends Component { - static navigatorStyle = { - navBarHidden:true, - }; - static navigationOptions = { - drawerLabel: () => null, - headerTitle:I18n.t('ASK_CREDIT'), - title:I18n.t('ASK_CREDIT') - }; - constructor(props){ - super(props); - this.state=this.initState(); - this.updateState() - } - handleViewRef=ref=>this.numberView=ref; - handleMontantRef=ref=>this.montantView=ref; - initState(){ - return { - phone:null, - montant:undefined, - isSending:false, - isDisabled:true, - networks:[], - user:null, - visibleError:false, - currentNetwork:{nt:1}, - errorAnimation:"", - } - } +const route = require('../../route.json') +import { Card, CardTitle, CardContent, CardAction, CardButton, CardImage, Title } from 'react-native-material-cards' +export default class HistoryRequester extends Component { + static navigatorStyle = { + navBarHidden: true, + }; + static navigationOptions = { + drawerLabel: () => null, + headerTitle: I18n.t('ASK_CREDIT'), + title: I18n.t('ASK_CREDIT') + }; + constructor(props) { + super(props); + this.state = this.initState(); + this.updateState() + } + handleViewRef = ref => this.numberView = ref; + handleMontantRef = ref => this.montantView = ref; + initState() { + return { + phone: null, + montant: undefined, + isSending: false, + isDisabled: true, + networks: [], + user: null, + visibleError: false, + currentNetwork: { nt: 1 }, + errorAnimation: "", + } + } - onUserCancel(){ - this.props.navigation.goBack() - } - onUserSend(){ - var validMontant=true - if( !isNumber(this.state.montant)||this.state.montant>1000000){ - validMontant=false - } - this.setState({visibleError:!validMontant}) - if(!validMontant){ - this.montantView.shake(800) - setTimeout(()=>{ - this.setState({visibleError:false}) - },3000) - } - else { - this.setState({isSending:true}) - let title="" - let message="" - sendDemandeSpecificque(this.state.montant,this.state.user.phoneTransaction,this.state.user.code_membre).then((data)=> { - if (data.success !== undefined) { - if (data.success === 1) { - title= I18n.t('DEMAND_SEND'), - message=I18n.t('DEMAND_SEND_SUCCESFUL') - } else { - title= "Erreur survenu lors de l'envoie ", - message="Une erreur est survenu lors de l'envoie de la demande" - } + onUserCancel() { + console.log(this.props); + this.props.navigation.state.params.onGoBack(); + this.props.navigation.goBack(); + } + onUserSend() { + var validMontant = true + if (!isNumber(this.state.montant) || this.state.montant > 1000000) { + validMontant = false + } + this.setState({ visibleError: !validMontant }) + if (!validMontant) { + this.montantView.shake(800) + setTimeout(() => { + this.setState({ visibleError: false }) + }, 3000) + } + else { + this.setState({ isSending: true }) + let title = "" + let message = "" + sendDemandeSpecificque(this.state.montant, this.state.user.phoneTransaction, this.state.user.code_membre).then((data) => { + if (data.success !== undefined) { + if (data.success === 1) { + title = I18n.t('DEMAND_SEND'), + message = I18n.t('DEMAND_SEND_SUCCESFUL') + } else { + title = "Erreur survenu lors de l'envoie ", + message = "Une erreur est survenu lors de l'envoie de la demande" + } - }else { - title= "Erreur survenu lors de l'envoie ", - message="Une erreur est survenu lors de l'envoie de la demande" + } else { + title = "Erreur survenu lors de l'envoie ", + message = "Une erreur est survenu lors de l'envoie de la demande" - } - Alert.alert(title,message,[{text:'Ok',onPress:()=>{ - this.setState({montant: ""}) - }}]) - setTimeout(() => { - this.setState({isSending: false}) - }, 800) + } + Alert.alert(title, message, [{ + text: 'Ok', onPress: () => { + this.setState({ montant: "" }) + } + }]) + setTimeout(() => { + this.setState({ isSending: false }) + }, 800) - }).catch((error)=>{ - title= "Erreur survenu lors de l'envoie ", - message="Une erreur est survenu lors de l'envoie de la demande" - Alert.alert(title,message,[{text:'Ok'}]) + }).catch((error) => { + title = "Erreur survenu lors de l'envoie ", + message = "Une erreur est survenu lors de l'envoie de la demande" + Alert.alert(title, message, [{ text: 'Ok' }]) - }) - } - } - render () { - const {user}=this.state - return ( - - - {user?((user.category === "geolocated")? - this.multiNetwork(): this.simpleAgent()): - - } - - ) - } - simpleAgent(){ - let montant=0 - if(true){ - return ( - - - - - { - this.refInp = ref - }} - - mode={"outlined"} - inputStyle={input.style} - onChangeText={(text) => { - try{ - let neb=parseInt(text) - this.setState({montant:neb,isDisabled:isNaN(neb)}) - }catch (e) { + }) + } + } + render() { + const { user } = this.state + return ( + + + {user ? ((user.category === "geolocated") ? + this.multiNetwork() : this.simpleAgent()) : + + } + + ) + } + simpleAgent() { + let montant = 0 + if (true) { + return ( + + + + + { + this.refInp = ref + }} - } - }} - value={this.state.montant} - /> - - {I18n.t('INVALID_MONTANT')} - - + mode={"outlined"} + inputStyle={input.style} + onChangeText={(text) => { + try { + let neb = parseInt(text) + this.setState({ montant: neb, isDisabled: isNaN(neb) }) + } catch (e) { - - - - {this.onUserCancel()}} - title={I18n.t('CANCEL')} - color="crimson" - /> - {this.onUserSend()}} - title={I18n.t('SEND')} - color="steelblue" + } + }} + value={this.state.montant} + /> + + {I18n.t('INVALID_MONTANT')} + + - /> - - - ) - }else - return ( - - - Demande de credit - - { - this.refInp = ref - }} - onChangeText={(text) => { - if(text.length>0) { - try { - montant = parseFloat(text); - this.setState({isDisabled:montant>0,montant:montant}) + + + + { this.onUserCancel() }} + title={I18n.t('CANCEL')} + color="crimson" + /> + { this.onUserSend() }} + title={I18n.t('SEND')} + color="steelblue" - } catch (e) { + /> + + + ) + } else + return ( + + + Demande de credit + + { + this.refInp = ref + }} + onChangeText={(text) => { + if (text.length > 0) { + try { + montant = parseFloat(text); + this.setState({ isDisabled: montant > 0, montant: montant }) + } catch (e) { + + } + } + }} + style={input.selfitem} + labelStyle={input.label} + autoCapitalize={'none'} + autoCorrect={false} + /> + + + + + + + + + + + + ) + } + + multiNetwork() { + if (true) { + return ( + + + + + + + this.setState({ currentNetwork: itemValue }) + }> + {this.state.networks.map((item, index) => { + return () + })} + + + + + + { + this.refInp = ref + }} + + mode={"outlined"} + inputStyle={input.style} + onChangeText={(text) => { + try { + let neb = parseInt(text) + this.setState({ montant: neb, isDisabled: isNaN(neb) }) + } catch (e) { + + } + }} + value={this.state.montant} + /> + + {I18n.t('INVALID_MONTANT')} + + + + + + { this.onUserCancel() }} + title={I18n.t('CANCEL')} + color="crimson" + /> + { + const { currentNetwork, montant } = this.state + if (currentNetwork !== undefined && currentNetwork.nt === undefined) { + this.onNetworkSend(currentNetwork.phone, currentNetwork.code_membre, montant) } - } - }} - style={input.selfitem} - labelStyle={input.label} - autoCapitalize={'none'} - autoCorrect={false} - /> - + }} + title={I18n.t('SEND')} + color="steelblue" + /> + + + ) + } + else + return ( + + + + {I18n.t('ASK_CREDIT')} + + this.setState({ currentNetwork: itemValue }) + }> + {this.state.networks.map((item, index) => { + return () + })} + + + + { + this.refInp = ref + }} + inputStyle={input.style} + keyboardType={"numeric"} + onChangeText={(text) => { + try { + let neb = parseInt(text) + this.setState({ montant: neb, isDisabled: isNaN(neb) }) + } catch (e) { + + } + }} + style={input.selfitem} + labelStyle={input.label} + autoCapitalize={'none'} + autoCorrect={false} + /> + + + + + + + + + + ) + } + + renderSingleNetwork(item) { + const itm = item.item + console.log(item) + let refInp = null, refBtn = null + let montant = 0 + return ( + + + {I18n.t('ASK_CREDIT')} + {I18n.t("FOR_NUMB")} {itm.phone} ({itm.name}) + + { + refInp = ref + this.setState({ refIn: refInp }) + }} + inputStyle={input.style} + + value={this.state.montant} + keyboardType={"numeric"} + onChangeText={(text) => { + if (text.length > 0) { + try { + montant = parseFloat(text); + this.setStat({ montant: montant }) + if (refBtn) { + refBtn.setState({ isDisabled: montant > 0 }) + refBtn.isDisabled = montant > 0 + + } + } catch (e) { + + } + } + }} + style={input.selfitem} + labelStyle={input.label} + autoCapitalize={'none'} + autoCorrect={false} + /> + - - + + - + - - ) - } + ) - multiNetwork() { - if(true){ - return ( - - - - - - - this.setState({currentNetwork: itemValue}) - }> - {this.state.networks.map((item,index)=>{ - return() - })} - - - - - - { - this.refInp = ref - }} - - mode={"outlined"} - inputStyle={input.style} - onChangeText={(text) => { - try{ - let neb=parseInt(text) - this.setState({montant:neb,isDisabled:isNaN(neb)}) - }catch (e) { - - } - }} - value={this.state.montant} - /> - - {I18n.t('INVALID_MONTANT')} - - - - - - {this.onUserCancel()}} - title={I18n.t('CANCEL')} - color="crimson" - /> - { const {currentNetwork,montant}=this.state - if(currentNetwork!==undefined && currentNetwork.nt===undefined) { - this.onNetworkSend(currentNetwork.phone, currentNetwork.code_membre, montant) - }}} - title={I18n.t('SEND')} - color="steelblue" - /> - - - ) - } - else - return ( - - - - {I18n.t('ASK_CREDIT')} - - this.setState({currentNetwork: itemValue}) - }> - {this.state.networks.map((item,index)=>{ - return() - })} - - - - { - this.refInp = ref - }} - inputStyle={input.style} - keyboardType={"numeric"} - onChangeText={(text) => { - try{ - let neb=parseInt(text) - this.setState({montant:neb,isDisabled:isNaN(neb)}) - }catch (e) { - - } - }} - style={input.selfitem} - labelStyle={input.label} - autoCapitalize={'none'} - autoCorrect={false} - /> - - - - - - - - - - ) - } - - renderSingleNetwork(item) { - const itm=item.item - console.log(item) - let refInp=null,refBtn=null - let montant=0 - return ( - - - {I18n.t('ASK_CREDIT')} - {I18n.t("FOR_NUMB")} {itm.phone} ({itm.name}) - - { - refInp = ref - this.setState({refIn:refInp}) - }} - inputStyle={input.style} - - value={this.state.montant} - keyboardType={"numeric"} - onChangeText={(text) => { - if(text.length>0) { - try { - montant = parseFloat(text); - this.setStat({montant:montant}) - if(refBtn){ - refBtn.setState({isDisabled:montant>0}) - refBtn.isDisabled=montant>0 - - }} catch (e) { - - } - } - }} - style={input.selfitem} - labelStyle={input.label} - autoCapitalize={'none'} - autoCorrect={false} - /> - - - - - - - - - - - ) - - } - onNetworkSend(phone, code_membre,text) { - var validMontant=true - let montant=parseFloat(text) - if(montant===null || !isNumber(montant) || montant>1000000){ - validMontant=false - } - this.setState({visibleError:!validMontant}) - if(!validMontant){ - this.montantView.shake(800) - setTimeout(()=>{ - this.setState({visibleError:false}) - },3000) - } - else { - sendDemandeSpecificque(montant,phone,code_membre).then((data)=>{ - var title="" - var message="" - if(data.success!==undefined) { - if (data.success === 1) { - title = I18n.t("DEMAND_SEND") - message = I18n.t('DEMAND_SEND_SUCCESFUL') + } + onNetworkSend(phone, code_membre, text) { + var validMontant = true + let montant = parseFloat(text) + if (montant === null || !isNumber(montant) || montant > 1000000) { + validMontant = false + } + this.setState({ visibleError: !validMontant }) + if (!validMontant) { + this.montantView.shake(800) + setTimeout(() => { + this.setState({ visibleError: false }) + }, 3000) + } + else { + sendDemandeSpecificque(montant, phone, code_membre).then((data) => { + var title = "" + var message = "" + if (data.success !== undefined) { + if (data.success === 1) { + title = I18n.t("DEMAND_SEND") + message = I18n.t('DEMAND_SEND_SUCCESFUL') + } else { + title = "Erreur survenu lors de l'envoie " + message = "Une erreur est survenu lors de l'envoie de la demande" + } } else { - title = "Erreur survenu lors de l'envoie " - message = "Une erreur est survenu lors de l'envoie de la demande" + title = "Erreur survenu lors de l'envoie " + message = "Une erreur est survenu lors de l'envoie de la demande" } - }else{ - title = "Erreur survenu lors de l'envoie " - message = "Une erreur est survenu lors de l'envoie de la demande" - } - Alert.alert(title,message,[{text:"Ok",onPress:()=>{this.setState({montant:""})}}]) + Alert.alert(title, message, [{ text: "Ok", onPress: () => { this.setState({ montant: "" }) } }]) - }) - } - } + }) + } + } - async updateState() { + async updateState() { - let user=await readUser(); - if(user.category==="geolocated"){ - let networks=await getAgentNetworksList(user.agentId); - console.log(networks) - if(networks.success===1) { - let net=[this.state.currentNetwork] - networks.networks.forEach((item)=>{ - net.push(item) + let user = await readUser(); + if (user.category === "geolocated") { + let networks = await getAgentNetworksList(user.agentId); + console.log(networks) + if (networks.success === 1) { + let net = [this.state.currentNetwork] + networks.networks.forEach((item) => { + net.push(item) - }) - this.setState({networks: net}) - } - } - this.setState({user:user}) + }) + this.setState({ networks: net }) + } + } + this.setState({ user: user }) - } + } } - const input=StyleSheet.create({ - selfitem:{ +const input = StyleSheet.create({ + selfitem: { - width:responsiveWidth(70), - alignSelf: 'center', - marginBottom:20, - }, - label:{ - color:primary - }, - style:{ - color:'black' - } - }) - const styles = StyleSheet.create({ - title:{ - backgroundColor: primary, - color:'white', - paddingLeft: 20, - paddingTop: 10, - fontWeight: 'bold', - fontSize:responsiveFontSize(3), - height:responsiveHeight(10), - }, - subtitle:{ - color:'black', - paddingLeft: 20, - paddingTop: 10, - marginBottom: responsiveHeight(3), - fontWeight: 'bold', - fontSize:responsiveFontSize(2), - }, - container: { - flex: 1, - backgroundColor: '#EEE', - justifyContent: 'space-between', - }, + width: responsiveWidth(70), + alignSelf: 'center', + marginBottom: 20, + }, + label: { + color: primary + }, + style: { + color: 'black' + } +}) +const styles = StyleSheet.create({ + title: { + backgroundColor: primary, + color: 'white', + paddingLeft: 20, + paddingTop: 10, + fontWeight: 'bold', + fontSize: responsiveFontSize(3), + height: responsiveHeight(10), + }, + subtitle: { + color: 'black', + paddingLeft: 20, + paddingTop: 10, + marginBottom: responsiveHeight(3), + fontWeight: 'bold', + fontSize: responsiveFontSize(2), + }, + container: { + flex: 1, + backgroundColor: '#EEE', + justifyContent: 'space-between', + }, - container2: { - flex: 1, - height:responsiveHeight(20), - backgroundColor: '#EEE', - }, - btnContainer:{ - flexDirection: 'row', - paddingRight: 5, - paddingLeft: 5, - paddingTop: 5, - marginBottom: -2.5, - }, - button_1:{ - flex:1, - borderColor: 'transparent', + container2: { + flex: 1, + height: responsiveHeight(20), + backgroundColor: '#EEE', + }, + btnContainer: { + flexDirection: 'row', + paddingRight: 5, + paddingLeft: 5, + paddingTop: 5, + marginBottom: -2.5, + }, + button_1: { + flex: 1, + borderColor: 'transparent', -}, -button_2:{ - flex:1, - borderColor: 'transparent', - backgroundColor: primary, - borderRadius: 0, -}, + }, + button_2: { + flex: 1, + borderColor: 'transparent', + backgroundColor: primary, + borderRadius: 0, + }, -button_1_text:{ - color:primary, - fontWeight: 'bold', -}, + button_1_text: { + color: primary, + fontWeight: 'bold', + }, -button_2_text:{ - color:'white', - fontWeight: 'bold', -}, - cardInput:{ - - marginLeft: 10, - marginRight: 10, - marginTop: responsiveHeight(5), - width:responsiveWidth(98), - alignSelf: 'center', - justifyContent:'space-between', - height:responsiveHeight(40) - }, - cardInput2:{ + button_2_text: { + color: 'white', + fontWeight: 'bold', + }, + cardInput: { - marginLeft: 10, - marginRight: 10, - marginTop: responsiveHeight(1), - width:responsiveWidth(98), - height:responsiveHeight(50), - alignSelf: 'center', - justifyContent:'space-between', - } + marginLeft: 10, + marginRight: 10, + marginTop: responsiveHeight(5), + width: responsiveWidth(98), + alignSelf: 'center', + justifyContent: 'space-between', + height: responsiveHeight(40) + }, + cardInput2: { + + marginLeft: 10, + marginRight: 10, + marginTop: responsiveHeight(1), + width: responsiveWidth(98), + height: responsiveHeight(50), + alignSelf: 'center', + justifyContent: 'space-between', + } }); diff --git a/screens/history-request/MyHistory.js b/screens/history-request/MyHistory.js index 401cba67..6b71935c 100644 --- a/screens/history-request/MyHistory.js +++ b/screens/history-request/MyHistory.js @@ -660,7 +660,9 @@ class MyHistory extends React.Component { return ( { - this.props.navigation.navigate(route.credrequester) + this.props.navigation.push(route.credrequester, { + onGoBack: () => this.refreshData() + }) }} > diff --git a/screens/wallet/WalletDepot.js b/screens/wallet/WalletDepot.js index d358bf26..1e3666ea 100644 --- a/screens/wallet/WalletDepot.js +++ b/screens/wallet/WalletDepot.js @@ -50,7 +50,7 @@ class WalletDepot extends Component { constructor(props) { super(props); this.state = { - type: "debit", + type: "credit", montant: null, numCarte: 0, cvv: 0, @@ -59,7 +59,9 @@ class WalletDepot extends Component { comptePrincipal: this.props.navigation.state.params.wallet.balance_princ, id: this.props.navigation.state.params.wallet.id, isModalConfirmVisible: false, - isDataSubmit: false + isDataSubmit: false, + isSubmitClick: false, + displayCardError: false }; console.log("Wallet Params", this.props.navigation.state.params.wallet); @@ -73,8 +75,10 @@ class WalletDepot extends Component { } onCreditCardChange = (form) => { + console.log(form); this.setState({ - creditCardInput: form + creditCardInput: form, + displayCardError: false }); } @@ -83,8 +87,6 @@ class WalletDepot extends Component { return false; else return true; - - } isMontantValid = () => { @@ -115,6 +117,25 @@ class WalletDepot extends Component { }; } + isCreditCardValid = () => { + const { creditCardInput } = this.state; + const errorMessage = []; + + if (typeof creditCardInput.status !== 'undefined') { + + if (creditCardInput.status.cvc === 'incomplete') + errorMessage.push(I18n.t('CVC_CARD_ERROR')); + if (creditCardInput.status.expiry === 'incomplete') + errorMessage.push(I18n.t('EXPIRY_CARD_ERROR')); + if (creditCardInput.status.number === 'incomplete') + errorMessage.push(I18n.t('CARD_NUMBER_ERROR')); + } + else + errorMessage.push(I18n.t('THIS_FIELD_IS_REQUIRED')) + + return errorMessage; + } + commissionsFees = (amount, tauxComClientDepot, fraisMinBanquedepot) => { let tauxComClientDepotTemp = ((amount * tauxComClientDepot) / 100); return Math.round(tauxComClientDepotTemp + fraisMinBanquedepot); @@ -153,7 +174,7 @@ class WalletDepot extends Component { numCarte: parseInt((this.state.creditCardInput.values.number).replace(/ /g, ' ')), cvv: this.state.creditCardInput.values.cvc, expiration_date: this.state.creditCardInput.values.expiry, - type: "debit", + type: "credit", montant: this.state.montant, id_wallet: this.state.id }); @@ -211,6 +232,12 @@ class WalletDepot extends Component { //this.props.depositAction(this.state); } + else if (!creditCardInput.valid) { + this.setState({ + displayCardError: true + }) + } + this.setState({ isSubmitClick: true }) } isHasError = () => { @@ -219,23 +246,30 @@ class WalletDepot extends Component { if (this.state.isDataSubmit) { if (error !== null) { - Alert.alert( - I18n.t("ERROR_LABEL"), - error, - [ - { - text: I18n.t("OK"), onPress: () => { } - } + if (typeof error.data !== 'undefined') { + Alert.alert( + I18n.t("ERROR_LABEL"), + error.data.error, + [ + { + text: I18n.t("OK"), onPress: () => { } + } - ], - { cancelable: false } - ); - return null + ], + { cancelable: false } + ); + + this.props.navigation.state.params.onGoBack(); + this.props.navigation.pop(); + + } + return null; } else if (result !== null) { setTimeout(() => { + this.props.navigation.state.params.onGoBack(); this.props.navigation.pop(); }, 1500); @@ -278,6 +312,12 @@ class WalletDepot extends Component { expiry: I18n.t('CARD_EXPIRY_LABEL'), cvc: I18n.t('CARD_CVC_LABEL'), }} /> + { + (this.state.displayCardError) && + this.isCreditCardValid().map((item) => ( + {item} + )) + } @@ -294,8 +334,12 @@ class WalletDepot extends Component { }} /> { - (!this.isMontantValid().isValid && this.state.montant !== null) && - {this.isMontantValid().errorMessage} + (!this.isMontantValid().isValid) && + {this.isMontantValid().errorMessage} + } + { + (this.state.isSubmitClick && this.state.montant === null) && + {I18n.t('PLEASE_ENTER_THE_AMOUNT')} } diff --git a/screens/wallet/WalletDetail.js b/screens/wallet/WalletDetail.js index a00ee32a..a93846b8 100644 --- a/screens/wallet/WalletDetail.js +++ b/screens/wallet/WalletDetail.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { Animated, Platform, StyleSheet, View, Image, StatusBar, ScrollView, Text, ProgressBarAndroid, ActivityIndicator, TouchableOpacity } from 'react-native'; +import { Animated, Alert, Platform, StyleSheet, View, Image, StatusBar, ScrollView, Text, ProgressBarAndroid, ActivityIndicator, TouchableOpacity } from 'react-native'; import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; import I18n from 'react-native-i18n' import { TabView, TabBar, SceneMap } from 'react-native-tab-view'; @@ -12,7 +12,11 @@ import Tag from '../../components/Tag'; import { IlinkEmitter } from "../../utils/events"; import { CreditCardInput } from "react-native-credit-card-input"; import { Typography, FontWeight } from '../../config/typography'; +import { responsiveHeight, responsiveWidth, } from 'react-native-responsive-dimensions'; import getWalletActivated from '../../webservice/WalletApi'; +import getWalletTransactionHistory from '../../webservice/WalletTransactionHistoryApi'; +import transferCommissionAction from '../../webservice/WalletTransferCommission'; +import Dialog, { DialogContent, DialogTitle, DialogFooter, DialogButton } from 'react-native-popup-dialog'; import { baseUrl } from '../../webservice/IlinkConstants'; let moment = require('moment-timezone'); import 'moment/locale/fr' @@ -40,28 +44,34 @@ class WalletDetail extends Component { { key: 'retrait', title: I18n.t('WITHDRAWAL') } ], heightHeader: Utils.heightHeader(), + isModalConfirmVisible: false, + wallet: null, + triggerTransferCommission: false }; slugify.extend({ '+': 'plus' }); this.scrollY = new Animated.Value(0); this.deltaY = new Animated.Value(0); + this.bgBannerY = new Animated.Value(0); this.heightImageBanner = Utils.scaleWithPixel(250, 1); this.marginTopBanner = this.heightImageBanner - this.state.heightHeader - 40; IlinkEmitter.on("langueChange", this.updateLangue.bind(this)); - /* if (this.props.navigation.state.params.hasOwnProperty('agentId')) { - let agentId = this.props.navigation.state.params.agentId; - console.log("AGENT id", agentId); - this.props.getWalletActivated(agentId); - } */ + if (this.props.navigation.state.params.hasOwnProperty('agentId')) { + let agentId = this.props.navigation.state.params.agentId; + this.props.getWalletActivated(agentId); + } + else { + this.props.getWalletTransactionHistory(this.props.navigation.state.params.wallet.id); + this.state.wallet = this.props.navigation.state.params.wallet; + } } - static options(passProps) { return { topBar: { @@ -102,6 +112,30 @@ class WalletDetail extends Component { } }; + componentDidMount() { + const { result } = this.props; + + if (this.props.navigation.state.params.hasOwnProperty('agentId')) { + + if (result !== null) { + const wallet = Array.isArray(result) ? result[0] : result; + this.props.getWalletTransactionHistory(wallet.id); + this.setState({ + wallet + }) + } + } + } + + shouldComponentUpdate(nextProps, nextState) { + if (this.state.triggerTransferCommission !== nextState.triggerTransferCommission) { + return false; + } else { + return true; + } + } + + isEmptyObject = (obj) => { for (let prop in obj) { if (obj.hasOwnProperty(prop)) { @@ -121,12 +155,12 @@ class WalletDetail extends Component { let re = moment.tz(date, 'Etc/GMT+0').format(); return moment(re).fromNow(); } + updateLangue() { this.props.navigation.setParams({ name: I18n.t('WALLET') }) this.forceUpdate() } - handleIndexChange = index => this.setState({ index }); imageScale = () => { @@ -145,6 +179,23 @@ class WalletDetail extends Component { }); } + bgBannerY = () => { + return this.scrollY.interpolate({ + inputRange: [0, 100], + outputRange: [150, 0], + extrapolate: 'clamp', + }); + } + + + refresh = () => { + const { agentId, wallet } = this.props.navigation.state.params; + if (typeof agentId !== "undefined") { + this.props.getWalletActivated(wallet.agentId); + } + else + this.props.getWalletActivated(agentId); + } renderTabBar = props => ( @@ -224,7 +276,10 @@ class WalletDetail extends Component { justifyContent: 'flex-end' }}> {wallet.network} - + { + this.renderDialogConfirmTransferCommission() + }}> {I18n.t('TRANSFER_TO_PRINCIPAL_ACCOUNT')} @@ -315,111 +370,128 @@ class WalletDetail extends Component { return ( !this.isEmptyObject(wallet) ? - ( + (<> + {this.state.triggerTransferCommission && this.renderDialogTransferCommissionResponse()} + {this.props.loading ? + + {I18n.t("LOADING_DOTS")} + : null + } - + - + + - + ])}> + - {this.renderHeader(wallet)} + {this.renderHeader(wallet)} - + - {this.renderAccountDetail(wallet)} + {this.renderAccountDetail(wallet)} - - - {I18n.t('TRANSACTIONS')} - - - - - - - - this.props.navigation.push(route.walletDepot, { wallet })} - activeOpacity={0.9}> - - - - - - - - {I18n.t('DEPOSIT')} - - - - - - {I18n.t('DEPOSIT_DESCRIPTION')} - - - - - + + + {I18n.t('TRANSACTIONS')} + - - console.log('click')} - activeOpacity={0.9}> - + - + + + this.props.navigation.push(route.walletDepot, { + wallet, + onGoBack: () => this.refresh(), + })} + activeOpacity={0.9}> + + + + + + + + {I18n.t('DEPOSIT')} + + + + + + {I18n.t('DEPOSIT_DESCRIPTION')} + + - - - {I18n.t('WITHDRAWAL')} - + + + + + this.props.navigation.push(route.walletRetrait, { + wallet, + onGoBack: () => this.refresh(), + })} + activeOpacity={0.9}> + + + + + + + {I18n.t('WITHDRAWAL')} + + + + + + {I18n.t('WITHDRAWAL_DESCRIPTION')} + + - - - {I18n.t('WITHDRAWAL_DESCRIPTION')} - - - - + + - + {this.renderHistoryTransaction()} + - - - ) + + + ) : ( @@ -429,6 +501,196 @@ class WalletDetail extends Component { ) } + renderHistoryTransactionItem = (item) => { + let re = moment.tz(item.date, 'Etc/GMT+0').format(); + let date = moment(re).fromNow(); + + return ( + + + + + + + {item.type === 'credit' ? ( + {I18n.t('WITHDRAWAL_TRANSACTION_HISTORY_DESCRIPTION')} {item.montant} + ) : + ( + {I18n.t('DEPOSIT_TRANSACTION_HISTORY_DESCRIPTION')} {item.montant} + ) + } + + {date} + + + + + ); + } + + renderHistoryTransactionList = () => { + + const { resultTransaction, errorTransaction } = this.props; + if (errorTransaction !== null) { + if (typeof errorTransaction.data !== 'undefined') { + return ( + + {errorTransaction.data.error} + + ) + } + else { + return ( + + {errorTransaction} + + ) + } + } + if (resultTransaction !== null) { + if (resultTransaction.response !== null) { + return ( + Array.isArray(resultTransaction.response) && (resultTransaction.response.length) > 0 ? + ( + resultTransaction.response.map((item, ) => ( + this.renderHistoryTransactionItem(item) + )) + ) : + ( + + {I18n.t('NO_WALLET_HISTORY')} + + ) + ) + } + } + + } + + + renderHistoryTransaction = () => { + + return ( + <> + + + {I18n.t('TRANSACTION_HISTORY')} + + + + + { + this.props.loadingTransaction ? + ( + + {Platform.OS === 'android' + ? + ( + <> + + {I18n.t('LOADING_DOTS')} + + + ) : + <> + + {I18n.t('LOADING_DOTS')} + + } + + ) : this.renderHistoryTransactionList() + } + + + ) + } + + renderDialogConfirmTransferCommission = () => { + Alert.alert( + I18n.t("CONFIRM"), + I18n.t('CONFIRM_TRANSFER_COMMISSION') + , + [ + { + text: I18n.t("NO"), onPress: () => { + + } + }, + { + text: I18n.t("YES"), onPress: () => { + this.props.transferCommissionAction(this.state.wallet.id); + this.refresh(); + this.setState({ + triggerTransferCommission: !this.state.triggerTransferCommission + }); + } + } + + ], + { cancelable: false } + ) + } + + + renderDialogTransferCommissionResponse = () => { + const { resultTransferCommission, errorTransferCommission } = this.props; + if (errorTransferCommission !== null) { + if (typeof errorTransferCommission.data !== 'undefined') { + Alert.alert( + I18n.t("ERROR_LABLE"), + errorTransferCommission.data.error + , + [ + { + text: I18n.t("OK"), onPress: () => { + + } + } + + ], + { cancelable: false } + ) + } + else { + Alert.alert( + I18n.t("ERROR_LABLE"), + errorTransferCommission + , + [ + { + text: I18n.t("OK"), onPress: () => { + + } + } + + ], + { cancelable: false } + ) + } + } + + if (resultTransferCommission !== null) { + if (resultTransferCommission.response !== null) { + Alert.alert( + I18n.t("SUCCESS"), + resultTransferCommission.response, + [ + { + text: I18n.t("OK"), onPress: () => { + + } + } + + ], + { cancelable: false } + ) + } + } + } render() { console.log('Wallet Detail props', this.props); @@ -438,7 +700,7 @@ class WalletDetail extends Component { !isHomeRootView ? this.renderDetailWallet(this.props.navigation.state.params.wallet) : - (this.props.loading ? + ((this.props.loading || this.props.loadingTransferCommission) ? this.renderLoader() : ( this.props.result !== null && @@ -453,11 +715,21 @@ class WalletDetail extends Component { const mapStateToProps = state => ({ loading: state.walletReducer.loading, result: state.walletReducer.result, - error: state.walletReducer.error + error: state.walletReducer.error, + + loadingTransaction: state.walletHistoryReducer.loadingTransaction, + resultTransaction: state.walletHistoryReducer.resultTransaction, + errorTransaction: state.walletHistoryReducer.errorTransaction, + + loadingTransferCommission: state.walletTransferCommissionReducer.loadingTransferCommission, + resultTransferCommission: state.walletTransferCommissionReducer.resultTransferCommission, + errorTransferCommission: state.walletTransferCommissionReducer.errorTransferCommission, }); const mapDispatchToProps = dispatch => bindActionCreators({ - getWalletActivated + getWalletActivated, + getWalletTransactionHistory, + transferCommissionAction }, dispatch); export default connect(mapStateToProps, mapDispatchToProps)(WalletDetail); @@ -491,6 +763,20 @@ const styles = StyleSheet.create({ height: 140, borderRadius: 10 }, + paymentItem: { + flexDirection: "row", + alignItems: "center", + justifyContent: "space-between", + borderBottomWidth: 1, + paddingVertical: 5, + width: responsiveWidth(100), + marginBottom: 15 + }, + iconContent: { + width: 60, + marginRight: 10, + alignItems: "center" + }, contentLeftItem: { flex: 1, paddingTop: 40, @@ -511,8 +797,8 @@ const styles = StyleSheet.create({ justifyContent: "space-between", alignItems: "center", borderBottomWidth: 1, - paddingVertical: 15, - marginTop: 10 + paddingVertical: 10, + marginTop: 5 }, blockView: { paddingVertical: 10, @@ -528,7 +814,7 @@ const styles = StyleSheet.create({ }, transactionContainer: { flexDirection: 'row', - paddingTop: 20, + paddingTop: 10, }, containerTouch: { flex: 1, @@ -555,7 +841,7 @@ const styles = StyleSheet.create({ height: Utils.scaleWithPixel(30) }, content: { - height: Utils.scaleWithPixel(50), + height: Utils.scaleWithPixel(60), paddingHorizontal: 10, justifyContent: 'space-between', alignItems: 'flex-start', diff --git a/screens/wallet/WalletRetrait.js b/screens/wallet/WalletRetrait.js index d49960b4..c7f8b787 100644 --- a/screens/wallet/WalletRetrait.js +++ b/screens/wallet/WalletRetrait.js @@ -1,19 +1,20 @@ import React, { Component } from 'react'; -import { Animated, Platform, StyleSheet, View, Image, StatusBar, ScrollView, Text, ProgressBarAndroid, ActivityIndicator, TouchableOpacity } from 'react-native'; +import { Dimensions, Platform, StyleSheet, View, Alert, StatusBar, ScrollView, Text, ProgressBarAndroid, ActivityIndicator, TouchableOpacity } from 'react-native'; import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; import I18n from 'react-native-i18n' -import { TabView, TabBar, SceneMap } from 'react-native-tab-view'; +import LottieView from 'lottie-react-native'; import * as Utils from '../../utils/DeviceUtils'; import Icons from 'react-native-vector-icons/Ionicons' import { Images } from '../../config/Images'; import CustomButton from '../../components/CustomButton'; +import OutlineTextInput from '../../components/OutlineTextInput'; import { Color } from '../../config/Color'; import Tag from '../../components/Tag'; import { IlinkEmitter } from "../../utils/events"; import { CreditCardInput } from "react-native-credit-card-input"; import { Typography, FontWeight } from '../../config/typography'; -import getWalletActivated from '../../webservice/WalletApi'; -import { baseUrl } from '../../webservice/IlinkConstants'; +import depositAction from '../../webservice/DepositApi'; +import Dialog, { DialogContent, DialogTitle, DialogFooter, DialogButton } from 'react-native-popup-dialog'; let moment = require('moment-timezone'); import 'moment/locale/fr' import 'moment/locale/es-us' @@ -24,16 +25,47 @@ import 'moment/locale/en-il' import 'moment/locale/en-nz' import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; +import style from '../../components/TextInput/styles'; +import { responsiveHeight, responsiveWidth, } from 'react-native-responsive-dimensions'; +const CONTAINER_WIDTH = Dimensions.get("window").width; + class WalletRetrait extends Component { + + static navigatorStyle = { + navBarBackgroundColor: Color.accentLightColor, + statusBarColor: Color.accentColor, + navBarTextColor: '#FFFFFF', + navBarButtonColor: '#FFFFFF', + }; + static navigationOptions = ({ navigation }) => { + return { + drawerLabel: () => null, + title: I18n.t('MAKE_WITHDRAWAL') + } + }; + constructor(props) { super(props); this.state = { - + type: "debit", + montant: null, + numCarte: 0, + cvv: 0, + expiration_date: '', + creditCardInput: {}, + comptePrincipal: this.props.navigation.state.params.wallet.balance_princ, + id: this.props.navigation.state.params.wallet.id, + isModalConfirmVisible: false, + isDataSubmit: false, + isSubmitClick: false, + displayCardError: false }; + console.log("Wallet Params", this.props.navigation.state.params.wallet); + IlinkEmitter.on("langueChange", this.updateLangue.bind(this)); } @@ -42,41 +74,296 @@ class WalletRetrait extends Component { this.forceUpdate() } - render() { + onCreditCardChange = (form) => { + console.log(form); + this.setState({ + creditCardInput: form, + displayCardError: false + }); + } + + isNormalInteger = (str) => { + if (/[ `!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?~]/.test(str)) + return false; + else + return true; + } + + isMontantValid = () => { + const { montant } = this.state; + if ((parseInt(montant) == 0 || montant < 0)) + return { + errorMessage: I18n.t('ENTER_AMOUNT_SUPERIOR_ZEROR'), + isValid: false + }; + + else if (!this.isNormalInteger(montant)) + return { + errorMessage: I18n.t('ENTER_VALID_AMOUNT'), + isValid: false + }; + + + else if (montant > parseInt(this.state.comptePrincipal)) + return { + errorMessage: I18n.t('AMOUNT_SUPERIOR_TO_PRINCIPAL_ACCOUNT'), + isValid: false + }; + + else + return { + errorMessage: '', + isValid: true + }; + } + + isCreditCardValid = () => { + const { creditCardInput } = this.state; + const errorMessage = []; + + if (typeof creditCardInput.status !== 'undefined') { + + if (creditCardInput.status.cvc === 'incomplete') + errorMessage.push(I18n.t('CVC_CARD_ERROR')); + if (creditCardInput.status.expiry === 'incomplete') + errorMessage.push(I18n.t('EXPIRY_CARD_ERROR')); + if (creditCardInput.status.number === 'incomplete') + errorMessage.push(I18n.t('CARD_NUMBER_ERROR')); + } + else + errorMessage.push(I18n.t('THIS_FIELD_IS_REQUIRED')) + + return errorMessage; + } + + commissionsFees = (amount, tauxComClientRetrait) => { + let tauxComClientDepotTemp = ((amount * tauxComClientRetrait) / 100); + return Math.round(tauxComClientDepotTemp + tauxComClientDepotTemp); + } + + modalConfirmTransaction = () => { + const { taux_com_client_retrait } = this.props.navigation.state.params.wallet; + return ( - - - - - {I18n.t('ENTER_YOUR_CARD_ID')} - + { + this.setState({ isModalConfirmVisible: false }); + }} + width={0.7} + dialogTitle={} + footer={ + + { + this.setState({ + isModalConfirmVisible: false + }); + }} + /> + { + this.setState({ + isModalConfirmVisible: false, + isDataSubmit: true + }); + this.props.depositAction({ + numCarte: parseInt((this.state.creditCardInput.values.number).replace(/ /g, ' ')), + cvv: this.state.creditCardInput.values.cvc, + expiration_date: this.state.creditCardInput.values.expiry, + type: "credit", + montant: this.state.montant, + id_wallet: this.state.id + }); + }} + /> + + } + > + + + + + + {I18n.t('AMOUNT')} + + + {this.state.montant} + + + + + {I18n.t('COMMISSION_FEES')} + + + {this.commissionsFees(this.state.montant, taux_com_client_retrait)} + + + + + + {I18n.t('TOTAL')} + + + {this.state.montant - this.commissionsFees(this.state.montant, taux_com_client_retrait)} + + + + + + + ) + } + + onSubmitDeposit = () => { + const { creditCardInput } = this.state; + + if (this.isMontantValid().isValid && creditCardInput.valid) { + this.setState({ + numCarte: parseInt((creditCardInput.values.number).replace(/ /g, ' ')), + cvv: creditCardInput.values.cvc, + expiration_date: creditCardInput.values.expiry, + isModalConfirmVisible: true + }); + + //this.props.depositAction(this.state); + } + else if (!creditCardInput.valid) { + this.setState({ + displayCardError: true + }) + } + this.setState({ isSubmitClick: true }) + } + + isHasError = () => { + const { error, result } = this.props; + + if (this.state.isDataSubmit) { + + if (error !== null) { + if (typeof error.data !== 'undefined') { + Alert.alert( + I18n.t("ERROR_LABEL"), + error.data.error, + [ + { + text: I18n.t("OK"), onPress: () => { } + } + + ], + { cancelable: false } + ); + + this.props.navigation.state.params.onGoBack(); + this.props.navigation.pop(); + + } + return null; + } + + else if (result !== null) { + + setTimeout(() => { + this.props.navigation.state.params.onGoBack(); + this.props.navigation.pop(); + }, 1500); + + return + + - + } - - + else + return null; + } + } - - { console.log('click') }}> - {I18n.t('VALIDATE')} - - - + render() { + const { error } = this.props; + + return ( + + + {this.isHasError()} + {this.modalConfirmTransaction()} + + + + + + { + (this.state.displayCardError) && + this.isCreditCardValid().map((item) => ( + {item} + )) + } + + + + { + this.setState({ montant }); + this.isMontantValid(); + }} + /> + { + (!this.isMontantValid().isValid) && + {this.isMontantValid().errorMessage} + } + { + (this.state.isSubmitClick && this.state.montant === null) && + {I18n.t('PLEASE_ENTER_THE_AMOUNT')} + } + + + + + this.onSubmitDeposit()}> + {I18n.t('VALIDATE')} + + + + ) } } const mapStateToProps = state => ({ - loading: state.walletReducer.loading, - result: state.walletReducer.result, - error: state.walletReducer.error + loading: state.depositReducer.loading, + result: state.depositReducer.result, + error: state.depositReducer.error }); const mapDispatchToProps = dispatch => bindActionCreators({ + depositAction: depositAction }, dispatch); export default connect(mapStateToProps, mapDispatchToProps)(WalletRetrait); @@ -94,4 +381,20 @@ const styles = StyleSheet.create({ paddingVertical: 15, marginTop: 10 }, + contentButtonBottom: { + borderTopWidth: 1, + paddingVertical: 10, + paddingHorizontal: 20, + flexDirection: "row", + justifyContent: "space-between", + alignItems: "center" + }, + blockView: { + paddingVertical: 10, + borderBottomWidth: 1 + }, + lottie: { + width: 248, + height: 248 + }, }); \ No newline at end of file diff --git a/screens/wallet/WalletSelect.js b/screens/wallet/WalletSelect.js index 92424088..a6e70068 100644 --- a/screens/wallet/WalletSelect.js +++ b/screens/wallet/WalletSelect.js @@ -24,7 +24,8 @@ class WalletSelect extends Component { IlinkEmitter.on("langueChange", this.updateLangue.bind(this)); this.state = { result: null, - isDataLoaded: false + isDataLoaded: false, + agentId: null } } @@ -49,8 +50,10 @@ class WalletSelect extends Component { readUser().then((user) => { if (user) { if (user !== undefined) { - if (user.phone !== undefined) + if (user.phone !== undefined) { this.props.getWalletActivated(user.agentId); + this.setState({ agentId: user.agentId }); + } } } }); @@ -85,12 +88,14 @@ class WalletSelect extends Component { renderWalletItem = (item) => { let icon = `${baseUrl}/datas/img/network/${slugify(item.network, { lower: true })}-logo.png`; + let itemToSend = item; + itemToSend.agentId = this.state.agentId; return ( this.props.navigation.navigate('walletDetail', { wallet: item })}> + onPress={() => this.props.navigation.navigate('walletDetail', { wallet: itemToSend })}> diff --git a/utils/i18n/en.json b/utils/i18n/en.json index 8d302aee..87dc0662 100644 --- a/utils/i18n/en.json +++ b/utils/i18n/en.json @@ -44,10 +44,18 @@ "CARD_NUMBER_LABEL": "Card number", "CARD_EXPIRY_LABEL": "Expiry.", "CARD_CVC_LABEL": "CVC/CCV", + "CVC_CARD_ERROR": "CVC card error format", + "THIS_FIELD_IS_REQUIRED": "This field is required", + "PLEASE_ENTER_THE_AMOUNT": "Please enter the amount", + "EXPIRY_CARD_ERROR": "Date incorrect", + "CARD_NUMBER_ERROR": "Card number incorrect", "AMOUNT_LABEL": "Montant", "WITHDRAWAL": "Withdrawal", + "DEMAND_SEND": "Demand send", "WITHDRAWAL_DESCRIPTION": "Make a withdrawal", "COMMISSION_ACCOUNT_TITLE": "Commission account", + "CONFIRM": "Confirm", + "CONFIRM_TRANSFER_COMMISSION": "Confirm commission transfer", "CREATION_DATE": "Creation date", "PRINCIPAL_ACCOUNT_TITLE": "Principal account", "NO_WALLET_ACTIVED": "PNo wallet is activated for your account", @@ -56,6 +64,10 @@ "ENTER_YOUR_CARD_ID": "Please enter your bank card ID", "SELECT_YOUR_WALLET": "Selec your wallet", "TRANSACTIONS": "Transactions", + "TRANSACTION_HISTORY": "Transactions history", + "DEPOSIT_TRANSACTION_HISTORY_DESCRIPTION": "Deposit of", + "NO_WALLET_HISTORY": "No transaction", + "WITHDRAWAL_TRANSACTION_HISTORY_DESCRIPTION": "Withdrawal of", "THE_ACCOUNT": "Account ", "NO_GEO_POINT_CODE": "You have no free geolocated point", "NO_DEMAND_ADHESION": "You have no membership request", diff --git a/utils/i18n/fr.json b/utils/i18n/fr.json index fc7d92d7..088bc6b3 100644 --- a/utils/i18n/fr.json +++ b/utils/i18n/fr.json @@ -43,16 +43,28 @@ "ENTER_AMOUNT_SUPERIOR_ZEROR": "Entrer un montant supérieur à zero", "AMOUNT_SUPERIOR_TO_PRINCIPAL_ACCOUNT": "Montant supérieur à celui du compte principal de l'agent", "MAKE_DEPOSIT": "Effectuer un dépôt", - "MAKE_WITHDRAWAL": "Effectuer un dépôt", + "MAKE_WITHDRAWAL": "Effectuer un retrait", "CARD_NUMBER_LABEL": "Numéro de la carte", "CARD_EXPIRY_LABEL": "Date. exp.", "CARD_CVC_LABEL": "CVC/CCV", + "CVC_CARD_ERROR": "Code CVC est erroné", + "EXPIRY_CARD_ERROR": "Date est incorrect", + "CARD_NUMBER_ERROR": "Numéro de carte incorrect", + "THIS_FIELD_IS_REQUIRED": "Ce champ est requis", + "PLEASE_ENTER_THE_AMOUNT": "Veuillez renseigne le montant", "DEPOSIT_DESCRIPTION": "Effectuer un dépôt", "WITHDRAWAL": "Retrait", "WITHDRAWAL_DESCRIPTION": "Effectuer un retrait", "COMMISSION_ACCOUNT_TITLE": "Cpt. commission", + "CONFIRM": "Confirmer", + "CONFIRM_TRANSFER_COMMISSION": "Confirmer le transfert des commissions", "PRINCIPAL_ACCOUNT_TITLE": "Cpt. principal", "TRANSACTIONS": "Transactions", + "TRANSACTION_HISTORY": "Historique des transactions", + "WITHDRAWAL_TRANSACTION_HISTORY_DESCRIPTION": "Retrait de", + "DEPOSIT_TRANSACTION_HISTORY_DESCRIPTION": "Dépôt de", + "NO_WALLET_HISTORY": "Aucune transaction à ce jour", + "DEMAND_SEND": "Demande envoyé", "NO_WALLET_ACTIVED": "Aucun wallet n'est activé pour votre compte", "TRANSFER_TO_PRINCIPAL_ACCOUNT": "Transférer les commissions", "PRINCIPAL": "Principal", diff --git a/webservice/IlinkConstants.js b/webservice/IlinkConstants.js index 000b9bcc..b75b35b2 100644 --- a/webservice/IlinkConstants.js +++ b/webservice/IlinkConstants.js @@ -2,7 +2,9 @@ export const isDebugMode = false //base url test //const baseUrl = "https://ilink-app.com/mobilebackendbeta" //base url production -export const baseUrl = "https://ilink-app.com/mobilebackend"; +//export const baseUrl = "https://ilink-app.com/mobilebackend"; +//export const baseUrl = "https://test.ilink-app.com/mobilebackendtest"; +export const baseUrl = "http://test.ilink-app.com:8080/mobilebackendtest"; export const testBaseUrl = "https://test.ilink-app.com"; //base url agent //const baseUrl = "https://ilink-app.com/mobilebackendtest2" @@ -18,6 +20,7 @@ export const demandeActionUrl = baseUrl + '/interacted/DemandeAction.php'; export const configActionUrl = baseUrl + '/interacted/ConfigAction.php'; export const walletActionUrl = testBaseUrl + '/walletService/wallets'; export const transactionUrl = testBaseUrl + '/walletService/transactions'; +export const transferCommission = testBaseUrl + '/walletService/virement'; export const authKeyUrl = testBaseUrl + '/oauth/token'; export const videoUrl = "https://www.youtube.com/watch?v=wwGPDPsSLWY"; export const MARKER_URL = baseUrl + "/interacted/LocationAction.php"; diff --git a/webservice/WalletTransactionHistoryApi.js b/webservice/WalletTransactionHistoryApi.js new file mode 100644 index 00000000..8ee77de6 --- /dev/null +++ b/webservice/WalletTransactionHistoryApi.js @@ -0,0 +1,39 @@ + +import { transactionUrl } from "./IlinkConstants"; +import { store } from "../redux/store"; +import axios from "axios"; +import { fetchWalletHistoryPending, fetchWalletHistorySuccess, fetchWalletHistoryError } from "../redux/actions/WalletActions"; + +const getWalletTransactionHistory = (walletID) => { + + const auth = store.getState().authKeyReducer; + const authKey = auth !== null ? `${auth.authKey.token_type} ${auth.authKey.access_token}` : ''; + + return dispatch => { + dispatch(fetchWalletHistoryPending()); + + axios({ + url: `${transactionUrl}/${walletID}`, + method: 'GET', + headers: { + 'Authorization': authKey + } + }) + .then(response => { + console.log(response); + dispatch(fetchWalletHistorySuccess(response)); + }) + .catch(error => { + console.log(error); + dispatch(fetchWalletHistoryError(error.message)); + if (error.response) + dispatch(fetchWalletHistoryError(error.response)); + else if (error.request) + dispatch(fetchWalletHistoryError(error.request)) + else + dispatch(fetchWalletHistoryError(error.message)) + }); + } +} + +export default getWalletTransactionHistory; \ No newline at end of file diff --git a/webservice/WalletTransferCommission.js b/webservice/WalletTransferCommission.js new file mode 100644 index 00000000..355fb492 --- /dev/null +++ b/webservice/WalletTransferCommission.js @@ -0,0 +1,39 @@ + +import { transferCommission } from "./IlinkConstants"; +import { store } from "../redux/store"; +import axios from "axios"; +import { fetchWalletTransferCommissionPending, fetchWalletTransferCommissionSuccess, fetchWalletTransferCommssionError } from "../redux/actions/WalletActions"; + +const transferCommissionAction = (walletID) => { + + const auth = store.getState().authKeyReducer; + const authKey = auth !== null ? `${auth.authKey.token_type} ${auth.authKey.access_token}` : ''; + + return dispatch => { + dispatch(fetchWalletTransferCommissionPending()); + + axios({ + url: `${transferCommission}/${walletID}`, + method: 'PUT', + headers: { + 'Authorization': authKey + } + }) + .then(response => { + console.log(response); + dispatch(fetchWalletTransferCommissionSuccess(response)); + }) + .catch(error => { + console.log(error); + dispatch(fetchWalletTransferCommssionError(error.message)); + if (error.response) + dispatch(fetchWalletTransferCommssionError(error.response)); + else if (error.request) + dispatch(fetchWalletTransferCommssionError(error.request)) + else + dispatch(fetchWalletTransferCommssionError(error.message)) + }); + } +} + +export default transferCommissionAction; \ No newline at end of file