@originallyus/feedback-rn-sdk 2.0.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.sendSubmit=exports.sendRequest=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _NetworkHelper=require("../utils/NetworkHelper");var _reactNative=require("react-native");(function(a,b){var f=a0b,c=a();while(!![]){try{var d=parseInt(f(0x174))/0x1+-parseInt(f(0x177))/0x2+parseInt(f(0x17f))/0x3*(-parseInt(f(0x17e))/0x4)+-parseInt(f(0x175))/0x5+parseInt(f(0x171))/0x6+-parseInt(f(0x17a))/0x7+parseInt(f(0x179))/0x8;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}})(a0a,0x2e4b1);function a0a(){var i=['error','130288LpBWEM','1306290iDapJx','FeedbackSDK\x20Error:\x20response.data\x20is\x20empty.\x20Code\x209373','148542QyNYfj','log','7376488YKDybw','1589490ZUuGtw','data','FeedbackSDK\x20Error:\x20response\x20is\x20empty.\x20Code\x202370','FeedbackSDK\x20Error:\x20request\x20form\x20error.\x20Code\x208417','148KxNcCs','30333WiWYqs','FeedbackSDK\x20Error','FeedbackSDK\x20Error:\x20response.data\x20is\x20empty.\x20Code\x202373','debug_message','alert','FeedbackSDK\x20Debug:','/8vs2qwFD1rlSFWIa13Wc','443844gvRcIj','FeedbackSDK\x20Error:\x20request\x20form\x20error.\x20Code\x207451'];a0a=function a0a(){return i;};return a0a();}var sendRequest=exports.sendRequest=function(){var _ref=(0,_asyncToGenerator2.default)(function*(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var g=a0b;try{var c=yield(0,_NetworkHelper.myAxiosPost)(g(0x170),a,b);if(!c)return console[g(0x178)]('FeedbackSDK\x20Error:\x20response\x20is\x20empty.\x20Code\x209370'),null;if(!c['data'])return console['log'](g(0x176)),c[g(0x17b)];c[g(0x17b)][g(0x182)]&&console[g(0x178)](g(0x16f),c['data']['debug_message']);if(c[g(0x17b)]['error'])return _reactNative.Alert['alert'](g(0x180),c[g(0x17b)][g(0x173)],[{'text':'OK'}],{'cancelable':!![]}),c;return c[g(0x17b)];}catch(d){console[g(0x178)](g(0x172),d);}});return function sendRequest(_x){return _ref.apply(this,arguments);};}();function a0b(a,b){var c=a0a();return a0b=function a0b(d,e){d=d-0x16f;var f=c[d];return f;},a0b(a,b);}var sendSubmit=exports.sendSubmit=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var h=a0b;try{var c=yield(0,_NetworkHelper.myAxiosPost)('/LXvcFSTTOqxxmJX9qQar',a,b);if(!c)return console[h(0x178)](h(0x17c)),null;if(!c['data'])return console['log'](h(0x181)),c['data'];if(c[h(0x17b)][h(0x173)])return _reactNative.Alert[h(0x183)]('FeedbackSDK\x20Error',c['data'][h(0x173)],[{'text':'OK'}],{'cancelable':!![]}),c;return c[h(0x17b)];}catch(d){console['log'](h(0x17d),d);}});return function sendSubmit(_x2){return _ref2.apply(this,arguments);};}();
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.sendSubmit=exports.sendRequest=exports.sendConfirm=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _NetworkHelper=require("../utils/NetworkHelper");var _reactNative=require("react-native");function a0a(){var j=['FeedbackSDK\x20Error:\x20response.data\x20is\x20empty.\x20Code\x209322','FeedbackSDK\x20Error:\x20request\x20form\x20error.\x20Code\x207451','893868asiFdQ','data','156mATHWw','FeedbackSDK\x20Error:\x20response.data\x20is\x20empty.\x20Code\x209373','5zNtTYN','7oQyNIP','FeedbackSDK\x20Error:\x20request\x20form\x20error.\x20Code\x208417','4elnjYd','6353050paSwNt','26041zDvNCE','390723EPiTJs','350406Lwygtm','FeedbackSDK\x20Error','/LXvcFSTTOqxxmJX9qQar','log','error','FeedbackSDK\x20Error:\x20response\x20is\x20empty.\x20Code\x202370','/8vs2qwFD1rlSFWIa13Wc','alert','FeedbackSDK\x20Error:\x20response\x20is\x20empty.\x20Code\x209370','56irwviW','/xPm2OGUrgAAVLom2NSZd','FeedbackSDK\x20Error:\x20response\x20is\x20empty.\x20Code\x209377','debug_message','256630uMgLXD','1746440SMcZwE','FeedbackSDK\x20Debug:'];a0a=function a0a(){return j;};return a0a();}(function(a,b){var f=a0b,c=a();while(!![]){try{var d=-parseInt(f(0x1dd))/0x1*(-parseInt(f(0x1e8))/0x2)+-parseInt(f(0x1de))/0x3*(parseInt(f(0x1db))/0x4)+-parseInt(f(0x1d8))/0x5*(parseInt(f(0x1d4))/0x6)+parseInt(f(0x1d9))/0x7*(parseInt(f(0x1ed))/0x8)+parseInt(f(0x1df))/0x9+-parseInt(f(0x1dc))/0xa+-parseInt(f(0x1ec))/0xb*(-parseInt(f(0x1d6))/0xc);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}})(a0a,0x5b971);function a0b(a,b){var c=a0a();return a0b=function a0b(d,e){d=d-0x1d4;var f=c[d];return f;},a0b(a,b);}var sendRequest=exports.sendRequest=function(){var _ref=(0,_asyncToGenerator2.default)(function*(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var g=a0b;try{var c=yield(0,_NetworkHelper.myAxiosPost)(g(0x1e5),a,b);if(!c)return console[g(0x1e2)](g(0x1e7)),null;if(!c['data'])return console[g(0x1e2)](g(0x1d7)),c[g(0x1d5)];c[g(0x1d5)]['debug_message']&&console['log']('FeedbackSDK\x20Debug:',c['data'][g(0x1eb)]);if(c[g(0x1d5)][g(0x1e3)])return _reactNative.Alert[g(0x1e6)](g(0x1e0),c[g(0x1d5)][g(0x1e3)],[{'text':'OK'}],{'cancelable':!![]}),c;return c[g(0x1d5)];}catch(d){console[g(0x1e2)](g(0x1f0),d);}});return function sendRequest(_x){return _ref.apply(this,arguments);};}();var sendSubmit=exports.sendSubmit=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var h=a0b;try{var c=yield(0,_NetworkHelper.myAxiosPost)(h(0x1e1),a,b);if(!c)return console[h(0x1e2)](h(0x1e4)),null;if(!c[h(0x1d5)])return console[h(0x1e2)]('FeedbackSDK\x20Error:\x20response.data\x20is\x20empty.\x20Code\x202373'),c[h(0x1d5)];if(c['data'][h(0x1e3)])return _reactNative.Alert[h(0x1e6)](h(0x1e0),c[h(0x1d5)][h(0x1e3)],[{'text':'OK'}],{'cancelable':!![]}),c;return c['data'];}catch(d){console[h(0x1e2)](h(0x1da),d);}});return function sendSubmit(_x2){return _ref2.apply(this,arguments);};}();var sendConfirm=exports.sendConfirm=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(a){var b=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var i=a0b;try{var c=yield(0,_NetworkHelper.myAxiosPost)(i(0x1e9),a,b);if(!c)return console['log'](i(0x1ea)),null;if(!c[i(0x1d5)])return console['log'](i(0x1ef)),c[i(0x1d5)];c[i(0x1d5)][i(0x1eb)]&&console['log'](i(0x1ee),c[i(0x1d5)][i(0x1eb)]);if(c[i(0x1d5)]['error'])return _reactNative.Alert['alert'](i(0x1e0),c[i(0x1d5)][i(0x1e3)],[{'text':'OK'}],{'cancelable':!![]}),c;return c[i(0x1d5)];}catch(d){console[i(0x1e2)](i(0x1f0),d);}});return function sendConfirm(_x3){return _ref3.apply(this,arguments);};}();
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _const=require("../utils/const");var myFunc=_interopRequireWildcard(require("../utils/MyFunction"));var _header=require("./header");var _ui=require("../ui");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/component/confirmStep.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var ConfirmStep=function ConfirmStep(_ref){var theme=_ref.theme,handleButtonClose=_ref.handleButtonClose,form=_ref.form,onProcess=_ref.onProcess;var appWidth=myFunc.getAppWidth(instrusive_style);var splash_screen_title=form.splash_screen_title,instrusive_style=form.instrusive_style,splash_screen_button_skip=form.splash_screen_button_skip,splash_screen_button_proceed=form.splash_screen_button_proceed,splash_screen_question=form.splash_screen_question;var isTabletInstrusive=false;var opacity=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;if(_const.isTablet&&!!instrusive_style)isTabletInstrusive=true;var fadeOut=function fadeOut(callback){return _reactNative.Animated.timing(opacity,{toValue:0,useNativeDriver:true}).start(callback);};(0,_react.useState)(function(){_reactNative.Animated.timing(opacity,{toValue:1,useNativeDriver:true}).start();},[]);return(0,_jsxRuntime.jsxs)(_reactNative.Animated.View,{style:[style.wrapper,{paddingHorizontal:isTabletInstrusive?80:myFunc.w_p21(appWidth),opacity:opacity}],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{rowGap:20},children:[(0,_jsxRuntime.jsx)(_header.Header,Object.assign({},theme,{alignment:'center',handleButtonClose:handleButtonClose,title:splash_screen_title,instrusive_style:instrusive_style,appWidth:appWidth,isTabletInstrusive:isTabletInstrusive})),(0,_jsxRuntime.jsx)(_ui.Question,Object.assign({},theme,{question:splash_screen_question}))]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{},children:[(0,_jsxRuntime.jsx)(_ui.ButtonSubmit,Object.assign({},theme,{title:splash_screen_button_proceed,onPress:function onPress(){fadeOut(onProcess);},appWidth:appWidth,isTabletInstrusive:isTabletInstrusive})),(0,_jsxRuntime.jsx)(_ui.ButtonSubmit,{button_bg_color:'#fff',button_text_color:theme.button_bg_color,button_font:theme.button_font,button_fontsize:theme.button_fontsize,customStyle:{borderColor:theme.button_bg_color,borderWidth:1,borderRadius:8},title:splash_screen_button_skip,onPress:handleButtonClose,appWidth:appWidth,isTabletInstrusive:isTabletInstrusive})]})]});};var style=_reactNative.StyleSheet.create({wrapper:{flex:1,backgroundColor:'#fff',justifyContent:'space-between'}});var _default=exports.default=ConfirmStep;
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _=require("./");var _const=require("../utils/const");var _ui=require("../ui");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/component/contentUI.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var heightToLowUI=["question","show_rating","instruction","options","secondary_question","show_comment","fineprint","submit_btn"];var NonInstrusiveUI=function NonInstrusiveUI(_ref){var didSubmitted=_ref.didSubmitted,form=_ref.form,animatedValues=_ref.animatedValues,animations=_ref.animations,states=_ref.states,functions=_ref.functions;var theme=form.theme,question=form.question,title=form.title,options=form.options,options_multiselect=form.options_multiselect,instruction=form.instruction,comment_placeholder=form.comment_placeholder,fineprint=form.fineprint,button_text=form.button_text,rating_max=form.rating_max,rating_min=form.rating_min,show_rating_star=form.show_rating_star,show_rating_number=form.show_rating_number,read_only_rating=form.read_only_rating,show_comment=form.show_comment,comment_mandatory=form.comment_mandatory,secondary_question=form.secondary_question,image_file_url=form.image_file_url,instrusive_style=form.instrusive_style,alignment=form.alignment,auto_submit=form.auto_submit;var submitForm=functions.submitForm,handleButtonClose=functions.handleButtonClose,handlePressRating=functions.handlePressRating,handleChangeText=functions.handleChangeText,handleSelectOption=functions.handleSelectOption,handleMultiSelectOption=functions.handleMultiSelectOption,scrollViewInputRef=functions.scrollViewInputRef;var animaginSelectBtn=animations.animaginSelectBtn,animationInSideApp=animations.animationInSideApp;var numStar=states.numStar,inputValue=states.inputValue,listActiveSelect=states.listActiveSelect,loading=states.loading,isShowingExtraForm=states.isShowingExtraForm;var keyboardHeight=animatedValues.keyboardHeight;var multipleSelectAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var secondaryQuestionAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var textAreaAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var fineprintAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var submitBtnAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var _useState=(0,_react.useState)(new Array(heightToLowUI.length).fill(false)),_useState2=(0,_slicedToArray2.default)(_useState,2),showHeightToLowUI=_useState2[0],setShowHeightToLowUI=_useState2[1];var _useState3=(0,_react.useState)(""),_useState4=(0,_slicedToArray2.default)(_useState3,2),showSlug=_useState4[0],setShowSlug=_useState4[1];(0,_react.useEffect)(function(){if(_reactNative.Platform.OS==="android"&&_reactNative.UIManager.setLayoutAnimationEnabledExperimental){_reactNative.UIManager.setLayoutAnimationEnabledExperimental(true);}var showIndex=-1;if(show_rating_number||show_rating_star||auto_submit){showIndex=heightToLowUI.findIndex(function(value){return value==="show_rating";});setShowSlug("show_rating");}else if((options==null?void 0:options.length)!==0&&options){showIndex=heightToLowUI.findIndex(function(value){return value==="options";});setShowSlug("options");}else if(show_comment){setShowSlug("show_comment");}if(showIndex!==-1){var _showUI=new Array(showIndex+1).fill(true).concat(new Array(heightToLowUI.length-showIndex+1).fill(false));setShowHeightToLowUI((0,_toConsumableArray2.default)(_showUI));return;}var showUI=new Array(heightToLowUI.length).fill(true);setShowHeightToLowUI((0,_toConsumableArray2.default)(showUI));},[]);(0,_react.useEffect)(function(){setTimeout(function(){if((options==null?void 0:options.length)!==0&&options&&showHeightToLowUI[3]){_reactNative.Animated.timing(multipleSelectAni,{toValue:1,useNativeDriver:false}).start();}if(secondary_question&&showHeightToLowUI[4]){_reactNative.Animated.timing(secondaryQuestionAni,{toValue:1,useNativeDriver:false}).start();}if(show_comment&&showHeightToLowUI[5]){_reactNative.Animated.timing(textAreaAni,{toValue:1,useNativeDriver:false}).start();}if(fineprint&&showHeightToLowUI[6]){_reactNative.Animated.timing(fineprintAni,{toValue:1,useNativeDriver:false}).start();}if(showHeightToLowUI[7]){_reactNative.Animated.timing(submitBtnAni,{toValue:1,useNativeDriver:false}).start();}},300);},[showHeightToLowUI]);(0,_react.useEffect)(function(){if(auto_submit!=null&&auto_submit.includes(numStar))return;if(numStar!==0&&showSlug==="show_rating"){var _showUI2=new Array(heightToLowUI.length).fill(true);_reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);setShowHeightToLowUI((0,_toConsumableArray2.default)(_showUI2));}},[numStar]);(0,_react.useEffect)(function(){if(listActiveSelect.length>0&&showSlug==="options"){var _showUI3=new Array(heightToLowUI.length).fill(true);_reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);setShowHeightToLowUI((0,_toConsumableArray2.default)(_showUI3));}},[listActiveSelect]);(0,_react.useEffect)(function(){if(didSubmitted){_reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);var _showUI4=new Array(heightToLowUI.length).fill(true);setShowHeightToLowUI((0,_toConsumableArray2.default)(_showUI4));}},[didSubmitted]);var showUI=(0,_react.useRef)(new _reactNative.Animated.Value(1)).current;(0,_react.useEffect)(function(){if(isShowingExtraForm){_reactNative.Animated.sequence([_reactNative.Animated.timing(showUI,{toValue:0,duration:350,useNativeDriver:false}),_reactNative.Animated.timing(showUI,{toValue:1,duration:350,useNativeDriver:false})]).start(function(){});}},[isShowingExtraForm]);var opacitySecondaryQuestion=secondaryQuestionAni.interpolate({inputRange:[0,1],outputRange:[0,1]});var opacityTextArea=textAreaAni.interpolate({inputRange:[0,1],outputRange:[0,1]});var opacityFineprint=fineprintAni.interpolate({inputRange:[0,1],outputRange:[0,1]});var opacitySubmitBtn=submitBtnAni.interpolate({inputRange:[0,1],outputRange:[0,1]});var disableSumitBtn=false;if(comment_mandatory==1&&!inputValue.trim()){disableSumitBtn=true;}if(show_rating_star==1||show_rating_number==1)if(numStar==0)disableSumitBtn=true;var appWidth=f.getAppWidth(instrusive_style);var isTabletInstrusive=false;if(_const.isTablet&&!!instrusive_style)isTabletInstrusive=true;return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableWithoutFeedback,{onPress:_reactNative.Keyboard.dismiss,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:{paddingHorizontal:isTabletInstrusive?22:f.w_p21(appWidth),paddingTop:isTabletInstrusive?22:f.w_p16(appWidth),marginTop:_reactNative.Platform.OS==="android"&&!_const.isTablet&&!!instrusive_style?_reactNative.StatusBar.currentHeight:0},children:(0,_jsxRuntime.jsx)(_.Header,Object.assign({},theme,{handleButtonClose:handleButtonClose,title:title,image_file_url:image_file_url,instrusive_style:instrusive_style,alignment:alignment,appWidth:appWidth,isTabletInstrusive:isTabletInstrusive}))})}),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{horizontal:true,pagingEnabled:true,style:{flex:1},contentContainerStyle:{flexGrow:1},scrollEnabled:false,keyboardShouldPersistTaps:"always",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.ratingContainer,{width:appWidth,marginTop:isTabletInstrusive?22:f.w_p16(appWidth)}],children:[(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{ref:function ref(_ref2){return scrollViewInputRef(_ref2);},style:{flex:1,width:"100%"},contentContainerStyle:{flexGrow:1,alignItems:"center",paddingHorizontal:isTabletInstrusive?80:f.w_p21(appWidth)},showsVerticalScrollIndicator:false,showsHorizontalScrollIndicator:false,children:[question&&showHeightToLowUI[0]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.Question,Object.assign({},theme,{question:question,alignment:alignment}))}),(show_rating_number==1||show_rating_star==1)&&showHeightToLowUI[1]&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{flexDirection:"row",marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:[show_rating_number==1&&(0,_jsxRuntime.jsx)(_ui.RatingNumber,Object.assign({},theme,{numStar:numStar,rating_min:rating_min,rating_max:rating_max,handlePressRating:isShowingExtraForm?function(){return null;}:handlePressRating,appWidth:appWidth})),show_rating_star==1&&(0,_jsxRuntime.jsx)(_ui.RatingStar,Object.assign({},theme,{numStar:numStar,rating_min:rating_min,rating_max:rating_max,handlePressRating:isShowingExtraForm?function(){return null;}:handlePressRating,disable:!!read_only_rating||false}))]}),(instruction&&showHeightToLowUI[2]||isShowingExtraForm)&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.Instruction,Object.assign({},theme,{instruction:form[`instruction_${numStar}_star`]||instruction,alignment:alignment}))}),(options==null?void 0:options.length)!==0&&options&&showHeightToLowUI[3]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.MultipleSelectInput,{theme:theme,options:options,animaginSelectBtn:animaginSelectBtn,listActiveSelect:listActiveSelect,handleSelectOption:handleSelectOption,handleMultiSelectOption:handleMultiSelectOption,options_multiselect:options_multiselect,animated:multipleSelectAni,appWidth:appWidth})}),secondary_question&&showHeightToLowUI[4]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",opacity:opacitySecondaryQuestion,marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.SecondaryQuestion,Object.assign({},theme,{secondary_question:form[`secondary_question_${numStar}_star`]||secondary_question,alignment:alignment}))}),show_comment&&showHeightToLowUI[5]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{opacity:opacityTextArea,width:"100%",height:_const.isTablet?110:94,marginBottom:isTabletInstrusive?20:f.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.TextArea,Object.assign({},theme,{inputValue:inputValue,numStar:numStar,handleChangeText:handleChangeText,comment_placeholder:form[`comment_placeholder_${numStar}_star`]||comment_placeholder,animated:textAreaAni,appWidth:appWidth}))}),fineprint&&showHeightToLowUI[6]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",opacity:opacityFineprint},children:(0,_jsxRuntime.jsx)(_ui.Fineprint,Object.assign({},theme,{fineprint:fineprint,alignment:alignment}))})]}),(showHeightToLowUI[7]||isShowingExtraForm)&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:"100%",opacity:opacitySubmitBtn,paddingHorizontal:isTabletInstrusive?80:f.w_p21(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.ButtonSubmit,Object.assign({},theme,{title:button_text,onPress:function onPress(){return submitForm();},disabled:disableSumitBtn,loading:loading,appWidth:appWidth,isTabletInstrusive:isTabletInstrusive}))}),(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{paddingBottom:animationInSideApp,width:appWidth}})]})})]});};var _default=exports.default=NonInstrusiveUI;var _Dimensions$get=_reactNative.Dimensions.get('window'),width=_Dimensions$get.width,height=_Dimensions$get.height;var styles=_reactNative.StyleSheet.create({ratingContainer:{flex:1,alignItems:"center"}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _2=require("./");var _const=require("../utils/const");var _ui=require("../ui");var _=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/component/contentUI.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var highToLowUI=['question','show_rating','instruction','options','secondary_question','show_comment','fineprint','submit_btn'];var ContentUI=function ContentUI(_ref){var didSubmitted=_ref.didSubmitted,form=_ref.form,animatedValues=_ref.animatedValues,animations=_ref.animations,states=_ref.states,functions=_ref.functions;var theme=form.theme,question=form.question,title=form.title,options=form.options,options_multiselect=form.options_multiselect,instruction=form.instruction,comment_placeholder=form.comment_placeholder,fineprint=form.fineprint,button_text=form.button_text,rating_max=form.rating_max,rating_min=form.rating_min,show_rating_star=form.show_rating_star,show_rating_number=form.show_rating_number,read_only_rating=form.read_only_rating,show_comment=form.show_comment,comment_mandatory=form.comment_mandatory,secondary_question=form.secondary_question,image_file_url=form.image_file_url,instrusive_style=form.instrusive_style,alignment=form.alignment,auto_submit=form.auto_submit,positive_feedback_button=form.positive_feedback_button,negative_feedback_button=form.negative_feedback_button,type=form.type;var submitForm=functions.submitForm,handleButtonClose=functions.handleButtonClose,handlePressRating=functions.handlePressRating,handleChangeText=functions.handleChangeText,handleSelectOption=functions.handleSelectOption,handleMultiSelectOption=functions.handleMultiSelectOption,scrollViewInputRef=functions.scrollViewInputRef;var aniMarginSelectBtn=animations.aniMarginSelectBtn,animationInSideApp=animations.animationInSideApp;var numStar=states.numStar,inputValue=states.inputValue,listActiveSelect=states.listActiveSelect,loading=states.loading,isShowingExtraForm=states.isShowingExtraForm;var multipleSelectAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var secondaryQuestionAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var textAreaAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var fineprintAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var submitBtnAni=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var _useState=(0,_react.useState)(new Array(highToLowUI.length).fill(false)),_useState2=(0,_slicedToArray2.default)(_useState,2),showHighToLowUI=_useState2[0],setShowHighToLowUI=_useState2[1];var _useState3=(0,_react.useState)(''),_useState4=(0,_slicedToArray2.default)(_useState3,2),showSlug=_useState4[0],setShowSlug=_useState4[1];var isInline=type==='content_usefulness';(0,_react.useEffect)(function(){if(_reactNative.Platform.OS==='android'&&_reactNative.UIManager.setLayoutAnimationEnabledExperimental){_reactNative.UIManager.setLayoutAnimationEnabledExperimental(true);}var showIndex=-1;if(show_rating_number||show_rating_star||auto_submit){showIndex=highToLowUI.findIndex(function(value){return value==='show_rating';});setShowSlug('show_rating');}else if((options==null?void 0:options.length)!==0&&options){showIndex=highToLowUI.findIndex(function(value){return value==='options';});setShowSlug('options');}else if(show_comment){setShowSlug('show_comment');}if(showIndex!==-1){var _showUI=new Array(showIndex+1).fill(true).concat(new Array(highToLowUI.length-showIndex+1).fill(false));setShowHighToLowUI((0,_toConsumableArray2.default)(_showUI));return;}var showUI=new Array(highToLowUI.length).fill(true);setShowHighToLowUI((0,_toConsumableArray2.default)(showUI));},[]);(0,_react.useEffect)(function(){setTimeout(function(){if((options==null?void 0:options.length)!==0&&options&&showHighToLowUI[3]){_reactNative.Animated.timing(multipleSelectAni,{toValue:1,useNativeDriver:false}).start();}if(secondary_question&&showHighToLowUI[4]){_reactNative.Animated.timing(secondaryQuestionAni,{toValue:1,useNativeDriver:false}).start();}if(show_comment&&showHighToLowUI[5]){_reactNative.Animated.timing(textAreaAni,{toValue:1,useNativeDriver:false}).start();}if(fineprint&&showHighToLowUI[6]){_reactNative.Animated.timing(fineprintAni,{toValue:1,useNativeDriver:false}).start();}if(showHighToLowUI[7]){_reactNative.Animated.timing(submitBtnAni,{toValue:1,useNativeDriver:false}).start();}},300);},[showHighToLowUI]);(0,_react.useEffect)(function(){if(auto_submit!=null&&auto_submit.includes(numStar))return;if(numStar!==0&&showSlug==='show_rating'){var _showUI2=new Array(highToLowUI.length).fill(true);_reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);setShowHighToLowUI((0,_toConsumableArray2.default)(_showUI2));}},[numStar]);(0,_react.useEffect)(function(){if(listActiveSelect.length>0&&showSlug==='options'){var _showUI3=new Array(highToLowUI.length).fill(true);_reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);setShowHighToLowUI((0,_toConsumableArray2.default)(_showUI3));}},[listActiveSelect]);(0,_react.useEffect)(function(){if(didSubmitted){_reactNative.LayoutAnimation.configureNext(_reactNative.LayoutAnimation.Presets.easeInEaseOut);var _showUI4=new Array(highToLowUI.length).fill(true);setShowHighToLowUI((0,_toConsumableArray2.default)(_showUI4));}},[didSubmitted]);var showUI=(0,_react.useRef)(new _reactNative.Animated.Value(1)).current;(0,_react.useEffect)(function(){if(isShowingExtraForm){_reactNative.Animated.sequence([_reactNative.Animated.timing(showUI,{toValue:0,duration:350,useNativeDriver:false}),_reactNative.Animated.timing(showUI,{toValue:1,duration:350,useNativeDriver:false})]).start(function(){});}},[isShowingExtraForm]);var opacitySecondaryQuestion=secondaryQuestionAni.interpolate({inputRange:[0,1],outputRange:[0,1]});var opacityTextArea=textAreaAni.interpolate({inputRange:[0,1],outputRange:[0,1]});var opacityFineprint=fineprintAni.interpolate({inputRange:[0,1],outputRange:[0,1]});var opacitySubmitBtn=submitBtnAni.interpolate({inputRange:[0,1],outputRange:[0,1]});var disableSumitBtn=false;if(comment_mandatory==1&&!inputValue.trim()){disableSumitBtn=true;}if(show_rating_star==1||show_rating_number==1)if(numStar==0)disableSumitBtn=true;var appWidth=_.getAppWidth(instrusive_style);var isTabletInstrusive=false;if(_const.isTablet&&!!instrusive_style)isTabletInstrusive=true;return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableWithoutFeedback,{onPress:_reactNative.Keyboard.dismiss,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:{paddingHorizontal:isTabletInstrusive?22:_.w_p21(appWidth),paddingTop:isTabletInstrusive?22:_.w_p16(appWidth),marginTop:_reactNative.Platform.OS==='android'&&!_const.isTablet&&!!instrusive_style?_reactNative.StatusBar.currentHeight:0},children:(0,_jsxRuntime.jsx)(_2.Header,Object.assign({},theme,{handleButtonClose:handleButtonClose,title:title,image_file_url:image_file_url,instrusive_style:instrusive_style,alignment:alignment,appWidth:appWidth,isTabletInstrusive:isTabletInstrusive}))})}),(0,_jsxRuntime.jsx)(_reactNative.ScrollView,{horizontal:true,pagingEnabled:true,style:{flex:1},contentContainerStyle:{flexGrow:1},scrollEnabled:false,keyboardShouldPersistTaps:"always",children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.ratingContainer,{width:appWidth,marginTop:isTabletInstrusive?22:_.w_p16(appWidth)}],children:[(0,_jsxRuntime.jsxs)(_reactNative.ScrollView,{ref:function ref(_ref2){return scrollViewInputRef(_ref2);},style:{flex:1,width:'100%'},contentContainerStyle:{flexGrow:1,alignItems:'center',paddingHorizontal:isTabletInstrusive?80:_.w_p21(appWidth)},showsVerticalScrollIndicator:false,showsHorizontalScrollIndicator:false,children:[question&&showHighToLowUI[0]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:'100%',marginBottom:isTabletInstrusive?20:_.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.Question,Object.assign({},theme,{question:question,alignment:alignment}))}),(show_rating_number==1||show_rating_star==1)&&showHighToLowUI[1]&&(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{flexDirection:'row',marginBottom:isTabletInstrusive?20:_.w_p16(appWidth)},children:[show_rating_number==1&&(0,_jsxRuntime.jsx)(_ui.RatingNumber,Object.assign({},theme,{numStar:numStar,rating_min:rating_min,rating_max:rating_max,handlePressRating:isShowingExtraForm?function(){return null;}:handlePressRating,appWidth:appWidth})),show_rating_star==1&&(0,_jsxRuntime.jsx)(_ui.RatingStar,Object.assign({},theme,{numStar:numStar,rating_min:rating_min,rating_max:rating_max,handlePressRating:isShowingExtraForm?function(){return null;}:handlePressRating,disable:!!read_only_rating||false}))]}),(instruction&&showHighToLowUI[2]||isShowingExtraForm)&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:'100%',marginBottom:isTabletInstrusive?20:_.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.Instruction,Object.assign({},theme,{instruction:form[`instruction_${numStar}_star`]||instruction,alignment:alignment}))}),(options==null?void 0:options.length)!==0&&options&&showHighToLowUI[3]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:'100%',marginBottom:isTabletInstrusive?20:_.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.MultipleSelectInput,{theme:theme,options:options,aniMarginSelectBtn:aniMarginSelectBtn,listActiveSelect:listActiveSelect,handleSelectOption:handleSelectOption,handleMultiSelectOption:handleMultiSelectOption,options_multiselect:options_multiselect,animated:multipleSelectAni,appWidth:appWidth})}),secondary_question&&showHighToLowUI[4]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:'100%',opacity:opacitySecondaryQuestion,marginBottom:isTabletInstrusive?20:_.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.SecondaryQuestion,Object.assign({},theme,{secondary_question:form[`secondary_question_${numStar}_star`]||secondary_question,alignment:alignment}))}),show_comment&&showHighToLowUI[5]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{opacity:opacityTextArea,width:'100%',height:_const.isTablet?110:94,marginBottom:isTabletInstrusive?20:_.w_p16(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.TextArea,Object.assign({},theme,{inputValue:inputValue,numStar:numStar,handleChangeText:handleChangeText,comment_placeholder:form[`comment_placeholder_${numStar}_star`]||comment_placeholder,animated:textAreaAni,appWidth:appWidth}))}),fineprint&&showHighToLowUI[6]&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:'100%',opacity:opacityFineprint},children:(0,_jsxRuntime.jsx)(_ui.Fineprint,Object.assign({},theme,{fineprint:fineprint,alignment:alignment}))})]}),(showHighToLowUI[7]||isShowingExtraForm)&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:'100%',opacity:opacitySubmitBtn,paddingHorizontal:isTabletInstrusive?80:_.w_p21(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.ButtonSubmit,Object.assign({},theme,{title:isInline?positive_feedback_button:button_text,onPress:function onPress(){isInline?handlePressRating(2,false):submitForm();},disabled:disableSumitBtn,loading:loading,appWidth:appWidth,isTabletInstrusive:isTabletInstrusive}))}),!_.isNil(negative_feedback_button)&&(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{width:'100%',opacity:opacitySubmitBtn,paddingHorizontal:isTabletInstrusive?80:_.w_p21(appWidth)},children:(0,_jsxRuntime.jsx)(_ui.ButtonSubmit,Object.assign({},theme,{button_bg_color:'#fff',button_text_color:theme.button_bg_color,title:negative_feedback_button,onPress:function onPress(){isInline?handlePressRating(1,false):submitForm();},disabled:disableSumitBtn,loading:loading,appWidth:appWidth,customStyle:{borderColor:theme.button_bg_color,borderWidth:1,borderRadius:8}}))}),(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{paddingBottom:animationInSideApp,width:appWidth}})]})})]});};var _default=exports.default=ContentUI;var _Dimensions$get=_reactNative.Dimensions.get('window'),width=_Dimensions$get.width,height=_Dimensions$get.height;var styles=_reactNative.StyleSheet.create({ratingContainer:{flex:1,alignItems:'center'}});
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Header=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _assets=require("../assets");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/component/header.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var Header=exports.Header=function Header(_ref){var title=_ref.title,title_color=_ref.title_color,title_font=_ref.title_font,title_fontsize=_ref.title_fontsize,image_file_url=_ref.image_file_url,handleButtonClose=_ref.handleButtonClose,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment,appWidth=_ref.appWidth,isTabletInstrusive=_ref.isTabletInstrusive;return(0,_jsxRuntime.jsx)(_reactNative.SafeAreaView,{children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.headerContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{hitSlop:styles.hitSlop,onPress:handleButtonClose,style:Object.assign({},styles.btnCloseHeader,{marginBottom:isTabletInstrusive?0:f.w_p(appWidth,10)}),children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:_assets.imgCloseAsset,style:{width:isTabletInstrusive?28:f.w_p(appWidth,24),height:isTabletInstrusive?28:f.w_p(appWidth,24),tintColor:title_color},resizeMode:"contain"})}),image_file_url&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:{justifyContent:'center',alignItems:'center'},children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:image_file_url},style:{width:isTabletInstrusive?244:f.w_p(appWidth,200),height:isTabletInstrusive?244:f.w_p(appWidth,200)}})}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[{textAlign:alignment,fontFamily:title_font,color:title_color,fontSize:title_fontsize}],children:title||'Help us get better'})]})});};var styles=_reactNative.StyleSheet.create({headerContainer:{flexDirection:'column'},hitSlop:{top:10,left:10,right:10,bottom:10},btnCloseHeader:{marginLeft:'auto'}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Header=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _assets=require("../assets");var myFunc=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/component/header.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var Header=exports.Header=function Header(_ref){var title=_ref.title,title_color=_ref.title_color,title_font=_ref.title_font,title_fontsize=_ref.title_fontsize,image_file_url=_ref.image_file_url,handleButtonClose=_ref.handleButtonClose,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment,appWidth=_ref.appWidth,isTabletInstrusive=_ref.isTabletInstrusive;return(0,_jsxRuntime.jsx)(_reactNative.SafeAreaView,{children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.headerContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{hitSlop:styles.hitSlop,onPress:handleButtonClose,style:Object.assign({},styles.btnCloseHeader,{marginBottom:isTabletInstrusive?0:myFunc.w_p(appWidth,10)}),children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:_assets.imgCloseAsset,style:{width:isTabletInstrusive?28:myFunc.w_p(appWidth,24),height:isTabletInstrusive?28:myFunc.w_p(appWidth,24),tintColor:title_color},resizeMode:"contain"})}),image_file_url&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:{justifyContent:'center',alignItems:'center'},children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:{uri:image_file_url},style:{width:isTabletInstrusive?244:myFunc.w_p(appWidth,200),height:isTabletInstrusive?244:myFunc.w_p(appWidth,200)}})}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[{textAlign:alignment,fontFamily:title_font,color:title_color,fontSize:title_fontsize}],children:title||'Help us get better'})]})});};var styles=_reactNative.StyleSheet.create({headerContainer:{flexDirection:'column'},hitSlop:{top:10,left:10,right:10,bottom:10},btnCloseHeader:{marginLeft:'auto'}});
@@ -0,0 +1 @@
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _ui=require("../ui");var _=_interopRequireWildcard(require("../utils/MyFunction"));var _const=require("../utils/const");var _index=require("../index");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/component/inlineSurvey.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}function _callSuper(t,o,e){return o=(0,_getPrototypeOf2.default)(o),(0,_possibleConstructorReturn2.default)(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],(0,_getPrototypeOf2.default)(t).constructor):o.apply(t,e));}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}var InlineSurvey=exports.default=function(_React$Component){function InlineSurvey(props){var _this$state$formData;var _this;(0,_classCallCheck2.default)(this,InlineSurvey);_this=_callSuper(this,InlineSurvey,[props]);_this.onPressAnimated=function(){_reactNative.Animated.timing(_this.height,{toValue:0,duration:2000,useNativeDriver:false}).start(function(){_this.setState({show:false},function(){_this.height.setValue(1000);});});};_this.onClose=function(){var _this$props,_this$props2;((_this$props=_this.props)==null?void 0:_this$props.onClose)&&((_this$props2=_this.props)==null?void 0:_this$props2.onClose());_index.AIAFeedbackInstance.setState({isVisible:false},function(){_index.AIAFeedbackInstance.handlePressRating(1,false);});_this.onPressAnimated();};_this.onSubmit=function(){var _this$props3,_this$props4;((_this$props3=_this.props)==null?void 0:_this$props3.onPress)&&((_this$props4=_this.props)==null?void 0:_this$props4.onPress());_index.AIAFeedbackInstance.setState({isVisible:false},function(){_index.AIAFeedbackInstance.handlePressRating(2,false);});_this.onPressAnimated();};_this.state={formData:null,show:false};instrusive_style=(_this$state$formData=_this.state.formData)==null?void 0:_this$state$formData.instrusive_style;appWidth=0;_this.isTabletInstrusive=false;_this.height=new _reactNative.Animated.Value(1000);return _this;}(0,_inherits2.default)(InlineSurvey,_React$Component);return(0,_createClass2.default)(InlineSurvey,[{key:"componentDidMount",value:function componentDidMount(){var _this2=this;setTimeout(function(){if(_index.AIAFeedbackInstance){_index.AIAFeedbackInstance.inlineSurveyRef=_this2;}},500);}},{key:"componentWillUnmount",value:function componentWillUnmount(){_index.AIAFeedbackInstance.inlineSurveyRef=null;}},{key:"componentDidUpdate",value:function componentDidUpdate(){var _this$state$formData2,_this$state$formData3;this.appWidth=_.getAppWidth((_this$state$formData2=this.state.formData)==null?void 0:_this$state$formData2.instrusive_style);if(_const.isTablet&&!!((_this$state$formData3=this.state.formData)!=null&&_this$state$formData3.instrusive_style))this.isTabletInstrusive=true;}},{key:"setShowSurvey",value:function setShowSurvey(res){this.setState({formData:res,show:true});}},{key:"render",value:function render(){if(!this.state.show)return null;var theme=this.state.formData.theme;var title_alignment=theme.title_alignment,title_font=theme.title_font,title_color=theme.title_color,title_fontsize=theme.title_fontsize,question_font=theme.question_font,question_color=theme.question_color,question_fontsize=theme.question_fontsize,question_alignment=theme.question_alignment;var _this$state$formData4=this.state.formData,positive_feedback_button=_this$state$formData4.positive_feedback_button,negative_feedback_button=_this$state$formData4.negative_feedback_button,question=_this$state$formData4.question,title=_this$state$formData4.title;return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{maxHeight:this.height,overflow:'hidden'},children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.container,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{textAlign:title_alignment,fontFamily:title_font,color:title_color,fontSize:title_fontsize},children:title}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontFamily:question_font,color:question_color,fontSize:question_fontsize,textAlign:question_alignment},children:question}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{flexDirection:'row',columnGap:20},children:[(0,_jsxRuntime.jsx)(_ui.ButtonSubmit,{button_bg_color:'#fff',button_text_color:theme.button_bg_color,button_font:theme.button_font,button_fontsize:theme.button_fontsize,customStyle:{borderColor:theme.button_bg_color,borderWidth:1,borderRadius:8,flex:1},title:negative_feedback_button,onPress:this.onClose,appWidth:this.appWidth,isTabletInstrusive:this.isTabletInstrusive}),(0,_jsxRuntime.jsx)(_ui.ButtonSubmit,Object.assign({},theme,{title:positive_feedback_button,onPress:this.onSubmit,appWidth:this.appWidth,isTabletInstrusive:this.isTabletInstrusive,customStyle:{flex:1}}))]})]})});}}]);}(_react.default.Component);var styles=_reactNative.StyleSheet.create({container:{paddingVertical:20,paddingHorizontal:20,rowGap:20}});
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _reactNativeEncryptedStorage=_interopRequireDefault(require("react-native-encrypted-storage"));var _reactNativeRate=_interopRequireWildcard(require("react-native-rate"));var _component=require("./component");var _api=require("./api");var _const=require("./utils/const");var _StatusBarHeight=require("./utils/StatusBarHeight");var _=_interopRequireWildcard(require("./utils/MyFunction"));var _reactNativeAndroidKeyboardAdjustOriginallyus=_interopRequireDefault(require("react-native-android-keyboard-adjust-originallyus"));var _reactNativeDeviceInfo=_interopRequireDefault(require("react-native-device-info"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/index.jsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}function _callSuper(t,o,e){return o=(0,_getPrototypeOf2.default)(o),(0,_possibleConstructorReturn2.default)(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],(0,_getPrototypeOf2.default)(t).constructor):o.apply(t,e));}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}var _Dimensions$get=_reactNative.Dimensions.get('window'),height=_Dimensions$get.height;var requestFormTimestamp=null;var submitFormTimestamp=null;var AIAFeedback=function(_React$Component){(0,_inherits2.default)(AIAFeedback,_React$Component);function AIAFeedback(props){var _this;(0,_classCallCheck2.default)(this,AIAFeedback);_this=_callSuper(this,AIAFeedback,[props]);_this.getKeyboardInputMode=(0,_asyncToGenerator2.default)(function*(){if(_reactNative.Platform.OS=='android'){var inputMode=yield _reactNativeAndroidKeyboardAdjustOriginallyus.default.getCurrentSoftInputMode();_this.setState(Object.assign({},_this.state,{defaultNumberSoftInputMode:inputMode}));}return null;});_this.restoreKeyboardInputMode=function(){switch(_this.state.defaultNumberSoftInputMode){case 48:_reactNativeAndroidKeyboardAdjustOriginallyus.default.setAdjustNothing();console.log('AndroidKeyboardAdjust.setAdjustNothing()');break;case 32:_reactNativeAndroidKeyboardAdjustOriginallyus.default.setAdjustPan();console.log('AndroidKeyboardAdjust.setAdjustPan()');break;case 16:_reactNativeAndroidKeyboardAdjustOriginallyus.default.setAdjustResize();console.log('AndroidKeyboardAdjust.setAdjustResize()');break;case 0:_reactNativeAndroidKeyboardAdjustOriginallyus.default.setStateUnspecified();console.log('AndroidKeyboardAdjust.setStateUnspecified()');break;default:break;}};_this.onKeyboardDidShow=function(e){if(!_this.state.isVisible)return;var form=_this.state.form;_this.isShowingKeyboard=true;var customKeyboardHeight=e.endCoordinates.height;if(_const.isTablet&&form!=null&&form.instrusive_style)customKeyboardHeight=e.endCoordinates.height;if(!_const.isTablet&&form!=null&&form.instrusive_style&&_reactNative.Platform.OS==='android')customKeyboardHeight=1;_reactNative.Animated.timing(_this.keyboardHeight,{toValue:customKeyboardHeight,duration:300,easing:_reactNative.Easing.ease,useNativeDriver:false}).start(function(){if(_this.scrollViewInputRef){_this.scrollViewInputRef.scrollToEnd({duration:350,animated:true});}});};_this.onKeyboardDidHide=function(){if(!_this.state.isVisible)return;_this.isShowingKeyboard=false;_reactNative.Animated.timing(_this.keyboardHeight,{toValue:0,duration:350,useNativeDriver:false}).start();};_this.getVersion=function(){return _const.XVersion;};_this.setFormSlug=function(formSlug){if(!formSlug)return;if(formSlug.trim().length<2)return;_this.formSlug=formSlug.trim();};_this.setAppSecret=function(appSecret){_this.appSecret=appSecret;};_this.setAppUserId=function(){var userId=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'';try{if(typeof userId==='object'&&userId!==null){var userIdObject=Object.keys(userId).length===0?'':JSON.stringify(userId);_this.appUserId=userIdObject;return;}var userIdString=userId?userId.toString():'';_this.appUserId=userIdString;}catch(error){console.log('FeedbackSDK setAppUserId error:',error);_this.appUserId='';}};_this.setLanguage=function(language){if(!language||language.length<2){language='en';}language=language.toLowerCase();_this.language=language;};_this.setMetadata=function(metadata){if(!metadata)return;_this.metadata={metadata:metadata};};_this.testRatingForm=function(eventTag,callbackFn){_this.requestForm(true,eventTag,callbackFn);};_this.showRatingForm=function(eventTag,callbackFn){_this.requestForm(false,eventTag,callbackFn);};_this.hideRatingForm=function(){_this.setState({form:{},originalFormModel:{},numStar:0,inputValue:'',loading:false,listActiveSelect:[],isVisible:false,didSubmitted:false,isShowingExtraForm:false,heightScreenTablet:'auto'});_this.performCallbackFunction();_this.sdkCallbackFunction=null;_this.animatedValue=new _reactNative.Animated.Value(0);_this.isShowingKeyboard=false;_this.keyboardHeight=new _reactNative.Animated.Value(0);};_this.performCallbackFunction=function(){if(_this.sdkCallbackFunction&&typeof _this.sdkCallbackFunction==='function'){_this.sdkCallbackFunction(_this.formDidShow);}_this.restoreKeyboardInputMode();_this.sdkCallbackFunction=null;};_this.requestForm=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(debug){var eventTag=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'';var callbackFn=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;if(_this.state.isVisible)return;console.log({bundleId:_reactNativeDeviceInfo.default.getBundleId()});_this.formDidShow=false;_this.sdkCallbackFunction=null;if(callbackFn&&typeof callbackFn==='function'){_this.sdkCallbackFunction=callbackFn;}if(requestFormTimestamp){var nowTimestamp=Date.now();if(nowTimestamp-requestFormTimestamp<3000)return;}requestFormTimestamp=Date.now();_this.setState({form:{},originalFormModel:{},numStar:0,inputValue:'',loading:false,listActiveSelect:[],didSubmitted:false,isShowingExtraForm:false});_this.eventTag=eventTag;_this.debug=debug?1:0;var build_number=yield _.getBuildNumber();var storage_key=`dk3@sq8_${build_number}`;var install_timestamp=yield _reactNativeEncryptedStorage.default.getItem(storage_key);if(!install_timestamp)_reactNativeEncryptedStorage.default.setItem(storage_key,`${Math.floor(Date.now()/1000)}`);var bodyData={slug:_this.formSlug,debug:debug,event_tag:eventTag,install_timestamp:install_timestamp||0,metadata:_this.metadata||null};var headers={'X-App-Secret':_this.appSecret,'X-App-User-Id':_this.appUserId,'X-Lang':_this.language};var res=yield(0,_api.sendRequest)(bodyData,{headers:headers});if(res!=null&&res.error){if(debug)Alert.alert('FeedbackSDK Error',res==null?void 0:res.error,[{text:'OK'}],{cancelable:true});_this.performCallbackFunction();return;}if(!(res!=null&&res.title)||!(res!=null&&res.theme)){_this.performCallbackFunction();return;}_this.formDidShow=true;_this.setState({form:res,isVisible:true},function(){setTimeout(function(){_reactNative.Animated.timing(_this.animatedValue,{toValue:1,useNativeDriver:false}).start();},350);});});return function(_x){return _ref2.apply(this,arguments);};}();_this.handleButtonClose=function(){_reactNative.Animated.timing(_this.isVisibleValue,{toValue:0,useNativeDriver:false}).start(function(){_this.hideRatingForm();});};_this.handleChangeText=function(value){_this.setState({inputValue:value});};_this.handleMultiSelectOption=function(index){var listActiveSelect=_this.state.listActiveSelect;var indexActive=listActiveSelect.indexOf(index);if(indexActive===-1){listActiveSelect.push(index);_this.setState({listActiveSelect:(0,_toConsumableArray2.default)(listActiveSelect)});}else{_this.setState({listActiveSelect:listActiveSelect.filter(function(element,i){return element!==index;})});}};_this.handleSelectOption=function(index){_this.setState({listActiveSelect:[index]});};_this.handlePressRating=function(numberValue){_this.setState({numStar:numberValue},function(){var _this$state$form,_this$state$form2,_this$state$form2$aut,_this$state$form3,_this$state$form3$aut;if((_this$state$form=_this.state.form)!=null&&_this$state$form.auto_submit&&(_this$state$form2=_this.state.form)!=null&&(_this$state$form2$aut=_this$state$form2.auto_submit)!=null&&_this$state$form2$aut.length&&(_this$state$form3=_this.state.form)!=null&&(_this$state$form3$aut=_this$state$form3.auto_submit)!=null&&_this$state$form3$aut.includes(numberValue)){_this.submitForm(true);}});};_this.blinkAnimation=function(){_reactNative.Animated.sequence([_reactNative.Animated.timing(_this.opacityAnimatedValue,{toValue:0,duration:350,useNativeDriver:false}),_reactNative.Animated.timing(_this.opacityAnimatedValue,{toValue:1,duration:350,useNativeDriver:false})]).start();};_this.submitForm=(0,_asyncToGenerator2.default)(function*(){var _form$url;var isAutoSubmit=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var _this$state=_this.state,numStar=_this$state.numStar,inputValue=_this$state.inputValue,listActiveSelect=_this$state.listActiveSelect,form=_this$state.form,isShowingExtraForm=_this$state.isShowingExtraForm,originalFormModel=_this$state.originalFormModel,didSubmitted=_this$state.didSubmitted;if(submitFormTimestamp){var nowTimestamp=Date.now();if(nowTimestamp-submitFormTimestamp<1000)return;}submitFormTimestamp=Date.now();if(form!=null&&form.url&&(form==null?void 0:(_form$url=form.url)==null?void 0:_form$url.length)>5){_reactNative.Linking.canOpenURL(form==null?void 0:form.url).then(function(supported){supported&&_reactNative.Linking.openURL(form==null?void 0:form.url);},function(err){return console.log('FeedbackSDK Error:',err);});}if(form&&!form.auto_store_review){var url=_reactNative.Platform.OS==='ios'?form==null?void 0:form.ios_review_url:form==null?void 0:form.android_review_url;if(url){_reactNative.Linking.canOpenURL(url).then(function(supported){supported&&_reactNative.Linking.openURL(url);},function(err){return console.log('FeedbackSDK Error:',err);});}}if(isShowingExtraForm){_this.handleSubmitFormResponse(originalFormModel);return;}if(didSubmitted){_this.handleButtonClose();return;}_this.setState({loading:true});var bodyData={slug:_this.formSlug,rating:numStar,event_tag:_this.eventTag,debug:_this.debug,request_id:form==null?void 0:form.id,selected_options:listActiveSelect.join(','),free_text:inputValue,auto:isAutoSubmit,metadata:_this.metadata||null};var install_timestamp=yield _reactNativeEncryptedStorage.default.getItem('@opkjnbvfdxc');if(!install_timestamp)yield _reactNativeEncryptedStorage.default.setItem('@opkjnbvfdxc',`${Math.floor(Date.now()/1000)}`);var headers={'X-App-Secret':_this.appSecret,'X-App-User-Id':_this.appUserId,'X-Lang':_this.language};var res=yield(0,_api.sendSubmit)(bodyData,{headers:headers});if(res!=null&&res.error){Alert.alert('FeedbackSDK Error',res==null?void 0:res.error,[{text:'OK'}],{cancelable:true});_this.hideRatingForm();return;}_this.setState({didSubmitted:true});_this.setState({loading:false});if(res!=null&&res.auto_store_review){var options={AppleAppID:`${res==null?void 0:res.ios_store_app_id}`,OtherAndroidURL:res==null?void 0:res.android_review_url,preferredAndroidMarket:_reactNativeRate.AndroidMarket.Google,preferInApp:true,openAppStoreIfInAppFails:false};_reactNativeRate.default.rate(options,function(success){console.log('success',success);});}if(res!=null&&res.extra_form){_this.handleExtraFormResponse(res);return;}_this.handleSubmitFormResponse(res);return;});_this.handleExtraFormResponse=function(res){_this.setState({isShowingExtraForm:true},function(){_this.blinkAnimation();setTimeout(function(){_this.setState({originalFormModel:res,form:res.extra_form});},350);});};_this.handleSubmitFormResponse=function(res){_this.setState({isShowingExtraForm:false},function(){_this.blinkAnimation();setTimeout(function(){_this.setState({originalFormModel:null,form:res});},350);});};_this.state={form:{},originalFormModel:{},numStar:0,inputValue:'',loading:false,listActiveSelect:[],isVisible:false,didSubmitted:false,isShowingExtraForm:false,heightScreenTablet:'auto',defaultNumberSoftInputMode:null};_this.animatedValue=new _reactNative.Animated.Value(0);_this.keyboardHeight=new _reactNative.Animated.Value(0);_this.formSlug='native_rating_form';_this.scrollViewInputRef=null;_this.isShowingKeyboard=false;_this.timeout=null;_this.formDidShow=true;_this.eventTag=null;_this.showKeyboardSub=null;_this.hideKeyboardSub=null;_this.heightParentView=0;_this.isVisibleValue=new _reactNative.Animated.Value(0);_this.opacityAnimatedValue=new _reactNative.Animated.Value(1);_this.metadata=null;_this.sdkCallbackFunction=null;_this.appUserId='',_this.appSecret='',_this.language='en';return _this;}(0,_createClass2.default)(AIAFeedback,[{key:"componentDidUpdate",value:function componentDidUpdate(prevProps,prevState){var isVisible=this.state.isVisible;if(isVisible!==prevState.isVisible){if(isVisible){_reactNative.Animated.timing(this.isVisibleValue,{toValue:1,useNativeDriver:false}).start();}}}},{key:"componentDidMount",value:function componentDidMount(){this.getKeyboardInputMode();if(_reactNative.Platform.OS==='ios'){this.showKeyboardSub=_reactNative.Keyboard.addListener('keyboardWillShow',this.onKeyboardDidShow);this.hideKeyboardSub=_reactNative.Keyboard.addListener('keyboardWillHide',this.onKeyboardDidHide);return;}this.showKeyboardSub=_reactNative.Keyboard.addListener('keyboardDidShow',this.onKeyboardDidShow);this.hideKeyboardSub=_reactNative.Keyboard.addListener('keyboardDidHide',this.onKeyboardDidHide);}},{key:"componentWillUnmount",value:function componentWillUnmount(){try{var _this$showKeyboardSub,_this$hideKeyboardSub;if(this.timeout)clearTimeout(this.timeout);if((_this$showKeyboardSub=this.showKeyboardSub)!=null&&_this$showKeyboardSub.remove&&(_this$hideKeyboardSub=this.hideKeyboardSub)!=null&&_this$hideKeyboardSub.remove){this.showKeyboardSub.remove();this.hideKeyboardSub.remove();return;}if(_reactNative.Platform.OS==='ios'){if(_reactNative.Keyboard.removeListener){_reactNative.Keyboard.removeListener('keyboardWillShow',this.onKeyboardDidShow);_reactNative.Keyboard.removeListener('keyboardWillHide',this.onKeyboardDidHide);}return;}if(_reactNative.Keyboard.removeListener){_reactNative.Keyboard.removeListener('keyboardDidShow',this.onKeyboardDidShow);_reactNative.Keyboard.removeListener('keyboardDidHide',this.onKeyboardDidHide);}}catch(error){console.log('FeedbackSDK Error:',error);}}},{key:"render",value:function render(){var _this$props,_this2=this;var _this$state2=this.state,form=_this$state2.form,numStar=_this$state2.numStar,inputValue=_this$state2.inputValue,listActiveSelect=_this$state2.listActiveSelect,didSubmitted=_this$state2.didSubmitted,loading=_this$state2.loading,isShowingExtraForm=_this$state2.isShowingExtraForm,heightScreenTablet=_this$state2.heightScreenTablet;if(!form)return null;if(!form.theme)return null;var theme=form.theme;var heightParentViewAni=this.isVisibleValue.interpolate({inputRange:[0,1],outputRange:[height,0]});var animaginSelectBtn=this.keyboardHeight.interpolate({inputRange:[0,200],outputRange:[16/667*_const.heightScreen,10/667*_const.heightScreen]});var cmtTranslateY=this.animatedValue.interpolate({inputRange:[0,1],outputRange:[150,0]});var cmtAniOpacity=this.animatedValue.interpolate({inputRange:[0,1],outputRange:[0,1]});var opacityUI=this.opacityAnimatedValue.interpolate({inputRange:[0,1],outputRange:[0,1]});var widthStyle=_const.widthScreen;var translateX=-(widthStyle/2);var bottomStyle='auto';var rightStyle='auto';var leftStyle='50%';if(!!!form.instrusive_style){bottomStyle=0;}if(!!!form.instrusive_style&&_const.isTablet){widthStyle=_const.widthScreenNonIntr;rightStyle='15%';translateX=0;leftStyle='auto';}var heightUI;if(_const.isTablet)heightUI=heightScreenTablet;else{heightUI=heightScreenTablet==='auto'?'auto':_const.heightScreen-40;}var heightNonIntrusCondition=_const.heightScreen-40;if(_const.isTablet)heightNonIntrusCondition=_const.heightScreen/1.5;var animationOutSideApp=0;var animationInSideApp=0;if(_const.isTablet||!_const.isTablet&&!form.instrusive_style&&_reactNative.Platform.OS!=='android')animationOutSideApp=this.keyboardHeight;if(!_const.isTablet&&form.instrusive_style)animationInSideApp=this.keyboardHeight;var isSoftInputModeResize=_reactNative.Platform.OS==='android'&&!!form.instrusive_style;if(isSoftInputModeResize){_reactNativeAndroidKeyboardAdjustOriginallyus.default.setAdjustResize();console.warn('keyboard show on full screen');}var finalHeight=_const.isTablet?heightScreenTablet:_const.heightScreen;if(this!=null&&(_this$props=this.props)!=null&&_this$props.translucent)finalHeight=_const.heightScreen+(_reactNative.StatusBar==null?void 0:_reactNative.StatusBar.currentHeight);return(0,_jsxRuntime.jsxs)(_reactNative.Animated.View,{style:{position:'absolute',transform:[{translateY:heightParentViewAni},{translateX:translateX}],paddingBottom:animationOutSideApp,width:widthStyle,bottom:bottomStyle,right:rightStyle,left:leftStyle,zIndex:9999999,elevation:9999999},children:[JSON.stringify(form)!==JSON.stringify({})&&!!form.instrusive_style&&_reactNative.Platform.OS==='android'&&(0,_jsxRuntime.jsx)(_reactNative.KeyboardAvoidingView,{behavior:'height',style:{backgroundColor:(theme==null?void 0:theme.body_bg_color)||'#fff',borderRadius:_const.isTablet?8:0,flex:1},children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{onLayout:function onLayout(event){var height=event.nativeEvent.layout.height;if(_const.isTablet)return;if(height>_const.heightScreen&&heightScreenTablet==='auto'){_this2.setState({heightScreenTablet:_const.heightScreen});}},style:[{flex:1,height:finalHeight,opacity:opacityUI,paddingBottom:_const.isTablet?35:(0,_StatusBarHeight.getStatusBarHeight)()}],children:(0,_jsxRuntime.jsx)(_component.ContentUI,{didSubmitted:didSubmitted,form:form,animatedValues:{keyboardHeight:this.keyboardHeight},animations:{animaginSelectBtn:animaginSelectBtn,cmtTranslateY:cmtTranslateY,cmtAniOpacity:cmtAniOpacity,animationInSideApp:animationInSideApp},states:{inputValue:inputValue,numStar:numStar,listActiveSelect:listActiveSelect,loading:loading,isShowingExtraForm:isShowingExtraForm},functions:{submitForm:this.submitForm,handlePressRating:this.handlePressRating,handleButtonClose:this.handleButtonClose,handleChangeText:this.handleChangeText,handleSelectOption:this.handleSelectOption,handleMultiSelectOption:this.handleMultiSelectOption,scrollViewInputRef:function scrollViewInputRef(ref){return _this2.scrollViewInputRef=ref;}}})})}),JSON.stringify(form)!==JSON.stringify({})&&!!form.instrusive_style&&_reactNative.Platform.OS==='ios'&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:{backgroundColor:(theme==null?void 0:theme.body_bg_color)||'#fff',borderRadius:_const.isTablet?8:0,flex:1,marginHorizontal:_const.isTablet?20:0},children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{onLayout:function onLayout(event){var height=event.nativeEvent.layout.height;if(_const.isTablet)return;if(height>_const.heightScreen&&heightScreenTablet==='auto'){_this2.setState({heightScreenTablet:_const.heightScreen});}},style:[{flex:1,height:finalHeight,opacity:opacityUI,paddingBottom:_const.isTablet?35:(0,_StatusBarHeight.getStatusBarHeight)()}],children:(0,_jsxRuntime.jsx)(_component.ContentUI,{didSubmitted:didSubmitted,form:form,animatedValues:{keyboardHeight:this.keyboardHeight},animations:{animaginSelectBtn:animaginSelectBtn,cmtTranslateY:cmtTranslateY,cmtAniOpacity:cmtAniOpacity,animationInSideApp:animationInSideApp},states:{inputValue:inputValue,numStar:numStar,listActiveSelect:listActiveSelect,loading:loading,isShowingExtraForm:isShowingExtraForm},functions:{submitForm:this.submitForm,handlePressRating:this.handlePressRating,handleButtonClose:this.handleButtonClose,handleChangeText:this.handleChangeText,handleSelectOption:this.handleSelectOption,handleMultiSelectOption:this.handleMultiSelectOption,scrollViewInputRef:function scrollViewInputRef(ref){return _this2.scrollViewInputRef=ref;}}})})}),JSON.stringify(form)!==JSON.stringify({})&&!!!form.instrusive_style&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{borderTopLeftRadius:16/375*_const.widthScreenNonIntr,borderTopRightRadius:16/375*_const.widthScreenNonIntr,backgroundColor:(theme==null?void 0:theme.body_bg_color)||'#fff'}],children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{onLayout:function onLayout(event){var height=event.nativeEvent.layout.height;if(_const.isTablet)return;if(height>heightNonIntrusCondition&&heightScreenTablet==='auto'){_this2.setState({heightScreenTablet:heightNonIntrusCondition});}},style:[{flex:1,height:heightUI,opacity:opacityUI,paddingBottom:(0,_StatusBarHeight.getStatusBarHeight)()}],children:(0,_jsxRuntime.jsx)(_component.ContentUI,{didSubmitted:didSubmitted,form:form,animatedValues:{keyboardHeight:this.keyboardHeight},animations:{animaginSelectBtn:animaginSelectBtn,cmtTranslateY:cmtTranslateY,cmtAniOpacity:cmtAniOpacity,animationInSideApp:animationInSideApp},states:{inputValue:inputValue,numStar:numStar,listActiveSelect:listActiveSelect,loading:loading,isShowingExtraForm:isShowingExtraForm},functions:{submitForm:this.submitForm,handlePressRating:this.handlePressRating,handleButtonClose:this.handleButtonClose,handleChangeText:this.handleChangeText,handleSelectOption:this.handleSelectOption,handleMultiSelectOption:this.handleMultiSelectOption,scrollViewInputRef:function scrollViewInputRef(ref){return _this2.scrollViewInputRef=ref;}}})})})]});}}]);return AIAFeedback;}(_react.default.Component);var _default=exports.default=AIAFeedback;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.AIAFeedbackInstance=void 0;Object.defineProperty(exports,"FeedbackInlineSurvey",{enumerable:true,get:function get(){return _inlineSurvey.default;}});exports.default=void 0;var _toConsumableArray2=_interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _reactNativeEncryptedStorage=_interopRequireDefault(require("react-native-encrypted-storage"));var _reactNativeRate=_interopRequireWildcard(require("react-native-rate"));var _component=require("./component");var _api=require("./api");var _const=require("./utils/const");var _StatusBarHeight=require("./utils/StatusBarHeight");var _=_interopRequireWildcard(require("./utils/MyFunction"));var _reactNativeAndroidKeyboardAdjustOriginallyus=_interopRequireDefault(require("react-native-android-keyboard-adjust-originallyus"));var _reactNativeDeviceInfo=_interopRequireDefault(require("react-native-device-info"));var _confirmStep=_interopRequireDefault(require("./component/confirmStep"));var _inlineSurvey=_interopRequireDefault(require("./component/inlineSurvey"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/index.jsx",_this3=this;function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}function _callSuper(t,o,e){return o=(0,_getPrototypeOf2.default)(o),(0,_possibleConstructorReturn2.default)(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],(0,_getPrototypeOf2.default)(t).constructor):o.apply(t,e));}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}var deviceHeight=_reactNative.Dimensions.get('window').height;var requestFormTimestamp=null;var submitFormTimestamp=null;var AIAFeedbackInstance=exports.AIAFeedbackInstance=null;var AIAFeedback=function(_React$Component){function AIAFeedback(props){var _this;(0,_classCallCheck2.default)(this,AIAFeedback);_this=_callSuper(this,AIAFeedback,[props]);_this.openAnimation=(0,_asyncToGenerator2.default)(function*(){_reactNative.Animated.timing(_this.isVisibleValue,{toValue:1,useNativeDriver:false}).start();});_this.getKeyboardInputMode=(0,_asyncToGenerator2.default)(function*(){if(_reactNative.Platform.OS==='android'){var inputMode=yield _reactNativeAndroidKeyboardAdjustOriginallyus.default.getCurrentSoftInputMode();_this.setState(Object.assign({},_this.state,{defaultNumberSoftInputMode:inputMode}));}return null;});_this.restoreKeyboardInputMode=function(){switch(_this.state.defaultNumberSoftInputMode){case 48:_reactNativeAndroidKeyboardAdjustOriginallyus.default.setAdjustNothing();console.log('AndroidKeyboardAdjust.setAdjustNothing()');break;case 32:_reactNativeAndroidKeyboardAdjustOriginallyus.default.setAdjustPan();console.log('AndroidKeyboardAdjust.setAdjustPan()');break;case 16:_reactNativeAndroidKeyboardAdjustOriginallyus.default.setAdjustResize();console.log('AndroidKeyboardAdjust.setAdjustResize()');break;case 0:_reactNativeAndroidKeyboardAdjustOriginallyus.default.setStateUnspecified();console.log('AndroidKeyboardAdjust.setStateUnspecified()');break;default:break;}};_this.onKeyboardDidShow=function(e){if(!_this.state.isVisible)return;var form=_this.state.form;_this.isShowingKeyboard=true;var customKeyboardHeight=e.endCoordinates.height;if(_const.isTablet&&(form==null?void 0:form.instrusive_style)==1)customKeyboardHeight=e.endCoordinates.height;if(!_const.isTablet&&(form==null?void 0:form.instrusive_style)==1&&_reactNative.Platform.OS==='android')customKeyboardHeight=1;_reactNative.Animated.timing(_this.keyboardHeight,{toValue:customKeyboardHeight,duration:300,easing:_reactNative.Easing.ease,useNativeDriver:false}).start(function(){if(_this.scrollViewInputRef){_this.scrollViewInputRef.scrollToEnd({duration:350,animated:true});}});};_this.onKeyboardDidHide=function(){if(!_this.state.isVisible)return;_this.isShowingKeyboard=false;_reactNative.Animated.timing(_this.keyboardHeight,{toValue:0,duration:350,useNativeDriver:false}).start();};_this.getVersion=function(){return _const.X_Version_Npm;};_this.setFormSlug=function(formSlug){if(!formSlug)return;if(formSlug.trim().length<2)return;_this.formSlug=formSlug.trim();};_this.setAppSecret=function(appSecret){_this.appSecret=appSecret;exports.AIAFeedbackInstance=AIAFeedbackInstance=_this;};_this.setAppUserId=function(){var userId=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'';try{if(typeof userId==='object'&&userId!==null){var userIdObject=Object.keys(userId).length===0?'':JSON.stringify(userId);_this.appUserId=userIdObject;return;}var userIdString=userId?userId.toString():'';_this.appUserId=userIdString;}catch(error){console.log('FeedbackSDK setAppUserId error:',error);_this.appUserId='';}};_this.setLanguage=function(language){if(!language||language.length<2){language='en';}language=language.toLowerCase();_this.language=language;};_this.setMetadata=function(metadata){if(!metadata)return;_this.metadata={metadata:metadata};};_this.testRatingForm=function(eventTag,callbackFn){_this.requestForm(true,eventTag,callbackFn);};_this.showRatingForm=function(eventTag,callbackFn){_this.requestForm(false,eventTag,callbackFn);};_this.showInlineForm=function(eventTag,slug){var callbackFn=arguments.length>2&&arguments[2]!==undefined?arguments[2]:function(){return null;};var debug=arguments.length>3&&arguments[3]!==undefined?arguments[3]:true;_this.setFormSlug(slug);_this.requestForm(debug,eventTag,callbackFn);};_this.hideRatingForm=function(){_this.setState({form:{},originalFormModel:{},numStar:0,inputValue:'',loading:false,listActiveSelect:[],isVisible:false,didSubmitted:false,isShowingExtraForm:false,heightScreenTablet:'auto'});_this.performCallbackFunction();_this.sdkCallbackFunction=null;_this.animatedValue=new _reactNative.Animated.Value(0);_this.isShowingKeyboard=false;_this.keyboardHeight=new _reactNative.Animated.Value(0);};_this.performCallbackFunction=function(){if(_this.sdkCallbackFunction&&typeof _this.sdkCallbackFunction==='function'){_this.sdkCallbackFunction(_this.formDidShow);}_this.restoreKeyboardInputMode();_this.sdkCallbackFunction=null;};_this.requestForm=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(debug){var eventTag=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'';var callbackFn=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;if(_this.state.isVisible)return;console.log({bundleId:_reactNativeDeviceInfo.default.getBundleId()});_this.formDidShow=false;_this.sdkCallbackFunction=null;if(callbackFn&&typeof callbackFn==='function'){_this.sdkCallbackFunction=callbackFn;}if(requestFormTimestamp){var nowTimestamp=Date.now();if(nowTimestamp-requestFormTimestamp<3000)return;}requestFormTimestamp=Date.now();_this.setState({form:{},originalFormModel:{},numStar:0,inputValue:'',loading:false,listActiveSelect:[],didSubmitted:false,isShowingExtraForm:false});_this.eventTag=eventTag;_this.debug=debug?1:0;var build_number=yield _.getBuildNumber();var storage_key=`dk3@sq8_${build_number}`;var install_timestamp=yield _reactNativeEncryptedStorage.default.getItem(storage_key);if(!install_timestamp)_reactNativeEncryptedStorage.default.setItem(storage_key,`${Math.floor(Date.now()/1000)}`);var bodyData={slug:_this.formSlug,debug:debug,event_tag:eventTag,install_timestamp:install_timestamp||0,metadata:_this.metadata||null};var headers={'X-App-Secret':_this.appSecret,'X-App-User-Id':_this.appUserId,'X-Lang':_this.language};var res=yield(0,_api.sendRequest)(bodyData,{headers:headers});if(res!=null&&res.error){if(debug)Alert.alert('FeedbackSDK Error',res==null?void 0:res.error,[{text:'OK'}],{cancelable:true});_this.performCallbackFunction();return;}if(!(res!=null&&res.title)||!(res!=null&&res.theme)){_this.performCallbackFunction();return;}if((res==null?void 0:res.delay_second)>0){_this.saveDelayFormData(res);_this.setState({form:res});return;}_this.formDidShow=true;_this.setState({form:res,isVisible:true},function(){setTimeout(function(){_reactNative.Animated.timing(_this.animatedValue,{toValue:1,useNativeDriver:false}).start();},350);});});return function(_x){return _ref3.apply(this,arguments);};}();_this.confirmForm=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(debug,request_id){_this.debug=debug?1:0;var build_number=yield _.getBuildNumber();var storage_key=`dk3@sq8_${build_number}`;var install_timestamp=yield _reactNativeEncryptedStorage.default.getItem(storage_key);if(!install_timestamp)_reactNativeEncryptedStorage.default.setItem(storage_key,`${Math.floor(Date.now()/1000)}`);var bodyData={slug:_this.formSlug,debug:debug,install_timestamp:install_timestamp||0,metadata:_this.metadata||null,request_id:request_id};var headers={'X-App-Secret':_this.appSecret,'X-App-User-Id':_this.appUserId,'X-Lang':_this.language};var res=yield(0,_api.sendConfirm)(bodyData,{headers:headers});if(res!=null&&res.error){if(debug)Alert.alert('FeedbackSDK Error',res==null?void 0:res.error,[{text:'OK'}],{cancelable:true});return;}return res;});return function(_x2,_x3){return _ref4.apply(this,arguments);};}();_this.closeAnimation=function(callback){return _reactNative.Animated.timing(_this.isVisibleValue,{toValue:0,useNativeDriver:false}).start(callback);};_this.handleButtonClose=function(){_this.closeAnimation(function(){_this.hideRatingForm();_this.setState({confirmStep:true});});};_this.handleChangeText=function(value){_this.setState({inputValue:value});};_this.handleMultiSelectOption=function(index){var listActiveSelect=_this.state.listActiveSelect;var indexActive=listActiveSelect.indexOf(index);if(indexActive===-1){listActiveSelect.push(index);_this.setState({listActiveSelect:(0,_toConsumableArray2.default)(listActiveSelect)});}else{_this.setState({listActiveSelect:listActiveSelect.filter(function(element,i){return element!==index;})});}};_this.handleSelectOption=function(index){_this.setState({listActiveSelect:[index]});};_this.handlePressRating=function(numberValue){var autoSubmit=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;_this.setState({numStar:numberValue},function(){var _this$state$form,_this$state$form2,_this$state$form2$aut,_this$state$form3,_this$state$form3$aut;if((_this$state$form=_this.state.form)!=null&&_this$state$form.auto_submit&&(_this$state$form2=_this.state.form)!=null&&(_this$state$form2$aut=_this$state$form2.auto_submit)!=null&&_this$state$form2$aut.length&&(_this$state$form3=_this.state.form)!=null&&(_this$state$form3$aut=_this$state$form3.auto_submit)!=null&&_this$state$form3$aut.includes(numberValue)||!autoSubmit){_this.submitForm(autoSubmit);}});};_this.blinkAnimation=function(){_reactNative.Animated.sequence([_reactNative.Animated.timing(_this.opacityAnimatedValue,{toValue:0,duration:350,useNativeDriver:false}),_reactNative.Animated.timing(_this.opacityAnimatedValue,{toValue:1,duration:350,useNativeDriver:false})]).start();};_this.submitForm=(0,_asyncToGenerator2.default)(function*(){var _form$url;var isAutoSubmit=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;var _this$state=_this.state,numStar=_this$state.numStar,inputValue=_this$state.inputValue,listActiveSelect=_this$state.listActiveSelect,form=_this$state.form,isShowingExtraForm=_this$state.isShowingExtraForm,originalFormModel=_this$state.originalFormModel,didSubmitted=_this$state.didSubmitted;if(submitFormTimestamp){var nowTimestamp=Date.now();if(nowTimestamp-submitFormTimestamp<1000)return;}submitFormTimestamp=Date.now();if(form!=null&&form.url&&(form==null?void 0:(_form$url=form.url)==null?void 0:_form$url.length)>5){_reactNative.Linking.canOpenURL(form==null?void 0:form.url).then(function(supported){supported&&_reactNative.Linking.openURL(form==null?void 0:form.url);},function(err){return console.log('FeedbackSDK Error:',err);});}if(form&&!form.auto_store_review){var url=_reactNative.Platform.OS==='ios'?form==null?void 0:form.ios_review_url:form==null?void 0:form.android_review_url;if(url){_reactNative.Linking.canOpenURL(url).then(function(supported){supported&&_reactNative.Linking.openURL(url);},function(err){return console.log('FeedbackSDK Error:',err);});}}if(isShowingExtraForm){_this.handleSubmitFormResponse(originalFormModel);return;}if(didSubmitted){_this.handleButtonClose();return;}_this.setState({loading:true});var bodyData={slug:_this.formSlug,rating:numStar,event_tag:_this.eventTag,debug:_this.debug,request_id:form==null?void 0:form.id,selected_options:listActiveSelect.join(','),free_text:inputValue,auto:isAutoSubmit,metadata:_this.metadata||null};var install_timestamp=yield _reactNativeEncryptedStorage.default.getItem('@opkjnbvfdxc');if(!install_timestamp)yield _reactNativeEncryptedStorage.default.setItem('@opkjnbvfdxc',`${Math.floor(Date.now()/1000)}`);var headers={'X-App-Secret':_this.appSecret,'X-App-User-Id':_this.appUserId,'X-Lang':_this.language};var res=yield(0,_api.sendSubmit)(bodyData,{headers:headers});if(res!=null&&res.error){Alert.alert('FeedbackSDK Error',res==null?void 0:res.error,[{text:'OK'}],{cancelable:true});_this.hideRatingForm();return;}_this.setState({didSubmitted:true});_this.setState({loading:false});if(res!=null&&res.auto_store_review){var options={AppleAppID:`${res==null?void 0:res.ios_store_app_id}`,OtherAndroidURL:res==null?void 0:res.android_review_url,preferredAndroidMarket:_reactNativeRate.AndroidMarket.Google,preferInApp:true,openAppStoreIfInAppFails:false};_reactNativeRate.default.rate(options,function(success){console.log('success',success);});}if(res!=null&&res.extra_form){_this.handleExtraFormResponse(res);return;}_this.handleSubmitFormResponse(res);return;});_this.handleExtraFormResponse=function(res){_this.setState({isShowingExtraForm:true},function(){_this.blinkAnimation();setTimeout(function(){_this.setState({originalFormModel:res,form:res.extra_form});},350);});};_this.handleSubmitFormResponse=function(res){if(res.action==="linked_survey"){_this.blinkAnimation();_this.setFormSlug(res.slug);_this.setState({numStar:null,didSubmitted:false,form:res,isVisible:true});return;}if(res.action==="dismiss"){_this.closeAnimation(function(){return _this.hideRatingForm();});return;}_this.setState({isShowingExtraForm:false},function(){_this.blinkAnimation();setTimeout(function(){_this.setState({originalFormModel:null,form:res});},350);});};_this.functions={submitForm:_this.submitForm,handlePressRating:_this.handlePressRating,handleButtonClose:_this.handleButtonClose,handleChangeText:_this.handleChangeText,handleSelectOption:_this.handleSelectOption,handleMultiSelectOption:_this.handleMultiSelectOption,scrollViewInputRef:function scrollViewInputRef(ref){return _this.scrollViewInputRef=ref;}};_this.validationSplashScreenSettings=function(res){return res.splash_screen_title&&res.splash_screen_question&&res.splash_screen_button_proceed&&res.splash_screen_button_skip&&res.splash_screen_title.trim().length>0&&res.splash_screen_question.trim().length>0&&res.splash_screen_button_proceed.trim().length>0&&res.splash_screen_button_skip.trim().length>0;};_this.checkSplashScreen=function(res,debug){var validSetting=this.validationSplashScreenSettings(res);if(res.instrusive_style===1&&res.splash_screen_enabled===1&&debug&&!validSetting){console.warn('%cFeedbackSDK Warning:','color: #ff0000; font-size: 16px; font-weight: bold;');console.warn("Splash screen settings are not valid");}if(res.instrusive_style===1&&res.splash_screen_enabled===1&&validSetting||res.backend_force_splash_secreen_endable&&validSetting){res.splashScreenEnabled=1;}};_this.saveDelayFormData=function(form){try{var now=new Date().getTime();_this.showMoment=form.delay_second*1000+now;_this.expireMoment=form.delay_second_expiry*1000+now;var data={form:form,showMoment:_this.showMoment,expireMoment:_this.expireMoment};var stringifyData=JSON.stringify(data);_reactNativeEncryptedStorage.default.setItem('formData',stringifyData);}catch(error){}};_this.clearDelayFormData=function(){try{_reactNativeEncryptedStorage.default.removeItem('formData');}catch(error){}};_this.getDelayFormData=(0,_asyncToGenerator2.default)(function*(){try{var data=yield _reactNativeEncryptedStorage.default.getItem('formData');var parseData=JSON.parse(data);if(!_.isNil(parseData)){_this.showMoment=parseData.showMoment;_this.expireMoment=parseData.expireMoment;_this.setState({form:parseData.form});}}catch(error){}});_this.resetTimeout=function(){_this.clearDelayFormData();_this.showMoment=0;clearInterval(_this.timeId);_this.timeId=undefined;};_this.controlTimeout=function(){if(!_this.showMoment)return;_this.timeId=setInterval(function(){var now=new Date().getTime();if(_this.expireMoment<=now){_this.resetTimeout();return;}if(_this.showMoment>0&&_this.showMoment<=now){_this.confirmForm(_this.debug,_this.state.form.id);_this.setState({isVisible:true});_this.resetTimeout();}},500);};_this.confirmStepOnPress=function(){_this.isVisibleValue.setValue(0);_this.setState({confirmStep:false},function(){_this.openAnimation();});};_this.state={form:{},originalFormModel:{},numStar:0,inputValue:'',loading:false,listActiveSelect:[],isVisible:false,didSubmitted:false,isShowingExtraForm:false,heightScreenTablet:'auto',defaultNumberSoftInputMode:null,confirmStep:true};_this.animatedValue=new _reactNative.Animated.Value(0);_this.keyboardHeight=new _reactNative.Animated.Value(0);_this.formSlug='native_rating_form';_this.scrollViewInputRef=null;_this.isShowingKeyboard=false;_this.timeout=null;_this.formDidShow=true;_this.eventTag=null;_this.showKeyboardSub=null;_this.hideKeyboardSub=null;_this.heightParentView=0;_this.isVisibleValue=new _reactNative.Animated.Value(0);_this.opacityAnimatedValue=new _reactNative.Animated.Value(1);_this.metadata=null;_this.sdkCallbackFunction=null;_this.appUserId='',_this.appSecret='',_this.language='en';return _this;}(0,_inherits2.default)(AIAFeedback,_React$Component);return(0,_createClass2.default)(AIAFeedback,[{key:"componentDidMount",value:function componentDidMount(){this.getDelayFormData();this.getKeyboardInputMode();if(_reactNative.Platform.OS==='ios'){this.showKeyboardSub=_reactNative.Keyboard.addListener('keyboardWillShow',this.onKeyboardDidShow);this.hideKeyboardSub=_reactNative.Keyboard.addListener('keyboardWillHide',this.onKeyboardDidHide);return;}this.showKeyboardSub=_reactNative.Keyboard.addListener('keyboardDidShow',this.onKeyboardDidShow);this.hideKeyboardSub=_reactNative.Keyboard.addListener('keyboardDidHide',this.onKeyboardDidHide);_reactNative.StatusBar.setTranslucent(true);_reactNative.StatusBar.setBackgroundColor('transparent');}},{key:"componentWillUnmount",value:function componentWillUnmount(){try{var _this$showKeyboardSub,_this$hideKeyboardSub;if(this.timeId)clearInterval(this.timeId);if(this.timeout)clearTimeout(this.timeout);if((_this$showKeyboardSub=this.showKeyboardSub)!=null&&_this$showKeyboardSub.remove&&(_this$hideKeyboardSub=this.hideKeyboardSub)!=null&&_this$hideKeyboardSub.remove){this.showKeyboardSub.remove();this.hideKeyboardSub.remove();return;}if(_reactNative.Platform.OS==='ios'){if(_reactNative.Keyboard.removeListener){_reactNative.Keyboard.removeListener('keyboardWillShow',this.onKeyboardDidShow);_reactNative.Keyboard.removeListener('keyboardWillHide',this.onKeyboardDidHide);}return;}if(_reactNative.Keyboard.removeListener){_reactNative.Keyboard.removeListener('keyboardDidShow',this.onKeyboardDidShow);_reactNative.Keyboard.removeListener('keyboardDidHide',this.onKeyboardDidHide);}}catch(error){console.log('FeedbackSDK Error:',error);}}},{key:"componentDidUpdate",value:function componentDidUpdate(_prevProps,prevState){var isVisible=this.state.isVisible;if(!this.timeId){this.controlTimeout();}if(isVisible&&isVisible!==prevState.isVisible){if(this.state.form.type==='content_usefulness'){if(this.inlineSurveyRef){var _this$inlineSurveyRef;(_this$inlineSurveyRef=this.inlineSurveyRef)==null?void 0:_this$inlineSurveyRef.setShowSurvey(this.state.form);return;}}this.state.confirmStep&&this.validationSplashScreenSettings(this.state.form)?this.isVisibleValue.setValue(1):this.openAnimation();}}},{key:"render",value:function render(){var _this$props,_this2=this;var _this$state2=this.state,form=_this$state2.form,numStar=_this$state2.numStar,inputValue=_this$state2.inputValue,listActiveSelect=_this$state2.listActiveSelect,didSubmitted=_this$state2.didSubmitted,loading=_this$state2.loading,isShowingExtraForm=_this$state2.isShowingExtraForm,heightScreenTablet=_this$state2.heightScreenTablet;if(!form)return null;if(!form.theme)return null;var theme=form.theme;var hasSplash=this.validationSplashScreenSettings(form);var heightParentViewAni=this.isVisibleValue.interpolate({inputRange:[0,1],outputRange:[deviceHeight,0]});var aniMarginSelectBtn=this.keyboardHeight.interpolate({inputRange:[0,200],outputRange:[16/667*_const.heightScreen,10/667*_const.heightScreen]});var cmtTranslateY=this.animatedValue.interpolate({inputRange:[0,1],outputRange:[150,0]});var cmtAniOpacity=this.animatedValue.interpolate({inputRange:[0,1],outputRange:[0,1]});var opacityUI=this.opacityAnimatedValue.interpolate({inputRange:[0,1],outputRange:[0,1]});var widthStyle=_const.widthScreen;var translateX=-(widthStyle/2);var bottomStyle='auto';var rightStyle='auto';var leftStyle='50%';if(form.instrusive_style!=1){bottomStyle=0;}if(form.instrusive_style!=1&&_const.isTablet){widthStyle=_const.widthScreenNonIntr;rightStyle='15%';translateX=0;leftStyle='auto';}var heightUI;if(_const.isTablet)heightUI=heightScreenTablet;else{heightUI=heightScreenTablet==='auto'?'auto':_const.heightScreen-40;}var heightNonIntrusCondition=_const.heightScreen-40;if(_const.isTablet)heightNonIntrusCondition=_const.heightScreen/1.5;var animationOutSideApp=0;var animationInSideApp=0;if(_const.isTablet||!_const.isTablet&&form.instrusive_style!=1&&_reactNative.Platform.OS!=='android')animationOutSideApp=this.keyboardHeight;if(!_const.isTablet&&form.instrusive_style==1)animationInSideApp=this.keyboardHeight;var isSoftInputModeResize=_reactNative.Platform.OS==='android'&&!!form.instrusive_style;if(isSoftInputModeResize){_reactNativeAndroidKeyboardAdjustOriginallyus.default.setAdjustResize();console.warn('keyboard show on full screen');}var finalHeight=_const.isTablet?heightScreenTablet:_const.heightScreen;if(this!=null&&(_this$props=this.props)!=null&&_this$props.translucent)finalHeight=_const.heightScreen+(_reactNative.StatusBar==null?void 0:_reactNative.StatusBar.currentHeight);var statusBarHeight=(0,_StatusBarHeight.getStatusBarHeight)()+8;var transformStyle={transform:[{translateY:heightParentViewAni},{translateX:translateX}],paddingBottom:animationOutSideApp,width:widthStyle,bottom:bottomStyle,right:rightStyle,left:leftStyle};var animations={aniMarginSelectBtn:aniMarginSelectBtn,cmtTranslateY:cmtTranslateY,cmtAniOpacity:cmtAniOpacity,animationInSideApp:animationInSideApp};var states={inputValue:inputValue,numStar:numStar,listActiveSelect:listActiveSelect,loading:loading,isShowingExtraForm:isShowingExtraForm};var hasIntrusiveStyle=Object.keys(form).length>0&&form.instrusive_style==1;if(this.state.form.type==='content_usefulness'&&!_.isNil(this.inlineSurveyRef))return;if(this.state.confirmStep&&hasSplash&&hasIntrusiveStyle){return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[styles.wrapper,transformStyle],children:(0,_jsxRuntime.jsx)(ContentWrapper,{backgroundColor:theme==null?void 0:theme.body_bg_color,children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{onLayout:function onLayout(event){var height=event.nativeEvent.layout.height;if(_const.isTablet)return;if(height>_const.heightScreen&&heightScreenTablet==='auto'){_this2.setState({heightScreenTablet:_const.heightScreen});}},style:{flex:1,height:finalHeight,opacity:opacityUI,paddingBottom:_const.isTablet?35:statusBarHeight},children:(0,_jsxRuntime.jsx)(_confirmStep.default,{theme:theme,handleButtonClose:this.handleButtonClose,form:form,onProcess:this.confirmStepOnPress})})})});}return(0,_jsxRuntime.jsxs)(_reactNative.Animated.View,{style:[styles.wrapper,transformStyle],children:[hasIntrusiveStyle&&(0,_jsxRuntime.jsx)(ContentWrapper,{backgroundColor:theme==null?void 0:theme.body_bg_color,children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{onLayout:function onLayout(event){var height=event.nativeEvent.layout.height;if(_const.isTablet)return;if(height>_const.heightScreen&&heightScreenTablet==='auto'){_this2.setState({heightScreenTablet:_const.heightScreen});}},style:{flex:1,height:finalHeight,opacity:opacityUI,paddingBottom:_const.isTablet?35:statusBarHeight},children:(0,_jsxRuntime.jsx)(_component.ContentUI,{didSubmitted:didSubmitted,form:form,animatedValues:{keyboardHeight:this.keyboardHeight},animations:animations,states:states,functions:this.functions})})}),!hasIntrusiveStyle&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{borderTopLeftRadius:16/375*_const.widthScreenNonIntr,borderTopRightRadius:16/375*_const.widthScreenNonIntr,backgroundColor:(theme==null?void 0:theme.body_bg_color)||'#fff'}],children:(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{onLayout:function onLayout(event){var height=event.nativeEvent.layout.height;if(_const.isTablet)return;if(height>heightNonIntrusCondition&&heightScreenTablet==='auto'){_this2.setState({heightScreenTablet:heightNonIntrusCondition});}},style:{flex:1,height:heightUI,opacity:opacityUI,paddingBottom:statusBarHeight},children:(0,_jsxRuntime.jsx)(_component.ContentUI,{didSubmitted:didSubmitted,form:form,animatedValues:{keyboardHeight:this.keyboardHeight},animations:animations,states:states,functions:this.functions})})})]});}}]);}(_react.default.Component);var styles=_reactNative.StyleSheet.create({wrapper:{position:'absolute',zIndex:9999999,elevation:9999999,shadowColor:'rgba(0, 0, 0, 0.5)',shadowOffset:{width:0,height:3},shadowOpacity:0.5,shadowRadius:6,elevation:3}});var ContentWrapper=function ContentWrapper(_ref7){var children=_ref7.children,backgroundColor=_ref7.backgroundColor;if(_reactNative.Platform.OS==='ios')return(0,_jsxRuntime.jsx)(_reactNative.View,{style:{backgroundColor:backgroundColor||'#fff',borderRadius:_const.isTablet?8:0,flex:1,marginHorizontal:_const.isTablet?20:0,paddingTop:_reactNative.StatusBar.currentHeight},children:children});return(0,_jsxRuntime.jsx)(_reactNative.KeyboardAvoidingView,{behavior:'height',style:{backgroundColor:backgroundColor||'#fff',borderRadius:_const.isTablet?8:0,flex:1,paddingTop:_reactNative.StatusBar.currentHeight,paddingBottom:10},children:children});};var _default=exports.default=AIAFeedback;
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/ButtonSubmit.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var ButtonSubmit=function ButtonSubmit(props){var onPress=props.onPress,title=props.title,_props$disabled=props.disabled,disabled=_props$disabled===void 0?false:_props$disabled,_props$loading=props.loading,loading=_props$loading===void 0?false:_props$loading,button_text_color=props.button_text_color,button_bg_color=props.button_bg_color,button_font=props.button_font,button_fontsize=props.button_fontsize,customStyle=props.customStyle,appWidth=props.appWidth,isTabletInstrusive=props.isTabletInstrusive;return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.safeAreaViewContainer,Object.assign({marginTop:f.w_p(appWidth,10)},customStyle)],children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.viewWrap,children:(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{onPress:disabled||loading?function(){return null;}:onPress,style:[styles.btnContainer,{width:isTabletInstrusive?200:"100%",opacity:disabled?0.5:1,backgroundColor:button_bg_color,borderRadius:8,paddingVertical:12}],disabled:disabled,children:[loading&&(0,_jsxRuntime.jsx)(_reactNative.ActivityIndicator,{style:{position:"absolute"},color:button_text_color}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontSize:button_fontsize,color:button_text_color,fontFamily:button_font,opacity:loading?0:1},children:title})]})})});};var styles=_reactNative.StyleSheet.create({safeAreaViewContainer:{width:"100%"},btnContainer:{justifyContent:"center",alignItems:"center"},viewWrap:{justifyContent:"center",alignItems:"center"}});var _default=exports.default=ButtonSubmit;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var myFunc=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/ButtonSubmit.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var ButtonSubmit=function ButtonSubmit(props){var onPress=props.onPress,title=props.title,_props$disabled=props.disabled,disabled=_props$disabled===void 0?false:_props$disabled,_props$loading=props.loading,loading=_props$loading===void 0?false:_props$loading,button_text_color=props.button_text_color,button_bg_color=props.button_bg_color,button_font=props.button_font,button_fontsize=props.button_fontsize,customStyle=props.customStyle,appWidth=props.appWidth,isTabletInstrusive=props.isTabletInstrusive;return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.safeAreaViewContainer,Object.assign({marginTop:myFunc.w_p(appWidth,10)},customStyle)],children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.viewWrap,children:(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{onPress:disabled||loading?function(){return null;}:onPress,style:[styles.btnContainer,{width:isTabletInstrusive?200:'100%',opacity:disabled?0.5:1,backgroundColor:button_bg_color},styles.button],disabled:disabled,children:[loading&&(0,_jsxRuntime.jsx)(_reactNative.ActivityIndicator,{style:{position:'absolute'},color:button_text_color}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontSize:button_fontsize,color:button_text_color,fontFamily:button_font,opacity:loading?0:1},children:title})]})})});};var styles=_reactNative.StyleSheet.create({safeAreaViewContainer:{width:'100%'},btnContainer:{justifyContent:'center',alignItems:'center'},viewWrap:{justifyContent:'center',alignItems:'center'},button:{borderRadius:8,paddingVertical:12}});var _default=exports.default=ButtonSubmit;
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _const=require("../utils/const");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/Fineprint.js";var Fineprint=function Fineprint(_ref){var fineprint_color=_ref.fineprint_color,fineprint_font=_ref.fineprint_font,fineprint_fontsize=_ref.fineprint_fontsize,fineprint=_ref.fineprint,_ref$nonIntrusive=_ref.nonIntrusive,nonIntrusive=_ref$nonIntrusive===void 0?false:_ref$nonIntrusive,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment;var paddingHorizontal=_const.mainPaddingHorizontal;if(nonIntrusive&&_const.isTablet)paddingHorizontal=22;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.textComment,{fontSize:fineprint_fontsize,fontFamily:fineprint_font,color:fineprint_color,textAlign:alignment}],children:fineprint});};var _default=exports.default=Fineprint;var styles=_reactNative.StyleSheet.create({textComment:{marginTop:4/375*_const.widthScreen,paddingTop:4/375*_const.widthScreen,paddingBottom:12/375*_const.widthScreen}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _const=require("../utils/const");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/Fineprint.js";var Fineprint=function Fineprint(_ref){var fineprint_color=_ref.fineprint_color,fineprint_font=_ref.fineprint_font,fineprint_fontsize=_ref.fineprint_fontsize,fineprint=_ref.fineprint,_ref$nonIntrusive=_ref.nonIntrusive,nonIntrusive=_ref$nonIntrusive===void 0?false:_ref$nonIntrusive,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.textComment,{fontSize:fineprint_fontsize,fontFamily:fineprint_font,color:fineprint_color,textAlign:alignment}],children:fineprint});};var _default=exports.default=Fineprint;var styles=_reactNative.StyleSheet.create({textComment:{marginTop:4/375*_const.widthScreen,paddingTop:4/375*_const.widthScreen,paddingBottom:12/375*_const.widthScreen}});
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/Instruction.js";var Instruction=function Instruction(_ref){var instruction_color=_ref.instruction_color,instruction_font=_ref.instruction_font,instruction_fontsize=_ref.instruction_fontsize,instruction=_ref.instruction,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontSize:instruction_fontsize,fontFamily:instruction_font,color:instruction_color,textAlign:alignment},children:instruction});};var _default=exports.default=Instruction;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/Instruction.js";var Instruction=function Instruction(_ref){var instruction_color=_ref.instruction_color,instruction_font=_ref.instruction_font,instruction_fontsize=_ref.instruction_fontsize,instruction=_ref.instruction,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontSize:instruction_fontsize,fontFamily:instruction_font,color:instruction_color,textAlign:alignment},children:instruction});};var _default=exports.default=Instruction;
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/MultipleSelectInput.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var delayValue=10;var AnimatedTouchableOpacity=_reactNative.Animated.createAnimatedComponent(_reactNative.TouchableOpacity);var MultipleSelectInput=function MultipleSelectInput(_ref){var theme=_ref.theme,options=_ref.options,listActiveSelect=_ref.listActiveSelect,handleSelectOption=_ref.handleSelectOption,handleMultiSelectOption=_ref.handleMultiSelectOption,options_multiselect=_ref.options_multiselect,animated=_ref.animated,appWidth=_ref.appWidth;var option_bg_color=theme.option_bg_color,option_border_color=theme.option_border_color,option_font=theme.option_font,option_fontsize=theme.option_fontsize,option_selected_bg_color=theme.option_selected_bg_color,option_selected_border_color=theme.option_selected_border_color,option_selected_text_color=theme.option_selected_text_color,option_text_color=theme.option_text_color;(0,_react.useEffect)(function(){delayValue=10;},[]);return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.viewOptionsContainer,children:options==null?void 0:options.map(function(_ref2){var slug=_ref2.slug,title=_ref2.title;var activeSelect=false;if(listActiveSelect.indexOf(slug)!==-1){activeSelect=true;}var borderColor=activeSelect?option_selected_border_color:option_border_color;var backgroundColor=activeSelect?option_selected_bg_color:option_bg_color;var color=activeSelect?option_selected_text_color:option_text_color;return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{children:(0,_jsxRuntime.jsx)(AnimatedTouchableOpacity,{onPress:function onPress(){return options_multiselect?handleMultiSelectOption(slug):handleSelectOption(slug);},style:[styles.btnSelectContainer,{borderColor:borderColor,backgroundColor:backgroundColor,borderRadius:f.w_p(appWidth,16),paddingVertical:6,paddingHorizontal:16,marginHorizontal:6,marginVertical:8}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontFamily:option_font,fontSize:option_fontsize,textAlign:"center",color:color},children:title})})},`option-${slug}`);})});};MultipleSelectInput.defaultProps={options:[]};var _default=exports.default=MultipleSelectInput;var styles=_reactNative.StyleSheet.create({btnSelectContainer:{borderWidth:1,justifyContent:"center",alignItems:"center"},viewOptionsContainer:{flexDirection:"row",flexWrap:"wrap",justifyContent:"center"}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var myFunc=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/MultipleSelectInput.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var AnimatedTouchableOpacity=_reactNative.Animated.createAnimatedComponent(_reactNative.TouchableOpacity);var MultipleSelectInput=function MultipleSelectInput(_ref){var theme=_ref.theme,options=_ref.options,listActiveSelect=_ref.listActiveSelect,handleSelectOption=_ref.handleSelectOption,handleMultiSelectOption=_ref.handleMultiSelectOption,options_multiselect=_ref.options_multiselect,animated=_ref.animated,appWidth=_ref.appWidth;var option_bg_color=theme.option_bg_color,option_border_color=theme.option_border_color,option_font=theme.option_font,option_fontsize=theme.option_fontsize,option_selected_bg_color=theme.option_selected_bg_color,option_selected_border_color=theme.option_selected_border_color,option_selected_text_color=theme.option_selected_text_color,option_text_color=theme.option_text_color;return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.viewOptionsContainer,children:options==null?void 0:options.map(function(_ref2){var slug=_ref2.slug,title=_ref2.title;var activeSelect=false;if(listActiveSelect.indexOf(slug)!==-1){activeSelect=true;}var borderColor=activeSelect?option_selected_border_color:option_border_color;var backgroundColor=activeSelect?option_selected_bg_color:option_bg_color;var color=activeSelect?option_selected_text_color:option_text_color;return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{children:(0,_jsxRuntime.jsx)(AnimatedTouchableOpacity,{onPress:function onPress(){return options_multiselect?handleMultiSelectOption(slug):handleSelectOption(slug);},style:[styles.btnSelectContainer,{borderColor:borderColor,backgroundColor:backgroundColor,borderRadius:myFunc.w_p(appWidth,16),paddingVertical:6,paddingHorizontal:16,marginHorizontal:6,marginVertical:8}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontFamily:option_font,fontSize:option_fontsize,textAlign:'center',color:color},children:title})})},`option-${slug}`);})});};MultipleSelectInput.defaultProps={options:[]};var _default=exports.default=MultipleSelectInput;var styles=_reactNative.StyleSheet.create({btnSelectContainer:{borderWidth:1,justifyContent:'center',alignItems:'center'},viewOptionsContainer:{flexDirection:'row',flexWrap:'wrap',justifyContent:'center'}});
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/Question.js";var Question=function Question(_ref){var question_color=_ref.question_color,question_font=_ref.question_font,question_fontsize=_ref.question_fontsize,question=_ref.question,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontFamily:question_font,color:question_color,fontSize:question_fontsize,textAlign:alignment},children:question});};var _default=exports.default=Question;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/Question.js";var Question=function Question(_ref){var question_color=_ref.question_color,question_font=_ref.question_font,question_fontsize=_ref.question_fontsize,question=_ref.question,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontFamily:question_font,color:question_color,fontSize:question_fontsize,textAlign:alignment},children:question});};var _default=exports.default=Question;
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/RatingNumber.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var AnimatedTouchable=_reactNative.Animated.createAnimatedComponent(_reactNative.TouchableOpacity);var RatingNumber=function RatingNumber(props){var scale_label_color=props.scale_label_color,scale_label_left=props.scale_label_left,scale_label_right=props.scale_label_right,scale_label_font=props.scale_label_font,scale_label_fontsize=props.scale_label_fontsize,_handlePressRating=props.handlePressRating,numStar=props.numStar,rating_min=props.rating_min,rating_max=props.rating_max,appWidth=props.appWidth;var renderRating=function renderRating(){var listStar=[];var _loop=function _loop(i){listStar.push((0,_jsxRuntime.jsx)(ButtonNumber,Object.assign({},props,{handlePressRating:function handlePressRating(){_handlePressRating(i);},number:i,active:numStar===i,isStart:i===rating_min,isEnd:i===rating_max}),`rating-number-${i}`));};for(var i=rating_min;i<=rating_max;i++){_loop(i);}return listStar;};return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{flex:1},children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.ratingContainer,children:renderRating()}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:Object.assign({},styles.ratingLabelContainer,{marginTop:f.w_p(appWidth,12)}),children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:scale_label_color,fontSize:scale_label_fontsize,fontFamily:scale_label_font},children:scale_label_left||"Strongly disagree"}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:scale_label_color,fontSize:scale_label_fontsize,fontFamily:scale_label_font},children:scale_label_right||"Strongly agree"})]})]});};var ButtonNumber=function ButtonNumber(_ref){var handlePressRating=_ref.handlePressRating,active=_ref.active,isStart=_ref.isStart,isEnd=_ref.isEnd,number=_ref.number,rating_number_font=_ref.rating_number_font,rating_number_fontsize=_ref.rating_number_fontsize,rating_number_bg_color=_ref.rating_number_bg_color,rating_number_border_color=_ref.rating_number_border_color,rating_number_selected_bg_color=_ref.rating_number_selected_bg_color,rating_number_selected_border_color=_ref.rating_number_selected_border_color,rating_number_selected_text_color=_ref.rating_number_selected_text_color,rating_number_text_color=_ref.rating_number_text_color;var springAnimated=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;(0,_react.useEffect)(function(){if(active){_reactNative.Animated.timing(springAnimated,{toValue:1,useNativeDriver:false}).start();}else{_reactNative.Animated.timing(springAnimated,{toValue:0,useNativeDriver:false}).start();}},[active]);var backgroundColorAni=springAnimated.interpolate({inputRange:[0,1],outputRange:[rating_number_bg_color,rating_number_selected_bg_color]});return(0,_jsxRuntime.jsx)(AnimatedTouchable,{style:[styles.buttonNumberContainer,{borderColor:active?rating_number_selected_border_color:rating_number_border_color,borderRightWidth:isEnd?2*_reactNative.StyleSheet.hairlineWidth:0,borderTopLeftRadius:isStart?8:0,borderBottomLeftRadius:isStart?8:0,borderTopRightRadius:isEnd?8:0,borderBottomRightRadius:isEnd?8:0,backgroundColor:backgroundColorAni}],onPress:handlePressRating,activeOpacity:1,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:active?rating_number_selected_text_color:rating_number_text_color,fontSize:rating_number_fontsize,fontFamily:rating_number_font},children:number})});};var _default=exports.default=RatingNumber;var styles=_reactNative.StyleSheet.create({ratingContainer:{flexDirection:"row",flex:1},ratingLabelContainer:{flex:1,flexDirection:"row",justifyContent:"space-between"},buttonNumberContainer:{flex:1,paddingVertical:12,justifyContent:"center",alignItems:"center",borderWidth:1}});
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/RatingNumber.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var AnimatedTouchable=_reactNative.Animated.createAnimatedComponent(_reactNative.TouchableOpacity);var RatingNumber=function RatingNumber(props){var scale_label_color=props.scale_label_color,scale_label_left=props.scale_label_left,scale_label_right=props.scale_label_right,scale_label_font=props.scale_label_font,scale_label_fontsize=props.scale_label_fontsize,_handlePressRating=props.handlePressRating,numStar=props.numStar,rating_min=props.rating_min,rating_max=props.rating_max,appWidth=props.appWidth;var renderRating=function renderRating(){var listStar=[];var _loop=function _loop(i){listStar.push((0,_jsxRuntime.jsx)(ButtonNumber,Object.assign({},props,{handlePressRating:function handlePressRating(){_handlePressRating(i);},number:i,active:numStar===i,isStart:i===rating_min,isEnd:i===rating_max}),`rating-number-${i}`));};for(var i=rating_min;i<=rating_max;i++){_loop(i);}return listStar;};return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:{flex:1},children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.ratingContainer,children:renderRating()}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:Object.assign({},styles.ratingLabelContainer,{marginTop:f.w_p(appWidth,12)}),children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:scale_label_color,fontSize:scale_label_fontsize,fontFamily:scale_label_font},children:scale_label_left||'Strongly disagree'}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:scale_label_color,fontSize:scale_label_fontsize,fontFamily:scale_label_font},children:scale_label_right||'Strongly agree'})]})]});};var ButtonNumber=function ButtonNumber(_ref){var handlePressRating=_ref.handlePressRating,active=_ref.active,isStart=_ref.isStart,isEnd=_ref.isEnd,number=_ref.number,rating_number_font=_ref.rating_number_font,rating_number_fontsize=_ref.rating_number_fontsize,rating_number_bg_color=_ref.rating_number_bg_color,rating_number_border_color=_ref.rating_number_border_color,rating_number_selected_bg_color=_ref.rating_number_selected_bg_color,rating_number_selected_border_color=_ref.rating_number_selected_border_color,rating_number_selected_text_color=_ref.rating_number_selected_text_color,rating_number_text_color=_ref.rating_number_text_color;var springAnimated=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;(0,_react.useEffect)(function(){if(active){_reactNative.Animated.timing(springAnimated,{toValue:1,useNativeDriver:false}).start();}else{_reactNative.Animated.timing(springAnimated,{toValue:0,useNativeDriver:false}).start();}},[active]);var backgroundColorAni=springAnimated.interpolate({inputRange:[0,1],outputRange:[rating_number_bg_color,rating_number_selected_bg_color]});return(0,_jsxRuntime.jsx)(AnimatedTouchable,{style:[styles.buttonNumberContainer,{borderColor:active?rating_number_selected_border_color:rating_number_border_color,borderRightWidth:isEnd?2*_reactNative.StyleSheet.hairlineWidth:0,borderTopLeftRadius:isStart?8:0,borderBottomLeftRadius:isStart?8:0,borderTopRightRadius:isEnd?8:0,borderBottomRightRadius:isEnd?8:0,backgroundColor:backgroundColorAni}],onPress:handlePressRating,activeOpacity:1,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{color:active?rating_number_selected_text_color:rating_number_text_color,fontSize:rating_number_fontsize,fontFamily:rating_number_font},children:number})});};var _default=exports.default=RatingNumber;var styles=_reactNative.StyleSheet.create({ratingContainer:{flexDirection:'row',flex:1},ratingLabelContainer:{flex:1,flexDirection:'row',justifyContent:'space-between'},buttonNumberContainer:{flex:1,paddingVertical:12,justifyContent:'center',alignItems:'center',borderWidth:1}});
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _const=require("../utils/const");var _assets=require("../assets");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/RatingStar.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var pressRatingTimestamp=null;var RatingStar=function RatingStar(_ref){var rating_min=_ref.rating_min,rating_max=_ref.rating_max,numStar=_ref.numStar,_handlePressRating=_ref.handlePressRating,normal_star_color=_ref.normal_star_color,selected_star_color=_ref.selected_star_color,_ref$disable=_ref.disable,disable=_ref$disable===void 0?false:_ref$disable;var renderAllStars=function renderAllStars(){var listStar=[];var _loop=function _loop(i){var isDisable=!!disable||numStar===i;listStar.push((0,_jsxRuntime.jsx)(ButtonStar,{normal_star_color:normal_star_color,selected_star_color:selected_star_color,disabled:isDisable,handlePressRating:function handlePressRating(){_handlePressRating(i);},active:i<=numStar},`ButtonStar-${i}`));};for(var i=rating_min;i<=rating_max;i++){_loop(i);}return listStar;};return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:renderAllStars()});};var _default=exports.default=RatingStar;var ButtonStar=(0,_react.memo)(function(props){var disabled=props.disabled,handlePressRating=props.handlePressRating,_props$active=props.active,active=_props$active===void 0?false:_props$active,normal_star_color=props.normal_star_color,selected_star_color=props.selected_star_color;var springAnimated=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var onPressStar=function onPressStar(){if(pressRatingTimestamp){var nowTimestamp=Math.floor(Date.now());if(nowTimestamp-pressRatingTimestamp<500)return;}pressRatingTimestamp=Math.floor(Date.now());_reactNative.Animated.sequence([_reactNative.Animated.spring(springAnimated,{toValue:1,tension:50,useNativeDriver:true}),_reactNative.Animated.spring(springAnimated,{toValue:0,tension:50,useNativeDriver:true})]).start();handlePressRating();};var scaleStar=springAnimated.interpolate({inputRange:[0,1],outputRange:[1,1.5]});var tintColor=active?selected_star_color:normal_star_color;return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{transform:[{scale:scaleStar}]},children:(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{disabled:!!disabled,onPress:onPressStar,children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:_assets.imgStarAsset,style:[{width:_const.isTablet?42:34,height:_const.isTablet?42:34,marginHorizontal:_const.isTablet?12:8,tintColor:tintColor}],resizeMode:"contain"})})});});
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _const=require("../utils/const");var _assets=require("../assets");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/RatingStar.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var pressRatingTimestamp=null;var RatingStar=function RatingStar(_ref){var rating_min=_ref.rating_min,rating_max=_ref.rating_max,numStar=_ref.numStar,_handlePressRating=_ref.handlePressRating,normal_star_color=_ref.normal_star_color,selected_star_color=_ref.selected_star_color,_ref$disable=_ref.disable,disable=_ref$disable===void 0?false:_ref$disable;var renderAllStars=function renderAllStars(){var listStar=[];var _loop=function _loop(i){var isDisable=!!disable||numStar===i;listStar.push((0,_jsxRuntime.jsx)(ButtonStar,{normal_star_color:normal_star_color,selected_star_color:selected_star_color,disabled:isDisable,handlePressRating:function handlePressRating(){_handlePressRating(i);},active:i<=numStar},`ButtonStar-${i}`));};for(var i=rating_min;i<=rating_max;i++){_loop(i);}return listStar;};return(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:renderAllStars()});};var _default=exports.default=RatingStar;var ButtonStar=(0,_react.memo)(function(props){var disabled=props.disabled,handlePressRating=props.handlePressRating,_props$active=props.active,active=_props$active===void 0?false:_props$active,normal_star_color=props.normal_star_color,selected_star_color=props.selected_star_color;var springAnimated=(0,_react.useRef)(new _reactNative.Animated.Value(0)).current;var onPressStar=function onPressStar(){if(pressRatingTimestamp){var nowTimestamp=Math.floor(Date.now());if(nowTimestamp-pressRatingTimestamp<500)return;}pressRatingTimestamp=Math.floor(Date.now());_reactNative.Animated.sequence([_reactNative.Animated.spring(springAnimated,{toValue:1,tension:50,useNativeDriver:true}),_reactNative.Animated.spring(springAnimated,{toValue:0,tension:50,useNativeDriver:true})]).start();handlePressRating();};var scaleStar=springAnimated.interpolate({inputRange:[0,1],outputRange:[1,1.5]});var tintColor=active?selected_star_color:normal_star_color;return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:{transform:[{scale:scaleStar}]},children:(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{disabled:!!disabled,onPress:onPressStar,children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:_assets.imgStarAsset,style:[{width:_const.isTablet?42:34,height:_const.isTablet?42:34,marginHorizontal:_const.isTablet?12:8,tintColor:tintColor}],resizeMode:"contain"})})});});
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/SecondaryQuestion.js";var SecondaryQuestion=function SecondaryQuestion(_ref){var secondary_question_color=_ref.secondary_question_color,secondary_question_font=_ref.secondary_question_font,secondary_question_fontsize=_ref.secondary_question_fontsize,secondary_question=_ref.secondary_question,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontFamily:secondary_question_font,color:secondary_question_color,fontSize:secondary_question_fontsize,textAlign:alignment},children:secondary_question});};var _default=exports.default=SecondaryQuestion;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/SecondaryQuestion.js";var SecondaryQuestion=function SecondaryQuestion(_ref){var secondary_question_color=_ref.secondary_question_color,secondary_question_font=_ref.secondary_question_font,secondary_question_fontsize=_ref.secondary_question_fontsize,secondary_question=_ref.secondary_question,_ref$alignment=_ref.alignment,alignment=_ref$alignment===void 0?'center':_ref$alignment;return(0,_jsxRuntime.jsx)(_reactNative.Text,{style:{fontFamily:secondary_question_font,color:secondary_question_color,fontSize:secondary_question_fontsize,textAlign:alignment},children:secondary_question});};var _default=exports.default=SecondaryQuestion;
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _const=require("../utils/const");var f=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/khanh/Desktop/feedback-rn-sdk-new/src_uglifyjs/ui/TextArea.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var TextArea=function TextArea(_ref){var inputValue=_ref.inputValue,comment_placeholder=_ref.comment_placeholder,handleChangeText=_ref.handleChangeText,textarea_bg_color=_ref.textarea_bg_color,textarea_border_color=_ref.textarea_border_color,textarea_focus_bg_color=_ref.textarea_focus_bg_color,textarea_focus_border_color=_ref.textarea_focus_border_color,textarea_font=_ref.textarea_font,textarea_fontsize=_ref.textarea_fontsize,textarea_placeholder_color=_ref.textarea_placeholder_color,textarea_text_color=_ref.textarea_text_color,appWidth=_ref.appWidth;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),onFocusInput=_useState2[0],setOnFocusInput=_useState2[1];return(0,_jsxRuntime.jsx)(_reactNative.TextInput,{placeholder:comment_placeholder,placeholderTextColor:textarea_placeholder_color,style:[styles.viewImproveInput,{borderWidth:1,padding:f.w_p(appWidth,8),borderRadius:_const.isTablet?6:4,backgroundColor:onFocusInput?textarea_focus_bg_color:textarea_bg_color,fontFamily:textarea_font,color:textarea_text_color,borderColor:onFocusInput?textarea_focus_border_color:textarea_border_color,fontSize:textarea_fontsize}],multiline:true,value:inputValue,onChangeText:handleChangeText,onFocus:function onFocus(){return setOnFocusInput(true);},onBlur:function onBlur(){return setOnFocusInput(false);},autoCorrect:false});};var _default=exports.default=TextArea;var styles=_reactNative.StyleSheet.create({viewImproveInput:{flex:1,textAlignVertical:"top"}});
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _const=require("../utils/const");var myFunc=_interopRequireWildcard(require("../utils/MyFunction"));var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/tiem/Documents/Job/app/originally-us-rn-feedback-sdk/src_uglifyjs/ui/TextArea.js";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var TextArea=function TextArea(_ref){var inputValue=_ref.inputValue,comment_placeholder=_ref.comment_placeholder,handleChangeText=_ref.handleChangeText,textarea_bg_color=_ref.textarea_bg_color,textarea_border_color=_ref.textarea_border_color,textarea_focus_bg_color=_ref.textarea_focus_bg_color,textarea_focus_border_color=_ref.textarea_focus_border_color,textarea_font=_ref.textarea_font,textarea_fontsize=_ref.textarea_fontsize,textarea_placeholder_color=_ref.textarea_placeholder_color,textarea_text_color=_ref.textarea_text_color,appWidth=_ref.appWidth;var _useState=(0,_react.useState)(false),_useState2=(0,_slicedToArray2.default)(_useState,2),onFocusInput=_useState2[0],setOnFocusInput=_useState2[1];return(0,_jsxRuntime.jsx)(_reactNative.TextInput,{placeholder:comment_placeholder,placeholderTextColor:textarea_placeholder_color,style:[styles.viewImproveInput,{borderWidth:1,padding:myFunc.w_p(appWidth,8),borderRadius:_const.isTablet?6:4,backgroundColor:onFocusInput?textarea_focus_bg_color:textarea_bg_color,fontFamily:textarea_font,color:textarea_text_color,borderColor:onFocusInput?textarea_focus_border_color:textarea_border_color,fontSize:textarea_fontsize}],multiline:true,value:inputValue,onChangeText:handleChangeText,onFocus:function onFocus(){return setOnFocusInput(true);},onBlur:function onBlur(){return setOnFocusInput(false);},autoCorrect:false});};var _default=exports.default=TextArea;var styles=_reactNative.StyleSheet.create({viewImproveInput:{flex:1,textAlignVertical:'top'}});
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getAppHeight=getAppHeight;exports.getAppWidth=getAppWidth;exports.getVersion=exports.getUniqueID=exports.getSystemVersion=exports.getModel=exports.getManufacturer=exports.getDeviceType=exports.getDeviceId=exports.getBundleId=exports.getBuildNumber=exports.getBrand=void 0;exports.h_p16=h_p16;exports.h_p21=h_p21;exports.isNil=isNil;exports.isObject=isObject;exports.sample=sample;exports.w_p=w_p;exports.w_p16=w_p16;exports.w_p21=w_p21;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var _reactNativeDeviceInfo=_interopRequireDefault(require("react-native-device-info"));var a0g=a0b;function a0b(a,b){var c=a0a();return a0b=function a0b(d,e){d=d-0x13c;var f=c[d];return f;},a0b(a,b);}(function(a,b){var f=a0b,c=a();while(!![]){try{var d=parseInt(f(0x155))/0x1+parseInt(f(0x14c))/0x2+-parseInt(f(0x146))/0x3*(parseInt(f(0x152))/0x4)+-parseInt(f(0x14b))/0x5*(-parseInt(f(0x154))/0x6)+-parseInt(f(0x151))/0x7+-parseInt(f(0x13e))/0x8+-parseInt(f(0x14f))/0x9*(-parseInt(f(0x142))/0xa);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}})(a0a,0xabc94);var isTablet=typeof _reactNativeDeviceInfo.default[a0g(0x141)]()===a0g(0x143)?![]:_reactNativeDeviceInfo.default[a0g(0x141)](),_Dimensions$get=_reactNative.Dimensions['get']('window'),width=_Dimensions$get.width,height=_Dimensions$get.height;function isObject(a){var h=a0g,b=typeof a;return a!=null&&(b==='object'||b===h(0x149));}function sample(a){var i=a0g,b=a==null?0x0:a['length'],c=Math[i(0x13f)](Date[i(0x14a)]()/0x3e8);return b?a[c%b]:undefined;}function isNil(a){return a==null;}function w_p(a,b){return b/0x177*a;}function w_p21(a){return 0x15/0x177*a;}function w_p16(a){return 0x10/0x177*a;}function h_p21(a){return 0x15/0x29b*a;}function h_p16(a){return 0x10/0x29b*a;}function getAppWidth(a){var b=width;return isTablet&&(b=a?0x300:0x177),b;}function getAppHeight(a){var b=height;return isTablet&&(b=a?height*0x3/0x4:0x1c2),b;}function a0a(){var t=['getVersion','getManufacturer','57492FQzwmB','getUniqueId','3323509Hpyate','5884xOWvuM','getBrand','895938PPaKMg','20123sKRotL','getBundleId','getBuildNumber','3722552STHKXS','floor','getSystemVersion','isTablet','2400VfvoyR','object','getDeviceType','getDeviceId','645hKdvHS','getUniqueID','getModel','function','now','5ThRSQK','514882acMxoO'];a0a=function a0a(){return t;};return a0a();}var getUniqueID=exports.getUniqueID=function(){var _ref=(0,_asyncToGenerator2.default)(function*(){var j=a0g;if(_reactNativeDeviceInfo.default[j(0x147)])return typeof _reactNativeDeviceInfo.default[j(0x147)]()==='object'?yield _reactNativeDeviceInfo.default['getUniqueID']():_reactNativeDeviceInfo.default[j(0x147)]();return typeof _reactNativeDeviceInfo.default['getUniqueId']()===j(0x143)?yield _reactNativeDeviceInfo.default[j(0x150)]():_reactNativeDeviceInfo.default[j(0x150)]();});return function getUniqueID(){return _ref.apply(this,arguments);};}();var getSystemVersion=exports.getSystemVersion=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(){var k=a0g;return typeof _reactNativeDeviceInfo.default[k(0x140)]()===k(0x143)?yield _reactNativeDeviceInfo.default[k(0x140)]():_reactNativeDeviceInfo.default[k(0x140)]();});return function getSystemVersion(){return _ref2.apply(this,arguments);};}();var getVersion=exports.getVersion=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(){var l=a0g;return typeof _reactNativeDeviceInfo.default['getVersion']()===l(0x143)?yield _reactNativeDeviceInfo.default[l(0x14d)]():_reactNativeDeviceInfo.default[l(0x14d)]();});return function getVersion(){return _ref3.apply(this,arguments);};}();var getBuildNumber=exports.getBuildNumber=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(){var m=a0g;return typeof _reactNativeDeviceInfo.default[m(0x13d)]()===m(0x143)?yield _reactNativeDeviceInfo.default[m(0x13d)]():_reactNativeDeviceInfo.default[m(0x13d)]();});return function getBuildNumber(){return _ref4.apply(this,arguments);};}();var getModel=exports.getModel=function(){var _ref5=(0,_asyncToGenerator2.default)(function*(){var n=a0g;return typeof _reactNativeDeviceInfo.default[n(0x148)]()===n(0x143)?yield _reactNativeDeviceInfo.default[n(0x148)]():_reactNativeDeviceInfo.default[n(0x148)]();});return function getModel(){return _ref5.apply(this,arguments);};}();var getBundleId=exports.getBundleId=function(){var _ref6=(0,_asyncToGenerator2.default)(function*(){var o=a0g;return typeof _reactNativeDeviceInfo.default[o(0x13c)]()===o(0x143)?yield _reactNativeDeviceInfo.default[o(0x13c)]():_reactNativeDeviceInfo.default[o(0x13c)]();});return function getBundleId(){return _ref6.apply(this,arguments);};}();var getManufacturer=exports.getManufacturer=function(){var _ref7=(0,_asyncToGenerator2.default)(function*(){var p=a0g;return typeof _reactNativeDeviceInfo.default[p(0x14e)]()===p(0x143)?yield _reactNativeDeviceInfo.default[p(0x14e)]():_reactNativeDeviceInfo.default[p(0x14e)]();});return function getManufacturer(){return _ref7.apply(this,arguments);};}();var getDeviceType=exports.getDeviceType=function(){var _ref8=(0,_asyncToGenerator2.default)(function*(){var q=a0g;return typeof _reactNativeDeviceInfo.default['getDeviceType']()==='object'?yield _reactNativeDeviceInfo.default[q(0x144)]():_reactNativeDeviceInfo.default[q(0x144)]();});return function getDeviceType(){return _ref8.apply(this,arguments);};}();var getDeviceId=exports.getDeviceId=function(){var _ref9=(0,_asyncToGenerator2.default)(function*(){var r=a0g;return typeof _reactNativeDeviceInfo.default['getDeviceId']()===r(0x143)?yield _reactNativeDeviceInfo.default[r(0x145)]():_reactNativeDeviceInfo.default['getDeviceId']();});return function getDeviceId(){return _ref9.apply(this,arguments);};}();var getBrand=exports.getBrand=function(){var _ref10=(0,_asyncToGenerator2.default)(function*(){var s=a0g;return typeof _reactNativeDeviceInfo.default['getBrand']()===s(0x143)?yield _reactNativeDeviceInfo.default[s(0x153)]():_reactNativeDeviceInfo.default[s(0x153)]();});return function getBrand(){return _ref10.apply(this,arguments);};}();
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.getAppHeight=getAppHeight;exports.getAppWidth=getAppWidth;exports.getVersion=exports.getUniqueID=exports.getSystemVersion=exports.getModel=exports.getManufacturer=exports.getDeviceType=exports.getDeviceId=exports.getBundleId=exports.getBuildNumber=exports.getBrand=void 0;exports.h_p16=h_p16;exports.h_p21=h_p21;exports.isNil=isNil;exports.isObject=isObject;exports.sample=sample;exports.w_p=w_p;exports.w_p16=w_p16;exports.w_p21=w_p21;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var _reactNativeDeviceInfo=_interopRequireDefault(require("react-native-device-info"));var a0g=a0b;(function(a,b){var f=a0b,c=a();while(!![]){try{var d=parseInt(f(0x9d))/0x1*(parseInt(f(0x94))/0x2)+-parseInt(f(0x97))/0x3+-parseInt(f(0x8b))/0x4+parseInt(f(0x81))/0x5*(-parseInt(f(0x83))/0x6)+parseInt(f(0x8d))/0x7*(-parseInt(f(0x95))/0x8)+-parseInt(f(0x91))/0x9*(parseInt(f(0x88))/0xa)+parseInt(f(0x85))/0xb;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}})(a0a,0xec71d);var isTablet=typeof _reactNativeDeviceInfo.default['isTablet']()===a0g(0x87)?![]:_reactNativeDeviceInfo.default[a0g(0x8a)](),_Dimensions$a0g=_reactNative.Dimensions[a0g(0x98)](a0g(0x93)),width=_Dimensions$a0g.width,height=_Dimensions$a0g.height;function isObject(a){var h=a0g,b=typeof a;return a!=null&&(b===h(0x87)||b===h(0x8f));}function sample(a){var i=a0g,b=a==null?0x0:a[i(0x9c)],c=Math[i(0x9a)](Date[i(0x96)]()/0x3e8);return b?a[c%b]:undefined;}function isNil(a){return a==null;}function w_p(a,b){return b/0x177*a;}function w_p21(a){return 0x15/0x177*a;}function w_p16(a){return 0x10/0x177*a;}function h_p21(a){return 0x15/0x29b*a;}function h_p16(a){return 0x10/0x29b*a;}function getAppWidth(a){var b=width;return isTablet&&(b=a?0x300:0x177),b;}function getAppHeight(a){var b=height;return isTablet&&(b=a?height*0x3/0x4:0x1c2),b;}function a0a(){var t=['floor','getVersion','length','1613433Krcsjp','getSystemVersion','15DUKGrG','getBuildNumber','224892UjcNvM','getModel','20173824JevjMP','getManufacturer','object','10VTTaur','getBrand','isTablet','3704936MFtWMu','getUniqueID','13349NSEgBJ','getDeviceType','function','getUniqueId','572931TfiLYm','getDeviceId','window','2LddADV','5592zekoGt','now','130824yHKcse','get','getBundleId'];a0a=function a0a(){return t;};return a0a();}var getUniqueID=exports.getUniqueID=function(){var _ref=(0,_asyncToGenerator2.default)(function*(){var j=a0g;if(_reactNativeDeviceInfo.default['getUniqueID'])return typeof _reactNativeDeviceInfo.default[j(0x8c)]()===j(0x87)?yield _reactNativeDeviceInfo.default[j(0x8c)]():_reactNativeDeviceInfo.default[j(0x8c)]();return typeof _reactNativeDeviceInfo.default[j(0x90)]()==='object'?yield _reactNativeDeviceInfo.default['getUniqueId']():_reactNativeDeviceInfo.default[j(0x90)]();});return function getUniqueID(){return _ref.apply(this,arguments);};}();var getSystemVersion=exports.getSystemVersion=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(){var k=a0g;return typeof _reactNativeDeviceInfo.default[k(0x9e)]()===k(0x87)?yield _reactNativeDeviceInfo.default[k(0x9e)]():_reactNativeDeviceInfo.default[k(0x9e)]();});return function getSystemVersion(){return _ref2.apply(this,arguments);};}();function a0b(a,b){var c=a0a();return a0b=function a0b(d,e){d=d-0x81;var f=c[d];return f;},a0b(a,b);}var getVersion=exports.getVersion=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(){var l=a0g;return typeof _reactNativeDeviceInfo.default[l(0x9b)]()==='object'?yield _reactNativeDeviceInfo.default[l(0x9b)]():_reactNativeDeviceInfo.default[l(0x9b)]();});return function getVersion(){return _ref3.apply(this,arguments);};}();var getBuildNumber=exports.getBuildNumber=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(){var m=a0g;return typeof _reactNativeDeviceInfo.default[m(0x82)]()==='object'?yield _reactNativeDeviceInfo.default[m(0x82)]():_reactNativeDeviceInfo.default[m(0x82)]();});return function getBuildNumber(){return _ref4.apply(this,arguments);};}();var getModel=exports.getModel=function(){var _ref5=(0,_asyncToGenerator2.default)(function*(){var n=a0g;return typeof _reactNativeDeviceInfo.default[n(0x84)]()===n(0x87)?yield _reactNativeDeviceInfo.default[n(0x84)]():_reactNativeDeviceInfo.default[n(0x84)]();});return function getModel(){return _ref5.apply(this,arguments);};}();var getBundleId=exports.getBundleId=function(){var _ref6=(0,_asyncToGenerator2.default)(function*(){var o=a0g;return typeof _reactNativeDeviceInfo.default[o(0x99)]()===o(0x87)?yield _reactNativeDeviceInfo.default[o(0x99)]():_reactNativeDeviceInfo.default[o(0x99)]();});return function getBundleId(){return _ref6.apply(this,arguments);};}();var getManufacturer=exports.getManufacturer=function(){var _ref7=(0,_asyncToGenerator2.default)(function*(){var p=a0g;return typeof _reactNativeDeviceInfo.default[p(0x86)]()===p(0x87)?yield _reactNativeDeviceInfo.default['getManufacturer']():_reactNativeDeviceInfo.default[p(0x86)]();});return function getManufacturer(){return _ref7.apply(this,arguments);};}();var getDeviceType=exports.getDeviceType=function(){var _ref8=(0,_asyncToGenerator2.default)(function*(){var q=a0g;return typeof _reactNativeDeviceInfo.default[q(0x8e)]()==='object'?yield _reactNativeDeviceInfo.default[q(0x8e)]():_reactNativeDeviceInfo.default[q(0x8e)]();});return function getDeviceType(){return _ref8.apply(this,arguments);};}();var getDeviceId=exports.getDeviceId=function(){var _ref9=(0,_asyncToGenerator2.default)(function*(){var r=a0g;return typeof _reactNativeDeviceInfo.default[r(0x92)]()===r(0x87)?yield _reactNativeDeviceInfo.default[r(0x92)]():_reactNativeDeviceInfo.default['getDeviceId']();});return function getDeviceId(){return _ref9.apply(this,arguments);};}();var getBrand=exports.getBrand=function(){var _ref10=(0,_asyncToGenerator2.default)(function*(){var s=a0g;return typeof _reactNativeDeviceInfo.default['getBrand']()===s(0x87)?yield _reactNativeDeviceInfo.default[s(0x89)]():_reactNativeDeviceInfo.default[s(0x89)]();});return function getBrand(){return _ref10.apply(this,arguments);};}();
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.myAxiosPost=exports.myAxiosGet=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var _axios=_interopRequireDefault(require("axios"));var _reactNativeEncryptedStorage=_interopRequireDefault(require("react-native-encrypted-storage"));var _cryptoJs=_interopRequireDefault(require("crypto-js"));var _const=require("./const");var _=_interopRequireWildcard(require("./MyFunction"));function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var timestamp_delta=null;var myAxiosGet=exports.myAxiosGet=function(){var _ref=(0,_asyncToGenerator2.default)(function*(url){try{var response=yield _axios.default.get(url);return response;}catch(error){throw new Error(error);}});return function myAxiosGet(_x){return _ref.apply(this,arguments);};}();var myAxiosPost=exports.myAxiosPost=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(_api_path,dataInput,options){var shouldRetry=arguments.length>3&&arguments[3]!==undefined?arguments[3]:true;var _0x39e495=_0x1bc4;(function(_0x571739,_0x2a24cb){var _0xa78b96=_0x1bc4,_0x50119d=_0x571739();while(!![]){try{var _0x41ed73=parseInt(_0xa78b96(0x1ce))/0x1*(parseInt(_0xa78b96(0x1cc))/0x2)+-parseInt(_0xa78b96(0x1c3))/0x3+parseInt(_0xa78b96(0x1c8))/0x4+-parseInt(_0xa78b96(0x1c1))/0x5+-parseInt(_0xa78b96(0x1c0))/0x6+-parseInt(_0xa78b96(0x1c4))/0x7*(parseInt(_0xa78b96(0x1d8))/0x8)+-parseInt(_0xa78b96(0x1d1))/0x9*(-parseInt(_0xa78b96(0x1c9))/0xa);if(_0x41ed73===_0x2a24cb)break;else _0x50119d['push'](_0x50119d['shift']());}catch(_0x381449){_0x50119d['push'](_0x50119d['shift']());}}})(_0x3dfc,0xf36ba);if(!_['isObject'](dataInput))return console[_0x39e495(0x1c2)](_0x39e495(0x1dc)),![];var api_path=_api_path;if(api_path[_0x39e495(0x1bd)]('/'))api_path=api_path[_0x39e495(0x1da)](0x1);var API_URL='https://aia-dfs.originally.us/backend';function _0x3dfc(){var _0x3ae766=['includes','VlAI2Q1FDHvASMhqTXe0','6807000jepNmU','2760850CRDsyo','getBundleId','random','20170zNldNl','headers','49YAPRRF','getDeviceId','AppleLocale','81maqnrX','SettingsManager','getManufacturer','AppleLanguages','getDeviceType','Ij8Ji87IpdZTXSw1kAFV','floor','32oLKBbZ','rNwrNi5Iw36epJS9gprO','substring','sample','Data\x20must\x20be\x20an\x20object','getItem','settings','if-matched','ios','localeIdentifier','application/json','round','startsWith','SHA256','994','4776246VQsvqo','9768040CcQvSf','log','2790291VyPNtR','6797jquTHH','getBuildNumber'];_0x3dfc=function _0x3dfc(){return _0x3ae766;};return _0x3dfc();}var url=API_URL+'/'+_[_0x39e495(0x1db)]([_0x39e495(0x1c7),_0x39e495(0x1d9),_0x39e495(0x1d6)]);if(timestamp_delta===null)timestamp_delta=yield _reactNativeEncryptedStorage.default[_0x39e495(0x1dd)]('@qwsdcvzsdf');function _0x1bc4(_0x39c27d,_0x51cc46){var _0x3dfc98=_0x3dfc();return _0x1bc4=function _0x1bc4(_0x1bc4e2,_0x46b791){_0x1bc4e2=_0x1bc4e2-0x1bc;var _0x460ace=_0x3dfc98[_0x1bc4e2];return _0x460ace;},_0x1bc4(_0x39c27d,_0x51cc46);}var device_timestamp=Math[_0x39e495(0x1bc)](new Date()['getTime']()/0x3e8),server_timestamp=device_timestamp-timestamp_delta,x_server_timestamp=_cryptoJs.default[_0x39e495(0x1be)]('Ω'+server_timestamp+_0x39e495(0x1bf));if(!url[_0x39e495(0x1c6)](api_path)){if(Math[_0x39e495(0x1d7)](Math[_0x39e495(0x1cb)]()*0xa)%0x2)api_path=_cryptoJs.default[_0x39e495(0x1be)]('∑'+api_path+(server_timestamp+0xbc9-0x119*0x3+0x126/0x3)+'∆');else api_path=_cryptoJs.default[_0x39e495(0x1be)]('©'+api_path+(server_timestamp+0x12db+0x1f*0x1a-0xda/0x2)+'®');}var sdfg='last-modify',plkm='if-non-matched',oijnb=_0x39e495(0x1df),deviceLanguage=_reactNative.Platform['OS']===_0x39e495(0x1e0)?_reactNative.NativeModules[_0x39e495(0x1d2)][_0x39e495(0x1de)][_0x39e495(0x1d0)]||_reactNative.NativeModules[_0x39e495(0x1d2)][_0x39e495(0x1de)][_0x39e495(0x1d4)][0x0]:_reactNative.NativeModules['I18nManager'][_0x39e495(0x1e1)];var headers={'Access-Control-Allow-Origin':'*','Content-Type':_0x39e495(0x1e2),'X-Device-Uuid':yield _['getUniqueID'](),'X-OS':_reactNative.Platform['OS'],'X-OS-Version':yield _['getSystemVersion'](),'X-App-Version':yield _['getVersion'](),'X-Build-Number':yield _[_0x39e495(0x1c5)](),'X-Device-Model':yield _[_0x39e495(0x1cf)](),'X-Package-Id':yield _[_0x39e495(0x1ca)](),'X-System-Lang':deviceLanguage,'X-Sdk-Platform':'rn','X-Device-Manufacturer':yield yield _[_0x39e495(0x1d3)](),'X-Device-Type':yield _[_0x39e495(0x1d5)](),'X-Version':_const.XVersion};(options==null?void 0:options[_0x39e495(0x1cd)])&&(headers=Object.assign({},headers,options==null?void 0:options[_0x39e495(0x1cd)]));headers[sdfg]=''+server_timestamp,headers[plkm]=''+x_server_timestamp,headers[oijnb]=''+api_path;var customData=Object.assign({},dataInput,{device_uuid:yield _.getUniqueID(),os_type:_reactNative.Platform.OS,os_version:yield _.getSystemVersion(),app_version:yield _.getVersion(),build_number:yield _.getBuildNumber(),model:yield _.getDeviceId(),manufacturer:yield _.getBrand()});try{var _response,_response$_0x4a832d,_response3,_response4,_response5;var _0x=function _0x1450(){var _0x25298f=['33033DzGTdn','1613272aFnmwW','sdf','348704zWHHWA','getT','779980IgQuZu','@qws','setI','14FOtkvP','6bKTKSY','232002PFxpEb','pars','isNi','268988qeSaIg','dcvz','body','ime','788460SNebMt','Stri','roun','data','18NUakfJ'];_0x=function _0x1450(){return _0x25298f;};return _0x();};var _0x4d=function _0x4d88(_0x29cee2,_0x2affe7){var _0x14504c=_0x();return _0x4d=function _0x4d88(_0x4d880d,_0x50a90b){_0x4d880d=_0x4d880d-0x151;var _0x25bad7=_0x14504c[_0x4d880d];return _0x25bad7;},_0x4d(_0x29cee2,_0x2affe7);};var _0x4a832d=_0x4d;(function(_0x2e9261,_0x2647f7){var _0x4dcd7a=_0x4d,_0x4ab44e=_0x2e9261();while(!![]){try{var _0x2fd8ce=-parseInt(_0x4dcd7a(0x15f))/0x1+-parseInt(_0x4dcd7a(0x162))/0x2+-parseInt(_0x4dcd7a(0x152))/0x3*(-parseInt(_0x4dcd7a(0x156))/0x4)+parseInt(_0x4dcd7a(0x164))/0x5+-parseInt(_0x4dcd7a(0x153))/0x6*(-parseInt(_0x4dcd7a(0x151))/0x7)+-parseInt(_0x4dcd7a(0x160))/0x8+-parseInt(_0x4dcd7a(0x15e))/0x9*(-parseInt(_0x4dcd7a(0x15a))/0xa);if(_0x2fd8ce===_0x2647f7)break;else _0x4ab44e['push'](_0x4ab44e['shift']());}catch(_0x8d2280){_0x4ab44e['push'](_0x4ab44e['shift']());}}})(_0x,0x1c6f8);var response=yield _axios.default['post'](url,customData,{headers:headers});!_[_0x4a832d(0x155)+'l'](response['body'+'Stri'+'ng'])&&(response[_0x4a832d(0x15d)]=JSON[_0x4a832d(0x154)+'e'](response[_0x4a832d(0x158)+_0x4a832d(0x15b)+'ng']));if((_response=response)!=null&&(_response$_0x4a832d=_response[_0x4a832d(0x15d)])!=null&&_response$_0x4a832d['time'+'stam'+'p']){var _response2,_response2$_0x4a832d;var tmp_device_timestamp=Math[_0x4a832d(0x15c)+'d'](new Date()[_0x4a832d(0x163)+_0x4a832d(0x159)]()/0x3e8),tmp_server_timestamp=(_response2=response)==null?void 0:(_response2$_0x4a832d=_response2[_0x4a832d(0x15d)])==null?void 0:_response2$_0x4a832d['time'+'stam'+'p'];timestamp_delta=tmp_device_timestamp-tmp_server_timestamp,yield _reactNativeEncryptedStorage.default[_0x4a832d(0x166)+'tem'](_0x4a832d(0x165)+_0x4a832d(0x157)+_0x4a832d(0x161),''+timestamp_delta);}((_response3=response)==null?void 0:_response3['data'])&&shouldRetry&&(((_response4=response)==null?void 0:_response4[_0x4a832d(0x15d)]['🍩'])||((_response5=response)==null?void 0:_response5[_0x4a832d(0x15d)]['🎧']))&&(response=yield myAxiosPost(_api_path,dataInput,options,![]));return response;}catch(error){var _error$response;if(!_.isNil(error==null?void 0:(_error$response=error.response)==null?void 0:_error$response.data)){var _error$response2;return error==null?void 0:(_error$response2=error.response)==null?void 0:_error$response2.data;}return error;}});return function myAxiosPost(_x2,_x3,_x4){return _ref2.apply(this,arguments);};}();
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.myAxiosPost=exports.myAxiosGet=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _reactNative=require("react-native");var _axios=_interopRequireDefault(require("axios"));var _reactNativeEncryptedStorage=_interopRequireDefault(require("react-native-encrypted-storage"));var _cryptoJs=_interopRequireDefault(require("crypto-js"));var _const=require("./const");var _=_interopRequireWildcard(require("./MyFunction"));function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var timestamp_delta=null;var myAxiosGet=exports.myAxiosGet=function(){var _ref=(0,_asyncToGenerator2.default)(function*(url){try{var response=yield _axios.default.get(url);return response;}catch(error){throw new Error(error);}});return function myAxiosGet(_x){return _ref.apply(this,arguments);};}();var _myAxiosPost=exports.myAxiosPost=function(){var _ref2=(0,_asyncToGenerator2.default)(function*(_api_path,dataInput,options){var shouldRetry=arguments.length>3&&arguments[3]!==undefined?arguments[3]:true;var _0x39e495=_0x1bc4;(function(_0x571739,_0x2a24cb){var _0xa78b96=_0x1bc4,_0x50119d=_0x571739();while(!![]){try{var _0x41ed73=parseInt(_0xa78b96(0x1ce))/0x1*(parseInt(_0xa78b96(0x1cc))/0x2)+-parseInt(_0xa78b96(0x1c3))/0x3+parseInt(_0xa78b96(0x1c8))/0x4+-parseInt(_0xa78b96(0x1c1))/0x5+-parseInt(_0xa78b96(0x1c0))/0x6+-parseInt(_0xa78b96(0x1c4))/0x7*(parseInt(_0xa78b96(0x1d8))/0x8)+-parseInt(_0xa78b96(0x1d1))/0x9*(-parseInt(_0xa78b96(0x1c9))/0xa);if(_0x41ed73===_0x2a24cb)break;else _0x50119d['push'](_0x50119d['shift']());}catch(_0x381449){_0x50119d['push'](_0x50119d['shift']());}}})(_0x3dfc,0xf36ba);if(!_['isObject'](dataInput))return console[_0x39e495(0x1c2)](_0x39e495(0x1dc)),![];var api_path=_api_path;if(api_path[_0x39e495(0x1bd)]('/'))api_path=api_path[_0x39e495(0x1da)](0x1);var API_URL='https://aia-dfs.originally.us/backend';function _0x3dfc(){var _0x3ae766=['includes','VlAI2Q1FDHvASMhqTXe0','6807000jepNmU','2760850CRDsyo','getBundleId','random','20170zNldNl','headers','49YAPRRF','getDeviceId','AppleLocale','81maqnrX','SettingsManager','getManufacturer','AppleLanguages','getDeviceType','Ij8Ji87IpdZTXSw1kAFV','floor','32oLKBbZ','rNwrNi5Iw36epJS9gprO','substring','sample','Data\x20must\x20be\x20an\x20object','getItem','settings','if-matched','ios','localeIdentifier','application/json','round','startsWith','SHA256','994','4776246VQsvqo','9768040CcQvSf','log','2790291VyPNtR','6797jquTHH','getBuildNumber'];_0x3dfc=function _0x3dfc(){return _0x3ae766;};return _0x3dfc();}var url=API_URL+'/'+_[_0x39e495(0x1db)]([_0x39e495(0x1c7),_0x39e495(0x1d9),_0x39e495(0x1d6)]);if(timestamp_delta===null)timestamp_delta=yield _reactNativeEncryptedStorage.default[_0x39e495(0x1dd)]('@qwsdcvzsdf');function _0x1bc4(_0x39c27d,_0x51cc46){var _0x3dfc98=_0x3dfc();return _0x1bc4=function _0x1bc4(_0x1bc4e2,_0x46b791){_0x1bc4e2=_0x1bc4e2-0x1bc;var _0x460ace=_0x3dfc98[_0x1bc4e2];return _0x460ace;},_0x1bc4(_0x39c27d,_0x51cc46);}var device_timestamp=Math[_0x39e495(0x1bc)](new Date()['getTime']()/0x3e8),server_timestamp=device_timestamp-timestamp_delta,x_server_timestamp=_cryptoJs.default[_0x39e495(0x1be)]('Ω'+server_timestamp+_0x39e495(0x1bf));if(!url[_0x39e495(0x1c6)](api_path)){if(Math[_0x39e495(0x1d7)](Math[_0x39e495(0x1cb)]()*0xa)%0x2)api_path=_cryptoJs.default[_0x39e495(0x1be)]('∑'+api_path+(server_timestamp+0xbc9-0x119*0x3+0x126/0x3)+'∆');else api_path=_cryptoJs.default[_0x39e495(0x1be)]('©'+api_path+(server_timestamp+0x12db+0x1f*0x1a-0xda/0x2)+'®');}var sdfg='last-modify',plkm='if-non-matched',oijnb=_0x39e495(0x1df),deviceLanguage=_reactNative.Platform['OS']===_0x39e495(0x1e0)?_reactNative.NativeModules[_0x39e495(0x1d2)][_0x39e495(0x1de)][_0x39e495(0x1d0)]||_reactNative.NativeModules[_0x39e495(0x1d2)][_0x39e495(0x1de)][_0x39e495(0x1d4)][0x0]:_reactNative.NativeModules['I18nManager'][_0x39e495(0x1e1)];var headers={'Access-Control-Allow-Origin':'*','Content-Type':_0x39e495(0x1e2),'X-Device-Uuid':yield _['getUniqueID'](),'X-OS':_reactNative.Platform['OS'],'X-OS-Version':yield _['getSystemVersion'](),'X-App-Version':yield _['getVersion'](),'X-Build-Number':yield _[_0x39e495(0x1c5)](),'X-Device-Model':yield _[_0x39e495(0x1cf)](),'X-Package-Id':yield _[_0x39e495(0x1ca)](),'X-System-Lang':deviceLanguage,'X-Sdk-Platform':'rn','X-Device-Manufacturer':yield yield _[_0x39e495(0x1d3)](),'X-Device-Type':yield _[_0x39e495(0x1d5)](),'X-Version':_const.XVersion,'X_Version_Npm':_const.X_Version_Npm};(options==null?void 0:options[_0x39e495(0x1cd)])&&(headers=Object.assign({},headers,options==null?void 0:options[_0x39e495(0x1cd)]));headers[sdfg]=''+server_timestamp,headers[plkm]=''+x_server_timestamp,headers[oijnb]=''+api_path;var customData=Object.assign({},dataInput,{device_uuid:yield _.getUniqueID(),os_type:_reactNative.Platform.OS,os_version:yield _.getSystemVersion(),app_version:yield _.getVersion(),build_number:yield _.getBuildNumber(),model:yield _.getDeviceId(),manufacturer:yield _.getBrand()});try{var _response,_response$_0x4a832d,_response3,_response4,_response5;var _0x=function _0x1450(){var _0x25298f=['33033DzGTdn','1613272aFnmwW','sdf','348704zWHHWA','getT','779980IgQuZu','@qws','setI','14FOtkvP','6bKTKSY','232002PFxpEb','pars','isNi','268988qeSaIg','dcvz','body','ime','788460SNebMt','Stri','roun','data','18NUakfJ'];_0x=function _0x1450(){return _0x25298f;};return _0x();};var _0x4d=function _0x4d88(_0x29cee2,_0x2affe7){var _0x14504c=_0x();return _0x4d=function _0x4d88(_0x4d880d,_0x50a90b){_0x4d880d=_0x4d880d-0x151;var _0x25bad7=_0x14504c[_0x4d880d];return _0x25bad7;},_0x4d(_0x29cee2,_0x2affe7);};var _0x4a832d=_0x4d;(function(_0x2e9261,_0x2647f7){var _0x4dcd7a=_0x4d,_0x4ab44e=_0x2e9261();while(!![]){try{var _0x2fd8ce=-parseInt(_0x4dcd7a(0x15f))/0x1+-parseInt(_0x4dcd7a(0x162))/0x2+-parseInt(_0x4dcd7a(0x152))/0x3*(-parseInt(_0x4dcd7a(0x156))/0x4)+parseInt(_0x4dcd7a(0x164))/0x5+-parseInt(_0x4dcd7a(0x153))/0x6*(-parseInt(_0x4dcd7a(0x151))/0x7)+-parseInt(_0x4dcd7a(0x160))/0x8+-parseInt(_0x4dcd7a(0x15e))/0x9*(-parseInt(_0x4dcd7a(0x15a))/0xa);if(_0x2fd8ce===_0x2647f7)break;else _0x4ab44e['push'](_0x4ab44e['shift']());}catch(_0x8d2280){_0x4ab44e['push'](_0x4ab44e['shift']());}}})(_0x,0x1c6f8);var response=yield _axios.default['post'](url,customData,{headers:headers});!_[_0x4a832d(0x155)+'l'](response['body'+'Stri'+'ng'])&&(response[_0x4a832d(0x15d)]=JSON[_0x4a832d(0x154)+'e'](response[_0x4a832d(0x158)+_0x4a832d(0x15b)+'ng']));if((_response=response)!=null&&(_response$_0x4a832d=_response[_0x4a832d(0x15d)])!=null&&_response$_0x4a832d['time'+'stam'+'p']){var _response2,_response2$_0x4a832d;var tmp_device_timestamp=Math[_0x4a832d(0x15c)+'d'](new Date()[_0x4a832d(0x163)+_0x4a832d(0x159)]()/0x3e8),tmp_server_timestamp=(_response2=response)==null?void 0:(_response2$_0x4a832d=_response2[_0x4a832d(0x15d)])==null?void 0:_response2$_0x4a832d['time'+'stam'+'p'];timestamp_delta=tmp_device_timestamp-tmp_server_timestamp,yield _reactNativeEncryptedStorage.default[_0x4a832d(0x166)+'tem'](_0x4a832d(0x165)+_0x4a832d(0x157)+_0x4a832d(0x161),''+timestamp_delta);}((_response3=response)==null?void 0:_response3['data'])&&shouldRetry&&(((_response4=response)==null?void 0:_response4[_0x4a832d(0x15d)]['🍩'])||((_response5=response)==null?void 0:_response5[_0x4a832d(0x15d)]['🎧']))&&(response=yield _myAxiosPost(_api_path,dataInput,options,![]));return response;}catch(error){var _error$response;if(!_.isNil(error==null?void 0:(_error$response=error.response)==null?void 0:_error$response.data)){var _error$response2;return error==null?void 0:(_error$response2=error.response)==null?void 0:_error$response2.data;}return error;}});return function myAxiosPost(_x2,_x3,_x4){return _ref2.apply(this,arguments);};}();
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.getStatusBarHeight=getStatusBarHeight;exports.isIPhoneXMax=exports.isIPhoneX=exports.isIPhoneWithMonobrow=exports.isIPhone12Max=exports.isIPhone12=exports.isExpo=void 0;var _reactNative=require("react-native");var STATUSBAR_DEFAULT_HEIGHT=20;var STATUSBAR_X_HEIGHT=44;var STATUSBAR_IP12_HEIGHT=47;var STATUSBAR_IP12MAX_HEIGHT=47;var X_WIDTH=375;var X_HEIGHT=812;var XSMAX_WIDTH=414;var XSMAX_HEIGHT=896;var IP12_WIDTH=390;var IP12_HEIGHT=844;var IP12MAX_WIDTH=428;var IP12MAX_HEIGHT=926;var _Dimensions$get=_reactNative.Dimensions.get("window"),W_HEIGHT=_Dimensions$get.height,W_WIDTH=_Dimensions$get.width;var statusBarHeight=STATUSBAR_DEFAULT_HEIGHT;var isIPhoneX_v=false;var isIPhoneXMax_v=false;var isIPhone12_v=false;var isIPhone12Max_v=false;var isIPhoneWithMonobrow_v=false;if(_reactNative.Platform.OS==="ios"&&!_reactNative.Platform.isPad&&!_reactNative.Platform.isTVOS){if(W_WIDTH===X_WIDTH&&W_HEIGHT===X_HEIGHT){isIPhoneWithMonobrow_v=true;isIPhoneX_v=true;statusBarHeight=STATUSBAR_X_HEIGHT;}else if(W_WIDTH===XSMAX_WIDTH&&W_HEIGHT===XSMAX_HEIGHT){isIPhoneWithMonobrow_v=true;isIPhoneXMax_v=true;statusBarHeight=STATUSBAR_X_HEIGHT;}else if(W_WIDTH===IP12_WIDTH&&W_HEIGHT===IP12_HEIGHT){isIPhoneWithMonobrow_v=true;isIPhone12_v=true;statusBarHeight=STATUSBAR_IP12_HEIGHT;}else if(W_WIDTH===IP12MAX_WIDTH&&W_HEIGHT===IP12MAX_HEIGHT){isIPhoneWithMonobrow_v=true;isIPhone12Max_v=true;statusBarHeight=STATUSBAR_IP12MAX_HEIGHT;}}var isIPhoneX=exports.isIPhoneX=function isIPhoneX(){return isIPhoneX_v;};var isIPhoneXMax=exports.isIPhoneXMax=function isIPhoneXMax(){return isIPhoneXMax_v;};var isIPhone12=exports.isIPhone12=function isIPhone12(){return isIPhone12_v;};var isIPhone12Max=exports.isIPhone12Max=function isIPhone12Max(){return isIPhone12Max_v;};var isIPhoneWithMonobrow=exports.isIPhoneWithMonobrow=function isIPhoneWithMonobrow(){return isIPhoneWithMonobrow_v;};var getExpoRoot=function getExpoRoot(){return global.Expo||global.__expo||global.__exponent;};var isExpo=exports.isExpo=function isExpo(){return getExpoRoot()!==undefined;};function getStatusBarHeight(skipAndroid){return _reactNative.Platform.select({ios:statusBarHeight,android:skipAndroid?0:_reactNative.StatusBar.currentHeight,default:0});}
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.getStatusBarHeight=getStatusBarHeight;exports.isIPhoneXMax=exports.isIPhoneX=exports.isIPhoneWithMonobrow=exports.isIPhone12Max=exports.isIPhone12=exports.isExpo=void 0;var _reactNative=require("react-native");var STATUSBAR_DEFAULT_HEIGHT=20;var STATUSBAR_X_HEIGHT=44;var STATUSBAR_IP12_HEIGHT=47;var STATUSBAR_IP12MAX_HEIGHT=47;var X_WIDTH=375;var X_HEIGHT=812;var XSMAX_WIDTH=414;var XSMAX_HEIGHT=896;var IP12_WIDTH=390;var IP12_HEIGHT=844;var IP12MAX_WIDTH=428;var IP12MAX_HEIGHT=926;var _Dimensions$get=_reactNative.Dimensions.get('window'),W_HEIGHT=_Dimensions$get.height,W_WIDTH=_Dimensions$get.width;var statusBarHeight=STATUSBAR_DEFAULT_HEIGHT;var isIPhoneX_v=false;var isIPhoneXMax_v=false;var isIPhone12_v=false;var isIPhone12Max_v=false;var isIPhoneWithMonobrow_v=false;if(_reactNative.Platform.OS==='ios'&&!_reactNative.Platform.isPad&&!_reactNative.Platform.isTVOS){if(W_WIDTH===X_WIDTH&&W_HEIGHT===X_HEIGHT){isIPhoneWithMonobrow_v=true;isIPhoneX_v=true;statusBarHeight=STATUSBAR_X_HEIGHT;}else if(W_WIDTH===XSMAX_WIDTH&&W_HEIGHT===XSMAX_HEIGHT){isIPhoneWithMonobrow_v=true;isIPhoneXMax_v=true;statusBarHeight=STATUSBAR_X_HEIGHT;}else if(W_WIDTH===IP12_WIDTH&&W_HEIGHT===IP12_HEIGHT){isIPhoneWithMonobrow_v=true;isIPhone12_v=true;statusBarHeight=STATUSBAR_IP12_HEIGHT;}else if(W_WIDTH===IP12MAX_WIDTH&&W_HEIGHT===IP12MAX_HEIGHT){isIPhoneWithMonobrow_v=true;isIPhone12Max_v=true;statusBarHeight=STATUSBAR_IP12MAX_HEIGHT;}}var isIPhoneX=exports.isIPhoneX=function isIPhoneX(){return isIPhoneX_v;};var isIPhoneXMax=exports.isIPhoneXMax=function isIPhoneXMax(){return isIPhoneXMax_v;};var isIPhone12=exports.isIPhone12=function isIPhone12(){return isIPhone12_v;};var isIPhone12Max=exports.isIPhone12Max=function isIPhone12Max(){return isIPhone12Max_v;};var isIPhoneWithMonobrow=exports.isIPhoneWithMonobrow=function isIPhoneWithMonobrow(){return isIPhoneWithMonobrow_v;};var getExpoRoot=function getExpoRoot(){return global.Expo||global.__expo||global.__exponent;};var isExpo=exports.isExpo=function isExpo(){return getExpoRoot()!==undefined;};function getStatusBarHeight(skipAndroid){return _reactNative.Platform.select({ios:statusBarHeight,android:skipAndroid?0:_reactNative.StatusBar.currentHeight,default:0});}
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.widthScreenNonIntr=exports.widthScreen=exports.shuffle=exports.mainPaddingVertical=exports.mainPaddingHorizontal=exports.isTablet=exports.heightScreenNonIntr=exports.heightScreen=exports.fontSizePlus=exports.XVersion=exports.Fonts=void 0;var _reactNative=require("react-native");var _reactNativeDeviceInfo=_interopRequireDefault(require("react-native-device-info"));var a0g=a0b;(function(a,b){var f=a0b,c=a();while(!![]){try{var d=parseInt(f(0x13b))/0x1*(-parseInt(f(0x131))/0x2)+-parseInt(f(0x13a))/0x3+-parseInt(f(0x134))/0x4+parseInt(f(0x143))/0x5*(parseInt(f(0x135))/0x6)+parseInt(f(0x13e))/0x7*(parseInt(f(0x137))/0x8)+parseInt(f(0x140))/0x9+parseInt(f(0x139))/0xa*(parseInt(f(0x13f))/0xb);if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}})(a0a,0x80ae5);function a0b(a,b){var c=a0a();return a0b=function a0b(d,e){d=d-0x131;var f=c[d];return f;},a0b(a,b);}var _Dimensions$a0g=_reactNative.Dimensions[a0g(0x141)]('window'),width=_Dimensions$a0g.width,height=_Dimensions$a0g.height,isTablet=exports.isTablet=typeof _reactNativeDeviceInfo.default[a0g(0x133)]()===a0g(0x132)?![]:_reactNativeDeviceInfo.default[a0g(0x133)](),widthScreen=exports.widthScreen=isTablet?0x300:width,heightScreen=exports.heightScreen=isTablet?height*0x3/0x4:height,widthScreenNonIntr=exports.widthScreenNonIntr=isTablet?0x177:width,heightScreenNonIntr=exports.heightScreenNonIntr=isTablet?0x177:height,fontSizePlus=exports.fontSizePlus=0x6;var mainPaddingVertical=exports.mainPaddingVertical=0x10/0x29b*heightScreen,mainPaddingHorizontal=exports.mainPaddingHorizontal=0x15/0x177*widthScreen;height<=0x238&&(exports.mainPaddingVertical=mainPaddingVertical=0xa/0x29b*height);function a0a(){var i=['828860tehhYX','random','AIAEverest-Regular','42vdOsPn','object','isTablet','1813004gnOpDD','12wXpyKN','AIAEverest-Medium','37144njZfBv','AIAEverest-CondensedMedium','10UivusG','3130275CnMYpc','49791oRpHKO','floor','20230502','511JfnBCQ','15648501MLbzpE','8786610HXKnZO','get','AIAEverestBold'];a0a=function a0a(){return i;};return a0a();}width<=0x140&&(exports.mainPaddingHorizontal=mainPaddingHorizontal=0xe/0x177*width);var shuffle=exports.shuffle=function shuffle(a){var h=a0g;var b=a['length'],c,d;while(b!==0x0){d=Math[h(0x13c)](Math[h(0x144)]()*b),b-=0x1,c=a[b],a[b]=a[d],a[d]=c;}return a;};var Fonts=exports.Fonts={'CondensedMedium':{'fontFamily':a0g(0x138)},'Medium':{'fontFamily':a0g(0x136)},'Regular':{'fontFamily':a0g(0x145)},'Bold':{'fontFamily':a0g(0x142)}};var XVersion=exports.XVersion=a0g(0x13d);
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.widthScreenNonIntr=exports.widthScreen=exports.shuffle=exports.mainPaddingVertical=exports.mainPaddingHorizontal=exports.isTablet=exports.heightScreenNonIntr=exports.heightScreen=exports.fontSizePlus=exports.X_Version_Npm=exports.XVersion=exports.Fonts=void 0;var _reactNative=require("react-native");var _reactNativeDeviceInfo=_interopRequireDefault(require("react-native-device-info"));function a0a(){var i=['AIAEverest-Medium','68ehOHRM','AIAEverest-Regular','20250306','173635BXBCjn','206ZPuUqB','4354191BqMwlx','window','AIAEverest-CondensedMedium','get','4364580cEfQpM','3352720scriLB','6010YIPyMl','598434jDwzFa','AIAEverestBold','isTablet','2329104bcZQQL','7KqqWtO','object','length'];a0a=function a0a(){return i;};return a0a();}var a0g=a0b;function a0b(a,b){var c=a0a();return a0b=function a0b(d,e){d=d-0x189;var f=c[d];return f;},a0b(a,b);}(function(a,b){var f=a0b,c=a();while(!![]){try{var d=parseInt(f(0x18c))/0x1*(parseInt(f(0x193))/0x2)+parseInt(f(0x197))/0x3+-parseInt(f(0x19c))/0x4*(parseInt(f(0x18b))/0x5)+parseInt(f(0x194))/0x6*(parseInt(f(0x198))/0x7)+parseInt(f(0x192))/0x8+-parseInt(f(0x18d))/0x9+-parseInt(f(0x191))/0xa;if(d===b)break;else c['push'](c['shift']());}catch(e){c['push'](c['shift']());}}})(a0a,0x6289b);var _Dimensions$a0g=_reactNative.Dimensions[a0g(0x190)](a0g(0x18e)),width=_Dimensions$a0g.width,height=_Dimensions$a0g.height,isTablet=exports.isTablet=typeof _reactNativeDeviceInfo.default[a0g(0x196)]()===a0g(0x199)?![]:_reactNativeDeviceInfo.default['isTablet'](),widthScreen=exports.widthScreen=isTablet?0x300:width,heightScreen=exports.heightScreen=isTablet?height*0x3/0x4:height,widthScreenNonIntr=exports.widthScreenNonIntr=isTablet?0x177:width,heightScreenNonIntr=exports.heightScreenNonIntr=isTablet?0x177:height,fontSizePlus=exports.fontSizePlus=0x6;var mainPaddingVertical=exports.mainPaddingVertical=0x10/0x29b*heightScreen,mainPaddingHorizontal=exports.mainPaddingHorizontal=0x15/0x177*widthScreen;height<=0x238&&(exports.mainPaddingVertical=mainPaddingVertical=0xa/0x29b*height);width<=0x140&&(exports.mainPaddingHorizontal=mainPaddingHorizontal=0xe/0x177*width);var shuffle=exports.shuffle=function shuffle(a){var h=a0g;var b=a[h(0x19a)],c,d;while(b!==0x0){d=Math['floor'](Math['random']()*b),b-=0x1,c=a[b],a[b]=a[d],a[d]=c;}return a;};var Fonts=exports.Fonts={'CondensedMedium':{'fontFamily':a0g(0x18f)},'Medium':{'fontFamily':a0g(0x19b)},'Regular':{'fontFamily':a0g(0x189)},'Bold':{'fontFamily':a0g(0x195)}};var XVersion=exports.XVersion=a0g(0x18a);var X_Version_Npm=exports.X_Version_Npm='3.0.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@originallyus/feedback-rn-sdk",
3
- "version": "2.0.1",
3
+ "version": "3.0.0",
4
4
  "description": "A cross-platform Feedback component for React Native.",
5
5
  "main": "lib/commonjs/index",
6
6
  "react-native": "lib/commonjs/index",
@@ -14,6 +14,9 @@
14
14
  "bugs": {
15
15
  "email": "hello@originallyus.us"
16
16
  },
17
+ "scripts": {
18
+ "prepublishOnly": "sh pre_publish.sh"
19
+ },
17
20
  "devDependencies": {
18
21
  "@babel/runtime": "^7.24.0",
19
22
  "babel-preset-react-native": "^4.0.0",