PageSourceSearch

https://www.tet.lv/dist/modules/mod_lead_bc_form/scripts/index.9f9729242630605c5059.js?2caa38

js tet.lv collected 2026-09-24 08:59:59 UTC 29,859 bytes, 2 lines download raw bytes

1/*! For license information please see index.9f9729242630605c5059.js.LICENSE.txt */
2(()=>{"use strict";var e={4677(e,t,n){n.d(t,{q:()=>d});var r=n(8089);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function u(n,r,o,i){var u=r&&r.prototype instanceof c?r:c,s=Object.create(u.prototype);return a(s,"_invoke",function(n,r,o){var i,a,u,c=0,s=o||[],d=!1,f={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return i=t,a=0,u=e,f.n=n,l}};function m(n,r){for(a=n,u=r,t=0;!d&&c&&!o&&t<s.length;t++){var o,i=s[t],m=f.p,h=i[2];n>3?(o=h===r)&&(u=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=m&&((o=n<2&&m<i[1])?(a=0,f.v=r,f.n=i[1]):m<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,f.n=h,a=0))}if(o||n>1)return l;throw d=!0,r}return function(o,s,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&m(s,h),a=s,u=h;(t=a<2?e:u)||!d;){i||(a?a<3?(a>1&&(f.n=-1),m(a,u)):f.n=u:f.v=u);try{if(c=2,i){if(a||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((t=(d=f.n<0)?u:n.call(r,f))!==l)break}catch(t){i=e,a=1,u=t}finally{c=1}}return{value:t,done:d}}}(n,o,i),!0),s}var l={};function c(){}function s(){}function d(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(a(t={},r,function(){return this}),t),m=d.prototype=c.prototype=Object.create(f);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,a(e,o,"GeneratorFunction")),e.prototype=Object.create(m),e}return s.prototype=d,a(m,"constructor",d),a(d,"constructor",s),s.displayName="GeneratorFunction",a(d,o,"GeneratorFunction"),a(m),a(m,o,"Generator"),a(m,r,function(){return this}),a(m,"toString",function(){return"[object Generator]"}),(i=function(){return{w:u,m:h}})()}function a(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}a=function(e,t,n,r){function i(t,n){a(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},a(e,t,n,r)}function u(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void n(e)}u.done?t(l):Promise.resolve(l).then(r,o)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,s(r.key),r)}}function c(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}var d=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,n=[{key:"htmlStringToElement",value:function(t){var n=t.html;return e.htmlStringToElement({html:n})}},{key:"htmlToScriptElement",value:function(t){var n=t.html;return e.htmlToScriptElement({html:n})}},{key:"htmlStringArrayToScriptElements",value:function(t){var n=t.strings;return e.htmlStringArrayToScriptElements({strings:n})}},{key:"getScriptsFromHtml",value:function(t){var n=t.html;return e.getScriptsFromHtml({html:n})}},{key:"getLanguageFromHtmlTag",value:function(){return"RU"===window.location.href.split("/")[3].toUpperCase()?"RU":"LV"}}],o=[{key:"htmlToScriptElement",value:function(e){var t,n=e.html,r=e.noscript;return t=void 0!==r&&r?document.createElement("noscript"):document.createElement("script"),n=(n=n.replace(/<script>|<\/script>|<noscript>|<\/noscript>/g,"")).trim(),t.innerHTML=n,t}},{key:"htmlStringToElement",value:function(e){var t=e.html,n=document.createElement("template");return t=t.trim(),n.innerHTML=t,n.content.firstChild}},{key:"remToPx",value:function(e){return e*parseFloat(getComputedStyle(document.documentElement).fontSize)}},{key:"injectStyles",value:function(t,n,o){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,u=[];(u=i?(0,r.Do)(n,t):t.querySelector(n)).length?u.forEach(function(t){e.injectStylesInElement(t,o)}):a<e.MAX_INJECTION_TRIES&&setTimeout(function(){return e.injectStyles(t,n,o,i,++a)},e.INJECTION_TRY_TIMEOUT)}},{key:"injectStylesInElement",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;
2t.shadowRoot?n.forEach(function(e){var n=document.createElement("link");n.href=e,n.rel="stylesheet",n.type="text/css",t.shadowRoot.appendChild(n)}):r<e.MAX_INJECTION_TRIES&&setTimeout(function(){return e.injectStylesInElement(t,n,++r)},e.INJECTION_TRY_TIMEOUT)}},{key:"getScriptsFromHtml",value:function(e){for(var t,n=e.html,r=[];null!=(t=this.scriptRegex.exec(n));)r.push(t[0]);return r}},{key:"htmlStringArrayToScriptElements",value:function(e){var t=this;return e.strings.map(function(e){return t.htmlToScriptElement({html:e})})}},{key:"isInIframe",value:function(){try{return window.self!==window.top}catch(e){return!0}}},{key:"awaitHydration",value:(a=i().m(function e(t){return i().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,new Promise(function(e){if(t.classList.contains("hydrated"))e();else{var n=new MutationObserver(function(){t.classList.contains("hydrated")&&(n.disconnect(),e())});n.observe(t,{attributes:!0,attributeFilter:["class"]})}});case 1:return e.a(2)}},e)}),c=function(){var e=this,t=arguments;return new Promise(function(n,r){var o=a.apply(e,t);function i(e){u(o,n,r,i,l,"next",e)}function l(e){u(o,n,r,i,l,"throw",e)}i(void 0)})},function(e){return c.apply(this,arguments)})}],n&&l(t.prototype,n),o&&l(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,o,a,c}();if(c(d,"MAX_INJECTION_TRIES",30),c(d,"INJECTION_TRY_TIMEOUT",100),c(d,"scriptRegex",/<script>(.|\n|\r)*?<\/script>/g),!window.HTMLUtilities){window.HTMLUtilities=d,document.defaultQuerySelector=document.querySelector,document.defaultQuerySelectorAll=document.querySelectorAll,document.querySelectorAllDeep=function(e){document.querySelectorAll=document.defaultQuerySelectorAll;var t=(0,r.Do)(e,document);return document.querySelectorAll=document.querySelectorAllDeep,t},document.querySelectorDeep=function(e){document.querySelector=document.defaultQuerySelector;var t=(0,r.qi)(e,document);return document.querySelector=document.querySelectorDeep,t},document.querySelector=document.querySelectorDeep,document.querySelectorAll=document.querySelectorAllDeep}},3142(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function i(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}n.d(t,{j:()=>a});var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return t=e,r=[{key:"insertDash",value:function(e){var t=e.element,n=void 0===t?null:t,r=e.value,o=e.index,i=void 0===o?6:o;return(r=r.replace(/\D/g,"")).length>i?("-"!==r.charAt(i)&&(r=r.substring(0,i)+"-"+r.substring(i)),"-"===r.charAt(i+1)&&(r=r.slice(0,i)+r.slice(i+1))):r.length===i&&(r+="-"),n&&(n.value=r),r}},{key:"insertCreditCardDash",value:function(e){var t=e.value;if((t=t.replace(/\D/g,"")).length>0){var n=t.match(new RegExp(".{1,4}","g"));t=n.join("-"),4===n[n.length-1].length&&n.length<4&&(t+="-")}return t}},{key:"insertVtvCardDash",value:function(e){var t=e.value;if((t=t.replace(/\D/g,"")).length>=3){var n=/(.{1,3})(.{1,4})?(.{1,4})?(.)?/.exec(t).filter(function(e){return void 0!==e});n.length>1&&n.shift(),t=n.join("-"),n[n.length-1].length===[3,4,4,1][n.length-1]&&n.length<4&&(t+="-")}return t}},{key:"getBirthDateFromPersonalCode",value:function(e){var t=e.personalCode,n={birth_date:"",birth_date_mask:""};if(!(t=t.replace(/\D/g,"")).startsWith("32")){var r=t.substring(0,2),o=t.substring(2,2),i=t.substring(4,2);switch(t.substring(6,1)){case"0":i="18"+i;break;case"1":i="19"+i;break;case"2":i="20"+i;break;default:return n}n.birth_date_mask=r+"."+o+"."+i,n.birth_date=i+"-"+o+"-"+r}return n}},{key:"validateNewPersonalCode",value:function(e){var t=e.personalCode,n=(1*(t=t.replace(/\D/g,"")).substring(0,1)+6*t.substring(1,2)+3*t.substring(2,3)+7*t.substring(3,4)+9*t.substring(4,5)+10*t.substring(5,6)+5*t.substring(6,7)+8*t.substring(7,8)+4*t.substring(8,9)+2*t.substring(9,10))%11;return 1-n<-1?t.substring(10,11)===String(1-n+11):t.substring(10,11)===String(1-n)}},{key:"validateOldPersonalCode",value:function(t){var n=t.personalCode;return!!/^\d{6}-\d{5}$/.test(n)&&!!e.validatePersonalCodeChecksum(n)&&new Date([(+n.substring(7,8)+18).toString()+n.substring(4,6),n.substring(2,4),n.substring(0,2)].join("-"))<=Date.now()}},{key:"validatePersonalCodeChecksum",value:function(e){var t=e.split("-");if(t.length<2)return!1;var n=t[0]+t[1];return(1101-(1*n[0]+6*n[1]+3*n[2]+7*n[3]+9*n[4]+10*n[5]+5*n[6]+8*n[7]+4*n[8]+2*n[9]))%11==1*n[10]}},{key:"validateEmail",value:function(e){var t=e.email;return!!/^[^@\s]+@[^@\s]+\.[^@\s]{2,}$/.test(t)&&t}},{key:"validatePhone",value:function(e){var t=e.phone;return!!/[26]\d{7}/.test(t.toString())&&t}}],(n=[{key:"insertDash",value:function(t){var n=t.element,r=void 0===n?null:n,o=t.value,i=t.index,a=void 0===i?6:i;return e.insertDash(r,o,a)}},{key:"insertCreditCardDash",value:function(t){var n=t.value;return e.insertCreditCardDash({value:n})}},{key:"insertVtvCardDash",value:function(t){var n=t.value;return e.insertVtvCardDash({value:n})}},{key:"getBirthDateFromPersonalCode",value:function(t){var n=t.personalCode;return e.getBirthDateFromPersonalCode({personalCode:n})}},{key:"validateNewPersonalCode",value:function(t){var n=t.personalCode;e.validateNewPersonalCode({personalCode:n})}},{key:"validateOldPersonalCode",value:function(t){var n=t.personalCode;return e.validateOldPersonalCode({personalCode:n})}},{key:"validateEmail",value:function(t){var n=t.email;return e.validateEmail({email:n})}},{key:"validatePhone",value:function(t){var n=t.phone;return e.validatePhone({phone:n})}}])&&o(t.prototype,n),r&&o(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}();window.InputUtilities=a},4609(e,t,n){function r(e){function t(){r&&(a.length>0&&/^[~+>]$/.test(a[a.length-1])&&a.push(" "),a.push(r))}var n,r,o,i,a=[],u=[0],l=0,c=/(?:[^\\]|(?:^|[^\\])(?:\\\\)+)$/,s=/^\s+$/,d=[/\s+|\/\*|["'>~+[(]/g,/\s+|\/\*|["'[\]()]/g,/\s+|\/\*|["'[\]()]/g,null,/\*\//g];for(e=e.trim();;){if(r="",(o=d[u[u.length-1]]).lastIndex=l,!(n=o.exec(e))){r=e.substr(l),t();break}if((i=l)<(l=o.lastIndex)-n[0].length&&(r=e.substring(i,l-n[0].length)),u[u.length-1]<3){if(t(),"["===n[0])u.push(1);else if("("===n[0])u.push(2);else if(/^["']$/.test(n[0]))u.push(3),d[3]=new RegExp(n[0],"g");else if("/*"===n[0])u.push(4);else if(/^[\])]$/.test(n[0])&&u.length>0)u.pop();else if(/^(?:\s+|[~+>])$/.test(n[0])&&(a.length>0&&!s.test(a[a.length-1])&&0===u[u.length-1]&&a.push(" "),1===u[u.length-1]&&5===a.length&&"="===a[2].charAt(a[2].length-1)&&(a[4]=" "+a[4]),s.test(n[0])))continue;a.push(n[0])}else a[a.length-1]+=r,c.test(a[a.length-1])&&(4===u[u.length-1]&&(a.length<2||s.test(a[a.length-2])?a.pop():a[a.length-1]=" ",n[0]=""),u.pop()),a[a.length-1]+=n[0]}return a.join("").trim()}n.d(t,{P:()=>r})},8089(e,t,n){n.d(t,{Do:()=>o,qi:()=>i});var r=n(4609);function o(e,t=document,n=null){return a(e,!0,t,n)}function i(e,t=document,n=null){return a(e,!1,t,n)}function a(e,t,n,o=null){e=(0,r.P)(e);let i=n.querySelector(e);
2if(document.head.createShadowRoot||document.head.attachShadow){if(!t&&i)return i;return u(e,",").reduce((e,r)=>{if(!t&&e)return e;const i=u(r.replace(/^\s+/g,"").replace(/\s*([>+~]+)\s*/g,"$1")," ").filter(e=>!!e).map(e=>u(e,">")),a=i.length-1,s=function(e=null,t,n=null){let r=[];if(n)r=n;else{const e=function(t){for(let n=0;n<t.length;n++){const o=t[n];r.push(o),o.shadowRoot&&e(o.shadowRoot.querySelectorAll("*"))}};t.shadowRoot&&e(t.shadowRoot.querySelectorAll("*")),e(t.querySelectorAll("*"))}return e?r.filter(t=>t.matches(e)):r}(i[a][i[a].length-1],n,o),d=function(e,t,n){return r=>{let o=t,i=r,a=!1;for(;i&&!l(i);){let t=!0;if(1===e[o].length)t=i.matches(e[o]);else{const r=[].concat(e[o]).reverse();let a=i;for(const e of r){if(!a||!a.matches(e)){t=!1;break}a=c(a,n)}}if(t&&0===o){a=!0;break}t&&o--,i=c(i,n)}return a}}(i,a,n);return t?e=e.concat(s.filter(d)):(e=s.find(d))||null},t?[]:null)}return t?n.querySelectorAll(e):i}function u(e,t){return e.match(/\\?.|^$/g).reduce((e,n)=>('"'!==n||e.sQuote?"'"!==n||e.quote?e.quote||e.sQuote||n!==t?e.a[e.a.length-1]+=n:e.a.push(""):(e.sQuote^=1,e.a[e.a.length-1]+=n):(e.quote^=1,e.a[e.a.length-1]+=n),e),{a:[""]}).a}function l(e){return e.nodeType===Node.DOCUMENT_FRAGMENT_NODE||e.nodeType===Node.DOCUMENT_NODE}function c(e,t){const n=e.parentNode;return n&&n.host&&11===n.nodeType?n.host:n===t?null:n}}};const t={};function n(r){const o=t[r];if(void 0!==o)return o.exports;const i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var o=t[r++],i=t[r++];n.o(e,o)?0===i&&r++:0===i?Object.defineProperty(e,o,{enumerable:!0,value:t[r++]}):Object.defineProperty(e,o,{enumerable:!0,get:i})}else for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r=n(3142),o=n(4677);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=l(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}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 i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function u(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,o,i,a,u=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(u.push(r.value),u.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return u}}(e,t)||l(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 l(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.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)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var l=r&&r.prototype instanceof u?r:u,c=Object.create(l.prototype);return d(c,"_invoke",function(n,r,o){var i,u,l,c=0,s=o||[],d=!1,f={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,n){return i=t,u=0,l=e,f.n=n,a}};function m(n,r){for(u=n,l=r,t=0;!d&&c&&!o&&t<s.length;t++){var o,i=s[t],m=f.p,h=i[2];n>3?(o=h===r)&&(l=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=e):i[0]<=m&&((o=n<2&&m<i[1])?(u=0,f.v=r,f.n=i[1]):m<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,f.n=h,u=0))}if(o||n>1)return a;throw d=!0,r}return function(o,s,h){if(c>1)throw TypeError("Generator is already running");for(d&&1===s&&m(s,h),u=s,l=h;(t=u<2?e:l)||!d;){i||(u?u<3?(u>1&&(f.n=-1),m(u,l)):f.n=l:f.v=l);try{if(c=2,i){if(u||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");
2if(!t.done)return t;l=t.value,u<2&&(u=0)}else 1===u&&(t=i.return)&&t.call(i),u<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=e}else if((t=(d=f.n<0)?l:n.call(r,f))!==a)break}catch(t){i=e,u=1,l=t}finally{c=1}}return{value:t,done:d}}}(n,o,i),!0),c}var a={};function u(){}function l(){}function c(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(d(t={},r,function(){return this}),t),m=c.prototype=u.prototype=Object.create(f);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,d(e,o,"GeneratorFunction")),e.prototype=Object.create(m),e}return l.prototype=c,d(m,"constructor",c),d(c,"constructor",l),l.displayName="GeneratorFunction",d(c,o,"GeneratorFunction"),d(m),d(m,o,"Generator"),d(m,r,function(){return this}),d(m,"toString",function(){return"[object Generator]"}),(s=function(){return{w:i,m:h}})()}function d(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}d=function(e,t,n,r){function i(t,n){d(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},d(e,t,n,r)}function f(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void n(e)}u.done?t(l):Promise.resolve(l).then(r,o)}function m(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){f(i,r,o,a,u,"next",e)}function u(e){f(i,r,o,a,u,"throw",e)}a(void 0)})}}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,p(r.key),r)}}function y(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:t+""}var v=function(){return e=function e(t){var n=this,r=t.root,i=t.campaignId,a=t.errorMessages;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),y(this,"initExpandableCheckboxLabels",m(s().m(function e(){var t,r,i,a,u,l,c,d,f,m,h,y;return s().w(function(e){for(;;)switch(e.n){case 0:if(0!==(a=Array.from(null!==(t=null===(r=n.root)||void 0===r?void 0:r.querySelectorAll(".js-expandable-checkbox-label"))&&void 0!==t?t:[])).length){e.n=1;break}return e.a(2);case 1:u="mod-lead-bc-form__checkbox-label--expanded",l=function(e,t){e.setAttribute("aria-expanded",String(t)),e.setAttribute("aria-label",t?e.dataset.collapsedLabel:e.dataset.expandedLabel)},c=function(e){var t=e.classList.contains(u);t&&e.classList.remove(u),e.style.maxHeight="",e.style.overflow="";var n=e.clientHeight;return t&&(e.classList.add(u),e.style.maxHeight="none",e.style.overflow="visible"),n},d=function(e,t){if("true"!==e.dataset.animating){e.dataset.animating="true";var n=c(e);if(t){e.classList.add(u);var r=e.scrollHeight;return e.style.overflow="hidden",e.style.maxHeight="".concat(n,"px"),e.getBoundingClientRect(),e.style.maxHeight="".concat(r,"px"),void globalThis.setTimeout(function(){e.classList.contains(u)&&(e.style.maxHeight="none",e.style.overflow="visible"),e.dataset.animating="false"},240)}var o=e.scrollHeight;e.style.overflow="hidden",e.style.maxHeight="".concat(o,"px"),e.getBoundingClientRect(),e.style.maxHeight="".concat(n,"px"),globalThis.setTimeout(function(){e.classList.remove(u),e.style.maxHeight="",e.style.overflow="",e.dataset.animating="false"},240)}},f=function(e){var t=e.querySelector("[data-checkbox-ellipsis-label]"),n=e.querySelector("[data-checkbox-ellipsis-toggle]");if(t&&n){var r=t.classList.contains(u);if(r&&t.classList.remove(u),t.style.maxHeight="",t.style.overflow="",!(t.scrollHeight>t.clientHeight+1))return t.classList.remove(u),n.hidden=!0,void l(n,!1);n.hidden=!1,r&&(t.classList.add(u),t.style.maxHeight="none",t.style.overflow="visible"),l(n,r)}},m=function(){a.forEach(function(e){return f(e)})},h=function(){requestAnimationFrame(m)},a.forEach(function(e){var t=e.querySelector("[data-checkbox-ellipsis-toggle]");t&&(t.addEventListener("click",function(n){n.preventDefault(),n.stopPropagation();var r=e.querySelector("[data-checkbox-ellipsis-label]");if(r&&"true"!==r.dataset.animating){var o=!r.classList.contains(u);l(t,o),d(r,o)}}),h())}),globalThis.addEventListener("resize",function(){h()}),(y=document.getElementById("".concat(n.campaignId,"_oportunity")))&&o.q.awaitHydration(y).then(function(){h()}),null!==(i=document.fonts)&&void 0!==i&&i.ready&&document.fonts.ready.then(function(){h()}),"function"==typeof MutationObserver&&new MutationObserver(function(){h()}).observe(n.root,{attributes:!0,attributeFilter:["class"]});case 2:return e.a(2)}},e)}))),y(this,"onFormSubmit",function(e){e.preventDefault();var t=n.root.querySelector(".js-mod-lead-bc-form-main"),r=n.root.querySelector(".js-mod-lead-bc-form-result-layout"),o=n.root.querySelector(".js-mod-lead-bc-form__submission-sr-only"),i=n.root.querySelector(".js-mod-lead-bc-form-submission-result-success"),a=n.root.querySelector(".js-mod-lead-bc-form-submission-result-error");
2if(t&&r&&o&&i&&a){var u=i;n.syncResultLayoutHeight(),n.root.classList.add("js-mod-lead-bc-form-submitted"),t.style.display="none",r.style.display="flex",u.style.display="flex",requestAnimationFrame(function(){u.classList.add("mod-lead-bc-form__submission-result--visible"),o.textContent=(u.textContent||"").trim()})}}),this.root=r,this.campaignId=i,this.errorMessages=a,this.form=null,this.alreadyClientCheckbox=null,this.opportunityCheckbox=null,this.inputFields={},this.hiddenInputFields={},this.videos=[],this.init()},t=[{key:"init",value:function(){this.initForm(),this.initCheckboxes(),this.initExpandableCheckboxLabels(),this.initInputFields(),this.initHiddenInputFields(),this.initSubmitButton(),this.initAnimationWatcher()}},{key:"syncResultLayoutHeight",value:function(){var e=this.root.querySelector(".js-mod-lead-bc-form-result-layout"),t=this.root.querySelector(".js-mod-lead-bc-form-main");e&&t&&(e.style.minHeight="".concat(t.offsetHeight,"px"))}},{key:"initAnimationWatcher",value:function(){var e,t,n=this;this.videos=this.root.querySelectorAll(".js-mod-lead-bc-form__video");var r,o,i=null===(e=globalThis.TetThemeAnimation)||void 0===e||null===(t=e.isEnabled)||void 0===t?void 0:t.call(e);this.videos.length&&(this.handleVideoAnimation(i),null===(r=globalThis.TetThemeAnimation)||void 0===r||null===(o=r.onChange)||void 0===o||o.call(r,function(e){return n.handleVideoAnimation(e)}))}},{key:"handleVideoAnimation",value:function(e){this.videos.forEach(function(t){if(e){var n;null===(n=t.play())||void 0===n||n.catch(function(){})}else{t.pause();try{t.currentTime=0}catch(e){}}})}},{key:"initForm",value:function(){this.form=document.getElementById("".concat(this.campaignId,"_lead_bc_form")),this.form&&this.form.addEventListener("submit",this.onFormSubmit)}},{key:"initCheckboxes",value:(c=m(s().m(function e(){return s().w(function(e){for(;;)switch(e.n){case 0:return this.opportunityCheckbox=document.getElementById("".concat(this.campaignId,"_oportunity")),this.alreadyClientCheckbox=document.getElementById("".concat(this.campaignId,"_existing_customer")),e.n=1,Promise.all([this.initCheckboxAnalytics(this.opportunityCheckbox),this.initCheckboxAnalytics(this.alreadyClientCheckbox)]);case 1:return e.a(2)}},e,this)})),function(){return c.apply(this,arguments)})},{key:"initCheckboxAnalytics",value:(l=m(s().m(function e(t){var n,r;return s().w(function(e){for(;;)switch(e.n){case 0:if(t){e.n=1;break}return e.a(2);case 1:return e.n=2,o.q.awaitHydration(t);case 2:r=(null===(n=t.textContent)||void 0===n?void 0:n.trim())||"",t.addEventListener("check",function(){dataLayer.push({event:"lead_interaction",lead_interaction_element:"Checkbox - ".concat(r)})});case 3:return e.a(2)}},e)})),function(e){return l.apply(this,arguments)})},{key:"initSubmitButton",value:function(){var e=this,t=this.root.querySelectorAll(".js-mod-lead-bc-form-submit-button"),n=function(){var t=m(s().m(function t(){return s().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,Promise.all(Object.values(e.inputFields).map(function(){var e=m(s().m(function e(t){return s().w(function(e){for(;;)if(0===e.n)return e.a(2,null==t?void 0:t.validateInput())},e)}));return function(t){return e.apply(this,arguments)}}()));case 1:if(!(t.v.filter(function(e){return e&&e.length>0}).length>0)){t.n=2;break}return dataLayer.push({event:"lead_interaction",lead_interaction_element:"Button - Nosūtīt"}),t.a(2);case 2:e.syncHiddenBlueconicInputs(),e.form.requestSubmit(),e.clearInputFields();case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();t.forEach(function(e){e.clickCallback=n})}},{key:"initInputFields",value:function(){for(var e=this,t={name:document.getElementById("".concat(this.campaignId,"_name-input")),surname:document.getElementById("".concat(this.campaignId,"_surname-input")),company_name:document.getElementById("".concat(this.campaignId,"_company_name-input")),company_reg_nr:document.getElementById("".concat(this.campaignId,"_company_reg_nr-input")),email:document.getElementById("".concat(this.campaignId,"_email-input")),address:document.getElementById("".concat(this.campaignId,"_address-input")),custom:document.getElementById("".concat(this.campaignId,"_custom-input")),phone:document.getElementById("".concat(this.campaignId,"_phone-input"))},n=t.name,o=t.surname,i=t.company_name,a=t.company_reg_nr,l=t.email,c=t.address,s=t.custom,d=t.phone,f=function(){var t=u(h[m],2),n=t[0],o=t[1];if(!o)return 1;switch(n){case"email":o.validators=[{validate:function(e){return r.j.validateEmail({email:e})},getErrorMessage:function(){return e.errorMessages[n]}}];break;case"phone":o.validators=[{validate:function(e){return r.j.validatePhone({phone:Number.parseInt(e)})},getErrorMessage:function(){return e.errorMessages[n]}}],o.addEventListener("input",function(e){e.target.value.length>=8&&(e.target.value=e.target.value.toString().substring(0,8))});break;default:o.validators=[{validate:function(e){return e.length>0},getErrorMessage:function(){return e.errorMessages[n]}}]}},m=0,h=Object.entries(t);m<h.length;m++)f();this.inputFields={name:n,surname:o,company_name:i,company_reg_nr:a,email:l,address:c,
2custom:s,phone:d}}},{key:"initHiddenInputFields",value:function(){var e=document.getElementById("".concat(this.campaignId,"_name_surname")),t=document.getElementById("".concat(this.campaignId,"_company_name")),n=document.getElementById("".concat(this.campaignId,"_company_reg_nr")),r=document.getElementById("".concat(this.campaignId,"_email")),o=document.getElementById("".concat(this.campaignId,"_address")),i=document.getElementById("".concat(this.campaignId,"_custom")),a=document.getElementById("".concat(this.campaignId,"_phone")),u=document.getElementById("".concat(this.campaignId,"_existing_customer_value")),l=document.getElementById("".concat(this.campaignId,"_oportunity_value"));this.hiddenInputFields={name_surname:e,company_name:t,company_reg_nr:n,email:r,address:o,custom:i,phone:a,existing_customer:u,opportunity:l}}},{key:"clearInputFields",value:(i=m(s().m(function e(){var t,n,r,o,i,u=this;return s().w(function(e){for(;;)switch(e.p=e.n){case 0:Object.values(this.inputFields).forEach(function(e){null!=e&&u.setInputFieldValue(e,"")}),t=[this.alreadyClientCheckbox,this.opportunityCheckbox].filter(Boolean),n=a(t),e.p=1,n.s();case 2:if((r=n.n()).done){e.n=4;break}return o=r.value,e.n=3,o.setChecked(!1);case 3:e.n=2;break;case 4:e.n=6;break;case 5:e.p=5,i=e.v,n.e(i);case 6:return e.p=6,n.f(),e.f(6);case 7:this.syncHiddenBlueconicInputs();case 8:return e.a(2)}},e,this,[[1,5,6,7]])})),function(){return i.apply(this,arguments)})},{key:"setInputFieldValue",value:function(e,t){e.querySelector("input").value=t}},{key:"getInputFieldValue",value:function(e){return e.querySelector("input").value}},{key:"syncHiddenBlueconicInputs",value:function(){for(var e,t,n=0,r=Object.entries(this.hiddenInputFields);n<r.length;n++){var o=u(r[n],2),i=o[0],a=o[1];if(a)switch(i){case"name_surname":var l=this.getInputFieldValue(this.inputFields.name),c=this.getInputFieldValue(this.inputFields.surname);a.value="".concat(l," ").concat(c);break;case"existing_customer":a.value=null!==(e=this.alreadyClientCheckbox)&&void 0!==e&&e.checked?1:0;break;case"opportunity":a.value=null!==(t=this.opportunityCheckbox)&&void 0!==t&&t.checked?1:0;break;default:var s=this.inputFields[i];s&&(a.value=this.getInputFieldValue(s))}}}}],t&&h(e.prototype,t),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n,i,l,c}();globalThis.ModBlueconicForm=v})();

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.