"use strict";exports.__esModule=!0,exports.default=startWatchShake;var _invoker=_interopRequireWildcard(require("./invoker"));function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,r&&r.set(e,a),a}function startShakeHandler(e,t){var r=t.resolve,a=t.reject,n=t.context,o=t.containerType,i=t.platformType,u=_invoker.default.registerEvent(_invoker.CONTINUOUS_EVENT_LIST.ON_SHAKE,(function(){e.onSuccess&&e.onSuccess()}));if(o){i===_invoker.PLATFORM_TYPE_ENUM.ANDROID?n&&n((function(t){e.onSuccess&&e.onSuccess(),r()}),(function(e){a()}),"taurus.common","startWatchShake",e):i===_invoker.PLATFORM_TYPE_ENUM.IOS&&n.callHandler("taurus.common.startWatchShake",Object.assign({},e),(function(e){r()}))}else n&&n.call("startWatchShake",e,(function(e){_invoker.default.registerContinuesEvent("shake",u),_invoker.default.handleBridgeResponse(e,r,a)}))}function startWatchShake(e){return _invoker.default.invoke("startWatchShake",e)}_invoker.default.registerAPI("startWatchShake",{mobile:startShakeHandler}),startWatchShake.version={android:"1.6.2",ios:"1.6.2"},module.exports=exports.default,module.exports.default=exports.default;