"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");exports.__esModule=!0,exports.c2p=c2p,exports.p2c=p2c;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));function p2c(e){return function(t){var n=t.success,r=t.fail,u=t.complete;e(t).then((function(e){n&&n(e)})).catch((function(e){r&&r(e)})).finally((function(){u&&u()}))}}function c2p(e,t){if(e)return function(n){return"function"==typeof n||t.includes("Sync")||t.startsWith("create")?e(n):new Promise((function(t,r){e((0,_extends2.default)({},n,{success:function(e){t(e)},fail:function(e){r(e)}}))}))}}