PageSourceSearch

https://www.tet.lv/dist/components-web/utility/html.049975cc23d12a8bfa01.js?2caa38

js tet.lv collected 2026-09-24 08:59:37 UTC 10,053 bytes, 2 lines download raw bytes

1/*! For license information please see html.049975cc23d12a8bfa01.js.LICENSE.txt */
2(()=>{"use strict";var e={4609(e,t,n){function r(e){function t(){r&&(l.length>0&&/^[~+>]$/.test(l[l.length-1])&&l.push(" "),l.push(r))}var n,r,o,u,l=[],i=[0],c=0,a=/(?:[^\\]|(?:^|[^\\])(?:\\\\)+)$/,s=/^\s+$/,f=[/\s+|\/\*|["'>~+[(]/g,/\s+|\/\*|["'[\]()]/g,/\s+|\/\*|["'[\]()]/g,null,/\*\//g];for(e=e.trim();;){if(r="",(o=f[i[i.length-1]]).lastIndex=c,!(n=o.exec(e))){r=e.substr(c),t();break}if((u=c)<(c=o.lastIndex)-n[0].length&&(r=e.substring(u,c-n[0].length)),i[i.length-1]<3){if(t(),"["===n[0])i.push(1);else if("("===n[0])i.push(2);else if(/^["']$/.test(n[0]))i.push(3),f[3]=new RegExp(n[0],"g");else if("/*"===n[0])i.push(4);else if(/^[\])]$/.test(n[0])&&i.length>0)i.pop();else if(/^(?:\s+|[~+>])$/.test(n[0])&&(l.length>0&&!s.test(l[l.length-1])&&0===i[i.length-1]&&l.push(" "),1===i[i.length-1]&&5===l.length&&"="===l[2].charAt(l[2].length-1)&&(l[4]=" "+l[4]),s.test(n[0])))continue;l.push(n[0])}else l[l.length-1]+=r,a.test(l[l.length-1])&&(4===i[i.length-1]&&(l.length<2||s.test(l[l.length-2])?l.pop():l[l.length-1]=" ",n[0]=""),i.pop()),l[l.length-1]+=n[0]}return l.join("").trim()}n.d(t,{P:()=>r})},8089(e,t,n){n.d(t,{Do:()=>o,qi:()=>u});var r=n(4609);function o(e,t=document,n=null){return l(e,!0,t,n)}function u(e,t=document,n=null){return l(e,!1,t,n)}function l(e,t,n,o=null){e=(0,r.P)(e);let u=n.querySelector(e);if(document.head.createShadowRoot||document.head.attachShadow){if(!t&&u)return u;return i(e,",").reduce((e,r)=>{if(!t&&e)return e;const u=i(r.replace(/^\s+/g,"").replace(/\s*([>+~]+)\s*/g,"$1")," ").filter(e=>!!e).map(e=>i(e,">")),l=u.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}(u[l][u[l].length-1],n,o),f=function(e,t,n){return r=>{let o=t,u=r,l=!1;for(;u&&!c(u);){let t=!0;if(1===e[o].length)t=u.matches(e[o]);else{const r=[].concat(e[o]).reverse();let l=u;for(const e of r){if(!l||!l.matches(e)){t=!1;break}l=a(l,n)}}if(t&&0===o){l=!0;break}t&&o--,u=a(u,n)}return l}}(u,l,n);return t?e=e.concat(s.filter(f)):(e=s.find(f))||null},t?[]:null)}return t?n.querySelectorAll(e):u}function i(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 c(e){return e.nodeType===Node.DOCUMENT_FRAGMENT_NODE||e.nodeType===Node.DOCUMENT_NODE}function a(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 u=t[r]={exports:{}};return e[r](u,u.exports,n),u.exports}n.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var o=t[r++],u=t[r++];n.o(e,o)?0===u&&r++:0===u?Object.defineProperty(e,o,{enumerable:!0,value:t[r++]}):Object.defineProperty(e,o,{enumerable:!0,get:u})}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(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 u(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,u){var i=r&&r.prototype instanceof a?r:a,s=Object.create(i.prototype);return l(s,"_invoke",function(n,r,o){var u,l,i,a=0,s=o||[],f=!1,m={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return u=t,l=0,i=e,m.n=n,c}};function p(n,r){for(l=n,i=r,t=0;!f&&a&&!o&&t<s.length;t++){var o,u=s[t],p=m.p,h=u[2];n>3?(o=h===r)&&(i=u[(l=u[4])?5:(l=3,3)],u[4]=u[5]=e):u[0]<=p&&((o=n<2&&p<u[1])?(l=0,m.v=r,m.n=u[1]):p<h&&(o=n<3||u[0]>r||r>h)&&(u[4]=n,u[5]=r,m.n=h,l=0))}if(o||n>1)return c;throw f=!0,r}return function(o,s,h){if(a>1)throw TypeError("Generator is already running");for(f&&1===s&&p(s,h),l=s,i=h;(t=l<2?e:i)||!f;){u||(l?l<3?(l>1&&(m.n=-1),p(l,i)):m.n=i:m.v=i);try{if(a=2,u){if(l||(o="next"),t=u[o]){if(!(t=t.call(u,i)))throw TypeError("iterator result is not an object");
2if(!t.done)return t;i=t.value,l<2&&(l=0)}else 1===l&&(t=u.return)&&t.call(u),l<2&&(i=TypeError("The iterator does not provide a '"+o+"' method"),l=1);u=e}else if((t=(f=m.n<0)?i:n.call(r,m))!==c)break}catch(t){u=e,l=1,i=t}finally{a=1}}return{value:t,done:f}}}(n,o,u),!0),s}var c={};function a(){}function s(){}function f(){}t=Object.getPrototypeOf;var m=[][r]?t(t([][r]())):(l(t={},r,function(){return this}),t),p=f.prototype=a.prototype=Object.create(m);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,o,"GeneratorFunction")),e.prototype=Object.create(p),e}return s.prototype=f,l(p,"constructor",f),l(f,"constructor",s),s.displayName="GeneratorFunction",l(f,o,"GeneratorFunction"),l(p),l(p,o,"Generator"),l(p,r,function(){return this}),l(p,"toString",function(){return"[object Generator]"}),(u=function(){return{w:i,m:h}})()}function l(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}l=function(e,t,n,r){function u(t,n){l(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:(u("next",0),u("throw",1),u("return",2))},l(e,t,n,r)}function i(e,t,n,r,o,u,l){try{var i=e[u](l),c=i.value}catch(e){return void n(e)}i.done?t(c):Promise.resolve(c).then(r,o)}function c(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 a(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 f=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 u=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=[];(i=u?(0,r.Do)(n,t):t.querySelector(n)).length?i.forEach(function(t){e.injectStylesInElement(t,o)}):l<e.MAX_INJECTION_TRIES&&setTimeout(function(){return e.injectStyles(t,n,o,u,++l)},e.INJECTION_TRY_TIMEOUT)}},{key:"injectStylesInElement",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t.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:(l=u().m(function e(t){return u().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)}),a=function(){var e=this,t=arguments;return new Promise(function(n,r){var o=l.apply(e,t);function u(e){i(o,n,r,u,c,"next",e)}function c(e){i(o,n,r,u,c,"throw",e)}u(void 0)})},function(e){return a.apply(this,arguments)})}],n&&c(t.prototype,n),o&&c(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,o,l,a}();if(a(f,"MAX_INJECTION_TRIES",30),a(f,"INJECTION_TRY_TIMEOUT",100),a(f,"scriptRegex",/<script>(.|\n|\r)*?<\/script>/g),!window.HTMLUtilities){window.HTMLUtilities=f,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}})();

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.