"use strict";exports.__esModule=!0,exports.default=replacePage;var _invoker=_interopRequireWildcard(require("./invoker"));function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap,a=new WeakMap;return(_getRequireWildcardCache=function(e){return e?a: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 a=_getRequireWildcardCache(r);if(a&&a.has(e))return a.get(e);var t={},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(t,o,i):t[o]=e[o]}return t.default=e,a&&a.set(e,t),t}function replacePageHandler(e,r){var a=r.resolve,t=r.reject,n=r.containerType,o=r.platformType,i=r.appType,c=r.context;if(n){var l=function(){e.onSuccess&&e.onSuccess(),a()},u=function(){e.onFail&&e.onFail(),t()};i===_invoker.API_INVOKER_TYPE.MINI_APP?c&&c({m:"biz.navigation.replace",args:e,onSuccess:l,onFail:u}):o===_invoker.PLATFORM_TYPE_ENUM.ANDROID?c&&c(l,u,"biz.navigation","replace",e):o===_invoker.PLATFORM_TYPE_ENUM.IOS&&c.callHandler("taurus.common.replacePage",Object.assign({},e),(function(){a()}))}else c&&c.call("replacePage",e,(function(){a()}))}function replacePage(e){return _invoker.default.invoke("replacePage",e)}_invoker.default.registerAPI("replacePage",{mini:replacePageHandler,mobile:replacePageHandler}),replacePage.version={android:"1.3.2",ios:"1.3.2"},module.exports=exports.default,module.exports.default=exports.default;