vendor: 4,339 bytes, lines 1-2
1/*! For license information please see feature-livingwish-account.749977db15632e9ebce5.js.LICENSE.txt */ 2"use strict";(self.webpackChunkfrontend_nwn=self.webpackChunkfrontend_nwn||[]).push([[9955],{3023:function(t,e,n){n.r(e),n(228),n(7522),n(4338),n(9373),n(9903),n(9749),n(6544),n(9288),n(4254),n(752),n(1694),n(6265),n(3964),n(8373),n(6793),n(7629),n(7509),n(8052),n(4284),n(5399),n(9730);var r=n(1257);function o(){o=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",s=c.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,a=Object.create(o.prototype),c=new I(r||[]);return i(a,"_invoke",{value:O(t,n,c)}),a}function p(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d="suspendedStart",y="suspendedYield",v="executing",m="completed",g={};function b(){}function w(){}function E(){}var L={};f(L,u,(function(){return this}));var x=Object.getPrototypeOf,S=x&&x(x(N([])));S&&S!==n&&r.call(S,u)&&(L=S);var k=E.prototype=b.prototype=Object.create(L);function A(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(o,i,c,u){var l=p(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,c,u)}),(function(t){n("throw",t,c,u)})):e.resolve(f).then((function(t){s.value=t,c(s)}),(function(t){return n("throw",t,c,u)}))}u(l.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}})}function O(e,n,r){var o=d;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var u=P(c,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===d)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=v;var l=p(e,n,r);if("normal"===l.type){if(o=r.done?m:y,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function P(e,n){var r=n.method,o=e.iterator[r];if(o===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,P(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=p(o,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function q(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function I(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function N(e){if(e||""===e){var n=e[u];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(a(e)+" is not iterable")}return w.prototype=E,i(k,"constructor",{value:E,configurable:!0}),i(E,"constructor",{value:w,configurable:!0}),w.displayName=f(E,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,f(t,s,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},A(j.prototype),f(j.prototype,l,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,r,o,i){void 0===i&&(i=Prom
2ise);var a=new j(h(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(k),f(k,s,"Generator"),f(k,u,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=N,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(q),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return c.type="throw",c.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=r.call(a,"catchLoc"),l=r.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),q(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;q(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:N(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),g}},e}function i(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function c(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),Object.defineProperty(t,u(r.key),r)}}function u(t){var e=function(t,e){if("object"!=a(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:String(e)}var l=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.wrapperElement=e,this.conditionAttribute="data-option-id",this.dependentAttribute="data-depends-on-option"}var e,n;return e=t,(n=[{key:"initialize",value:function(){var t=this;this.processDependentElements(),this.wrapperElement.querySelectorAll("[".concat(this.conditionAttribute,"]")).forEach((function(e){e.getAttribute(t.conditionAttribute)&&("OPTION"===e.tagName&&(e=e.parentElement),e.addEventListener("change",(function(){t.processDependentElements()})))}))}},{key:"processDependentElements",value:function(){var t=this;this.wrapperElement.querySelectorAll("[".concat(this.dependentAttribute,"]")).forEac
2h((function(e){return t.handleDependency(e)}))}},{key:"handleDependency",value:function(t){var e=this,n=t.getAttribute(this.dependentAttribute);if(n){var r=n.split(","),o=!1;r.forEach((function(t){e.checkIfconditionIsFulfilled(t)&&(o=!0)})),o?this.showElement(t):this.hideElement(t)}}},{key:"checkIfconditionIsFulfilled",value:function(t){var e=this.wrapperElement.querySelector("[".concat(this.conditionAttribute,'="').concat(t,'"]'));return!(!e||!e.checked&&!e.selected)}},{key:"hideElement",value:function(t){t&&!t.classList.contains("d-none")&&t.classList.add("d-none")}},{key:"showElement",value:function(t){t&&t.classList.contains("d-none")&&t.classList.remove("d-none")}}])&&c(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();e.default=function(){var t=document.querySelector("#livingwish-account-form");t&&(new l(t).initialize(),t.querySelectorAll("select").forEach((function(t){var e=t.querySelectorAll("option[selected]");e.length>1&&(t.classList.contains("range-option-min")?t.value=e[0].value:t.classList.contains("range-option-max")&&(t.value=e[e.length-1].value))})));var e=function(){var t=document.getElementById("livingwishQuestionPrioritySelectionModal"),e=document.getElementById("livingwishQuestionPrioritySelectionModal").querySelectorAll('input[type="checkbox"]:checked').length;e?(t.querySelector(".btn.btn-primary").classList.remove("disabled"),t.querySelector(".minimum-message").classList.add("d-none")):(t.querySelector(".btn.btn-primary").classList.add("disabled"),t.querySelector(".minimum-message").classList.remove("d-none")),document.getElementById("livingwishQuestionPrioritySelectionModal").querySelectorAll('input[type="checkbox"]:not(:checked)').forEach((function(t){e<4?(t.removeAttribute("disabled"),t.nextElementSibling.classList.remove("disabled")):(t.setAttribute("disabled","true"),t.nextElementSibling.classList.add("disabled"))}))};e();var n=document.getElementById("livingwishQuestionPrioritySelectionModal");n.querySelectorAll("input[type=checkbox]").forEach((function(t){t.addEventListener("change",(function(t){e()}))})),n.querySelector(".btn.btn-primary").addEventListener("click",function(){var t,e=(t=o().mark((function t(e){var i;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=[],n.querySelectorAll('input[type="checkbox"]').forEach((function(t){t.checked&&i.push(t.value)})),t.next=4,r.Z.post("/account/api/ajax-save-living-wishes-priorities",{questionIds:i});case 4:document.getElementById("livingwish-account-form").submit();case 5:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function c(t){i(a,r,o,c,u,"next",t)}function u(t){i(a,r,o,c,u,"throw",t)}c(void 0)}))});return function(t){return e.apply(this,arguments)}}())}}}]); 3//# sourceMappingURL=feature-livingwish-account.749977db15632e9ebce5.js.map
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.