!function(){"use strict";var n=[];angular.module("webshop.shoppingcart.instantfulfilment",[]).constant("InstantfulfilmentConstants",{FILES:n})}(),function(){angular.module("webshop.shoppingcart.instantfulfilment.templates",[]).run(["$templateCache",function(n){n.put("/sendInstantFulfilmentTemplate",' \n
\n'),n.put("/instantFulfilmentValidationDialogTemplate",' \n Je staat op het punt om te bestellen:
\n \n
\n
\n
{{productDescription}}
\n \n
\n
\n
\n \n \n \n')}])}(),function(){"use strict";function n(n){function t(n,t){var i=n.isordering;i&&e(n),t[0].addEventListener("click",function(){e(n)},!1)}function e(t){var e=t.action||"PROVIDE",i=t.plc,r=t.product,c=t.serviceid;n.validateInstantFulfilment(r).then(function(){return t.isUpdating=!0,n.sendInstantFulfilment(r,e,i,c)})["catch"](angular.noop)["finally"](function(){t.isUpdating=!1})}var i={restrict:"EA",templateUrl:"/sendInstantFulfilmentTemplate",transclude:!0,link:t,scope:{serviceid:"=",product:"=",plc:"@",action:"@?",isordering:"=?"}};return i}n.$inject=["InstantFulfilmentService"],angular.module("webshop.shoppingcart.instantfulfilment").directive("webshopSendInstantFulfilment",n)}(),function(){"use strict";function n(n){function t(t,e){n.emit(t,e)}function e(t,e,i,r){n.emitError(o(t,e,i),r)}function i(t,e,i,r){n.emit(o(t,e,i),r)}function r(t,e){n.emit(t+"-"+e+"-CLOSE-EVENT",{})}function c(t,e,i,r,c){n.listen(o(t,e,i),r,c)}function a(t,e){n.listen(t,e)}function o(n,t,e){return n+"-"+t+"-"+e+"-EVENT"}var s={emitEvent:t,emitOrderErrorEvent:e,emitOrderSuccessEvent:i,emitCancelOrderEvent:r,subscribeToEvent:a,subscribeToOrderEvent:c};return s}n.$inject=["EventService"],angular.module("webshop.shoppingcart.instantfulfilment").factory("InstantFulfilmentEventService",n)}(),function(){"use strict";function n(n,t,e){function i(i,r,a,o){var s=n.defer(),l=t.createEntity(c.fulfilment);return l.value={mpcUuid:i.optionCodeForDescription,chargeConfiguration:{chargeEvent:i.productChargeEvent,chargeCode:i.productChargeCode},plc:a,serviceId:o,action:r},t.saveEntity(l).subscribe(function(n){s.resolve(n.value)},function(n){e.handleMicroServiceError(n)&&s.reject(n)}),s.promise}var r={sendInstantFulfilment:i},c={fulfilment:{url:"/rest/product-options/products/optionorder",rel:"po:optionorder",version:"v1"}};return r._entitiesConfig=c,r}n.$inject=["$q","$entityManager","ErrorService"],angular.module("webshop.shoppingcart.instantfulfilment").factory("InstantFulfilmentRepository",n)}(),function(){"use strict";function n(n,t,e,i,r){function c(e){var i={productDescription:e.name,price:e.price};return s(e,i.price),t.emitInstantFulfilmentValidation(i)["catch"](function(t){return o(e),n.reject(t)})}function a(t,c,a,o){return r.sendInstantFulfilment(t,c,a,o).then(function(n){var r=i.buildBundledProduct(n.product);e.emitOrderSuccessEvent(t.accessNumber,t.optionCodeForDescription,c,r)})["catch"](function(i){return e.emitOrderErrorEvent(t.accessNumber,t.optionCodeForDescription,c,i),n.reject(i)})}function o(n){e.emitCancelOrderEvent(n.accessNumber,n.optionCodeForDescription)}function s(n,t){t&&(t.chargeEvent=n.productChargeEvent,t.isPriceVisible=!0,t.frequency=t.chargeFrequency?t.chargeFrequency:"MON")}var l={validateInstantFulfilment:c,sendInstantFulfilment:a};return l}n.$inject=["$q","EventService","InstantFulfilmentEventService","BundledProductsService","InstantFulfilmentRepository"],angular.module("webshop.shoppingcart.instantfulfilment").factory("InstantFulfilmentService",n)}(),function(){"use strict";function n(n,t,e,i,r){function c(){f.resolve(),t.close()}function a(){f.reject(),t.close()}function o(){return d&&r.showFrequency(d)}function s(){return d&&r.updateCalculatedPrice(d)}function l(){return r.getWebDeal(d)}var u=n;u.isTermsAndconditionsChecked=!1,u.productDescription=e.productDescription,u.cancel=a,u.confirm=c,u.getPrice=s,u.showFrequency=o,u.getWebDeal=l;var d=e.price,f=e.defer}n.$inject=["$scope","DialogService","args","ChargeEventConstants","PriceService"],angular.module("webshop.shoppingcart.instantfulfilment").controller("instantFulfilmentValidationDialogController",n)}();
//# sourceMappingURL=instantfulfilment.webshop.process.js.map