PageSourceSearch

https://dubaysk.ru/wp-content/plugins/quizle/assets/public/js/scripts.min.js?ver=ca9f0d77f73d

js dubaysk.ru collected 2026-10-08 14:15:05 UTC 62,956 bytes, 1 lines download raw bytes

vendor: 5,196 bytes, line 1
1!function(e){"function"==typeof define&&define.amd?define("scripts",e):e()}((function(){"use strict";function e(e,n,r){return n=l(n),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,t()?Reflect.construct(n,r||[],l(e).constructor):n.apply(e,r))}function t(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(t=function(){return!!e})()}function n(){n=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var i=t&&t.prototype instanceof w?t:w,o=Object.create(i.prototype),s=new D(r||[]);return a(o,"_invoke",{value:E(e,n,s)}),o}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p="suspendedStart",h="suspendedYield",v="executing",m="completed",y={};function w(){}function g(){}function b(){}var _={};l(_,s,(function(){return this}));var x=Object.getPrototypeOf,q=x&&x(x(I([])));q&&q!==r&&i.call(q,s)&&(_=q);var z=b.prototype=w.prototype=Object.create(_);function k(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function j(e,t){function n(r,a,o,s){var u=f(e[r],e,a);if("throw"!==u.type){var c=u.arg,l=c.value;return l&&"object"==typeof l&&i.call(l,"__await")?t.resolve(l.__await).then((function(e){n("next",e,o,s)}),(function(e){n("throw",e,o,s)})):t.resolve(l).then((function(e){c.value=e,o(c)}),(function(e){return n("throw",e,o,s)}))}s(u.arg)}var r;a(this,"_invoke",{value:function(e,i){function a(){return new t((function(t,r){n(e,i,t,r)}))}return r=r?r.then(a,a):a()}})}function E(t,n,r){var i=p;return function(a,o){if(i===v)throw Error("Generator is already running");if(i===m){if("throw"===a)throw o;return{value:e,done:!0}}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var u=C(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===p)throw i=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=v;var c=f(t,n,r);if("normal"===c.type){if(i=r.done?m:h,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=m,r.method="throw",r.arg=c.arg)}}}function C(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,C(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var a=f(i,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,y;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function T(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 S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function D(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(T,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[s];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function n(){for(;++r<t.length;)if(i.call(t,r))return n.value=t[r],n.done=!1,n;return n.value=e,n.done=!0,n};return a.next=a}}throw new TypeError(typeof t+" is not iterable")}return g.prototype=b,a(z,"constructor",{value:b,configurable:!0}),a(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,l(e,c,"GeneratorFunction")),e.prototype=Object.create(z),e},t.awrap=function(e){return{__await:e}},k(j.prototype),l(j.prototype,u,(function(){return this})),t.AsyncIterator=j,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var o=new j(d(e,n,r,i),a);return t.isGeneratorFunction(n)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},k(z),l(z,c,"Generator"),l(z,s,(function(){return this})),l(z,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=I,D.prototype={constructor:D,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEac
vendor: 4,625 bytes, line 1
1h(S),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,y):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:I(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}function r(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function i(e,t,n,r,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var o=e.apply(t,n);function s(e){i(o,r,a,s,u,"next",e)}function u(e){i(o,r,a,s,u,"throw",e)}s(void 0)}))}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,r(i.key),i)}}function u(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(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&&d(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],u=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=p(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function m(e){for(var t=encodeURIComponent(e)+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var i=n[r];" "===i.charAt(0);)i=i.substring(1,i.length);if(0===i.indexOf(t))return decodeURIComponent(i.substring(t.length,i.length))}return null}function y(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}function w(e){return new this((function(t,n){if(!e||void 0===e.length)return n(new TypeError(typeof e+" "+e+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var i=r.length;function a(e,n){if(n&&("object"==typeof n||"function"==typeof n)){var o=n.then;if("function"==typeof o)return void o.call(n,(function(t){a(e,t)}),(function(n){r[e]={status:"rejected",reason:n},0==--i&&t(r)}))}r[e]={status:"fulfilled",value:n},0==--i&&t(r)}for(var o=0;o<r.length;o++)a(o,r[o])}))}var g=setTimeout;function b(e){return Boolean(e&&void 0!==e.length)}function _(){}function x(e){if(!(this instanceof x))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],C(e,this)}function q(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,x._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void k(t.promise,e)}z(t.promise,r)}else(1===e._state?z:k)(t.promise,e._value)}))):e._deferreds.push(t)}function z(e,t){try{if(t===e)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if(t instanceof x)return e._state=3,e._value=t,void j(e);if("function"==typeof n)return void C((r=n,i=t,function(){r.apply(i,arguments)}),e)}e._state=1,e._value=t,j(e)}catch(t){k(e,t)}var r,i}function k(e,t){e._state=2,e._value=t,j(e)}function j(e){2===e._state&&0===e._deferreds.length&&x._immediateFn((function(){e._handled||x._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)q(e,e._deferreds[t]);e._deferreds=null}function E(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function C(e,t){var n=!1;try{e((function(e){n||(n=!0,z(t,e))}),(function(e){n||(n=!0,k(t,e))}))}catch(e){if(n)return;n=!0,k(t,e)}}x.prototype.catch=function(e){return this.then(null,e)},x.prototype.then=function(e,t){var n=new this.constructor(_);return q(this,new E(e,t,n)),n},x.prototype.finally=y,x.all=function(e){return new x((function(t,n){if(!b(e))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var i=r.length;function a(e,o){try{if(o&&("object"==typeof o||"function"==typeof o)){var s=o.then;if("function"==typeof s)return void s.call(o,(function(t){a(e,t)}),n)}r[e]=o,0==--i&&t(r)}catch(e){n(e)}}for(var o=0;o<r.length;o++)a(o,r[o])}))},x.allSettled=w,x.resolve=function(e){return e&&"object"==typeof e&&e.constructor===x?e:new x((function(t){t(e)}))},x.reject=function(e){return new x((function(t,n){n(e)}))},x.race=function(e){return new x((function(t,n){if(!b(e))return n(new TypeError("Promise.race accepts an array"));for(var r=0,i=e.length;r<i;r++)x.resolve(e[r]).then(t,n)}))},x._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){g(e,0)},x._unhandledRejectionFn=function(e){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var T=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}();function S(e){var t=e instanceof File?e.name:e.filename,n=e.size,r=e instanceof File?window.URL.createObjectURL(e):new URL(e.url),i=document.createElement("div");i.className="quizle-file-upload-preview__item";var a=document.createElement("div");a.className="quizle-file-upload-preview__item-text",a.textContent=t+", "+function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],r=1024,i=0;for(;e/r>.9;)e/=r,i++;return e.toFixed(t)+n[i]}(n);var o=document.createElement("div");if(o.className="quizle-file-upload-preview__item-right",e.type.startsWith("image/")){var s=document.createElement("img");s.src=r,o.appendChild(s)}return i.appendChild(a),i.appendChild(o),i}"function"!=typeof T.Promise?T.Promise=x:(T.Promise.prototype.finally||(T.Promise.prototype.finally=y),T.Promise.allSettled||(T.Promise.allSettled=w));var D=1,I=16,P=256,L=4096,A=65536,O=function(){return u((function e(t){o(this,e),this._value=t}),[{key:"value",get:function(){return this._value}},{key:"type",get:function(){return"general"}}])}(),Q=function(t){function n(){return o(this,n),e(this,n,arguments)}return c(n,t),u(n)}(O),N=function(t){function n(t,r){var i;return o(this,n),(i=e(this,n,[t]))._customValue=r,i}return c(n,t),u(n,[{key:"type",get:function(){return"custom"}},{key:"customValue",get:function(){return this._customValue}}])}(O),R=function(t){function n(t,r){var i;return o(this,n),(i=e(this,n,[t]))._input=r,i}return c(n,t),u(n,[{key:"type",get:function(){return"file"}},{key:"input",get:function(){return this._input}}])}(O),U=function(){return u((function e(t,n,r){o(this,e),this._jquery=t,this.quizleData=[],this.answerData=[],this._decrypt=r,this._cookieName=n,null===m(n)&&function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/",i=[encodeURIComponent(e)+"="+encodeURIComponent(t)];n&&i.push("max-age="+n),i.push("path="+r),document.cookie=i.join("; ")}(n,this.generateUniqueId(),31536e4),this._submitting=!1,this._fileDataStorage=null}),[{key:"jquery",get:function(){return this._jquery}},{key:"cookieName",get:function(){return this._cookieName}},{key:"cookie",get:function(){return m(this.cookieName)}},{key:"decrypt",get:function(){return this._decrypt}},{key:"getQuizleData",value:function(e){if(void 0===this.quizleData[e.data("identity")]){var t=this.jquery;try{void 0!==e.data("results")&&(this.answerData[e.data("identity")]=JSON.parse(decodeURIComponent(atob(this.decrypt(e.data("results"))))))}catch(e){console.error(e)}this.quizleData[e.data("identity")]={isInProcess:!1,$currentQuestion:null,totalCount:Number(e.data("questions_count")),countConfirmed:0,answers:{},penalties:[],result:{},jqxhr:null,fileUploadHandler:(i=e.data("identity"),o=this.scriptParam
1s.url,s=[],{add:function(e,t){s.push({questionId:e,input:t})},upload:function(e,t){return a(n().mark((function r(){var u,c,l,d,f,p,h;return n().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:u=v(s),r.prev=1,u.s();case 3:if((c=u.n()).done){r.next=15;break}return l=c.value,r.prev=5,r.next=8,function(){var r=a(n().mark((function r(a){var u,c,l,d,f;return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:for(u=a.questionId,c=a.input,e(u,c),(l=new FormData).append("action","quizle_file_upload"),l.append("quizle",i),d=0;d<c.files.length;d++)l.append("quizle_files[]",c.files[d]);return n.next=8,fetch(o,{method:"POST",body:l});case 8:return f=n.sent,n.next=11,f.json();case 11:f=n.sent,s=s.filter((function(e){return e.questionId!==u})),t(u,c,f);case 14:case"end":return n.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}()(l);case 8:r.next=13;break;case 10:r.prev=10,r.t0=r.catch(5),console.error(r.t0);case 13:r.next=3;break;case 15:r.next=20;break;case 17:r.prev=17,r.t1=r.catch(1),u.e(r.t1);case 20:return r.prev=20,u.f(),r.finish(20);case 23:return r.abrupt("return");case 28:if((f=d.n()).done){r.next=42;break}return p=f.value,r.prev=30,r.next=33,p();case 33:h=r.sent,console.log(h),r.next=40;break;case 37:r.prev=37,r.t2=r.catch(30),console.error(r.t2);case 40:r.next=28;break;case 42:r.next=47;break;case 44:r.prev=44,r.t3=r.catch(26),d.e(r.t3);case 47:return r.prev=47,d.f(),r.finish(47);case 50:case"end":return r.stop()}}),r,null,[[1,17,20,23],[5,10],[26,44,47,50],[30,37]])})))()},hasFiles:function(){return s.length>0}})};var r=0;e.find(".js-quizle-question").each((function(e,n){return t(n).data("index",r++)})),this.submitQuizleData(e,D)}var i,o,s;return this.quizleData[e.data("identity")]}},{key:"increaseTotalCount",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.getQuizleData(e).totalCount+=t}},{key:"getRightAnswers",value:function(e,t){return this.getQuizleData(e),void 0!==this.answerData[e.data("identity")]&&void 0!==this.answerData[e.data("identity")][t.data("identity")]?this.answerData[e.data("identity")][t.data("identity")]:[]}},{key:"setInProcess",value:function(e,t){return this.getQuizleData(e).isInProcess=t,this}},{key:"isInProcess",value:function(e){return this.getQuizleData(e).isInProcess}},{key:"setCurrentQuestion",value:function(e,t){return this.getQuizleData(e).$currentQuestion=t,this}},{key:"setConfirmed",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];t.data("confirmed",n),n?t.addClass("confirmed"):t.removeClass("confirmed");var r=this.jquery,i=0;e.find(".js-quizle-question").each((function(e,t){r(t).data("confirmed")&&i++})),this.getQuizleData(e).countConfirmed=i;var a=[],o=this.getQuizleData(e).answers[t.data("identity")];if(o)for(var s=0;s<o.length;s++){var u=o[s];"custom"===u.type?a.push(u.custom_answer):"__text__"===u.answer?a.push(u.val):a.push(t.find('.js-quizle-answer[data-identity="'+u.answer+'"]').find(".quizle-answer__text").text())}return document.dispatchEvent(new CustomEvent("quizle:confirm",{detail:{quizle:e.data("title"),question:t.find(".quizle-question__title").text(),$quizle:e,$question:t,answers:a}})),this}},{key:"getCurrentQuestion",value:function(e){return this.getQuizleData(e).$currentQuestion}},{key:"addPenalty",value:function(e,t,n){var r=this.getQuizleData(e).penalties.find((function(e){return e.question_id===t}));r||(r={question_id:t,items:[]},this.getQuizleData(e).penalties.push(r));var i=r.items.filter((function(e){return e.id!==n.id}));return i.push(n),r.items=i,console.log("addPenalty",this.getQuizleData(e).penalties),this}},{key:"addAnswer",value:function(e,t,n){void 0===this.getQuizleData(e).answers[t]&&(this.getQuizleData(e).answers[t]=[]);var r=this.getQuizleData(e).penalties,i=void 0!==r[t]?r[t]:0,a={answer:"",val:"",type:n.type,hint_penalty:i};if(n instanceof Q)a.answer="__text__",a.val=n.value;else if(n instanceof R)a.answer="__file__",a.val=n.value,n.input&&this.getQuizleData(e).fileUploadHandler.add(t,n.input);
1else if(a.answer=n.value,n instanceof N&&(a.custom_answer=n.customValue),void 0!==this.answerData[e.data("identity")]&&void 0!==this.answerData[e.data("identity")][t]){var o=this.answerData[e.data("identity")][t].filter((function(e){return e.id===n.value}));o.length&&(a.val=o[0].val)}var s=this.getQuizleData(e).answers[t].filter((function(e){return e.answer!==a.answer}));return s.push(a),this.getQuizleData(e).answers[t]=s,console.log("addAnswer",this.getQuizleData(e).answers),this}},{key:"removeAnswer",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(void 0!==this.getQuizleData(e).answers[t]){if(null===n)this.getQuizleData(e).answers[t]=[];else{var r=n.value;n instanceof Q&&(r="__text__"),this.getQuizleData(e).answers[t]=this.getQuizleData(e).answers[t].filter((function(e){return e.answer!==r}))}this.getQuizleData(e).answers[t].length||delete this.getQuizleData(e).answers[t]}return console.log("removeAnswer",this.getQuizleData(e).answers),this}},{key:"getAnswersValue",value:function(e){for(var t=0,n=0,r=Object.entries(this.getQuizleData(e).answers);n<r.length;n++){var i=f(r[n],2);i[0];t+=i[1].reduce((function(e,t){var n=parseInt(t.val);return(isNaN(n)?0:n)+e}),0)}return t}},{key:"isQuestionAnswered",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return null===t&&(t=e.parents(".js-quizle")),void 0!==e.data("identity")&&void 0!==this.getQuizleData(t).answers[e.data("identity")]}},{key:"scriptParams",get:function(){return window.quizle_script_params||{}}},{key:"getContactFormHtml",value:(i=a(n().mark((function e(t){var r,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(r=new FormData).set("action","quizle_get_contact_form"),r.set("nonce",this.scriptParams.nonce),r.set("quizle",t.data("identity")),e.prev=4,e.next=7,fetch(this.scriptParams.url,{method:"POST",body:r});case 7:if((i=e.sent).ok){e.next=11;break}return console.error("Unable to retrieve quizle contact form"),e.abrupt("return",null);case 11:return e.next=13,i.json();case 13:if(!(i=e.sent).success){e.next=16;break}return e.abrupt("return",i.data.html);case 16:console.log(i),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(4),console.error(e.t0);case 22:case"end":return e.stop()}}),e,this,[[4,19]])}))),function(e){return i.apply(this,arguments)})},{key:"_submitData",value:(r=a(n().mark((function e(t,r){var i,a,o,s,u,c,l=this,d=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=d.length>2&&void 0!==d[2]?d[2]:null,a=d.length>3&&void 0!==d[3]?d[3]:null,!this._submitting){e.next=5;break}return console.log("is submitting..."),e.abrupt("return",new Promise((function(e,n){document.addEventListener("quizle:fetch_done",(function n(o){console.log("call afterFetch()"),document.removeEventListener("quizle:fetch_done",n),e(l._submitData(t,r,i,a))}))})));case 5:if(this._submitting=!0,o=function(e){return l._submitting=!1,document.dispatchEvent(new CustomEvent("quizle:fetch_done")),e},s=!!t.data("options").save_contacts_and_results,e.prev=8,(u=new FormData(null!==i?i:void 0)).set("action","quizle_save_result"),u.set("nonce",this.scriptParams.nonce),u.set("data[quizle]",t.data("identity")),u.set("data[cookie]",this.cookie),u.set("data[context]",t.data("context")),a&&u.append("data[gr-token]",a),s||I&r||L&r){e.next=18;break}return e.abrupt("return",o(null));case 18:return s?D&r?u.append("data[_action][init_result]",1):(u.set("data[result][id]",this.getQuizleData(t).result.id),u.set("data[result][_mac]",this.getQuizleData(t).result._mac)):u.set("data[_use_empty_result]",1),s&&P&r&&(u.append("data[_action][update_answers]",1),u.set("data[penalties]",JSON.stringify(this.getQuizleData(t).penalties)),u.set("data[answers]",JSON.stringify(this.getQuizleData(t).answers))),s&&A&r&&u.append("data[_action][update_finished]",1),L&r&&u.append("data[_action][update_contacts]",1),I&r&&(u.append("data[_action][get_result_content]",1),u.set("data[score]",this.getAnswersValue(t)),s||(u.set("data[penalties]",JSON.stringify(this.getQuizleData(t).penalties)),u.set("data[answers]",JSON.stringify(this.getQuizleData(t).answers)))),document.dispatchEvent(new CustomEvent("quizle:before_submit_contacts",{detail:{formData:u,$quizle:t,actionMask:r}}
1)),e.next=26,fetch(this.scriptParams.url,{method:"POST",body:$(u)});case 26:if((c=e.sent).ok){e.next=29;break}return e.abrupt("return",o(null));case 29:return e.next=31,c.json();case 31:if(!(c=e.sent).success){e.next=36;break}return D&r&&(this.getQuizleData(t).result=c.data.result),L&r&&document.dispatchEvent(new CustomEvent("quizle:submit_contacts",{detail:{quizle:t.data("title"),$quizle:t}})),e.abrupt("return",o(new B(c.data)));case 36:return e.abrupt("return",o(new M(c.data)));case 39:e.prev=39,e.t0=e.catch(8),console.error(e.t0);case 42:return e.abrupt("return",o(null));case 43:case"end":return e.stop()}}),e,this,[[8,39]])}))),function(e,t){return r.apply(this,arguments)})},{key:"uploadFiles",value:(t=a(n().mark((function e(t,r,i){var a=this;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.getQuizleData(t).fileUploadHandler.hasFiles()){e.next=4;break}return e.next=3,this.getQuizleData(t).fileUploadHandler.upload(r,(function(e,n,r){a.removeAnswer(t,e),r.success&&a.addAnswer(t,e,new R(r.data.files)),i(e,n,r)}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e,this)}))),function(e,n,r){return t.apply(this,arguments)})},{key:"submitQuizleData",value:(e=a(n().mark((function e(t,r){var i,a,o=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=o.length>2&&void 0!==o[2]?o[2]:null,a=null,!(L&r)){e.next=14;break}if(!t.data("options")||!t.data("options").gr_enabled){e.next=14;break}return e.prev=4,e.next=7,F(t.data("options").gr_site_key,"submit_contacts");case 7:a=e.sent,e.next=14;break;case 10:return e.prev=10,e.t0=e.catch(4),console.error(e.t0),e.abrupt("return",new M({message:this.scriptParams.i18n.captchaErrorMessage||"Unable to validate captcha. Please try again later."}));case 14:return e.abrupt("return",this._submitData(t,r,i,a));case 15:case"end":return e.stop()}}),e,this,[[4,10]])}))),function(t,n){return e.apply(this,arguments)})},{key:"generateUniqueId",value:function(){return Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10)}}]);var e,t,r,i}();function F(e,t){return new Promise((function(n,r){if(!e)return r(new Error("Missing reCAPTCHA site key"));if(void 0===window.grecaptcha||"function"!=typeof window.grecaptcha.ready||"function"!=typeof window.grecaptcha.execute)return r(new Error("reCAPTCHA API is unavailable"));var i=setTimeout((function(){r(new Error("reCAPTCHA validation timeout"))}),1e4);window.grecaptcha.ready((function(){window.grecaptcha.execute(e,{action:t}).then((function(e){clearTimeout(i),e?n(e):r(new Error("Empty reCAPTCHA token"))})).catch((function(e){clearTimeout(i),r(e)}))}))}))}var B=function(){return u((function e(t){o(this,e),this._data=t}),[{key:"resultContent",get:function(){return this._data.result_content}},{key:"contactsRedirect",get:function(){return this._data.contacts_redirect}},{key:"contactsRedirectTimout",get:function(){return this._data.contacts_redirect_timeout}},{key:"resultRedirect",get:function(){return this._data.result_redirect}},{key:"contactsSuccessMessage",get:function(){return this._data.contacts_success_message}}])}(),M=function(){return u((function e(t){o(this,e),this._data=t}),[{key:"messages",get:function(){return Array.isArray(this._data)?this._data.map((function(e){return e.message})):[this._data.message]}}])}();function $(e){var t=new FormData;return Array.from(e.entries()).sort((function(e,t){return f(e,1)[0]>f(t,1)[0]?1:-1})).forEach((function(e){var n=f(e,2),r=n[0],i=n[1];t.append(r,i)})),t}function H(e){return G.apply(this,arguments)}function G(){return G=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e){setTimeout((function(){return e()}),t)})));case 1:case"end":return e.stop()}}),e)}))),G.apply(this,arguments)}function V(e,t){var n;return function(){var r=this,i=arguments;clearTimeout(n),n=setTimeout((function(){return e.apply(r,i)}),t)}}var Y="quizle-goodshare-plugin-js",J=!1;function W(e){return X.apply(this,arguments)}function X(){return X=a(n().mark((function e(t){var r,i,a=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=a.length>1&&void 0!==a[1]&&a[1],t){e.next=4;break}return console.warn("Unable to init social share script for quizle"),e.abrupt("return");case 4:if(null!==document.getElementById(Y)){e.next=13;break}return(i=document.createElement("script")).id=Y,i.src=t||"//cdn.jsdelivr.net/npm/goodshare.js@6/goodshare.min.js",i.type="text/javascript",i.onload=function(){J=!0,r&&Z()},i.async=1,e.next=13,(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(i);case 13:r&&(J?Z():document.getElementById(Y).onload=function(){J=!0,Z()});case 14:case"end":return e.stop()}}),e)}))),X.apply(this,arguments)}function Z(){window._goodshare.reNewAllInstance()}function K(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(null===e)return!1;var t=function(e){function t(t){var n=t.target,r=t.compare,i=t.value,a=t.compareOptions,o=e[n];if(void 0===o)return!1;o=Array.isArray(o)?o:[o];var s=!1;switch(r){case"in":for(var u=0;u<o.length;u++)if(i.includes(o[u].answer))return!0;return!1;
1case"like":for(var c=a.partial,l=void 0===c||c,d=a.caseSensitive,f=void 0!==d&&d,p=0;p<o.length;p++)if("__text__"===o[p].answer)return ee(o[p].val,i[0],l,f);return!1;default:console.warn('Unknown compare operation"'+r+'"')}return s}return function(e){var n=e.type,r=e.relation,i=e.conditions;if(!["AND","OR"].includes(r.toUpperCase()))return!1;var a=i.filter((function(e){return!parseInt(e.disabled)})).reduce((function(e,n){return"AND"===r.toUpperCase()?e&&t(n):e||t(n)}),"AND"===r.toUpperCase());return"show"===n?a:!a}}(arguments.length>1?arguments[1]:void 0);return e.reduce((function(e,n){return e&&t(n)}),!0)}function ee(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];"string"!=typeof e&&(e=e.toString()),t=t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),r||(e=e.toUpperCase(),t=t.toUpperCase());var i=t.replace(/%/g,".*");return n||(i="^"+i+"$"),new RegExp(i).test(e)}function te(){var e;return{start:function(t,r,i){var o=arguments;return a(n().mark((function a(){var s,u,c,l,d,f;return n().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(s=o.length>3&&void 0!==o[3]?o[3]:null,!(t<1e3)){n.next=3;break}return n.abrupt("return");case 3:if(!s){n.next=6;break}return n.next=6,H(s);case 6:u=(new Date).getTime(),c=new Date(u+t).getTime(),l=Math.floor(t/1e3),d=0,f=function(){d++;var t=(new Date).getTime(),n=c-t,a=Math.floor(n/864e5),o=Math.floor(n%864e5/36e5),s=Math.floor(n%36e5/6e4),u=Math.floor(n%6e4/1e3),f=Math.max(0,Math.min(100,parseFloat(d/l*100).toFixed(4)));r({progress:f,days:a,hours:o,minutes:s,seconds:u}),n<0&&(clearInterval(e),i())},f(),e=setInterval(f,1e3);case 14:case"end":return n.stop()}}),a)})))()},stop:function(){clearInterval(e)}}}jQuery((function(e){var t,r,i,o="test",s={LIST:"list",SLIDES:"slides"},u={BEFORE_RESULTS:"before_results",AFTER_RESULTS:"after_results",ONLY_CONTACTS:"only_contacts"},c=(t=[],{block:function(e,n){(t=t.filter((function(t){return t.type!==e}))).push({type:e,reason:n})},unblock:function(e){t=t.filter((function(t){return t.type!==e}))},canSubmit:function(){return!t.length},getBlockReason:function(){return t.map((function(e){return e.reason})).join("\n")}}),l=3500,d=1100,p=3500,h=(r=m(atob("cXVpemxlLXNhbHQ=")),i=function(e){return(t=r,t.split("").map((function(e){return e.charCodeAt(0)}))).reduce((function(e,t){return e^t}),e);var t},function(e){return e.match(/.{1,2}/g).map((function(e){return parseInt(e,16)})).map(i).map((function(e){return String.fromCharCode(e)})).join("")}),v=new U(e,atob("cXVpemxlLXVpZA=="),h);e("body").hasClass("single-quizle-result")&&W(v.scriptParams.goodshare_url,!0);var y,w=function(e){e.data("_started")||(e.data("_started",1),b(e),document.dispatchEvent(new CustomEvent("quizle:start",{detail:{quizle:e.data("title"),$quizle:e}})))},g=function(e){document.dispatchEvent(new CustomEvent("quizle:finish",{detail:{quizle:e.data("title"),$quizle:e}}))},b=function(e){if(qe(e,"ym_enabled")){if(e.data("_init_metrika"))return;!function(e){function t(t,n){if("undefined"!=typeof ym)try{ym(e,"reachGoal",t,n,(function(){}))}catch(e){console.error(e)}}document.addEventListener("quizle:start",(function(e){t("quizle:start",{quizle:e.detail.quizle})})),document.addEventListener("quizle:finish",(function(e){t("quizle:finish",{quizle:e.detail.quizle})})),document.addEventListener("quizle:next",(function(e){t("quizle:next",{quizle:e.detail.quizle,question:e.detail.$question.find(".quizle-question__title").text()})})),document.addEventListener("quizle:prev",(function(e){t("quizle:prev",{quizle:e.detail.quizle,question:e.detail.$question.find(".quizle-question__title").text()})})),document.addEventListener("quizle:show_results",(function(e){t("quizle:show_results",{quizle:e.detail.quizle})})),document.addEventListener("quizle:show_contacts",(function(e){t("quizle:show_contacts",{quizle:e.detail.quizle})})),document.addEventListener("quizle:submit_contacts",(function(e){t("quizle:submit_contacts",{quizle:e.detail.quizle})})),document.addEventListener("quizle:progress",(function(e){t("quizle:progress",{quizle:e.detail.quizle,percent:e.detail.percent})}))}(qe(e,"ym_counter")),e.data("_init_metrika",1)}},_=function(){var e=a(n().mark((function e(t,r){var i,o,u,c,l;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=qe(t,"completion_time")){e.next=3;break}return e.abrupt("return");case 3:if(!t.data("_stop_completion_countdown")){e.next=5;break}return e.abrupt("return");case 5:o=t.find(".js-quizle-expiration-countdown"),u=o.find(".js-quizle-expiration-countdown-progress"),c=o.find(".js-quizle-expiration-countdown-time"),l=te(),o.show(),t.data("_stop_completion_countdown",l.stop),l.start(1e3*i,(function(e){var t=e.progress,n=e.days,r=e.hours,i=e.minutes,a=e.seconds,o=(i||0).toString().padStart(2,"0")+":"+(a||0).toString().padStart(2,"0");r&&(o=r.toString().padStart(2,"0")+":"+o),n&&(o=n+" "+o),u.css("width",t+"%"),c.text(o)}),a(n().mark((function e(){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.hide(),qe(t,"view_type")!==s.SLIDES){e.next=7;break}return e.next=4,fe(t,!0);case 4:Y(t,!0),e.next=9;break;case 7:fe(t,!1),j(t,null,!0);case 9:case"end":return e.stop()}}),e)}))),r);case 12:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),q=function(e){var t=e.data("_stop_completion_countdown");t&&(e.removeData("_stop_completion_countdown"),t(),e.find(".js-quizle-expiration-countdown").hide())},z=function(){var e=a(n().mark((function e(t,r){var i,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a=function(e){if("undefined"!=typeof intlTelInputUtils){var n,a=i.getNumber(intlTelInputUtils.numberFormat.E164);if("string"==typeof a){var o,s=(i.getSelectedCountryData().dialCode||"").concat(e.target.placeholder).replace(/[^0-9]/g,"").length-a.replace(/[^0-9]/g,"").length;if(s>0){for(var u=0,l=0,d=(o=intlTelInputUtils.formatNumber(a.concat(new Array(s).fill(0).join("")),i.getSelectedCountryData().dialCode,intlTelInputUtils.numberFormat.INTERNATIONAL)).split("").reverse(),f=0;f<s;f++){for(var p=f+l;" "===(n=d[p])||!Number.isInteger(Number(n));)p++,l++;u=f+l}o=d.slice(u+1).reverse().join("")}else o=intlTelInputUtils.formatNumber(a,i.getSelectedCountryData().dialCode,intlTelInputUtils.numberFormat.INTERNATIONAL);i.setNumber(o),r.value=i.getNumber(intlTelInputUtils.numberFormat.INTERNATIONAL),a?i.isValidNumber()?(c.unblock("phone"),t.classList.remove("invalid"),t.classList.add("valid")):(t.classList.add("invalid"),t.classList.remove("valid"),c.block("phone",v.scriptParam
1s.i18n.wrongPhoneMessage)):t.classList.remove("valid","invalid")}}},i=window.intlTelInput(t,{utilsScript:v.scriptParams.intlTelInput.utilsScriptSrc,localizedCountries:v.scriptParams.intlTelInput.localizedCountries,preferredCountries:v.scriptParams.intlTelInput.preferredCountries,onlyCountries:v.scriptParams.intlTelInput.onlyCountries,separateDialCode:!0,nationalMode:!1,formatOnDisplay:!1,placeholderNumberType:"MOBILE"}),t.addEventListener("keyup",V(a,300)),t.addEventListener("change",a);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();function k(e,t,n){var r=(n.val()||"").trim();r?n.parents(".js-quizle-answer").addClass("checked"):n.parents(".js-quizle-answer").removeClass("checked"),v.removeAnswer(e,t.data("identity")).addAnswer(e,t.data("identity"),new Q(r))}function j(e){return E.apply(this,arguments)}function E(){return E=a(n().mark((function t(r){var i,o,s,c,l,d,f,p=arguments;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=p.length>1&&void 0!==p[1]?p[1]:null,o=p.length>2&&void 0!==p[2]&&p[2],w(r),i&&i.prop("disabled",!0),r.find(".js-quizle-question").removeClass("require-select-answer"),s=!1,c=null,r.find(".js-quizle-question").each((function(t,n){var i=e(n);i.data("required")&&(v.isQuestionAnswered(i,r)||(s=!0,i.addClass("require-select-answer"),null===c&&(c=i)))})),o||!s){t.next=14;break}if(ze(c)){t.next=12;break}return t.next=12,ke(c.offset().top+20);case 12:return i&&(i.blur(),i.prop("disabled",!1)),t.abrupt("return");case 14:if(i&&i.blur(),r.find(".js-quizle-question").each((function(t,n){var i=e(n);i.find(".js-quizle-answer input, .js-quizle-answer textarea").each((function(){var t=e(this);t.data("is_custom_answer")||t.is(":checkbox")||t.is(":radio")||k(r,i,t)})),v.setConfirmed(r,i)})),g(r),q(r),r.find(".js-quizle-custom-answer-input").prop("disabled",!0),!qe(r,"show_results")){t.next=24;break}return l=[],r.find(".js-quizle-question").each(function(){var t=a(n().mark((function t(r,i){return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",l.push(F(e(i))));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}()),t.next=24,x.all(l);case 24:if(i&&(i.prop("disabled",!1),i.hide(),i.parents(".js-quizle-footer").hide()),d=qe(r,"contacts_order"),u.AFTER_RESULTS!==d&&null!==d){t.next=34;break}return t.next=29,v.submitQuizleData(r,P|I|A);case 29:f=t.sent,oe(r,f),he(r,!1),t.next=38;break;case 34:if(u.BEFORE_RESULTS!==d&&u.ONLY_CONTACTS!==d){t.next=38;break}return t.next=37,v.submitQuizleData(r,P|A);case 37:me(r,!1);case 38:case"end":return t.stop()}}),t)}))),E.apply(this,arguments)}function C(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d,r=t.parents(".js-quizle");return new x((function(i){v.setInProcess(r,!0),_e(r);var a=v.getRightAnswers(r,t);a.forEach((function(e){t.find('[data-identity="'+e.id+'"]').addClass("reveal-right")})),t.find(".js-quizle-answer.checked").each((function(){var t=e(this);t.addClass(a.filter((function(e){return e.id===t.data("identity")})).length?"right":"wrong")})),setTimeout((function(){v.setInProcess(r,!1),_e(r),i(t)}),n)}))}function T(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return function(t){t.data("answer_desc_shown",1);var n=t.parents(".js-quizle");return new x((function(r){var i=t.find(".js-quizle-answer-description");i.text()?e?t.find(".js-quizle-answers").animate({height:0,opacity:0},qe(n,"animation_duration"),(function(){i.show(0,(function(){r(t)}))})):i.slideDown(qe(n,"animation_duration"),(function(){r(t)})):r(t)}))}}function D(e){var t=e.find(".js-quizle-answer-description");return new x((function(n,r){try{var i=t.text();!t.data("enc")&&i&&(i=decodeURIComponent(atob(h(i))),t.data("enc",1),t.html(i)),n(e)}catch(e){r(e)}}))}function F(e){return B.apply(this,arguments)}function B(){return(B=a(n().mark((function e(t){return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C(t);case 2:return e.next=4,D(t);case 4:return e.next=6,T(!1)(t);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $(e){return G.apply(this,arguments)}function G(){return(G=a(n().mark((function e(t){var r,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.parents(".js-quizle"),!v.isInProcess(r)){e.next=4;break}return e.abrupt("return",null);case 4:return v.setConfirmed(r,t),e.next=7,Z(t);case 7:return null===(i=e.sent)?Y(r,!0):(_e(r),we(i),X(t),i.find('.js-quizle-answer input[type="text"], .js-quizle-answer textarea').first().trigger("focus"),document.dispatchEvent(new CustomEvent("quizle:next",{detail:{quizle:r.data("title"),$quizle:r,$question:i}}))),e.abrupt("return",i);case 10:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(e,t){return J.apply(this,arguments)}function J(){return(J=a(n().mark((function e(t,r){var i,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=qe(t,"contacts_order"),a=qe(t,"view_type"),e.next=4,le(t);case 4:if(!r&&qe(t,"can_change_answer")){e.next=20;break}if(g(t),q(t),qe(t,"show_results")){e.next=10;break}return e.next=10,H(600);case 10:if(u.BEFORE_RESULTS!==i&&u.ONLY_CONTACTS!==i){e.next=16;break}return v.submitQuizleData(t,P|A),e.next=14,me(t,s.SLIDES===a);case 14:e.next=20;break;case 16:if(u.AFTER_RESULTS!==i&&null!==i){e.next=20;break}return x.all([v.submitQuizleData(t,P|I|A),ue(t)]).then((function(e){var n=f(e,1)[0];null!==n&&oe(t,n)}
1)),e.next=20,he(t,s.SLIDES===qe(t,"view_type"));case 20:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function X(e){e.find(".js-quizle-video, .js-quizle-video-embed iframe").each((function(){if("video"===this.tagName.toLowerCase())this.pause();else{var e=this.src;this.src=e}}))}function Z(e){return ee.apply(this,arguments)}function ee(){return ee=a(n().mark((function e(t){var r,i,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.parents(".js-quizle"),i=t.next(),a=0;case 3:if(!(a<1e4)){e.next=10;break}if(i.data("conditions")){e.next=6;break}return e.abrupt("break",10);case 6:K(i.data("conditions"),v.getQuizleData(r).answers)||(v.removeAnswer(r,i.data("identity")),i=i.next());case 7:a++,e.next=3;break;case 10:if(i.data("conditions")&&!i.data("_increased_total_count")&&(i.data("_increased_total_count",1),v.increaseTotalCount(r)),ge(r),i.length){e.next=14;break}return e.abrupt("return",null);case 14:return e.abrupt("return",new x((function(e){i.addClass("show"),t.addClass("hide"),v.setInProcess(r,!0),setTimeout((function(){t.hide().removeClass("hide show"),i.show().removeClass("show"),v.setInProcess(r,!1).setCurrentQuestion(r,i.length?i:null),be(i),e(i)}),qe(r,"animation_duration"))})));case 15:case"end":return e.stop()}}),e)}))),ee.apply(this,arguments)}function ne(e){return re.apply(this,arguments)}function re(){return(re=a(n().mark((function e(t){var r,i;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.parents(".js-quizle"),!v.isInProcess(r)){e.next=3;break}return e.abrupt("return",null);case 3:return e.next=5,ie(t);case 5:return i=e.sent,v.setCurrentQuestion(r,i),_e(r),we(i),document.dispatchEvent(new CustomEvent("quizle:prev",{detail:{quizle:r.data("title"),$quizle:r,$question:i}})),e.abrupt("return",i);case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ie(e){return ae.apply(this,arguments)}function ae(){return ae=a(n().mark((function e(t){var r,i,a;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=t.parents(".js-quizle"),i=t.prev(),a=0;case 3:if(!(a<1e4)){e.next=10;break}if(i.data("conditions")){e.next=6;break}return e.abrupt("break",10);case 6:i=i.prev();case 7:a++,e.next=3;break;case 10:if(i.length){e.next=12;break}return e.abrupt("return",null);case 12:return e.abrupt("return",new x((function(e){v.setInProcess(r,!0),i.addClass("hide"),t.addClass("show"),setTimeout((function(){t.hide().removeClass("hide").removeClass("show"),i.css("display","flex").removeClass("hide"),v.setInProcess(r,!1),be(i),e(i)}),qe(r,"animation_duration"))})));case 13:case"end":return e.stop()}}),e)}))),ae.apply(this,arguments)}function oe(e,t){return se.apply(this,arguments)}function se(){return se=a(n().mark((function t(r,i){var a,o,s=arguments;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=!(s.length>2&&void 0!==s[2])||s[2],i){t.next=3;break}return t.abrupt("return",!1);case 3:if(!(i instanceof M)){t.next=6;break}return alert(i.messages.join("\n")),t.abrupt("return",!1);case 6:if(!a||!i.resultRedirect){t.next=16;break}return t.prev=7,window.location.href=new URL(i.resultRedirect),H(1e4),t.abrupt("return",!1);case 13:t.prev=13,t.t0=t.catch(7),console.error(t.t0);case 16:if(i.resultContent){t.next=18;break}return t.abrupt("return",!1);case 18:if((o=r.find(".js-quizle-results")).empty().append(e(i.resultContent)),!o.find(".js-social-share").length){t.next=23;break}return t.next=23,W(v.scriptParams.goodshare_url,!0);case 23:return t.abrupt("return",!0);case 24:case"end":return t.stop()}}),t,null,[[7,13]])}))),se.apply(this,arguments)}function ue(e){return ce.apply(this,arguments)}function ce(){return ce=a(n().mark((function e(t){var r;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=qe(t,"progress_animation_duration")||2e3,e.abrupt("return",new x((function(e){var n=0,i=t.find(".js-result-progress-bar"),a=setInterval((function(){n+=Number(100/r*100),n=Math.min(100,n),i.css("width",n.toFixed(2)+"%")}),100);setTimeout((function(){clearInterval(a),i.css("width","100%"),e()}),r+r/5)})));case 2:case"end":return e.stop()}}),e)}))),ce.apply(this,arguments)}function le(e){return de.apply(this,arguments)}function de(){return(de=a(n().mark((function e(t){var r;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((r=t.find(".js-quizle-upload-screen")).length){e.next=3;break}return e.abrupt("return");case 3:return qe(t,"view_type")===s.SLIDES&&(t.find(".js-quizle-questions").hide(),t.find(".js-quizle-footer").hide(),t.find(".js-quizle-contacts").hide()),r.show(),e.next=7,v.uploadFiles(t,(function(e,t){console.log("start upload")}),(function(e,t,n){console.log("finish upload")}));case 7:r.hide();case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fe(e){return pe.apply(this,arguments)}function pe(){return pe=a(n().mark((function e(t){var r,i,a=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=!(a.length>1&&void 0!==a[1])||a[1],i=a.length>2&&void 0!==a[2]?a[2]:p,e.abrupt("return",new x((function(e){r&&(t.find(".js-quizle-questions").fadeOut(qe(t,"animation_duration")),t.find(".js-quizle-footer").hide(),t.find(".js-quizle-contacts").hide()),t.find(".js-quizle-progress").hide(),i<qe(t,"animation_duration")&&(i=qe(t,"animation_duration"));var n=t.find(".js-quizle-completion-expire");r?setTimeout((function(){n.fadeIn(qe(t,"animation_duration"))}),qe(t,"animation_duration")):n.fadeIn(qe(t,"animation_duration")),document.dispatchEvent(new CustomEvent("quizle:completion_time_expired",{detail:{quizle:t.data("title"),$quizle:t}})),setTimeout((function(){r&&n.hide(),e(t)}
1),i)})));case 3:case"end":return e.stop()}}),e)}))),pe.apply(this,arguments)}function he(e){return ve.apply(this,arguments)}function ve(){return ve=a(n().mark((function e(t){var r,i=arguments;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>2&&void 0!==i[2]?i[2]:l,(!(i.length>1&&void 0!==i[1])||i[1])&&(t.find(".js-quizle-questions").fadeOut(qe(t,"animation_duration")),t.find(".js-quizle-footer").hide(),t.find(".js-quizle-contacts").hide()),t.find(".js-quizle-progress").hide(),e.abrupt("return",new x((function(e){r<qe(t,"animation_duration")&&(r=qe(t,"animation_duration")),t.find(".js-quizle-results").fadeIn(qe(t,"animation_duration")),document.dispatchEvent(new CustomEvent("quizle:show_results",{detail:{quizle:t.data("title"),$quizle:t}})),setTimeout((function(){return e(t)}),r)})));case 5:case"end":return e.stop()}}),e)}))),ve.apply(this,arguments)}function me(e){return ye.apply(this,arguments)}function ye(){return ye=a(n().mark((function t(r){var i,a,o,s,u=arguments;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=!(u.length>1&&void 0!==u[1])||u[1],v.setInProcess(r,!0),!(a=r.find(".js-quizle-contacts-placeholder")).length){t.next=8;break}return t.next=6,v.getContactFormHtml(r);case 6:(o=t.sent)?a.replaceWith(e(o)):console.error("Unable to retrieve html of contacts form");case 8:if((s=r.find(".js-quizle-contacts")).length){t.next=11;break}return t.abrupt("return",r);case 11:return i&&(r.find(".js-quizle-questions").hide(),r.find(".js-quizle-footer").hide(),r.find(".js-quizle-results").hide()),r.find(".js-quizle-progress").hide(),t.abrupt("return",new x((function(t){s.fadeIn(qe(r,"animation_duration"),(function(){v.setInProcess(r,!1),xe(r),s.find("input").first().trigger("focus"),s.find(".js-quizle-contacts-phone").each((function(){var t=e(this);z(t.find('input[type="tel"]').get(0),t.find('input[type="hidden"]').get(0))})),document.dispatchEvent(new CustomEvent("quizle:show_contacts",{detail:{quizle:r.data("title"),$quizle:r}})),t(r)}))})));case 14:case"end":return t.stop()}}),t)}))),ye.apply(this,arguments)}function we(e){var t=e.parents(".js-quizle"),n=e.prev(),r=t.find(".js-quizle-prev-step");n.length?r.prop("disabled",!1):r.prop("disabled",!0)}function ge(e){var t=e.find(".js-quizle-progress"),n=v.getQuizleData(e),r=n.totalCount,i=n.countConfirmed,a=null;if(i>0&&(a=Number(i/r*100),document.dispatchEvent(new CustomEvent("quizle:progress",{detail:{quizle:e.data("title"),$quizle:e,percent:a}}))),"line"===t.data("type")){var o=t.find(".js-quizle-progress-bar"),s=t.find(".js-quizle-progress-percent"),u="0";a&&(u=a.toFixed(2)+"%",o.css({width:u}),s.text(a.toFixed(0)+"%"))}"numbers"===t.data("type")&&(t.find(".js-quizle-progress-step").text(i),t.find(".js-quizle-progress-total").text(r))}function be(e){var t=e.parents(".js-quizle").find(".js-quizle-next-step-description");if("textarea"===e.data("type")){if(void 0!==t.data("_text_stash"))return;t.data("_text_stash",t.text()),t.text(t.data("shift"))}else void 0!==t.data("_text_stash")&&t.text(t.data("_text_stash"))}function _e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:!qe(e,"prevent_autofocus"),n=v.getCurrentQuestion(e);if(null!==n){var r=e.find(".js-quizle-next-step"),i=n.data("required")&&!v.isQuestionAnswered(n);v.isInProcess(e)&&(i=!0),r.prop("disabled",i),!t||i||r.is(":focus")||r.trigger("focus"),n.next().length?void 0!==r.data("source_text")&&r.text(r.data("source_text")):(void 0===r.data("source_text")&&r.data("source_text",r.text()),r.text(r.data("finish_text")))}}function xe(e){var t=e.find(".js-quizle-contact-data form");if(!t.length)return!0;var n=e.find('.js-quizle-contacts-agreement[data-required="1"]'),r=!n.length||n.filter(":checked").length===n.length;return r?c.unblock("agreement"):c.block("agreement",v.scriptParams.i18n.applyAgreement),t.find('button[type="submit"]').attr("disabled",!r),r}function qe(e,t){return e.data("options")[t]}function ze(e){"function"==typeof jQuery&&e instanceof jQuery&&(e=e[0]);var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}function ke(e){return je.apply(this,arguments)}function je(){return je=a(n().mark((function t(r){var i,a=arguments;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=a.length>1&&void 0!==a[1]?a[1]:500,t.abrupt("return",new x((function(t){e([document.documentElement,document.body]).animate({scrollTop:r},i,t)})));case 2:case"end":return t.stop()}}),t)}))),je.apply(this,arguments)}e(document).on("keydown",'.js-quizle-answer input[type="text"], .js-quizle-answer textarea',(function(t){var n=e(t.currentTarget),r=n.parents(".js-quizle"),i=n.parents(".js-quizle-question"),a=n.parents(".js-quizle-answer");w(r),_(r);var o=function(){return!i.data("required")||!!(n.val()||"").trim().length};13===t.keyCode&&n.is("input")&&o()||13===t.keyCode&&n.is("textarea")&&t.shiftKey&&o()?$(i):(clearTimeout(y),y=setTimeout((function(){v.setCurrentQuestion(r,i),n.data("is_custom_answer")&&!i.data("is_multiple")&&i.find(".js-quizle-answer").removeClass("checked");var e=(n.val()||"").trim(),t=n.data("is_custom_answer")?new N(a.data("identity"),e):new Q(e);e&&e.trim()?(n.parents(".js-quizle-answer").addClass("checked"),v.removeAnswer(r,i.data("identity"),t).addAnswer(r,i.data("identity"),t)):(n.parents(".js-quizle-answer").removeClass("checked"),v.removeAnswer(r,i.data("identity"),t)),_e(r,!1),be(i)}),300))})),e(document).on("click",".js-quizle-answer input",(function(t){var n=e(t.currentTarget).parents(".js-quizle-answer").find(".js-quizle-custom-answer-input");n.length&&!(n.val()||"").trim()&&t.preventDefault()})),e(document).on("change",".js-quizle-answer input:not([type=file]), .js-quizle-answer textarea",function(){var t=a(n().mark((function t(r){var i,a,u,c,l,d,f;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e(r.currentTarget),a=i.parents(".js-quizle"),u=i.parents(".js-quizle-question"),c=i.parents(".js-quizle-answer"),l=c.find(".js-quizle-custom-answer-input"),w(a),_(a),!u.data("confirmed")||qe(a,"can_change_answer")){t.next=5;break}return t.abrupt("return");case 5:if(d=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return l.length?(null===e&&(e=(l.val()||"").trim()),new N(c.data("identity"),e)):new O(c.data("identity"))},v.setCurrentQuestion(a,u),i.is(":checkbox")?i.is(":checked")?(c.addClass("checked"),v.addAnswer(a,u.data("identity"),d())):(c.removeClass("checked"),v.removeAnswer(a,u.data("identity"),d())):i.is(":radio")?(u.find(".js-quizle-answer").removeClass("checked"),c.addClass("checked"),v.removeAnswer(a,u.data("identity")).addAnswer(a,u.data("identity"),d())):i.data("is_custom_answer")?(f=(i.val()||"").trim())?(u.data("is_multiple")||(u.find(".js-quizle-answer").removeClass("checked"),v.removeAnswer(a,u.data("identity"))),c.addClass("checked"),v.addAnswer(a,u.data("identity"),d(f))):(c.removeClass("checked"),v.removeAnswer(a,u.data("identity"),d(f))):k(a,u,i),_e(a),qe(
1a,"type")===o&&qe(a,"show_results")){t.next=18;break}if("radio"!==i.prop("type")){t.next=18;break}if(!v.isInProcess(a)){t.next=13;break}return t.abrupt("return");case 13:if(qe(a,"view_type")===s.SLIDES){t.next=15;break}return t.abrupt("return");case 15:if(qe(a,"prevent_auto_next")){t.next=18;break}return t.next=18,$(u);case 18:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e(document).on("click",".js-quizle-answer input[type=file]",(function(t){e(t.currentTarget).parents(".js-quizle-question").data("confirmed")&&t.preventDefault()})),e(document).on("change",".js-quizle-answer input[type=file]",(function(t){var n=e(t.currentTarget),r=n.parents(".js-quizle"),i=n.parents(".js-quizle-question");if(function(e){if(v.scriptParams.files.allowed)return!!e.data("options").save_contacts_and_results}(r)){if(w(r),_(r),i.find(".js-quizle-file-upload-messages").empty(),v.setCurrentQuestion(r,i),v.removeAnswer(r,i.data("identity")),n.get(0).files.length>v.scriptParams.files.limit){n.val("");var a=e("<p>");a.addClass("warning"),a.text(v.scriptParams.files.messages.maxFilesExceed),i.find(".js-quizle-file-upload-messages").append(a)}n.get(0).files.length&&v.addAnswer(r,i.data("identity"),new R(null,n.get(0))),_e(r),function(e,t){for(;t.firstChild;)t.removeChild(t.firstChild);var n=e.files;if(n.length>0)for(var r=0;r<n.length;r++)t.appendChild(S(n[r]))}(n.get(0),i.find(".quizle-file-upload-preview").get(0))}})),e(document).on("click",".js-quizle-welcome-start",function(){var t=a(n().mark((function t(r){var i,a,o,u,c;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e(r.currentTarget).parents(".js-quizle"),!v.isInProcess(i)){t.next=3;break}return t.abrupt("return");case 3:a=i.find(".js-quizle-welcome"),o=i.find(".js-quizle-body"),u=i.find(".js-quizle-questions"),v.setInProcess(i,!0),c=u.find(".js-quizle-question:first"),v.setCurrentQuestion(i,c),be(c),s.SLIDES===qe(i,"view_type")&&(u.find(".js-quizle-question").hide(),u.find(".js-quizle-question:first").show()),a.fadeOut(qe(i,"animation_duration"),(function(){o.fadeIn(qe(i,"animation_duration")),v.setInProcess(i,!1),s.SLIDES===qe(i,"view_type")&&(_e(i),we(c))})),w(i),_(i,2*qe(i,"animation_duration"));case 12:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e(document).on("click",".js-quizle-prev-step, .js-quizle-next-step",function(){var t=a(n().mark((function t(r){var i,a,s,u;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i=e(r.currentTarget),a=i.parents(".js-quizle"),s=i.data("direction"),u=a.find(".quizle-question:visible:first"),"next"!==s){t.next=29;break}if(!u.data("confirmed")){t.next=7;break}return t.next=6,$(u,!0);case 6:case 10:case 18:return t.abrupt("return");case 7:if("file"!==u.data("type")){t.next=11;break}return t.next=10,$(u,!0);case 11:if(u.find(".js-quizle-answer input, .js-quizle-answer textarea").each((function(){var t=e(this);t.data("is_custom_answer")||t.is(":checkbox")||t.is(":radio")||k(a,u,t)})),u.find(".js-quizle-custom-answer-input").prop("disabled",!0),qe(a,"type")!==o){t.next=27;break}if(!qe(a,"show_results")){t.next=23;break}if(!u.data("answer_desc_shown")){t.next=19;break}return t.next=18,$(u);case 19:v.setConfirmed(a,u),C(u).then(D).then(T()),t.next=25;break;case 23:return t.next=25,$(u);case 25:t.next=29;break;case 27:return t.next=29,$(u);case 29:if("prev"!==s){t.next=32;break}return t.next=32,ne(u);case 32:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e(document).on("click",".js-quizle-show-hint",(function(t){t.preventDefault();var n=e(this),r=n.parents(".js-quizle"),i=n.parents(".js-quizle-question-hint-container");if(!v.isInProcess(r)){var a=n.parents(".js-quizle-question");if(!a.data("confirmed")){var o=i.find(".js-quizle-question-hint");if(o.length){if(o.data("_used"))return void alert("You have already used a hint");try{var s=JSON.parse(decodeURIComponent(atob(h(o.data("params"))))),u=decodeURIComponent(atob(h(o.text())));o.html(u),o.show(150),n.hide(),o.data("_used",1);var c=s.id,l=s.penalty;v.addPenalty(r,a.data("identity"),{id:c,penalty:l}),i.next().show(150)}catch(e){console.error(e)}}else alert("There is no hint")}}})),e(document).on("click",".js-quizle-list-submit",function(){var t=a(n().mark((function t(r){var i;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r.preventDefault(),i=e(r.currentTarget),j(i.parents(".js-quizle"),i);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e(document).on("click",".js-quizle-result-button",(function(t){t.preventDefault();var n=e(t.currentTarget),r=n.parents(".js-quizle");if(n.attr("href")&&n.attr("href").length&&"#"!==n.attr("href"))try{var i=new URL(n.attr("href"));window.open(i,"_blank","noopener");window.focus()}catch(e){console.error(e)}n.blur(),n.data("clicked")||("#"===n.attr("href")&&u.AFTER_RESULTS===qe(r,"contacts_order")&&me(r,s.SLIDES===qe(r,"view_type")),n.data("clicked",1))})),e(document).on("submit",".js-quizle-contact-data form",function(){var t=a(n().mark((function t(r){var i,a,o,l,d,p,h,m,y,w,g;return n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.preventDefault(),i=e(r.currentTarget),a=i.parents(".js-quizle"),o=[],a.find(".js-quizle-contacts-agreement").each((function(){var t=e(this),n=t.closest(".quizle-contacts__agreement").find("span").text().trim();o.push({text:n,required:"1"===String(t.data("required"))?1:0,checked:t.is(":checked")?1:0})})),i.find(".js-quizle-contacts-agreements").val(JSON.stringify(o)),l=i.find('button[type="submit"]'),d=qe(a,"contacts_order"),p=qe(a,"view_type"),xe(a),c.canSubmit()){t.next=13;break}
1return alert(c.getBlockReason()||"Unable to submit contacts form"),t.abrupt("return");case 13:return l.attr("disabled",!0),l.data("toggle_txt")&&(l.data("source_txt",l.text()),l.text(l.data("toggle_txt"))),t.next=17,le(a);case 17:if(h={},m="",y=!1,d&&u.AFTER_RESULTS!==d){t.next=36;break}return t.next=23,v.submitQuizleData(a,L,i.get(0));case 23:if(h=t.sent,m=h.contactsSuccessMessage,!h.resultRedirect){t.next=34;break}return t.prev=26,window.location.href=new URL(h.resultRedirect),t.abrupt("return");case 31:t.prev=31,t.t0=t.catch(26),console.error(t.t0);case 34:t.next=59;break;case 36:if(u.BEFORE_RESULTS!==d){t.next=50;break}return he(a,s.SLIDES===p),t.next=40,x.all([v.submitQuizleData(a,L|P|I,i.get(0)),ue(a)]);case 40:if(w=t.sent,g=f(w,1),!(h=g[0])){t.next=48;break}return m=h.contactsSuccessMessage,t.next=47,oe(a,h,!h.contactsRedirect);case 47:y=t.sent;case 48:t.next=59;break;case 50:if(u.ONLY_CONTACTS!==d){t.next=59;break}return t.next=53,v.submitQuizleData(a,L,i.get(0));case 53:return h=t.sent,a.find(".js-quizle-contacts").empty().html(h.contactsSuccessMessage).show(),a.find(".js-quizle-contact-data").remove(),t.next=58,oe(a,h,!1);case 58:y=t.sent;case 59:m&&!y&&(i.find("fieldset").attr("disabled",!0),l.text(l.data("source_txt")),a.find(".js-quizle-contacts").empty().html(m).show(),a.find(".js-quizle-results").remove()),h.contactsRedirect&&setTimeout((function(){try{window.location.href=new URL(h.contactsRedirect)}catch(e){console.error(e)}}),h.contactsRedirectTimout);case 61:case"end":return t.stop()}}),t,null,[[26,31]])})));return function(e){return t.apply(this,arguments)}}()),e(document).on("change",".js-quizle-contacts-agreement",(function(){xe(e(this).parents(".js-quizle"))}))}))}));

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.