/*! For license information please see admin_home.bundle.js.LICENSE.txt */ (()=>{var e={595:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(143);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},l="function"==typeof Symbol?Symbol:{},u=l.iterator||"@@iterator",c=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),l=new q(n||[]);return i(a,"_invoke",{value:L(e,r,l)}),a}function y(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",g="executing",h="completed",m={};function b(){}function k(){}function S(){}var P={};f(P,u,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(D([])));E&&E!==r&&n.call(E,u)&&(P=E);var A=S.prototype=b.prototype=Object.create(P);function C(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(a,i,l,u){var c=y(e[a],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==o(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,l,u)}),(function(e){r("throw",e,l,u)})):t.resolve(f).then((function(e){s.value=e,l(s)}),(function(e){return r("throw",e,l,u)}))}u(c.arg)}var a;i(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,r,n){var o=p;return function(a,i){if(o===g)throw Error("Generator is already running");if(o===h){if("throw"===a)throw i;return{value:e,done:!0}}for(n.method=a,n.arg=i;;){var l=n.delegate;if(l){var u=j(l,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var c=y(t,r,n);if("normal"===c.type){if(o=n.done?h:v,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=h,n.method="throw",n.arg=c.arg)}}}function j(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,j(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=y(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function q(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function D(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,i=function r(){for(;++a=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function i(e,t,r,n,o,a,i){try{var l=e[a](i),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function l(e){i(a,n,o,l,u,"next",e)}function u(e){i(a,n,o,l,u,"throw",e)}l(void 0)}))}}function u(e,t){for(var r=0;r1&&void 0!==s[1]?s[1]:"GET",o=s.length>2&&void 0!==s[2]?s[2]:null,i=s.length>3&&void 0!==s[3]?s[3]:null,l=e.getUrlFromHash(r,i),u={method:n,headers:{"Content-Type":"application/json","X-CSRFToken":e.getCsrfToken()}},!o||"POST"!==n&&"PUT"!==n&&"PATCH"!==n||(u.body=JSON.stringify(o)),console.log("API request:",n,l,o),t.prev=7,t.next=10,fetch(l,u);case 10:if((c=t.sent).ok){t.next=13;break}throw new Error("HTTP error! status: ".concat(c.status));case 13:return t.next=15,c.json();case 15:return t.abrupt("return",t.sent);case 18:throw t.prev=18,t.t0=t.catch(7),console.error("API request failed:",t.t0),t.t0;case 22:case"end":return t.stop()}}),t,null,[[7,18]])}))),function(e){return f.apply(this,arguments)})},{key:"getUrlFromHash",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;null==e&&(e=hashPageHome),console.log("getUrlFromHash:"),console.log("base url: "+_pathHost+"\nhash: "+e+"\nparams: "+t);var r=_pathHost+e;return t&&(r+="?"+new URLSearchParams(t).toString()),console.log("url: "+r),r}},{key:"goToUrl",value:function(e){window.location.href=e}},{key:"goToHash",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.getUrlFromHash(t,r);e.goToUrl(n)}},{key:"loginUser",value:(s=l(a().mark((function t(){var r;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r={})[keyCallback]=n.A.getHashPageCurrent(),t.next=4,e.request(hashPageUserLogin,"POST",r);case 4:return t.abrupt("return",t.sent);case 5:case"end":return t.stop()}}),t)}))),function(){return s.apply(this,arguments)})},{key:"getCategories",value:(c=l(a().mark((function t(){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.request(hashGetStoreProductCategory);case 2:return t.abrupt("return",t.sent);case 3:case"end":return t.stop()}}),t)}))),function(){return c.apply(this,arguments)})},{key:"getCategoriesByFilters",value:(i=l(a().mark((function t(r){return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.goToHash(hashPageStoreProductCategories,r);case 1:case"end":return t.stop()}}),t)}))),function(e){return i.apply(this,arguments)})},{key:"saveCategories",value:(o=l(a().mark((function t(r,o,i){var l;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(l={})[flagFormFilters]=n.A.convertForm2JSON(o),l[flagCategory]=r,l[flagComment]=i,t.next=6,e.request(hashSaveStoreProductCategory,"POST",l);case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)}))),function(e,t,r){return o.apply(this,arguments)})}],r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,o,i,c,s,f}()},143:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(900);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){for(var r=0;r{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;ri});var i=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"initialiseEventHandler",value:function(e,t,r){document.querySelectorAll(e).forEach((function(e){e.classList.contains(t)||(e.classList.add(t),r(e))}))}}],null&&o(e.prototype,null),t&&o(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},322:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;ri});var i=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)},t=[{key:"getLocalStorage",value:function(e){return JSON.parse(localStorage.getItem(e))}},{key:"setLocalStorage",value:function(e,t){localStorage.setItem(e,JSON.stringify(t))}}],null&&o(e.prototype,null),t&&o(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},900:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;ri});var i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,r=[{key:"isEmpty",value:function(e){var t=!0;if(null!==e&&"null"!==e&&void 0!==e&&"undefined"!==e)if(null==e.length)t=!1;else if("function"==typeof e)t=!1;else{var r="string"==typeof e;if(r&&(e=e.trim()),e.length>0)if(r)t=!1;else if("string"!=typeof e[0])t=!1;else for(var n=0;n0)}},{key:"getDataContentType",value:function(t){var r=null,n="";return e.isEmpty(t)||("string"==typeof t?(r=t,n="application/x-www-form-urlencoded; charset=UTF-8"):(r=JSON.stringify(t),n="application/json; charset=UTF-8")),{Data:r,ContentType:n}}},{key:"arrayContainsItem",value:function(t,r){var n=!1;if(!e.isEmpty(t)&&!e.isEmpty(r))if(t[0]instanceof jQuery){for(var o=0;o{"use strict";r.r(t),r.d(t,{BasePage:()=>m});var n=r(782),o=r(322),a=r(595),i=r(143);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function d(e,t,r,n){var a=t&&t.prototype instanceof b?t:b,i=Object.create(a.prototype),l=new q(n||[]);return o(i,"_invoke",{value:L(e,r,l)}),i}function y(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",v="suspendedYield",g="executing",h="completed",m={};function b(){}function k(){}function S(){}var P={};f(P,i,(function(){return this}));var w=Object.getPrototypeOf,E=w&&w(w(D([])));E&&E!==r&&n.call(E,i)&&(P=E);var A=S.prototype=b.prototype=Object.create(P);function C(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,a,i,u){var c=y(e[o],e,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,i,u)}),(function(e){r("throw",e,i,u)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function L(t,r,n){var o=p;return function(a,i){if(o===g)throw Error("Generator is already running");if(o===h){if("throw"===a)throw i;return{value:e,done:!0}}for(n.method=a,n.arg=i;;){var l=n.delegate;if(l){var u=j(l,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var c=y(t,r,n);if("normal"===c.type){if(o=n.done?h:v,c.arg===m)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=h,n.method="throw",n.arg=c.arg)}}}function j(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,j(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=y(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function q(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function D(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--a){var i=this.tryEntries[a],l=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),T(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:D(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function c(e,t,r,n,o,a,i){try{var l=e[a](i),u=l.value}catch(e){return void r(e)}l.done?t(u):Promise.resolve(u).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){c(a,n,o,i,l,"next",e)}function l(e){c(a,n,o,i,l,"throw",e)}i(void 0)}))}}function f(e,t){for(var r=0;r0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageHome,e)},this.routes[hashPageContact]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageContact,e)},this.routes[hashPageServices]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageServices,e)},this.routes[hashPageAdminHome]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageAdminHome,e)},this.routes[hashPageAccessibilityStatement]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageAccessibilityStatement,e)},this.routes[hashPageLicense]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageLicense,e)},this.routes[hashPageStoreProductCategories]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageStoreProductCategories,e)},this.routes[hashPageStoreProductPermutations]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageStoreProductPermutations,e)},this.routes[hashPageStoreProducts]=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t.navigateToHash(hashPageStoreProducts,e)},this.initialize()},t=[{key:"loadPage",value:(l=s(u().mark((function e(t){var r,n,o=arguments;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]&&o[1],console.log("loadPage: "+t),e.next=4,this.getClassPageFromHash(t);case 4:n=e.sent,console.log("PageClass: ",n),this.currentPage=new n,console.log("this.currentPage: ",this.currentPage),this.currentPage.initialize(r);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return l.apply(this,arguments)})},{key:"getClassPageFromHash",value:(o=s(u().mark((function e(t){var r,n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.pages[t],console.log("pageJson: ",r),e.prev=2,e.next=5,y(r.pathModule);case 5:return n=e.sent,console.log("module: ",n),e.abrupt("return",n[r.name]);case 10:throw e.prev=10,e.t0=e.catch(2),console.error("Page not found:",t),e.t0;case 14:case"end":return e.stop()}}),e,this,[[2,10]])}))),function(e){return o.apply(this,arguments)})},{key:"initialize",value:function(){window.addEventListener("popstate",this.handlePopState.bind(this))}},{key:"handlePopState",value:function(e){this.loadPageCurrent()}},{key:"loadPageCurrent",value:function(){var e=i.A.getHashPageCurrent();this.loadPage(e)}},{key:"navigateToHash",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.beforeLeave();var n=a.A.getUrlFromHash(e,r);history.pushState(t,"",n),a.A.goToUrl(n,t)}},{key:"beforeLeave",value:(n=s(u().mark((function e(){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getClassPageFromHash(i.A.getHashPageCurrent());case 2:(new(0,e.sent)).leave();case 5:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})}],r=[{key:"loadPageBodyFromResponse",value:function(e){console.log(e.data),i.A.loadPageBody(e.data)}}],t&&f(e.prototype,t),r&&f(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,r,n,o,l}());function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function g(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;null==t&&(t=document.querySelector("form."+flagFilter+" button."+flagSave)),null==r&&(r=document.querySelector("form."+flagFilter+" button."+flagCancel)),e?(r.classList.remove(flagCollapsed),t.classList.remove(flagCollapsed)):(r.classList.add(flagCollapsed),t.classList.add(flagCollapsed))}}],l=[{key:"isDirtyFilter",value:function(e){var t=i.A.isElementDirty(e);return t&&document.querySelectorAll(idTableMain+" tbody tr").remove(),t}}],r&&g(t.prototype,r),l&&g(t,l),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r,l}()},992:(e,t,r)=>{"use strict";r.r(t),r.d(t,{TableBasePage:()=>v});var n=r(782),o=r(900),a=r(255),i=r(143);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){for(var r=0;r0&&void 0!==arguments[0]&&arguments[0];if(this.constructor===t)throw new Error("Must implement initialize() method.");if(r){var n=this.getLocalStoragePage()[flagFormFilters],a=this.getFormFilters(),l=i.A.convertForm2JSON(a);o.A.areEqualDicts(n,l)}else this.sharedInitialize(),this.hookupFilters(),this.hookupButtonsAddSaveCancel(),this.hookupTableMain(),hookupOverlayConfirm((function(){e.leave(),e.saveRecordsTableDirty()}))}},{key:"hookupFilters",value:function(){if(this.constructor===t)throw new Error("Subclass of TableBasePage must implement method hookupFilters().");this.hookupButtonApplyFilters()}},{key:"hookupFilterActive",value:function(){n.A.initialiseEventHandler(idFormFilters+"."+flagActive,flagInitialised,(function(e){e.addEventListener("change",(function(r){t.isDirtyFilter(e)}))}))}},{key:"hookupButtonApplyFilters",value:function(){var e=this;n.A.initialiseEventHandler(idButtonApplyFilters,flagInitialised,(function(t){t.addEventListener("click",(function(t){t.stopPropagation(),e.getAndLoadFilteredTableContent()}))}))}},{key:"getAndLoadFilteredTableContent",value:function(){var e=this.getFormFilters(),t=i.A.convertForm2JSON(e);this.callFilterTableContent(t).catch((function(e){return console.error("Error:",e)}))}},{key:"getFormFilters",value:function(){return document.querySelector(idFormFilters)}},{key:"callbackLoadTableContent",value:function(e){this.getTableMain().querySelector("tbody").querySelectorAll("tr").forEach((function(e){e.remove()}));var t=e.data[flagRows];!o.A.isEmpty(t)&&t.every((function(e){return e.hasOwnProperty("display_order")}))&&(t=t.sort((function(e,t){return e.display_order-t.display_order}))),t.forEach(this.loadRowTable.bind(this)),this.hookupTableMain()}},{key:"getTableMain",value:function(){return document.querySelector(idTableMain)}},{key:"loadRowTable",value:function(e){throw new Error("Subclass of TableBasePage must implement method loadRowTable().")}},{key:"hookupButtonsAddSaveCancel",value:function(){this.hookupButtonSave(),this.hookupButtonCancel(),this.hookupButtonAddRowTable()}},{key:"saveRecordsTableDirty",value:function(){var e=this,t=this.getTableRecords(!0);if(0!=t.length){var r=this.getFormFilters(),n=i.A.getElementValueCurrent(document.querySelector(idTextareaConfirm));this.callSaveTableContent(t,r,n).then((function(t){t[flagStatus]==flagSuccess?(console.log("Data received:",t),e.callbackLoadTableContent(t),console.log("Records saved!")):showOverlayError(t[flagMessage])})).catch((function(e){return console.error("Error:",e)}))}else showOverlayError("No records to save")}},{key:"getTableRecords",value:function(){var e,t=this,r=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.getTableMain(),o=[];return n.querySelectorAll("tbody tr").forEach((function(n){r&&!n.classList.contains(flagDirty)||(e=t.getJsonRow(n),o.push(e))})),o}},{key:"getJsonRow",value:function(e){throw new Error("Subclass of TableBasePage must implement method getJsonRow().")}},{key:"hookupButtonCancel",value:function(){n.A.initialiseEventHandler(idFormFilters+" button."+flagCancel,flagInitialised,(function(e){e.addEventListener("click",(function(e){e.stopPropagation(),getAndLoadFilteredTableContent()})),e.classList.add(flagCollapsed)}))}},{key:"hookupButtonAddRowTable",value:function(){var e=this;n.A.initialiseEventHandler(idFormFilters+" button."+flagAdd,flagInitialised,(function(t){t.addEventListener("click",(function(t){t.stopPropagation();var r=document.querySelector(idTableMain+" tbody"),n=_rowBlank.cloneNode(!0);n.classList.remove(flagInitialised),n.querySelectorAll("."+flagInitialised).forEach((function(e){e.classList.remove(flagInitialised)}));var o=parseInt(r.querySelector("tr:last-child").querySelector("td."+flagDisplayOrder+" ."+flagSlider).getAttribute(attrValueCurrent))+1;r.appendChild(n);var a=r.querySelector("tr:last-child").querySelector("td."+flagDisplayOrder+" ."+flagSlider);a&&(a.setAttribute(attrValueCurrent,o),a.setAttribute(attrValuePrevious,o)),e.hookupTableMain()}))}))}},{key:"hookupTableMain",value:function(){if(this.constructor===t)throw new Error("Must implement hookupTableMain() method.");null==_rowBlank&&this.cacheRowBlank()}},{key:"cacheRowBlank",value:function(){var e=idTableMain+" tbody tr."+flagRowNew,t=document.querySelector(e);console.log("row blank temp: ",t),_rowBlank=t.cloneNode(!0),document.querySelectorAll(e).forEach((function(e){e.remove()}))}},{key:"hookupSlidersDisplayOrderTable",value:function(){var e=this,t=idTableMain+" tbody tr td."+flagDisplayOrder+" input."+flagSlider+"."+flagDisplayOrder;n.A.initialiseEventHandler(t,flagInitialised,(function(t){t.addEventListener("change",(function(r){console.log("slider change event"),e.handleChangeElementCellTable(t)}))}))}},{key:"hookupTextareasCodeTable",value:function(){var e=this,t=idTableMain+" tbody tr td."+flagCode+" textarea";n.A.initialiseEventHandler(t,flagInitialised,(function(t){t.addEventListener("change",(function(r){console.log("textarea change event"),e.handleChangeElementCellTable(t)}))}))}},{key:"handleChangeElementCellTable",value:function(e){var t=i.A.getRowFromElement(e),r=i.A.getCellFromElement(e);console.log("td: ",r);var n=this.isDirtyRow(t),o=e.classList.contains(flagDirty),a=i.A.isElementDirty(e);if(console.log("isDirtyElement: ",a),console.log("wasDirtyElement: ",o),a!=o){i.A.handleDirtyElement(r,a);var l=this.isDirtyRow(t);if(console.log("isNowDirtyRow: ",l),console.log("wasDirtyRow: ",n),l!=n){i.A.handleDirtyElement(t,l);var u=this.getTableRecords(!0),c=u.length>0;console.log("dirty records:",u),console.log("existsDirtyRecord:",c),this.toggleShowButtonsSaveCancel(c)}}}},{key:"isDirtyRow",value:function(e){throw new Error("Subclass of TableBasePage must implement method isDirtyRow().")}},{key:"toggleShowButtonsSaveCancel",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;null==t&&(t=document.querySelector(idFormFilters+" button."+flagSave)),null==r&&(r=document.querySelector(idFormFilters+" button."+flagCancel)),e?(r.classList.remove(flagCollapsed),t.classList.remove(flagCollapsed)):(r.classList.add(flagCollapsed),t.classList.add(flagCollapsed))}},{key:"handleChangeSelectCellTable",value:function(e){var t=i.A.getRowFromElement(e),r=i.A.getCellFromElement(e);console.log("td: ",r);var n=this.isDirtyRow(t),o=e.classList.contains(flagDirty),a=i.A.isElementDirty(e);if(console.log("isDirtyElement: ",a),console.log("wasDirtyElement: ",o),a!=o){i.A.handleDirtyElement(r,a);var l=e.options[e.selectedIndex];r.setAttribute(attrIdAccessLevel,l.value),r.setAttribute(flagAccessLevelRequired,l.textcontent);var u=this.isDirtyRow(t);if(console.log("isNowDirtyRow: ",u),console.log("wasDirtyRow: ",n),u!=n){i.A.handleDirtyElement(t,u);var c=this.getTableRecords(!0),s=c.length>0;console.log("dirty records:",c),console.log("existsDirtyRecord:",s),this.toggleShowButtonsSaveCancel(s)}}}},{key:"hookupTextareasNameTable",value:function(){var e=this,t=idTableMain+" tbody tr td."+flagName+" textarea";n.A.initialiseEventHandler(t,flagInitialised,(function(t){t.addEventListener("change",(function(r){console.log("textarea change event"),e.handleChangeElementCellTable(t)}))}))}},{key:"hookupTextareasDescriptionTable",value:function(){var e=this,t=idTableMain+" tbody tr td."+flagDescription+" textarea";n.A.initialiseEventHandler(t,flagInitialised,(function(t){t.addEventListener("change",(function(r){console.log("textarea change event"),e.handleChangeElementCellTable(t)}))}))}},{key:"hookupInputsActiveTable",value:function(){var e=this,t=idTableMain+" tbody tr td."+flagActive+' input[type="checkbox"]';n.A.initialiseEventHandler(t,flagInitialised,(function(t){t.addEventListener("change",(function(r){console.log("input change event"),e.handleChangeElementCellTable(t)}))}))}},{key:"hookupTdsAccessLevel",value:function(){var e=this;n.A.initialiseEventHandler(idTableMain+" tbody td."+flagAccessLevel,flagInitialised,(function(t){t.addEventListener("click",(function(t){e.handleClickTdAccessLevel(t)}))}))}},{key:"handleClickTdAccessLevel",value:function(e){console.log("tdAccessLevel clicked"),e.stopPropagation();var t=i.A.getCellFromElement(e.target);console.log("tdAccessLevel: ",t);var r=i.A.getRowFromElement(t),n=t.querySelector("div."+flagAccessLevel).getAttribute(attrIdAccessLevel),o=document.createElement("select");o.classList.add(flagAccessLevel),o.setAttribute(attrValueCurrent,n),o.setAttribute(attrValuePrevious,n),optionsAccessLevel.forEach((function(e){var t=document.createElement("option");t.value=e.value,t.textContent=e.text,e.value==n&&(t.selected=!0),o.appendChild(t)}));var a=t.cloneNode(!0);a.innerHTML="",a.appendChild(o),r.replaceChild(a,t),this.hookupDdlsAccessLevelTable()}},{key:"hookupDdlsAccessLevelTable",value:function(){var e=this;n.A.initialiseEventHandler(idTableMain+" tbody select."+flagAccessLevel,flagInitialised,(function(t){t.addEventListener("change",(function(r){r.stopPropagation(),e.handleChangeDdlAccessLevelTable(t)}))}))}},{key:"handleChangeDdlAccessLevelTable",value:function(e){var t=i.A.getRowFromElement(e),r=i.A.getCellFromElement(e);console.log("td: ",r);var n=this.isDirtyRow(t),o=e.classList.contains(flagDirty),a=i.A.isElementDirty(e);if(console.log("isDirtyElement: ",a),console.log("wasDirtyElement: ",o),a!=o){i.A.handleDirtyElement(r,a);var l=e.options[e.selectedIndex];r.setAttribute(attrIdAccessLevel,l.value),r.setAttribute(flagAccessLevelRequired,l.textcontent);var u=this.isDirtyRow(t);if(console.log("isNowDirtyRow: ",u),console.log("wasDirtyRow: ",n),u!=n){i.A.handleDirtyElement(t,u);var c=this.getTableRecords(!0),s=c.length>0;console.log("dirty records:",c),console.log("existsDirtyRecord:",s),this.toggleShowButtonsSaveCancel(s)}}}},{key:"leave",value:function(){if(this.constructor===t)throw new Error("Must implement leave() method.");var e,r,n;(e=t,r=this,"function"==typeof(n=d(y(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([]);var o=this.getFormFilters(),a={};a[flagFormFilters]=i.A.convertForm2JSON(o),this.setLocalStoragePage(a),_rowBlank=null}}],l=[{key:"isDirtyFilter",value:function(e){var t=i.A.isElementDirty(e);if(t){var r=document.querySelector(idTableMain+" tbody");r.querySelectorAll("tr").remove(),r.appendChild(document.createElement('
Press "Apply Filters" to refresh the table.
'))}return t}}],a&&u(r.prototype,a),l&&u(r,l),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a,l}(a.BasePage)},623:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PageAdminHome:()=>v});var n=r(782);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t){for(var r=0;r{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;ry});var s,f,d,y=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(t,e),r=t,(n=[{key:"initialize",value:function(){this.sharedInitialize()}}])&&o(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(r(255).BasePage);s=y,f="hash",d=hashPageContact,(f=c(f))in s?Object.defineProperty(s,f,{value:d,enumerable:!0,configurable:!0,writable:!0}):s[f]=d},835:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;rp});var f,d,y,p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,n=[{key:"initialize",value:function(){this.sharedInitialize(),this.hookupButtonNavContact()}},{key:"leave",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=l(u(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([])}}],n&&o(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(r(255).BasePage);f=p,d="hash",y=hashPageHome,(d=s(d))in f?Object.defineProperty(f,d,{value:y,enumerable:!0,configurable:!0,writable:!0}):f[d]=y},312:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;rp});var f,d,y,p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,n=[{key:"initialize",value:function(){this.sharedInitialize()}},{key:"leave",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=l(u(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([])}}],n&&o(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(r(255).BasePage);f=p,d="hash",y=hashPageServices,(d=s(d))in f?Object.defineProperty(f,d,{value:y,enumerable:!0,configurable:!0,writable:!0}):f[d]=y},916:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;rp});var f,d,y,p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,n=[{key:"initialize",value:function(){this.sharedInitialize()}},{key:"leave",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=l(u(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([])}}],n&&o(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(r(255).BasePage);f=p,d="hash",y=hashPageAccessibilityStatement,(d=s(d))in f?Object.defineProperty(f,d,{value:y,enumerable:!0,configurable:!0,writable:!0}):f[d]=y},765:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;rp});var f,d,y,p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,n=[{key:"initialize",value:function(){this.sharedInitialize()}},{key:"leave",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=l(u(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([])}}],n&&o(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(r(255).BasePage);f=p,d="hash",y=hashPageLicense,(d=s(d))in f?Object.defineProperty(f,d,{value:y,enumerable:!0,configurable:!0,writable:!0}):f[d]=y},173:(e,t,r)=>{"use strict";r.r(t),r.d(t,{StoreMixinPage:()=>s});var n=r(782),o=r(322),a=r(900),i=r(143);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{PageStoreBasket:()=>g});var n=r(782),o=r(322);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function i(e,t){for(var r=0;r at "+r[keyPostcode]+"",document.querySelectorAll(idOverlayInfoBilling).css("display","none"),document.querySelectorAll(idOverlayInfoBilling).querySelector("form").classList.add(flagSubmitted)}else document.querySelectorAll(idContainerInfoDelivery).querySelector("div").innerHTML=""+r[keyNameFull]+" at "+r[keyPostcode]+"",document.querySelectorAll(idOverlayInfoDelivery).css("display","none"),document.querySelectorAll(idOverlayInfoDelivery).querySelector("form").classList.add(flagSubmitted)}},{key:"convertFormBilling2JSON",value:function(e,t){var r;r=document.querySelectorAll(t).querySelector("form"),r=document.querySelectorAll(idOverlayInfoDelivery).querySelector("form"),console.log("converting billing form to json\nform ID: "+r.id),e[keyForm]=convertForm2JSON(r);var n=[keyNameFull,keyPhoneNumber,keyPostcode,keyAddress1,keyAddress2,keyCity,keyCounty];for(var o in console.log("ajaxData:"),console.log(e),e[keyForm][keyInfoIdentical]=getElementCurrentValue(r.querySelector("#"+keyInfoIdentical)),n)t==idOverlayInfoBilling&&e[keyForm][keyInfoIdentical]?e[keyForm][n[o]]=getElementCurrentValue((void 0).querySelector("#"+n[o])):e[keyForm][n[o]]=getElementCurrentValue(r.querySelector("#"+n[o]));return console.log("ajaxData:"),console.log(e),e}},{key:"hookupButtonCheckoutSession",value:function(){var e=document.querySelectorAll(idButtonCheckout);e.classList.remove(flagInitialised),n.A.initialiseEventHandler(idButtonCheckout,flagInitialised,(function(){e.removeEventListener("click"),e.addEventListener("click",(function(e){var t=o.A.getLocalStorage(keyBasket),r={};r[keyBasket]=t,r=convertFormBilling2JSON(r,idOverlayInfoDelivery),(r=convertFormBilling2JSON(r,idOverlayInfoBilling))[key_code_currency]=getCurrencySelected(),ajaxJSONData("checkout session",mapHashToController(hashPageStoreCheckout),r,handleResponseCheckout,!1)}))}))}},{key:"handleResponseCheckout",value:function(e){window.location.href=e.data[keyUrlCheckout]}},{key:"hookupButtonFormBillingCopy",value:function(){n.A.initialiseEventHandler(idButtonFormBillingCopy,flagInitialised,(function(){document.querySelectorAll(idButtonFormBillingCopy).addEventListener("click",(function(e){var t=[keyNameFull,keyPhoneNumber,keyPostcode,keyAddress1,keyAddress2,keyCity,keyCounty],r=document.querySelectorAll(idOverlayInfoBilling).querySelector("form"),n=document.querySelectorAll(idOverlayInfoDelivery).querySelector("form");for(var o in t)r.querySelector("#"+t[o]).value=getElementCurrentValue(n.querySelector("#"+t[o]))}))}))}},{key:"leave",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=c(s(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([])}}],a&&i(r.prototype,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a}(r(255).BasePage);y=g,p="hash",v=hashPageStoreBasket,(p=d(p))in y?Object.defineProperty(y,p,{value:v,enumerable:!0,configurable:!0,writable:!0}):y[p]=v},771:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;rp});var f,d,y,p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),a(this,t)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,n=[{key:"initialize",value:function(){this.sharedInitialize(),this.hookupFiltersStore(),this.hookupStoreHome()}},{key:"leave",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=l(u(1&3?e.prototype:e),"leave",r))?function(e){return n.apply(r,e)}:n)([])}}],n&&o(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(r(255).BasePage);f=p,d="hash",y=hashPageStoreHome,(d=s(d))in f?Object.defineProperty(f,d,{value:y,enumerable:!0,configurable:!0,writable:!0}):f[d]=y},380:(e,t,r)=>{"use strict";r.r(t),r.d(t,{PageStoreProductCategories:()=>h});var n=r(782),o=r(992),a=r(595),i=r(143);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{PageStoreProductPermutations:()=>v});var n=r(782),o=r(255),a=r(900);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function l(e,t){for(var r=0;r",t))})),e.addEventListener("change",(function(e){loadPermutations()}))})),n.A.initialiseEventHandler(idFilterIsOutOfStock,flagInitialised,(function(e){e.addEventListener("change",(function(e){loadPermutations()}))})),n.A.initialiseEventHandler(idFilterQuantityMin,flagInitialised,(function(e){e.addEventListener("change",(function(e){loadPermutations()}))})),n.A.initialiseEventHandler(idFilterQuantityMax,flagInitialised,(function(e){e.addEventListener("change",(function(e){loadPermutations()}))}))}},{key:"loadPermutations",value:function(){var e=document.querySelectorAll(idFormFiltersPermutations),t={};t[keyForm]=convertForm2JSON(e),t.csrf_token=t[keyForm].csrf_token,console.log("ajaxData:"),console.log(t),ajaxJSONData("permutations",mapHashToController(hashPageStorePermutationsPost),t,callbackLoadPermutations,!1,{"X-CSRFToken":t.csrf_token})}},{key:"callbackLoadPermutations",value:function(e){console.log("ajax:"),console.log(e.data);var t,r,n,o=document.querySelectorAll(idTableMain);(t=o.querySelector("tbody")).querySelector("tr").remove(),e.data.forEach((function(e){r=_rowBlank.cloneNode(!0),(r=document.querySelectorAll(r)).classList.remove(flagRowNew),console.log("applying data row: ",e),r.querySelector("td."+flagCategory+" select").value=e[attrIdCategory],n=r.querySelector("td."+flagProduct+" select"),listProducts.forEach((function(t){t[attrIdCategory]==e[attrIdCategory]&&n.appendChild(document.createElement("