(()=>{"use strict";var e={r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t); /** * 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 * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ const{$:o}=window;class s{constructor(){o(document).on("click",".js-reset-theme-layouts-btn",(e=>this.handleResetting(e)))}handleResetting(e){const t=o(e.currentTarget),s=o("
",{action:t.data("submit-url"),method:"POST"}).append(o("",{name:"token",value:t.data("csrf-token"),type:"hidden"}));s.appendTo("body"),s.submit()}} /** * 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 * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ const{$:n}=window;class i{constructor(){n(document).on("click",".js-display-use-theme-modal",(e=>this.displayUseThemeModal(e)))}displayUseThemeModal(e){const t=n("#use_theme_modal");t.modal("show"),this.submitForm(t,e)}submitForm(e,t){const o=n(t.currentTarget);e.on("click",".js-submit-use-theme",(()=>{o.closest("form").submit()}))}} /** * 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 * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */const c=".js-multi-store-restriction-checkbox",r=".js-multi-store-restriction-switch",l=e=>`[data-shop-restriction-source="${e}"]`,{$:a}=window;class d{constructor(){a(document).on("change",c,(e=>this.multiStoreRestrictionCheckboxFieldChangeEvent(e))),a(document).on("change",r,(e=>this.multiStoreRestrictionSwitchFieldChangeEvent(e)))}multiStoreRestrictionCheckboxFieldChangeEvent(e){const t=a(e.currentTarget);this.toggleSourceFieldByTargetElement(t,!t.is(":checked"))}multiStoreRestrictionSwitchFieldChangeEvent(e){const t=a(e.currentTarget),o=1===parseInt(t.val(),10),s=t.data("targetFormName");a(`form[name="${s}"]`).find(c).each(((e,t)=>{const s=a(t);s.prop("checked",o),this.toggleSourceFieldByTargetElement(s,!o)}))}toggleSourceFieldByTargetElement(e,t){const o=e.data("shopRestrictionTarget"),s=a(l(o));s.prop("disabled",t),s.toggleClass("disabled",t)}} /** * 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 * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ const{$:m}=window;class u{constructor(){m(document).on("click",".js-display-delete-theme-modal",(e=>this.displayDeleteThemeModal(e)))}displayDeleteThemeModal(e){const t=m("#delete_theme_modal");t.modal("show"),this.submitForm(t,e)}submitForm(e,t){const o=m(t.currentTarget);e.on("click",".js-submit-delete-theme",(()=>{o.closest("form").submit()}))}} /** * 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 * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ const{$:h}=window;h((()=>{new s,new d,new i,new u})),window.themes=t})();