1function _typeof(e){return(_typeof="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})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}var ModuleMyAccountPaymentData=(()=>_createClass(function e(){_classCallCheck(this,e),(this.self=this).timeoutID=[],this.EventHandler=new EventHandler,this.delButtons=document.querySelectorAll(".action > .remove-cc")},[{key:"init",value:function(){this.initDeleteButtons()}},{key:"initDeleteButtons",value:function(){function s(e){var t=document.querySelector("main"),r=document.createElement("dialog"),n=document.querySelector(".overlay.error");n&&n.remove(),r.classList.add("overlay","error"),t.appendChild(r),(n=new Overlay("error")).update(e,"error",!0),(t=n.querySelector(".btn.error-reload"))&&t.addEventListener("click",function(){return location.reload()}),n.open()}function t(e){var t=e.target.parentNode.parentNode.querySelector(".creditcard.payment-info"),r=e.target.parentNode.parentNode.querySelector(".creditcard.delete-info"),n=e.target.parentNode.querySelector("button.undo"),o=e.target.parentNode.querySelector("button.remove-cc"),a=new FormData,i=(a.append("cc_id",o.dataset.id),a.append("formtoken",o.dataset.formtoken),new XMLHttpRequest);i.open("POST","/myaccount/paymentData/delcreditcard"),i.addEventListener("error",function(){s(this.responseText)}),i.addEventListener("load",function(){299<this.status&&s(this.responseText)}),i.send(a),n.after(n.cloneNode(!0)),n.remove(),(n=e.target.parentNode.querySelector("button.undo")).addEventListener("click",function(){i.readyState<4&&i.abort();var e=new XMLHttpRequest;e.open("POST","/myaccount/paymentData/undelcreditcard"),e.addEventListener("load",function(){var e;try{e=JSON.parse(this.responseText)}catch(e){return void s(this.responseText)}299<this.status||!e.ok?s(this.responseText):(e=parseInt(e.newId),isNaN(e)?location.reload():(o.dataset.id=e+"",n.dataset.id=e+""))}),e.addEventListener("error",function(){s(this.responseText)}),e.send(a),o.classList.remove("hidden"),o.focus(),t.classList.remove("hidden"),r.classList.add("hidden"),n.classList.add("hidden")}),o.classList.add("hidden"),t.classList.add("hidden"),r.classList.remove("hidden"),n.classList.remove("hidden"),n.focus()}var r=this;this.delButtons.forEach(function(e){r.EventHandler.add(e,"click",t)})}}]))();R.me("ModuleMyAccountPaymentData",!1);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.