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,EAAU,EAAS,EAAU,GACrD,OAAO,UAAU,oBAAoB,EAAQ,EAAU,EAAS,EAAU,EAC9E,CAEA,cAAA,CAAe,EAAM,EAAU,EAAS,GACpC,OAAO,UAAU,eAAe,EAAM,EAAU,EAAS,EAC7D,CAEA,eAAA,CAAgB,GACZ,OAAO,UAAU,gBAAgB,EACrC,CAEA,gBAAA,CAAiB,EAAQ,EAAS,EAAa,EAAU,GACrD,OAAO,UAAU,iBAAiB,EAAQ,EAAS,EAAa,EAAU,EAC9E,CAEA,eAAA,CAAgB,EAAQ,EAAS,EAAa,EAAU,EAAS,EAAU,GACvE,OAAO,UAAU,gBAAgB,EAAQ,EAAS,EAAa,EAAU,EAAS,EAAU,EAChG,CAEA,SAAA,GACI,OAAO,UAAU,WACrB,EAIJ,MAAM,OAAS,IAAI,6BACJ","file":"/npm/react-native-espider-engine@1.0.4/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/react-native-espider-engine@1.0.4/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","import {DeviceEventEmitter, NativeEventEmitter, NativeModules, Platform} from 'react-native';\n\nconst { RNEspider } = NativeModules;\n\nclass ESpiderBridge {\n\n    listeners = [];\n\n    constructor() {\n\n        if (Platform.OS == 'ios') {\n            const eventEmitter = new NativeEventEmitter(RNEspider);\n            console.log(eventEmitter, this);\n            eventEmitter.addListener('WorkStart', (props) => this.onWorkStart(props));\n            eventEmitter.addListener('WorkFinish', (props) => this.onWorkFinish(props));\n        }\n        else {\n            DeviceEventEmitter.addListener('WorkStart', (props) => this.onWorkStart(props));\n            DeviceEventEmitter.addListener('WorkFinish', (props) => this.onWorkFinish(props));\n        }\n\n        this.addListener = this.addListener.bind(this);\n        this.removeListener = this.removeListener.bind(this);\n    }\n\n    addListener(l) {\n        this.listeners.push(l);\n    }\n\n    removeListener(l) {\n        if (this.listeners.indexOf(l) >= 0) {\n            this.listeners.splice(this.listeners.indexOf(l), 1);\n        }\n    }\n\n    onWorkStart(param) {\n        console.log(\"onWorkStart\");\n        let data = param;\n        if (typeof(data.json) == \"string\") {\n            data = JSON.parse(param.json);\n        }\n        this.listeners.map((fn) => { fn(\"start\", data); });\n    }\n\n    onWorkFinish(data) {\n        console.log(data);\n        this.listeners.map((fn) => { fn(\"finish\", data); });\n    }\n\n    hasExecute() {\n        return !!RNEspider.execute;\n    }\n\n    hasExecute2() {\n        return !!RNEspider.execute2;\n    }\n\n    execute(data) {\n        return RNEspider.execute(data);\n    }\n\n    execute2(data) {\n        return RNEspider.execute2(data);\n    }\n\n    getS4AccountsByLogin(s4code, username, password) {\n        return RNEspider.getS4AccountsByLogin(s4code, username, password);\n    }\n\n    getS4AccountsByCert(s4code, certPath, keyPath, username, password) {\n        return RNEspider.getS4AccountsByCert(s4code, certPath, keyPath, username, password);\n    }\n\n    oneclickByCert(rows, certPath, keyPath, password) {\n        return RNEspider.oneclickByCert(rows, certPath, keyPath, password);\n    }\n\n    getStocksByJobs(rows) {\n        return RNEspider.getStocksByJobs(rows);\n    }\n\n    validPassByLogin(s4code, account, accountPass, username, password) {\n        return RNEspider.validPassByLogin(s4code, account, accountPass, username, password);\n    }\n\n    validPassByCert(s4code, account, accountPass, certPath, keyPath, username, password) {\n        return RNEspider.validPassByCert(s4code, account, accountPass, certPath, keyPath, username, password);\n    }\n\n    cancelJob() {\n        return RNEspider.cancelJob();\n    }\n\n}\n\nconst bridge = new ESpiderBridge();\nexport default bridge;\n"]}