/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */


define("text!Magento_Captcha/template/checkout/captcha.html",[],function(){return'\x3c!--\n/**\n * Copyright © Magento, Inc. All rights reserved.\n * See COPYING.txt for license details.\n */\n--\x3e\n<input name="captcha_form_id" type="hidden" data-bind="value: formId,  attr: {\'data-scope\': dataScope}" />\n\x3c!-- ko if: (isRequired() && getIsVisible())--\x3e\n<div class="field captcha required" data-bind="blockLoader: getIsLoading()">\n    <label data-bind="attr: {for: \'captcha_\' + formId}" class="label"><span data-bind="i18n: \'Please type the letters and numbers below\'"></span></label>\n    <div class="control captcha">\n        <input name="captcha_string" type="text" class="input-text required-entry" data-bind="value: captchaValue(), attr: {id: \'captcha_\' + formId, \'data-scope\': dataScope}" autocomplete="off"/>\n        <div class="nested">\n            <div class="field captcha no-label">\n                <div class="control captcha-image">\n                    <img data-bind="attr: {\n                                        alt: $t(\'Please type the letters and numbers below\'),\n                                        title: $t(\'Please type the letters and numbers below\'),\n                                        height: imageHeight(),\n                                        src: getImageSource(),\n                                        }"\n                         class="captcha-img"/>\n                    <button type="button" class="action reload captcha-reload" data-bind="attr: {title: $t(\'Reload captcha\')}, click: refresh">\n                        <span data-bind="i18n: \'Reload captcha\'"></span>\n                    </button>\n                </div>\n            </div>\n            \x3c!-- ko if: isCaseSensitive()--\x3e\n            <div class="captcha-note note" data-bind="i18n: \'Attention: Captcha is case sensitive.\'"></div>\n            \x3c!-- /ko --\x3e\n        </div>\n    </div>\n</div>\n\x3c!-- /ko --\x3e\n'}),define("Magento_Catalog/js/price-utils",["jquery","underscore"],function(e,t){"use strict";function i(e,t){return new Array(t+1).join(e)}function a(e,i,a){var n,s,r,o,d="";return i=t.extend(c,i),n=isNaN(i.requiredPrecision=Math.abs(i.requiredPrecision))?2:i.requiredPrecision,s=i.pattern||"%s",r=window.LOCALE||"en-US",void 0===a||!0===a?d=e<0?"-":a?"+":"":!1===a&&(d=""),s=s.indexOf("{sign}")<0?d+s:s.replace("{sign}",d),e=Number(Math.round(Math.abs(+e||0)+"e+"+n)+"e-"+n),o=e.toLocaleString(r,{minimumFractionDigits:n}),s.replace("%s",o).replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function n(e,a,n){var s,r,o,d,p,u,l,h,m,f,g,b,P="";return a=t.extend(c,a),s=isNaN(a.requiredPrecision=Math.abs(a.requiredPrecision))?2:a.requiredPrecision,r=isNaN(a.integerRequired=Math.abs(a.integerRequired))?1:a.integerRequired,o=void 0===a.decimalSymbol?",":a.decimalSymbol,d=void 0===a.groupSymbol?".":a.groupSymbol,p=void 0===a.groupLength?3:a.groupLength,u=a.pattern||"%s",void 0===n||!0===n?P=e<0?"-":n?"+":"":!1===n&&(P=""),u=u.indexOf("{sign}")<0?P+u:u.replace("{sign}",P),l=parseInt(e=Number(Math.round(Math.abs(+e||0)+"e+"+s)+"e-"+s),10)+"",h=l.length<r?r-l.length:0,l=i("0",h)+l,m=l.length>p?l.length%p:0,f=new RegExp("(\\d{"+p+"})(?=\\d)","g"),b=Number(Math.round(Math.abs(e-l)+"e+"+s)+"e-"+s),g=(m?l.substr(0,m)+d:"")+l.substr(m).replace(f,"$1"+d)+(s?o+b.toFixed(s).replace(/-/,0).slice(2):""),u.replace("%s",g).replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function s(e){return JSON.parse(JSON.stringify(e))}function r(t){var i,a,n;return t?(n=e(t).attr("name"),i=-1!==n.indexOf("[")?/\[([^\]]+)?\]/:/_([^\]]+)?_/,(a=i.exec(n)&&i.exec(n)[1])||void 0):a}var c={requiredPrecision:2,integerRequired:1,decimalSymbol:",",groupSymbol:",",groupLength:","};return{formatPriceLocale:a,formatPrice:n,deepClone:s,strPad:i,findOptionId:r}}),define("Magento_Catalog/js/price-box",["jquery","Magento_Catalog/js/price-utils","underscore","mage/template","jquery-ui-modules/widget"],function(e,t,i,a){"use strict";var n={productId:null,priceConfig:null,prices:{},priceTemplate:'<span class="price"><%- data.formatted %></span>'};return e.widget("mage.priceBox",{options:n,qtyInfo:"#qty",_init:function(){this.element.trigger("updatePrice"),this.cache.displayPrices=t.deepClone(this.options.prices)},_create:function(){var t=this.element;this.cache={},this._setDefaultsFromPriceConfig(),this._setDefaultsFromDataSet(),t.on("reloadPrice",this.reloadPrice.bind(this)),t.on("updatePrice",this.onUpdatePrice.bind(this)),e(this.qtyInfo).on("input",this.updateProductTierPrice.bind(this)),t.trigger("price-box-initialized")},onUpdatePrice:function(e,t){return this.updatePrice(t)},updatePrice:function(a){var n,s,r,c=this.cache.displayPrices,o={},d=[];this.cache.additionalPriceObject=this.cache.additionalPriceObject||{},a&&e.extend(this.cache.additionalPriceObject,a),i.isEmpty(o)?i.isEmpty(c)||(d=i.keys(c)):d=i.keys(o),i.each(this.cache.additionalPriceObject,function(e){e&&!i.isEmpty(e)&&(d=i.keys(e)),i.each(d,function(t){n=e[t]||{},n.amount=+n.amount||0,n.adjustments=n.adjustments||{},o[t]=o[t]||{amount:0,adjustments:{}},o[t].amount=0+(o[t].amount||0)+n.amount,i.each(n.adjustments,function(e,i){o[t].adjustments[i]=0+(o[t].adjustments[i]||0)+e})})}),i.isEmpty(o)?this.cache.displayPrices=t.deepClone(this.options.prices):i.each(o,function(e,t){s=this.options.prices[t]||{},r=c[t]||{},e.amount=e.amount||0,s.amount=s.amount||0,s.adjustments=s.adjustments||{},r.adjustments=r.adjustments||{},r.amount=0+s.amount+e.amount,i.each(e.adjustments,function(e,t){r.adjustments[t]=0+(s.adjustments[t]||0)+e})},this),this.element.trigger("priceUpdated",this.cache.displayPrices),this.element.trigger("reloadPrice")},reloadPrice:function(){var n=this.options.priceConfig&&this.options.priceConfig.priceFormat||{},s=a(this.options.priceTemplate);i.each(this.cache.displayPrices,function(a,r){a.final=i.reduce(a.adjustments,function(e,t){return e+t},a.amount),a.formatted=t.formatPriceLocale(a.final,n),e('[data-price-type="'+r+'"]',this.element).html(s({data:a}))},this)},setDefault:function(e){this.cache.displayPrices=t.deepClone(e),this.options.prices=t.deepClone(e)},_setOptions:function(t){return e.extend(!0,this.options,t),"disabled"in t&&this._setOption("disabled",t.disabled),this},_setDefaultsFromDataSet:function(){var t=this.element,a=e("[data-price-type]",t),n=this.options.prices;this.options.productId=t.data("productId"),i.isEmpty(n)&&a.each(function(t,a){var s=e(a).data("priceType"),r=parseFloat(e(a).data("priceAmount"));s&&!i.isNaN(r)&&(n[s]={amount:r})})},_setDefaultsFromPriceConfig:function(){var e=this.options.priceConfig;e&&e.prices&&(this.options.prices=e.prices)},updateProductTierPrice:function(){var e,t={prices:{}};this.options.prices.finalPrice&&(e=this.options.prices.finalPrice.amount,t.prices.finalPrice={amount:this.getPrice("price")-e}),this.options.prices.basePrice&&(e=this.options.prices.basePrice.amount,t.prices.basePrice={amount:this.getPrice("basePrice")-e}),this.updatePrice(t)},getPrice:function(t){var i,a,n,s=e(this.qtyInfo).val();for(n=0;n<this.options.priceConfig.tierPrices.length;n++)a=this.options.priceConfig.tierPrices[n],s>=a.qty&&a[t]&&(i=a[t]);return i}}),e.mage.priceBox}),define("bundles/category-product-cart-checkout",function(){});
//# sourceMappingURL=category-product-cart-checkout.js.map