define(["require","exports"],function(e,n){"use strict";function u(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 i(e,n){if(e.indexOf(n)+n.length!==e.length)return 0;n=new Number(e.substr(0,e.length-n.length)).valueOf()*u(n);return n==n?n:0}Object.defineProperty(n,"__esModule",{value:!0});var t=(r.prototype.execute=function(e,t){var r="number"==typeof(e=e.duration)?e==e?e:0:"string"==typeof e?i(e,"d")||i(e,"h")||i(e,"m")||i(e,"s")||i(e,"ms"):"object"==typeof e&&null!==e&&(e=e.value*u(e.unit))==e?e:0;return new Promise(function(e){var n=setTimeout(function(){void 0!==n&&(e({}),n=void 0)},r);t.cancellationToken.finally(function(){void 0!==n&&(clearTimeout(n),n=void 0)})})},r.action="gcx:wf:core::Delay",r.suite="gcx:wf:builtin",r);function r(){}n.Delay=t});