!function(e){"object"==typeof module&&"object"==typeof module.exports?e(require,exports):"function"==typeof define&&define.amd&&define(["require","exports"],e)}(function(e,t){"use strict";function r(e){switch(e){case"d":return 864e5;case"h":return 36e5;case"m":return 6e4;case"s":return 1e3;case"ms":return 1}return 0}function u(e,t){if(e.indexOf(t)+t.length!==e.length)return 0;t=new Number(e.substr(0,e.length-t.length)).valueOf()*r(t);return t==t?t:0}Object.defineProperty(t,"__esModule",{value:!0});var n=(o.prototype.execute=function(e,n){var o="number"==typeof(e=e.duration)?e==e?e:0:"string"==typeof e?u(e,"d")||u(e,"h")||u(e,"m")||u(e,"s")||u(e,"ms"):"object"==typeof e&&null!==e&&(e=e.value*r(e.unit))==e?e:0;return new Promise(function(e){var t=setTimeout(function(){void 0!==t&&(e({}),t=void 0)},o);n.cancellationToken.finally(function(){void 0!==t&&(clearTimeout(t),t=void 0)})})},o.action="gcx:wf:core::Delay",o.suite="gcx:wf:builtin",o);function o(){}t.Delay=n});