Files
b2b.redline.com.pl/admin086k8e6t9/themes/new-theme/public/customer_address_form.bundle.js
2025-06-24 14:14:35 +02:00

49 lines
14 KiB
JavaScript

window.customer_address_form=function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=468)}({0:function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},1:function(t,e,n){"use strict";e.__esModule=!0;var r=n(19),o=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,o.default)(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()},10:function(t,e,n){var r=n(6),o=n(12);t.exports=n(2)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},11:function(t,e,n){var r=n(4);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},12:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},13:function(t,e,n){var r=n(4);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},141:function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),u=r(o),i=n(1),a=r(i),c=window.$,s=function(){function t(e,n,r){var o=this;(0,u.default)(this,t),this.$countryDniInput=c(n),this.$countryDniInputLabel=c(r),this.$countryInput=c(e),this.countryInputSelectedSelector=e+">option:selected",this.countryDniInputLabelDangerSelector=r+">span.text-danger",this.$countryDniInput.attr("required")||(this.$countryInput.on("change",function(){return o.toggle()}),this.toggle())}return(0,a.default)(t,[{key:"toggle",value:function(){c(this.countryDniInputLabelDangerSelector).remove(),this.$countryDniInput.prop("required",!1),1===parseInt(c(this.countryInputSelectedSelector).attr("need_dni"),10)&&(this.$countryDniInput.prop("required",!0),this.$countryDniInputLabel.prepend(c('<span class="text-danger">*</span>')))}}]),t}();e.default=s},142:function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(67),u=r(o),i=n(0),a=r(i),c=n(1),s=r(c),f=window.$,d=function(){function t(e,n,r){var o=this;return(0,a.default)(this,t),this.$stateSelectionBlock=f(r),this.$countryStateSelector=f(n),this.$countryInput=f(e),this.$countryInput.on("change",function(){return o.change()}),{}}return(0,s.default)(t,[{key:"change",value:function(){var t=this,e=this.$countryInput.val();""!==e&&f.get({url:this.$countryInput.data("states-url"),dataType:"json",data:{id_country:e}}).then(function(e){t.$countryStateSelector.empty(),(0,u.default)(e.states).forEach(function(n){t.$countryStateSelector.append(f("<option></option>").attr("value",e.states[n]).text(n))}),t.toggle()}).catch(function(t){void 0!==t.responseJSON&&showErrorMessage(t.responseJSON.message)})}},{key:"toggle",value:function(){this.$countryStateSelector.find("option").length>0?(this.$stateSelectionBlock.fadeIn(),this.$stateSelectionBlock.removeClass("d-none")):this.$stateSelectionBlock.fadeOut()}}]),t}();e.default=d},15:function(t,e,n){var r=n(18);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},16:function(t,e,n){var r=n(4),o=n(5).document,u=r(o)&&r(o.createElement);t.exports=function(t){return u?o.createElement(t):{}}},17:function(t,e,n){t.exports=!n(2)&&!n(7)(function(){return 7!=Object.defineProperty(n(16)("div"),"a",{get:function(){return 7}}).a})},18:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},19:function(t,e,n){t.exports={default:n(20),__esModule:!0}},2:function(t,e,n){t.exports=!n(7)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},20:function(t,e,n){n(21);var r=n(3).Object;t.exports=function(t,e,n){return r.defineProperty(t,e,n)}},21:function(t,e,n){var r=n(8);r(r.S+r.F*!n(2),"Object",{defineProperty:n(6).f})},22:function(t,e,n){var r=n(51),o=n(38);t.exports=function(t){return r(o(t))}},27:function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},3:function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},34:function(t,e,n){var r=n(55),o=n(49);t.exports=Object.keys||function(t){return r(t,o)}},374:function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),u=r(o),i=n(1),a=r(i),c=window.$,s=function(){function t(e,n,r){var o=this;(0,u.default)(this,t),this.$countryPostcodeInput=c(n),this.$countryPostcodeInputLabel=c(r),this.$countryInput=c(e),this.countryInputSelectedSelector=e+">option:selected",this.countryPostcodeInputLabelDangerSelector=r+">span.text-danger",this.$countryPostcodeInput.attr("required")||(this.$countryInput.on("change",function(){return o.toggle()}),this.toggle())}return(0,a.default)(t,[{key:"toggle",value:function(){c(this.countryPostcodeInputLabelDangerSelector).remove(),this.$countryPostcodeInput.prop("required",!1),1===parseInt(c(this.countryInputSelectedSelector).attr("need_postcode"),10)&&(this.$countryPostcodeInput.prop("required",!0),this.$countryPostcodeInputLabel.prepend(c('<span class="text-danger">*</span>')))}}]),t}();e.default=s},375:function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(67),u=r(o),i=n(0),a=r(i),c=n(1),s=r(c),f=window.$,d=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(0,a.default)(this,t),this.map=r,this.$emailInput=f(e),this.$emailInput.on("change",function(){return n.change()})}return(0,s.default)(t,[{key:"change",value:function(){var t=this;f.get({url:this.$emailInput.data("customer-information-url"),dataType:"json",data:{email:this.$emailInput.val()}}).then(function(e){(0,u.default)(t.map).forEach(function(n){void 0!==e[n]&&f(t.map[n]).val(e[n])})}).catch(function(t){void 0!==t.responseJSON&&showErrorMessage(t.responseJSON.message)})}}]),t}();e.default=d},38:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},39:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},393:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
e.default={addressEmailInput:"#customer_address_customer_email",addressFirstnameInput:"#customer_address_first_name",addressLastnameInput:"#customer_address_last_name",addressCompanyInput:"#customer_address_company",addressCountrySelect:"#customer_address_id_country",addressStateSelect:"#customer_address_id_state",addressStateBlock:".js-address-state-select",addressDniInput:"#customer_address_dni",addressDniInputLabel:'label[for="customer_address_dni"]',addressPostcodeInput:"#customer_address_postcode",addressPostcodeInputLabel:'label[for="customer_address_postcode"]'}},4:function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},43:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},46:function(t,e,n){var r=n(38);t.exports=function(t){return Object(r(t))}},468:function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}var o=n(375),u=r(o),i=n(142),a=r(i),c=n(141),s=r(c),f=n(374),d=r(f),l=n(393),p=r(l);/**
* Copyright since 2007 PrestaShop SA and Contributors
* PrestaShop is an International Registered Trademark & Property of PrestaShop SA
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.md.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/OSL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to https://devdocs.prestashop.com/ for more information.
*
* @author PrestaShop SA and Contributors <contact@prestashop.com>
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
*/
(0,window.$)(document).ready(function(){new u.default(p.default.addressEmailInput,{firstName:p.default.addressFirstnameInput,lastName:p.default.addressLastnameInput,company:p.default.addressCompanyInput}),new a.default(p.default.addressCountrySelect,p.default.addressStateSelect,p.default.addressStateBlock),new s.default(p.default.addressCountrySelect,p.default.addressDniInput,p.default.addressDniInputLabel),new d.default(p.default.addressCountrySelect,p.default.addressPostcodeInput,p.default.addressPostcodeInputLabel)})},47:function(t,e,n){var r=n(50)("keys"),o=n(43);t.exports=function(t){return r[t]||(r[t]=o(t))}},48:function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},49:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},5:function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},50:function(t,e,n){var r=n(5),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});t.exports=function(t){return o[t]||(o[t]={})}},51:function(t,e,n){var r=n(48);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},55:function(t,e,n){var r=n(27),o=n(22),u=n(58)(!1),i=n(47)("IE_PROTO");t.exports=function(t,e){var n,a=o(t),c=0,s=[];for(n in a)n!=i&&r(a,n)&&s.push(n);for(;e.length>c;)r(a,n=e[c++])&&(~u(s,n)||s.push(n));return s}},56:function(t,e,n){var r=n(39),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},58:function(t,e,n){var r=n(22),o=n(56),u=n(59);t.exports=function(t){return function(e,n,i){var a,c=r(e),s=o(c.length),f=u(i,s);if(t&&n!=n){for(;s>f;)if((a=c[f++])!=a)return!0}else for(;s>f;f++)if((t||f in c)&&c[f]===n)return t||f||0;return!t&&-1}}},59:function(t,e,n){var r=n(39),o=Math.max,u=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):u(t,e)}},6:function(t,e,n){var r=n(11),o=n(17),u=n(13),i=Object.defineProperty;e.f=n(2)?Object.defineProperty:function(t,e,n){if(r(t),e=u(e,!0),r(n),o)try{return i(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},67:function(t,e,n){t.exports={default:n(82),__esModule:!0}},7:function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},76:function(t,e,n){var r=n(8),o=n(3),u=n(7);t.exports=function(t,e){var n=(o.Object||{})[t]||Object[t],i={};i[t]=e(n),r(r.S+r.F*u(function(){n(1)}),"Object",i)}},8:function(t,e,n){var r=n(5),o=n(3),u=n(15),i=n(10),a=function(t,e,n){var c,s,f,d=t&a.F,l=t&a.G,p=t&a.S,h=t&a.P,y=t&a.B,v=t&a.W,_=l?o:o[e]||(o[e]={}),m=_.prototype,g=l?r:p?r[e]:(r[e]||{}).prototype;l&&(n=e);for(c in n)(s=!d&&g&&void 0!==g[c])&&c in _||(f=s?g[c]:n[c],_[c]=l&&"function"!=typeof g[c]?n[c]:y&&s?u(f,r):v&&g[c]==f?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(f):h&&"function"==typeof f?u(Function.call,f):f,h&&((_.virtual||(_.virtual={}))[c]=f,t&a.R&&m&&!m[c]&&i(m,c,f)))};a.F=1,a.G=2,a.S=4,a.P=8,a.B=16,a.W=32,a.U=64,a.R=128,t.exports=a},82:function(t,e,n){n(86),t.exports=n(3).Object.keys},86:function(t,e,n){var r=n(46),o=n(34);n(76)("keys",function(){return function(t){return o(r(t))}})}});