PageSourceSearch

https://mtc.lt/templates/jl_simpli/js/jlcomponents/slideshow-parallax.min.js

js mtc.lt collected 2026-10-02 14:51:31 UTC 8,892 bytes, 1 lines download raw bytes

1/*! jlUIkit 3.16.21 | https://www.getuikit.com | (c) 2014 - 2023 YOOtheme | MIT License */(function(i,b){typeof exports=="object"&&typeof module<"u"?module.exports=b(require("uikit-util")):typeof define=="function"&&define.amd?define("uikitslideshow_parallax",["uikit-util"],b):(i=typeof globalThis<"u"?globalThis:i||self,i.jlUIkitSlideshow_parallax=b(i.jlUIkit.util))})(this,function(i){"use strict";var b={props:{media:Boolean},data:{media:!1},connected(){const n=X(this.media,this.$el);if(this.matchMedia=!0,n){this.mediaObj=window.matchMedia(n);const e=()=>{this.matchMedia=this.mediaObj.matches,i.trigger(this.$el,i.createEvent("mediachange",!1,!0,[this.mediaObj]))};this.offMediaObj=i.on(this.mediaObj,"change",()=>{e(),this.$emit("resize")}),e()}},disconnected(){var n;(n=this.offMediaObj)==null||n.call(this)}};function X(n,e){if(i.isString(n)){if(i.startsWith(n,"@"))n=i.toFloat(i.css(e,`--jl-breakpoint-${n.substr(1)}`));else if(isNaN(n))return n}return n&&i.isNumeric(n)?`(min-width: ${n}px)`:""}function A(n,e){var t;return(t=n==null?void 0:n.startsWith)==null?void 0:t.call(n,e)}const{isArray:Nn,from:Y}=Array;function Z(n){return typeof n=="function"}function C(n){return n!==null&&typeof n=="object"}function k(n){return C(n)&&n===n.window}function T(n){return E(n)>=1}function U(n){return E(n)===1}function E(n){return!k(n)&&C(n)&&n.nodeType}function M(n){return typeof n=="string"}function nn(n){return n===void 0}function x(n){return u(n)[0]}function u(n){return T(n)?[n]:Array.from(n||[]).filter(T)}function j(n){const e=Object.create(null);return t=>e[t]||(e[t]=n(t))}function O(n,e,t){var o;if(C(e)){for(const r in e)O(n,r,e[r]);return}if(nn(t))return(o=x(n))==null?void 0:o.getAttribute(e);for(const r of u(n))Z(t)&&(t=t.call(r,O(r,e))),t===null?tn(r,e):r.setAttribute(e,t)}function tn(n,e){u(n).forEach(t=>t.removeAttribute(e))}function W(n){var e;return(e=x(n))==null?void 0:e.parentElement}function en(n,e){return u(n).filter(t=>_(t,e))}function _(n,e){return u(n).some(t=>t.matches(e))}function R(n,e){return U(n)?n.closest(A(e,">")?e.slice(1):e):u(n).map(t=>R(t,e)).filter(Boolean)}function rn(n,e){n=x(n);const t=n?Y(n.children):[];return e?en(t,e):t}function on(n,e){return e?u(n).indexOf(x(e)):rn(W(n)).indexOf(n)}function sn(n,e){return u(dn(n,x(e),"querySelectorAll"))}const cn=/(^|[^\\],)\s*[!>+~-]/,an=j(n=>n.match(cn)),fn=/([!>+~-])(?=\s+[!>+~-]|\s*$)/g,un=j(n=>n.replace(fn,"$1 *"));function dn(n,e=document,t){if(!n||!M(n))return n;if(n=un(n),an(n)){const o=ln(n);n="";for(let r of o){let s=e;if(r[0]==="!"){const a=r.substr(1).trim().split(" ");if(s=R(W(e),a[0]),r=a.slice(1).join(" ").trim(),!r.length&&o.length===1)return s}if(r[0]==="-"){const a=r.substr(1).trim().split(" "),c=(s||e).previousElementSibling;s=_(c,r.substr(1))?c:null,r=a.slice(1).join(" ")}s&&(n+=`${n?",":""}${mn(s)} ${r}`)}e=document}try{return e[t](n)}catch{return null}}const hn=/.*?[^\\](?:,|$)/g,ln=j(n=>n.match(hn).map(e=>e.replace(/,$/,"").trim()));function mn(n){const e=[];for(;n.parentNode;){const t=O(n,"id");if(t){e.unshift(`#${gn(t)}`);break}else{let{tagName:o}=n;o!=="HTML"&&(o+=`:nth-child(${on(n)+1})`),e.unshift(o),n=n.parentNode}}return e.join(" > ")}function gn(n){return M(n)?CSS.escape(n):""}const bn=/^\s*<(\w+|!)[^>]*>/,xn=/^<(\w+)\s*\/?>(?:<\/\1>)?$/;function $n(n){const e=xn.exec(n);if(e)return document.createElement(e[1]);const t=document.createElement("div");return bn.test(n)?t.insertAdjacentHTML("beforeend",n.trim()):t.textContent=n,yn(t.childNodes)}function yn(n){return n.length>1?n:n[0]}function wn(n,e){return pn(n)?u($n(n)):sn(n,e)}function pn(n){return M(n)&&A(n.trim(),"<")}function vn(n){return Math.ceil(Math.max(0,...wn("[stroke]",n).map(e=>{try{return e.getTotalLength()}catch{return 0}})))}const p={x:v,y:v,rotate:v,scale:v,color:I,backgroundColor:I,borderColor:I,blur:m,hue:m,fopacity:m,grayscale:m,invert:m,saturate:m,sepia:m,opacity:Cn,stroke:Mn,bgx:B,bgy:B},{keys:z}=Object;var Fn={mixins:[b],props:L(z(p),"list"),data:L(z(p),void 0),computed:{props(n,e){const t={};for(const r in n)r in p&&!i.isUndefined(n[r])&&(t[r]=n[r].slice());const o={};for(const r in t)o[r]=p[r](r,e,t[r],t);return o}},events:{load(){this.$emit()}},methods:{reset(){for(const n in this.getCss(0))i.css(this.$el,n,"")},getCss(n){const e={transform:"",filter:""};for(const t in this.props)this.props[t](e,i.clamp(n));return e.willChange=Object.keys(e).filter(t=>e[t]!=="").map(i.propName).join(","),e}}};function v(n,e,t){let o=S(t)||{x:"px",y:"px",rotate:"deg"}[n]||"",r;return n==="x"||n==="y"?(n=`translate${i.ucfirst(n)}`,r=s=>
vendor: 4,331 bytes, line 1
1i.toFloat(i.toFloat(s).toFixed(o==="px"?0:6))):n==="scale"&&(o="",r=s=>S([s])?i.toPx(s,"width",e,!0)/e.offsetWidth:s),t.length===1&&t.unshift(n==="scale"?1:0),t=g(t,r),(s,a)=>{s.transform+=` ${n}(${$(t,a)}${o})`}}function I(n,e,t){return t.length===1&&t.unshift(y(e,n,"")),t=g(t,o=>Sn(e,o)),(o,r)=>{const[s,a,c]=q(t,r),h=s.map((l,f)=>(l+=c*(a[f]-l),f===3?i.toFloat(l):parseInt(l,10))).join(",");o[n]=`rgba(${h})`}}function Sn(n,e){return y(n,"color",e).split(/[(),]/g).slice(1,-1).concat(1).slice(0,4).map(i.toFloat)}function m(n,e,t){t.length===1&&t.unshift(0);const o=S(t)||{blur:"px",hue:"deg"}[n]||"%";return n={fopacity:"opacity",hue:"hue-rotate"}[n]||n,t=g(t),(r,s)=>{const a=$(t,s);r.filter+=` ${n}(${a+o})`}}function Cn(n,e,t){return t.length===1&&t.unshift(y(e,n,"")),t=g(t),(o,r)=>{o[n]=$(t,r)}}function Mn(n,e,t){t.length===1&&t.unshift(0);const o=S(t),r=vn(e);return t=g(t.reverse(),s=>(s=i.toFloat(s),o==="%"?s*r/100:s)),t.some(([s])=>s)?(i.css(e,"strokeDasharray",r),(s,a)=>{s.strokeDashoffset=$(t,a)}):i.noop}function B(n,e,t,o){t.length===1&&t.unshift(0);const r=n==="bgy"?"height":"width";o[n]=g(t,c=>i.toPx(c,r,e));const s=["bgx","bgy"].filter(c=>c in o);if(s.length===2&&n==="bgx")return i.noop;if(y(e,"backgroundSize","")==="cover")return jn(n,e,t,o);const a={};for(const c of s)a[c]=D(e,c);return H(s,a,o)}function jn(n,e,t,o){const r=On(e);if(!r.width)return i.noop;const s={width:e.offsetWidth,height:e.offsetHeight},a=["bgx","bgy"].filter(f=>f in o),c={};for(const f of a){const d=o[f].map(([Pn])=>Pn),w=Math.min(...d),N=Math.max(...d),K=d.indexOf(w)<d.indexOf(N),Q=N-w;c[f]=`${(K?-Q:0)-(K?w:N)}px`,s[f==="bgy"?"height":"width"]+=Q}const h=i.Dimensions.cover(r,s);for(const f of a){const d=f==="bgy"?"height":"width",w=h[d]-s[d];c[f]=`max(${D(e,f)},-${w}px) + ${c[f]}`}const l=H(a,c,o);return(f,d)=>{l(f,d),f.backgroundSize=`${h.width}px ${h.height}px`,f.backgroundRepeat="no-repeat"}}function D(n,e){return y(n,`background-position-${e.substr(-1)}`,"")}function H(n,e,t){return function(o,r){for(const s of n){const a=$(t[s],r);o[`background-position-${s.substr(-1)}`]=`calc(${e[s]} + ${a}px)`}}}const F={};function On(n){const e=i.css(n,"backgroundImage").replace(/^none|url\(["']?(.+?)["']?\)$/,"$1");if(F[e])return F[e];const t=new Image;return e&&(t.src=e,!t.naturalWidth)?(t.onload=()=>{F[e]=P(t),i.trigger(n,i.createEvent("load",!1))},P(t)):F[e]=P(t)}function P(n){return{width:n.naturalWidth,height:n.naturalHeight}}function g(n,e=i.toFloat){const t=[],{length:o}=n;let r=0;for(let s=0;s<o;s++){let[a,c]=i.isString(n[s])?n[s].trim().split(/ (?![^(]*\))/):[n[s]];if(a=e(a),c=c?i.toFloat(c)/100:null,s===0?c===null?c=0:c&&t.push([a,0]):s===o-1&&(c===null?c=1:c!==1&&(t.push([a,c]),c=1)),t.push([a,c]),c===null)r++;else if(r){const h=t[s-r-1][1],l=(c-h)/(r+1);for(let f=r;f>0;f--)t[s-f][1]=h+l*(r-f+1);r=0}}return t}function q(n,e){const t=i.findIndex(n.slice(1),([,o])=>e<=o)+1;return[n[t-1][0],n[t][0],(e-n[t-1][1])/(n[t][1]-n[t-1][1])]}function $(n,e){const[t,o,r]=q(n,e);return i.isNumber(t)?t+Math.abs(t-o)*r*(t<o?1:-1):+o}const In=/^-?\d+(\S+)?/;function S(n,e){var t;for(const o of n){const r=(t=o.match)==null?void 0:t.call(o,In);if(r)return r[1]}return e}function y(n,e,t){const o=n.style[e],r=i.css(i.css(n,e,t),e);return n.style[e]=o,r}function L(n,e){return n.reduce((t,o)=>(t[o]=e,t),{})}var V={mixins:[Fn],data:{selItem:"!li"},beforeConnect(){this.item=i.query(this.selItem,this.$el)},disconnected(){this.item=null},events:[{name:"itemin itemout",self:!0,el(){return this.item},handler({type:n,detail:{percent:e,duration:t,timing:o,dir:r}}){i.fastdom.read(()=>{if(!this.matchMedia)return;const s=this.getCss(J(n,r,e)),a=this.getCss(G(n)?.5:r>0?1:0);i.fastdom.write(()=>{i.css(this.$el,s),i.Transition.start(this.$el,a,t,o).catch(i.noop)})})}},{name:"transitioncanceled transitionend",self:!0,el(){return this.item},handler(){i.Transition.cancel(this.$el)}},{name:"itemtranslatein itemtranslateout",self:!0,el(){return this.item},handler({type:n,detail:{percent:e,dir:t}}){i.fastdom.read(()=>{if(!this.matchMedia){this.reset();return}const o=this.getCss(J(n,t,e));i.fastdom.write(()=>i.css(this.$el,o))})}}]};function G(n){return i.endsWith(n,"in")}function J(n,e,t){return t/=2,G(n)^e<0?t:1-t}return typeof window<"u"&&window.jlUIkit&&window.jlUIkit.component("slideshowParallax",V),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.