1 2; /* Start:"a:4:{s:4:"full";s:111:"/local/templates/psychology/components/bitrix/form.result.new/form_application_course/script.js?178220608127332";s:6:"source";s:95:"/local/templates/psychology/components/bitrix/form.result.new/form_application_course/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/ 3this.BX=this.BX||{},function(t,e){"use strict";var n={props:["formType","fields","updateValidation","isTouched"],components:{Item:{props:["fieldKey","formType","sid","title","placeholder","require","type","defaultValue","inputMask","inputMaskPattern","inputMaskStatus","updateValidation","isTouched","noteError"],setup:function(t){var n=e.ref(""),r=e.ref(""),o=e.ref(null),i=function(){var e=o.value;n.value=e?"checkbox"===t.type?e.checked?e.value||"Y":"":e.value||"":""};e.onMounted((function(){i();var t=n.value,r=setInterval((function(){if(o.value){i();var e=n.value;e!==t&&(t=e,a())}}),500);e.onUnmounted((function(){clearInterval(r)}))})),e.watch(o,(function(e){if(e){var n={};switch(t.inputMask){case"phone":n={mask:t.inputMaskPattern?t.inputMaskPattern:"+7 (999) 999-99-99",showMaskOnHover:!1};break;case"email":"boolean"==typeof t.inputMaskStatus&&!0===t.inputMaskStatus&&(n={alias:"email",showMaskOnHover:!1})}if(Object.keys(n).length>0)try{var r=window.Inputmask||window.inputmask||globalThis.Inputmask;if("function"!=typeof r)return void console.warn("Inputmask is not available on window");new r(n).mask(e)}catch(t){console.log("Init Inputmask error: ",t)}}}));var a=function e(){if(i(),"checkbox"===t.type)r.value="Y"===t.require&&""===n.value?BX.message("T_FILED_REQUIRE"):"";else if("Y"===t.require&&""===n.value.trim())r.value=BX.message("T_FILED_REQUIRE");else if("email"===t.inputMask&&""!==n.value.trim()){r.value=/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(n.value)?"":BX.message("T_FILED_ERROR_EMAIL")}else"phone"===t.inputMask&&""!==n.value.trim()&&n.value.replace(/\D/g,"").length<11?r.value=BX.message("T_FILED_ERROR_PHONE"):r.value="";t.updateValidation(t.sid,""===r.value,e)};return e.watch((function(){return t.isTouched}),(function(t){t&&a()}),{immediate:!0}),{value:n,error:r,inputRef:o,validate:a,onInput:function(){i(),a()}}},template:'\n <template v-if="type === \'text\' || type === \'tel\' || type === \'email\'">\n <component :is="formType === \'modal\' ? \'label\' : formType === \'inline_vertical\' ? \'label\' : \'div\'"\n :class="[\n\t\t\t\t\t \'cta__form-group\', \n\t\t\t\t\t { \'error\': isTouched && error }\n\t\t\t\t ]">\n <input :class="[\n\t\t\t\'cta__input\', \n\t {\n\t\t\t\t\'cta__input--phone\': type === \'tel\'\n\t\t\t}]"\n ref="inputRef"\n :type="type"\n :name="sid"\n :placeholder="placeholder"\n :data-js-required="require === \'Y\' ? \'true\' : \'false\'"\n v-model="value"\n @input="onInput"\n @blur="validate">\n <template v-if="noteError">\n <div class="form-error-notice" v-if="isTouched && error">{{ error }}</div>\n </template>\n </component>\n </template>\n <template v-if="type === \'checkbox\'">\n <label :class="[\n\t\t\t\t\'cta__checkbox\', \n { \'error\': isTouched && error }\n ]">\n <input class="cta__checkbox-input"\n ref="inputRef"\n :type="type"\n :name="sid"\n :data-js-required="require === \'Y\' ? \'true\' : \'false\'"\n :value="defaultValue"\n :checked="value !== \'\'"\n @input="onInput"\n @change="onInput"\n @blur="validate">\n <div class="cta__checkbox-shape"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.8035 4.13666C13.0964 3.84377 13.5711 3.84377 13.864 4.13666C14.1567 4.42957 14.1569 4.90438 13.864 5.19721L7.19703 11.8642C6.90415 12.1565 6.42921 12.1567 6.13648 11.8642L2.80347 8.53022C2.51081 8.23738 2.51084 7.76253 2.80347 7.46967C3.09632 7.17699 3.57117 7.17699 3.86402 7.46967L6.66675 10.2724L12.8035 4.13666Z" fill="#540EDC"/></svg></div>
3\n <span class="cta__checkbox-text" v-html="title"></span>\n </label>\n </template>\n\t'}},template:"\n <Item v-for=\"(item, index) in Object.values(fields)\"\n :key=\"index\"\n :fieldKey=\"item['SID']\"\n :formType=\"formType\"\n :sid=\"item['SID']\"\n :title=\"item['NAME']\"\n :placeholder=\"item['PLACEHOLDER']\"\n :defaultValue=\"item['VALUE'] ? item['VALUE'] : ''\"\n :require=\"item['REQUIRE']\"\n :type=\"item['TYPE'] ? item['TYPE'] : 'text'\"\n :inputMask=\"item['INPUT_MASK'] ? item['INPUT_MASK'] : 'text'\"\n :inputMaskPattern=\"item['PATTERN'] ? item['PATTERN'] : ''\"\n :inputMaskStatus=\"item.hasOwnProperty('INPUT_MASK_STATUS') ? item.INPUT_MASK_STATUS : true\"\n :updateValidation=\"updateValidation\"\n :isTouched=\"isTouched\"\n :noteError=\"item['NOTE_ERROR'] === 'Y'\"\n />\n\t"};function r(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new L(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=x(a,n);if(u){if(u===p)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var p={};function f(){}function h(){}function d(){}var v={};c(v,i,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(_([])));y&&y!==e&&n.call(y,i)&&(v=y);var g=d.prototype=f.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,p=l.value;return p&&"object"==babelHelpers.typeof(p)&&n.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(p).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=s(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,p;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function _(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=d,c(g,"constructor",d),c(d,"constructor",h),h.displayName=c(d,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},b(w.prototype),c(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Prom
vendor: 4,799 bytes, line 3
3ise);var a=new w(l(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=_,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.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,p):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),p},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),T(n),p}},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;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},t}var o=function(){function t(){babelHelpers.classCallCheck(this,t)}var e;return babelHelpers.createClass(t,null,[{key:"sendRequest",value:(e=babelHelpers.asyncToGenerator(r().mark((function t(e,n){return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.ajax="Y",t.abrupt("return",new Promise((function(t,r){BX.ajax({url:e,method:"POST",dataType:"json",data:n,processData:!1,onsuccess:function(e){try{var n="string"==typeof e?JSON.parse(e):e;t(n)}catch(t){r(BX.message("T_ERROR_MSG_AJAX")+t)}},onfailure:function(t){r(BX.message("T_ERROR_MSG_AJAX")+t)}})})));case 2:case"end":return t.stop()}}),t)}))),function(t,n){return e.apply(this,arguments)})}]),t}();function i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",u=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function l(t,e,n,r){var o=e&&e.prototype instanceof f?e:f,i=Object.create(o.prototype),a=new L(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return k()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=x(a,n);if(u){if(u===p)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=s(t,e,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===p)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(t,n,a),i}function s(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var p={};function f(){}function h(){}function d(){}var v={};c(v,o,(function(){return this}));
vendor: 5,376 bytes, line 3
3var m=Object.getPrototypeOf,y=m&&m(m(_([])));y&&y!==e&&n.call(y,o)&&(v=y);var g=d.prototype=f.prototype=Object.create(v);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,p=l.value;return p&&"object"==babelHelpers.typeof(p)&&n.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(p).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}}function x(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=s(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,p;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:k}}function k(){return{value:void 0,done:!0}}return h.prototype=d,c(g,"constructor",d),c(d,"constructor",h),h.displayName=c(d,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},b(w.prototype),c(w.prototype,a,(function(){return this})),t.AsyncIterator=w,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new w(l(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},b(g),c(g,u,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=_,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.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,p):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),p},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),T(n),p}},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;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},t}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function u(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
3e%2?a(Object(n),!0).forEach((function(e){babelHelpers.defineProperty(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c={components:{Fields:n},props:{AppData:Object},setup:function(t){var n=e.reactive({}),r=e.ref(null),a=e.ref(null),c=e.ref({}),l=e.ref({}),s=e.ref(!1),p=e.ref(!1),f=e.ref(null),h=e.ref(null),d=e.computed((function(){var e,n,r,o;return null!==(e=null!==(n=f.value)&&void 0!==n?n:t.AppData.submitButtonText)&&void 0!==e?e:null!==(r=window)&&void 0!==r&&null!==(o=r.BX)&&void 0!==o&&o.message?BX.message("T_SUBMIT_RESULT"):"Îòïðàâèòü"})),v=function(){try{if(!t.AppData.metrics||!Array.isArray(t.AppData.metrics))return void console.warn("Metrics are not set or are in the wrong format");t.AppData.metrics.forEach((function(t){var e,n=t.functionName,r=t.args;"function"==typeof window[n]?(console.log("Call metric: ".concat(n),r),(e=window)[n].apply(e,babelHelpers.toConsumableArray(r))):console.warn("function ".concat(n," not found in window"))}))}catch(t){console.error("Error execute runMetrics:",t)}},m=function(){var n=babelHelpers.asyncToGenerator(i().mark((function n(){var f,h,d,m,w,x;return i().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!p.value){n.next=2;break}return n.abrupt("return");case 2:return s.value=!0,Object.values(l.value).forEach((function(t){t&&t()})),n.next=6,e.nextTick();case 6:if(c.value=u({},c.value),Object.values(c.value).every((function(t){return t}))){n.next=10;break}return n.abrupt("return");case 10:return n.prev=10,y(!0),g(),f=new FormData(r.value),h={},f.forEach((function(t,e){h[e]=t})),n.next=18,o.sendRequest(t.AppData.action,h);case 18:if(d=n.sent,m="success"===d.status,w=Boolean(d.redirect_url),!m){n.next=28;break}if(v(),!w){n.next=26;break}return window.location.href=d.redirect_url,n.abrupt("return");case 26:(x=r.value.closest(".modal--request"))&&x.classList.add("success");case 28:r.value.innerHTML=d.message,n.next=34;break;case 31:n.prev=31,n.t0=n.catch(10),a.value?alert(String(n.t0)):console.error(n.t0);case 34:y(!1),b();case 36:case"end":return n.stop()}}),n,null,[[10,31]])})));return function(){return n.apply(this,arguments)}}(),y=function(t){p.value=!!t;r.value},g=function(){b();var e=0;f.value=t.AppData.sendingText,h.value=setInterval((function(){e=(e+1)%4,f.value=t.AppData.sendingText+".".repeat(e)}),350)},b=function(){h.value&&(clearInterval(h.value),h.value=null),f.value=null},w=function(e){var n=e.detail||{},r=n.sid,o=n.value;r&&function(e,n){var r=t.AppData.hiddenFields||(t.AppData.hiddenFields={}),o=Object.keys(r).find((function(t){var n;return(null===(n=r[t])||void 0===n?void 0:n.SID)===e}));o?r[o].VALUE=String(null!=n?n:""):r[e]={SID:e,VALUE:String(null!=n?n:"")}}(r,o)};return e.onMounted((function(){var e,r;(r=null===(e=t.AppData)||void 0===e?void 0:e.agreeItems,r?Object.values(r):[]).forEach((function(t){t.SID in n||(n[t.SID]=!1)})),window.addEventListener("tt:setHiddenField",w)})),e.onUnmounted((function(){window.removeEventListener("tt:setHiddenField",w)})),{formRef:r,errorRef:a,checkForm:m,updateValidation:function(t,e,n){c.value[t]=e,l.value[t]=n},isTouched:s,handleButtonClick:function(){var e,n;if(!p.value){var r=null===(e=t.AppData)||void 0===e||null===(n=e.metricsBtnForm)||void 0===n?void 0:n.trim();if(r){if([/^yaCounter\d+\.reachGoal\(['"][^'"]+['"]\);?$/,/^console\.log\((.*?)\);?$/,/^window\.open\(['"][^'"]+['"],?\s*['"]?_blank['"]?\);?$/].some((function(t){return t.test(r)})))try{new Function(r)()}catch(t){console.error("Error executing user code:",t)}}}},isSubmitting:p,submitText:f,defaultSubmitText:d}},template:'\n <template v-if="AppData.typeForm === \'modal\'">\n <div :class="{\'modal-body\': AppData.typeForm === \'modal\'}">\n <div v-if="AppData.HTMLBefore" v-html="AppData.HTMLBefore"></div>\n <template v-if="AppData.showDescription === \'Y\'">\n <div v-html="AppData.description"></div>\n </template>\n <form\n :class="[\'cta__form\', {}]"\n ref="formRef"\n :action="AppData.action"\n @submit.prevent="checkForm"\n >\n <div ref="errorRef" class="form-error" style="display:none; margin-bottom:10px;"></div>\n <div :class="{\'form-content\': AppData.typeForm === \'modal\'}">\n <Fields\n :formType="AppData.typeForm"\n :fields="AppData.fields"\n :updateValidation="updateV
3alidation"\n :isTouched="isTouched"\n />\n <div class="bot">\n <button\n type="submit"\n class="btn btn--v2 btn--green"\n :disabled="isSubmitting"\n @click="handleButtonClick"\n >\n {{ defaultSubmitText }}\n </button>\n <div v-if="AppData.phoneBtn" style="display: contents" v-html="AppData.phoneBtn"></div>\n <input type="hidden" name="WEB_FORM_ID" :value="AppData.webFormId"/>\n <input\n v-for="(item, index) in Object.values(AppData.hiddenFields)"\n :key="index"\n type="hidden"\n :name="item.SID"\n :value="item.VALUE"\n />\n </div>\n </div>\n </form>\n </div>\n </template>\n <template v-if="AppData.typeForm === \'inline_vertical\'">\n <div v-if="AppData.HTMLBefore" v-html="AppData.HTMLBefore"></div>\n <form\n :class="[\'cta__form\', {}]"\n ref="formRef"\n :action="AppData.action"\n @submit.prevent="checkForm"\n >\n <div ref="errorRef" class="form-error" style="display:none; margin-bottom:10px;"></div>\n <span v-if="AppData.showDescription === \'Y\'" style="display: contents" v-html="AppData.description"></span>\n <Fields\n :formType="AppData.typeForm"\n :fields="AppData.fields"\n :updateValidation="updateValidation"\n :isTouched="isTouched"\n />\n <div class="bot">\n <button\n type="submit"\n class="btn btn--v2 btn--green"\n :disabled="isSubmitting"\n @click="handleButtonClick"\n >\n {{ defaultSubmitText }}\n </button>\n <input type="hidden" name="WEB_FORM_ID" :value="AppData.webFormId"/>\n <input\n v-for="(item, index) in Object.values(AppData.hiddenFields)"\n :key="index"\n type="hidden"\n :name="item.SID"\n :value="item.VALUE"\n />\n </div>\n </form>\n </template>\n\t'};function l(t,e,n){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,n)}var s=new WeakMap,p=function(){function t(e){babelHelpers.classCallCheck(this,t),l(this,s,{writable:!0,value:void 0}),this.rootNode=document.querySelector(e)}return babelHelpers.createClass(t,[{key:"setParams",value:function(t){this.data=t}},{key:"startApp",value:function(){var t=this.data,n=e.ref({webFormId:t.webFormId,action:t.action,typeForm:t.typeForm,showDescription:t.showDescription,agreeText:t.agreeText?t.agreeText:"",description:t.description?t.description:"",HTMLBefore:t.HTMLBefore?t.HTMLBefore:"",fields:t.fields?t.fields:{},hiddenFields:t.hiddenFields?t.hiddenFields:{},metrics:t.metrics?t.metrics:[],metricsBtnForm:t.metricsBtnForm?t.metricsBtnForm:"",submitButtonText:t.submitButtonText?t.submitButtonText:"Sending",phoneBtn:t.phoneBtn?t.phoneBtn:""});babelHelpers.classPrivateFieldSet(this,s,e.BitrixVue.createApp({components:{Application:c},setup:function(){return{AppData:n}},template:'\n <Application :AppData="AppData"/>\n\t\t\t'})),babelHelpers.classPrivateFieldGet(this,s).mount(this.rootNode)}}]),t}();t.FormApplicationCourse=p}(this.BX.TTMedia=this.BX.TTMedia||{},BX.Vue3); 4//# sourceMappingURL=script.js.map 5 6/* End */ 7;; /* /local/templates/psychology/components/bitrix/form.result.new/form_application_course/script.js?178220608127332*/
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.