@digitalmoves/flying-images
Advanced tools
Comparing version 0.0.3 to 0.0.4
# @digitalmoves/flying-images | ||
## 0.0.4 | ||
### Patch Changes | ||
- 470344d: Fix README | ||
## 0.0.3 | ||
@@ -4,0 +10,0 @@ |
@@ -1,1 +0,1 @@ | ||
(function(u,m){typeof exports=="object"&&typeof module<"u"?m(exports):typeof define=="function"&&define.amd?define(["exports"],m):(u=typeof globalThis<"u"?globalThis:u||self,m(u["flying-images"]={}))})(this,function(u){"use strict";(function(i,t){const n=p,x=i();for(;;)try{if(parseInt(n(187))/1*(parseInt(n(181))/2)+parseInt(n(164))/3+-parseInt(n(157))/4+parseInt(n(166))/5*(parseInt(n(160))/6)+-parseInt(n(184))/7+parseInt(n(186))/8*(-parseInt(n(168))/9)+parseInt(n(183))/10*(parseInt(n(161))/11)===t)break;x.push(x.shift())}catch{x.push(x.shift())}})(I,888320);function m(i){const t=p,n=document[t(185)](t(177));let x=null;if(n.forEach(c=>{const s=t;c[s(169)].trim()===i&&(x=c[s(173)](s(180)))}),!x)return[null,[]];const e=x[t(185)](t(165)),r=Array[t(182)](e)[t(163)](c=>{const s=t,f=c[s(158)]("img"),h=c[s(158)](s(176)),a=c[s(158)](s(159));return{id:c.id,src:f?f[s(174)](s(162))+"?format=500w":"",dims:f[s(174)](s(175)).split("x"),href:h?h.getAttribute(s(178)):"",title:h?h[s(169)][s(170)]():"",excerpt:a?a[s(169)][s(170)]():""}});return[x,r]}function p(i,t){const n=I();return p=function(x,e){return x=x-157,n[x]},p(i,t)}function I(){const i=["2nJpVJB","from","10qeOXOR","5158055udnGaP","querySelectorAll","3946064KrwRAB","86917ynQGpg","3682240vOxGoS","querySelector",".summary-excerpt","396ejDTsz","16646993fovwcD","data-src","map","4262907AubnRb",".summary-item-list .summary-item","1345jsbqzL","addEventListener","9iPyJrR","textContent","trim","Unable to find Summary Block with title ","DOMContentLoaded","closest","getAttribute","data-image-dimensions","a.summary-title-link",".summary-header-text","href","error",".page-section"];return I=function(){return i},I()}function A(i){return function(n,x={}){const e=p;document[e(167)](e(172),function(){const r=e,[c,s]=m(n);c||console[r(179)](r(171)+n),new i(s,c,x)})}}(function(i,t){const n=w,x=i();for(;;)try{if(-parseInt(n(262))/1+-parseInt(n(267))/2*(parseInt(n(258))/3)+parseInt(n(257))/4+parseInt(n(265))/5*(-parseInt(n(260))/6)+-parseInt(n(263))/7+parseInt(n(268))/8*(parseInt(n(261))/9)+-parseInt(n(264))/10*(-parseInt(n(266))/11)===t)break;x.push(x.shift())}catch{x.push(x.shift())}})(g,514106);function w(i,t){const n=g();return w=function(x,e){return x=x-256,n[x]},w(i,t)}function g(){const i=["66QqhtDc","4wHDaYc","8iASomM","push","error","3794328BBZlxR","744798HgbSMR","Unable to find Summary Block with title ","1158198xgkbPo","5662296MbkEmZ","366488LBvXLK","3475591RfbvrF","814910xuWztv","5xyBUBc"];return g=function(){return i},g()}(function(i,t){const n=v,x=i();for(;;)try{if(-parseInt(n(380))/1+parseInt(n(365))/2+parseInt(n(367))/3+-parseInt(n(378))/4*(parseInt(n(355))/5)+parseInt(n(353))/6*(parseInt(n(358))/7)+parseInt(n(379))/8+-parseInt(n(360))/9===t)break;x.push(x.shift())}catch{x.push(x.shift())}})(b,357614);function b(){const i=["getAttribute","DOMContentLoaded",".sqs-block","64xmwKbh","5710944oXOitN","9238umOwlJ",".summary-excerpt","from","a.summary-title-link","241884KSyfBL","push","144650lJDbAe","map","data-src","70sMiRoG","split","9490869tJQAzE","img","href","contains",".summary-header-text","1413720KHUezn","querySelector","181215ZrXnRJ","textContent","closest","forEach",".summary-item-list .summary-item","trim","length","Unable to find Summary Blocks with title "];return b=function(){return i},b()}function v(i,t){const n=b();return v=function(x,e){return x=x-352,n[x]},v(i,t)}(function(i,t){for(var n=_,x=i();;)try{var e=-parseInt(n(395))/1+-parseInt(n(388))/2+-parseInt(n(394))/3+-parseInt(n(391))/4+-parseInt(n(392))/5*(-parseInt(n(389))/6)+-parseInt(n(390))/7+parseInt(n(393))/8;if(e===t)break;x.push(x.shift())}catch{x.push(x.shift())}})(y,134750);function _(i,t){var n=y();return _=function(x,e){x=x-388;var r=n[x];return r},_(i,t)}function y(){var i=["698644gIgZez","811010MuHJGP","6285048nduVgf","498906FzZZYy","250011LHQDre","166296bvtchG","6WbuZnJ","972727FInBrB"];return y=function(){return i},y()}const l=d;(function(i,t){const n=d,x=i();for(;;)try{if(parseInt(n(535))/1*(parseInt(n(520))/2)+parseInt(n(583))/3+parseInt(n(573))/4*(-parseInt(n(515))/5)+-parseInt(n(586))/6*(-parseInt(n(594))/7)+-parseInt(n(541))/8+parseInt(n(509))/9+parseInt(n(550))/10===t)break;x.push(x.shift())}catch{x.push(x.shift())}})(S,103808);function S(){const i=["scaling","floor","elapsedTime","transform ","3297VxafHf","style","removeSummaryBlock","min","config","ms ease, filter ","clickable","addEventListener","zIndexPool","auto","removeFocus","calc(50% + ","left","resize","px)","href","top","maxImageSize","scale(1)","title","transitionStartTime","animateImages","position","startNextImage","hidden","791334tMLCoq","items","targetScale","now","transitioning","isActive","701170PGujdI","dm-flying-images","delayJitter","excerpt","maxActive","24588qtsVhq","filter","height","zIndex","duration","initialSpeedFactor","activeCount","initialScale","init","transform","translateX(-","scaleAmount","focusOnHover","speedFactor","lastTimestamp","4iAkkfH","mouseenter","currentScale","slowSpeedFactor","src","isFocused","905568uuUCCa","alignmentStep","section","dims","length","from","push","forEach","startsWith","1586780JVGCMJ","remove","img","blur(0px)","baseHeight","default","setSectionStyles"," scale(","blur(","innerWidth","baseWidth","elements","queue","applyFocus","direction","transitionDuration","createElement","appendChild","calc","delay","bottom","scaleTransitionStartTime","translateX(","4ZhxAoA","absolute","querySelector","innerHeight","shift","offsetWidth","mouseleave","width","transition"," translateY(-50%)","168831lJwSmG","random","targetSpeedFactor","66ogPuNF","createFlyingImages","bind",".summary-v2-block"];return S=function(){return i},S()}function d(i,t){const n=S();return d=function(x,e){return x=x-500,n[x]},d(i,t)}class k{constructor(t,n,x){const e=d;this[e(598)]={maxImages:5,duration:5e3,delay:1500,delayJitter:1.2,verticalJitter:100,transitionDuration:350,slowSpeedFactor:.05,focusOnHover:!1,blurAmount:5,scaleAmount:1.03,direction:"left",clickable:!0,maxImageSize:500,...x},this[e(510)]=t,this[e(543)]=n,this[e(561)]=[],this[e(526)]=0,this[e(519)]=this[e(598)].maxImages,this[e(562)]=[],this.zIndexPool=Array[e(546)]({length:this[e(598)].maxImages},(r,c)=>c+1),this.alignmentStep=0,this[e(528)]()}[l(528)](){const t=l;this[t(596)](),this[t(556)](),this[t(587)](),window[t(601)](t(607),this[t(556)][t(588)](this)),this[t(507)](),requestAnimationFrame(this.animateImages[t(588)](this))}[l(596)](){const t=l,n=this.section[t(575)](t(589));n&&n[t(551)]()}setSectionStyles(){const t=l;this[t(543)][t(595)][t(506)]="relative",this.section[t(595)][t(522)]=window[t(576)]+"px",this.section[t(595)].overflow=t(508)}[l(587)](){const t=l;this[t(510)][t(548)](n=>{const x=t,e=document[x(566)]("a");e[x(609)]=n.href,e[x(503)]=n.title,!this[x(598)][x(600)]&&(e[x(601)]("click",o=>{o.preventDefault()}),e.style.cursor=x(555));const r=document[x(566)](x(552));r[x(539)]=n[x(539)],r.alt=n[x(518)];const[c,s]=n[x(544)];let f=c>s?this[x(598)].maxImageSize:c/s*this[x(598)].maxImageSize,h=c>s?s/c*this.config.maxImageSize:this[x(598)][x(501)];r.style[x(580)]=f+"px",r[x(595)][x(522)]=h+"px",r[x(595)][x(581)]=x(593)+this[x(598)][x(565)]+x(599)+this.config.transitionDuration+"ms ease",e[x(567)](r),this.section[x(567)](e),e.style[x(506)]=x(574),e[x(595)][x(606)]="0",this[x(598)][x(564)]===x(606)?e[x(595)].transform="translateX("+window[x(559)]+x(608):e[x(595)][x(529)]="translateX(-"+(f+1)+"px)";const a={el:e,img:r,isActive:!1,elapsedTime:0,lastTimestamp:null,zIndex:0,baseWidth:f,baseHeight:h,speedFactor:1,targetSpeedFactor:1,initialSpeedFactor:1,transitionStartTime:null,transitioning:!1,isFocused:!1,currentScale:1,targetScale:1,initialScale:1,scaleTransitionStartTime:null,scaling:!1};this.queue.push(a),e[x(601)](x(536),()=>{const o=x;this[o(598)][o(532)]&&this[o(563)](a),this.config.slowSpeedFactor!==null&&(a[o(525)]=a.speedFactor,a.targetSpeedFactor=this[o(598)].slowSpeedFactor,a.transitionStartTime=performance[o(512)](),a.transitioning=!0)}),e.addEventListener(x(579),()=>{const o=x;this[o(598)][o(532)]&&this[o(604)](a),this[o(598)][o(538)]!==null&&(a[o(525)]=a[o(533)],a.targetSpeedFactor=1,a[o(504)]=performance[o(512)](),a[o(513)]=!0)})})}[l(563)](t){const n=l;t.el.style[n(523)]=9999,t[n(527)]=t[n(537)],t[n(511)]=this.config[n(531)],t[n(571)]=performance[n(512)](),t[n(590)]=!0,this[n(561)][n(548)](x=>{const e=n;x!==t&&x[e(514)]&&(x[e(552)][e(595)].filter=e(558)+this[e(598)].blurAmount+"px)")})}removeFocus(t){const n=l;t.el[n(595)][n(523)]=t[n(523)],t[n(527)]=t[n(537)],t[n(511)]=1,t[n(571)]=performance[n(512)](),t[n(590)]=!0,this[n(561)].forEach(x=>{const e=n;x!==t&&x.isActive&&(x[e(552)][e(595)][e(521)]="blur(0px)")})}[l(507)](){const t=l;if(this[t(526)]>=this.maxActive||this[t(562)][t(545)]===0)return;const n=this[t(562)][t(577)]();if(n&&this[t(602)].length>0){this[t(526)]++,n[t(514)]=!0,n[t(592)]=0,n[t(534)]=null;const x=Math[t(591)](Math[t(584)]()*this[t(602)][t(545)]),e=this[t(602)].splice(x,1)[0];n[t(523)]=e,n.el[t(595)].zIndex=n[t(523)];const r=.5+(n[t(523)]-1)/(this.maxActive-1)*1;n[t(552)].style[t(580)]=n.baseWidth*r+"px",n[t(552)][t(595)][t(522)]=n[t(554)]*r+"px";const c=this[t(542)]%3,s=Math[t(591)](Math[t(584)]()*(2*this[t(598)].verticalJitter+1))-this[t(598)].verticalJitter;switch(c){case 0:n.el[t(595)][t(500)]=s+"px",n.el[t(595)][t(570)]=t(603);break;case 1:n.el[t(595)].bottom=s+"px",n.el[t(595)][t(500)]=t(603);break;case 2:n.el[t(595)].top=t(605)+s+t(608),n.el.style[t(570)]=t(603);break}n[t(540)]=!1,n[t(552)][t(595)].filter=t(553),n[t(552)][t(595)][t(529)]=t(502),this[t(598)].direction===t(606)?n.el[t(595)].transform=t(572)+window[t(559)]+t(608)+(c===2?t(582):""):n.el[t(595)][t(529)]=t(530)+(n.baseWidth+1)+t(608)+(c===2?t(582):""),this[t(542)]++,this[t(561)][t(547)](n);const f=this[t(598)][t(569)]+Math[t(584)]()*this[t(598)][t(569)]*(this[t(598)][t(517)]-1);setTimeout(()=>this[t(507)](),f)}}[l(505)](t){const n=l;this[n(561)][n(548)](x=>{const e=n;if(x[e(514)]){x[e(534)]||(x.lastTimestamp=t);const r=t-x.lastTimestamp;if(x.lastTimestamp=t,x.transitioning){const a=Math[e(597)]((t-x[e(504)])/this[e(598)][e(565)],1);x[e(533)]=x[e(525)]+(x[e(585)]-x[e(525)])*a,a===1&&(x.transitioning=!1)}if(x[e(590)]){const a=Math.min((t-x.scaleTransitionStartTime)/this[e(598)].transitionDuration,1);x.currentScale=x[e(527)]+(x[e(511)]-x[e(527)])*a,a===1&&(x[e(590)]=!1)}x[e(592)]+=r*x[e(533)];const c=x[e(592)]/this[e(598)][e(524)],s=x.img[e(578)];let f,h;if(this[e(598)][e(564)]===e(606)?(f=window.innerWidth+s,h=window[e(559)]-f*c):(f=window[e(559)]+s+2,h=-s-1+f*c),c<1){let a="translateX("+h+e(608);x.el[e(595)][e(500)][e(549)](e(568))&&(a+=e(582)),this.config[e(532)]&&x[e(540)]&&(a+=e(557)+x.currentScale+")"),x.el[e(595)][e(529)]=a}else x[e(540)]=!1,x[e(552)][e(595)].filter="blur(0px)",x[e(552)][e(595)].transform=e(502),this[e(598)][e(564)]===e(606)?x.el[e(595)][e(529)]=e(572)+window[e(559)]+e(608)+(x.el[e(595)][e(500)][e(549)](e(568))?e(582):""):x.el[e(595)][e(529)]="translateX(-"+(x.baseWidth+1)+e(608)+(x.el[e(595)][e(500)].startsWith(e(568))?e(582):""),x[e(552)][e(595)][e(580)]=x[e(560)]+"px",x[e(552)][e(595)].height=x[e(554)]+"px",x.el.style[e(523)]=0,x[e(514)]=!1,this[e(526)]--,this[e(602)].push(x.zIndex),x.zIndex=0,this[e(562)][e(547)](x),this[e(507)]()}}),requestAnimationFrame(this[n(505)][n(588)](this))}}const F=A(k);try{F(l(516),flyingImagesConfig)}catch{F(l(516))}u.startFlyingImages=F,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}); | ||
(function(m,u){typeof exports=="object"&&typeof module<"u"?u(exports):typeof define=="function"&&define.amd?define(["exports"],u):(m=typeof globalThis<"u"?globalThis:m||self,u(m["flying-images"]={}))})(this,function(m){"use strict";(function(i,x){const n=u,t=i();for(;;)try{if(-parseInt(n(217))/1+-parseInt(n(232))/2*(parseInt(n(228))/3)+parseInt(n(219))/4+-parseInt(n(221))/5+parseInt(n(213))/6*(-parseInt(n(229))/7)+-parseInt(n(234))/8+parseInt(n(220))/9===x)break;t.push(t.shift())}catch{t.push(t.shift())}})(d,608812);function u(i,x){const n=d();return u=function(t,e){return t=t-210,n[t]},u(i,x)}function d(){const i=["querySelector","split","data-image-dimensions","DOMContentLoaded","from",".summary-excerpt","336684JUKYCC","5749611sPDGZc","trim","error","20TigXIn","forEach","5947912Eojpsy","img",".summary-item-list .summary-item","href","querySelectorAll","textContent","getAttribute","closest","Unable to find Summary Block with title ","6YdVYhq","data-src",".summary-header-text","map","520155sUbRnS","addEventListener","2638904RnEEpx","31843098SIpahR","1908695cgPwcD"];return d=function(){return i},d()}function k(i){const x=u,n=document[x(238)](x(215));let t=null;if(n[x(233)](o=>{const s=x;o[s(239)][s(230)]()===i&&(t=o[s(211)](".page-section"))}),!t)return[null,[]];const e=t.querySelectorAll(x(236)),r=Array[x(226)](e)[x(216)](o=>{const s=x,f=o[s(222)](s(235)),h=o[s(222)]("a.summary-title-link"),a=o[s(222)](s(227));return{id:o.id,src:f?f[s(210)](s(214))+"?format=500w":"",dims:f[s(210)](s(224))[s(223)]("x"),href:h?h[s(210)](s(237)):"",title:h?h.textContent[s(230)]():"",excerpt:a?a[s(239)][s(230)]():""}});return[t,r]}function T(i){return function(n,t={}){const e=u;document[e(218)](e(225),function(){const r=e,[o,s]=k(n);o||console[r(231)](r(212)+n),new i(s,o,t)})}}(function(i,x){const n=S,t=i();for(;;)try{if(parseInt(n(256))/1*(-parseInt(n(257))/2)+-parseInt(n(261))/3+-parseInt(n(267))/4*(-parseInt(n(268))/5)+-parseInt(n(266))/6*(-parseInt(n(262))/7)+parseInt(n(259))/8+-parseInt(n(258))/9*(-parseInt(n(263))/10)+-parseInt(n(264))/11===x)break;t.push(t.shift())}catch{t.push(t.shift())}})(b,664647);function S(i,x){const n=b();return S=function(t,e){return t=t-256,n[t]},S(i,x)}function b(){const i=["36oMXOWo","12935bvpkqT","DOMContentLoaded","177kDqbza","9980bcDfUd","1503cnazOi","5259096LTvnRb","push","2866659MvJOwd","4610522fPUcXp","37790kTQYrt","1381875SsXTTU","length","12OvnkmJ"];return b=function(){return i},b()}(function(i,x){const n=v,t=i();for(;;)try{if(parseInt(n(134))/1+-parseInt(n(132))/2*(-parseInt(n(147))/3)+-parseInt(n(141))/4+-parseInt(n(159))/5+parseInt(n(158))/6*(-parseInt(n(154))/7)+-parseInt(n(130))/8+parseInt(n(150))/9===x)break;t.push(t.shift())}catch{t.push(t.shift())}})(g,458199);function g(){const i=["669604LVEeLF",".summary-header-text","map","img","querySelectorAll","Unable to find Summary Blocks with title ","data-src","2638540nNfBWZ","querySelector",".summary-excerpt","length","textContent","push","321atbQVX","body","error","11166030bfsorQ","forEach","contains","getAttribute","90349SObPNb",".sqs-block","from","classList","210eqQepw","3849350GskvOG","?format=500w","trim","DOMContentLoaded","686528Epjhhg","a.summary-title-link","9626JAiKlO","split"];return g=function(){return i},g()}function v(i,x){const n=g();return v=function(t,e){return t=t-130,n[t]},v(i,x)}function w(i,x){var n=I();return w=function(t,e){t=t-479;var r=n[t];return r},w(i,x)}(function(i,x){for(var n=w,t=i();;)try{var e=-parseInt(n(483))/1*(-parseInt(n(480))/2)+parseInt(n(485))/3+parseInt(n(482))/4+parseInt(n(486))/5*(parseInt(n(484))/6)+-parseInt(n(487))/7+-parseInt(n(479))/8+parseInt(n(481))/9;if(e===x)break;t.push(t.shift())}catch{t.push(t.shift())}})(I,828816);function I(){var i=["534900CRCIQM","380coJKZb","4864097xEEiYX","12191160fewJtQ","234Oenaos","2142225ItJoTZ","1200884dBQMgC","12832SyqwjL","65502YjsYnJ"];return I=function(){return i},I()}const l=p;(function(i,x){const n=p,t=i();for(;;)try{if(parseInt(n(497))/1+parseInt(n(558))/2+-parseInt(n(538))/3+-parseInt(n(598))/4*(-parseInt(n(522))/5)+-parseInt(n(501))/6+parseInt(n(547))/7+parseInt(n(505))/8*(-parseInt(n(499))/9)===x)break;t.push(t.shift())}catch{t.push(t.shift())}})(y,420435);function y(){const i=["px)","removeSummaryBlock","querySelector","blur(0px)","height","transform","preventDefault","5iZnFvw","transitionDuration","auto","verticalJitter","transitioning","duration","ms ease, filter ","blurAmount","init","from","filter","elapsedTime","baseWidth","src","cursor","activeCount","1759932RqOuZh",".summary-v2-block","scaleTransitionStartTime","shift","elements","alt","excerpt","resize","ms ease","2071146owQYrB","section","calc","style","mouseleave","random","transition","alignmentStep","zIndex","initialScale","forEach","473838dZjVaE","scale(1)","transform ","currentScale","queue","bottom","scaling","offsetWidth","width","createFlyingImages","startNextImage","floor","push","maxActive"," scale(","blur(","baseHeight","left","isFocused","delayJitter","clickable","now","href","dm-flying-images","title","transitionStartTime","scaleAmount","targetSpeedFactor","translateX(-","img","lastTimestamp","isActive","applyFocus","focusOnHover","zIndexPool","speedFactor","startsWith","innerWidth","click","config","797536glvgZm","top","setSectionStyles","maxImages","length","slowSpeedFactor","hidden","position","direction","dims","remove","761082SHygdO","maxImageSize","4707QPurUv","createElement","2025912XrGNGD","removeFocus"," translateY(-50%)","min","2272avdTED","items","targetScale","animateImages","initialSpeedFactor","addEventListener","bind","delay","translateX(","relative"];return y=function(){return i},y()}function p(i,x){const n=y();return p=function(t,e){return t=t-488,n[t]},p(i,x)}class F{constructor(x,n,t){const e=p;this[e(597)]={maxImages:5,duration:5e3,delay:1500,delayJitter:1.2,verticalJitter:100,transitionDuration:350,slowSpeedFactor:.05,focusOnHover:!1,blurAmount:5,scaleAmount:1.03,direction:"left",clickable:!0,maxImageSize:500,...t},this[e(506)]=x,this[e(548)]=n,this[e(542)]=[],this.activeCount=0,this[e(571)]=this[e(597)][e(489)],this[e(562)]=[],this[e(592)]=Array[e(531)]({length:this.config[e(489)]},(r,o)=>o+1),this.alignmentStep=0,this[e(530)]()}[l(530)](){const x=l;this.removeSummaryBlock(),this[x(488)](),this[x(567)](),window.addEventListener(x(545),this[x(488)][x(511)](this)),this[x(568)](),requestAnimationFrame(this.animateImages[x(511)](this))}[l(516)](){const x=l,n=this[x(548)][x(517)](x(539));n&&n[x(496)]()}[l(488)](){const x=l;this[x(548)][x(550)][x(493)]=x(514),this.section[x(550)][x(519)]=window.innerHeight+"px",this.section[x(550)].overflow=x(492)}[l(567)](){const x=l;this[x(506)].forEach(n=>{const t=x,e=document[t(500)]("a");e.href=n[t(580)],e.title=n[t(582)],!this[t(597)][t(578)]&&(e[t(510)](t(596),c=>{c[t(521)]()}),e[t(550)][t(536)]="default");const r=document[t(500)]("img");r.src=n[t(535)],r[t(543)]=n[t(544)];const[o,s]=n[t(495)];let f=o>s?this[t(597)][t(498)]:o/s*this[t(597)][t(498)],h=o>s?s/o*this.config[t(498)]:this[t(597)].maxImageSize;r[t(550)][t(566)]=f+"px",r.style.height=h+"px",r[t(550)][t(553)]=t(560)+this[t(597)][t(523)]+t(528)+this[t(597)][t(523)]+t(546),e.appendChild(r),this[t(548)].appendChild(e),e[t(550)].position="absolute",e[t(550)][t(575)]="0",this[t(597)][t(494)]===t(575)?e[t(550)][t(520)]=t(513)+window.innerWidth+t(515):e.style[t(520)]=t(586)+(f+1)+"px)";const a={el:e,img:r,isActive:!1,elapsedTime:0,lastTimestamp:null,zIndex:0,baseWidth:f,baseHeight:h,speedFactor:1,targetSpeedFactor:1,initialSpeedFactor:1,transitionStartTime:null,transitioning:!1,isFocused:!1,currentScale:1,targetScale:1,initialScale:1,scaleTransitionStartTime:null,scaling:!1};this[t(562)][t(570)](a),e[t(510)]("mouseenter",()=>{const c=t;this[c(597)][c(591)]&&this[c(590)](a),this[c(597)][c(491)]!==null&&(a[c(509)]=a.speedFactor,a[c(585)]=this.config[c(491)],a[c(583)]=performance.now(),a[c(526)]=!0)}),e[t(510)](t(551),()=>{const c=t;this[c(597)][c(591)]&&this[c(502)](a),this[c(597)][c(491)]!==null&&(a[c(509)]=a.speedFactor,a[c(585)]=1,a[c(583)]=performance.now(),a[c(526)]=!0)})})}[l(590)](x){const n=l;x.el[n(550)].zIndex=9999,x.initialScale=x.currentScale,x[n(507)]=this[n(597)][n(584)],x.scaleTransitionStartTime=performance[n(579)](),x[n(564)]=!0,this[n(542)][n(557)](t=>{const e=n;t!==x&&t[e(589)]&&(t[e(587)][e(550)].filter=e(573)+this[e(597)][e(529)]+"px)")})}removeFocus(x){const n=l;x.el.style.zIndex=x[n(555)],x.initialScale=x[n(561)],x.targetScale=1,x[n(540)]=performance[n(579)](),x[n(564)]=!0,this[n(542)][n(557)](t=>{const e=n;t!==x&&t[e(589)]&&(t[e(587)][e(550)][e(532)]=e(518))})}[l(568)](){const x=l;if(this[x(537)]>=this.maxActive||this[x(562)][x(490)]===0)return;const n=this.queue[x(541)]();if(n&&this[x(592)][x(490)]>0){this.activeCount++,n[x(589)]=!0,n[x(533)]=0,n[x(588)]=null;const t=Math[x(569)](Math[x(552)]()*this[x(592)].length),e=this.zIndexPool.splice(t,1)[0];n[x(555)]=e,n.el[x(550)][x(555)]=n[x(555)];const r=.5+(n[x(555)]-1)/(this.maxActive-1)*1;n.img[x(550)][x(566)]=n[x(534)]*r+"px",n[x(587)][x(550)][x(519)]=n[x(574)]*r+"px";const o=this.alignmentStep%3,s=Math.floor(Math.random()*(2*this[x(597)].verticalJitter+1))-this[x(597)][x(525)];switch(o){case 0:n.el[x(550)][x(599)]=s+"px",n.el[x(550)].bottom=x(524);break;case 1:n.el.style[x(563)]=s+"px",n.el[x(550)].top="auto";break;case 2:n.el[x(550)][x(599)]="calc(50% + "+s+"px)",n.el[x(550)][x(563)]=x(524);break}n[x(576)]=!1,n.img[x(550)].filter=x(518),n.img[x(550)].transform=x(559),this.config[x(494)]===x(575)?n.el[x(550)][x(520)]=x(513)+window[x(595)]+x(515)+(o===2?x(503):""):n.el[x(550)].transform=x(586)+(n[x(534)]+1)+"px)"+(o===2?x(503):""),this[x(554)]++,this.elements[x(570)](n);const f=this[x(597)][x(512)]+Math[x(552)]()*this.config.delay*(this[x(597)][x(577)]-1);setTimeout(()=>this[x(568)](),f)}}[l(508)](x){const n=l;this[n(542)][n(557)](t=>{const e=n;if(t[e(589)]){t[e(588)]||(t.lastTimestamp=x);const r=x-t[e(588)];if(t.lastTimestamp=x,t[e(526)]){const a=Math[e(504)]((x-t[e(583)])/this[e(597)][e(523)],1);t[e(593)]=t.initialSpeedFactor+(t[e(585)]-t[e(509)])*a,a===1&&(t[e(526)]=!1)}if(t[e(564)]){const a=Math[e(504)]((x-t[e(540)])/this[e(597)][e(523)],1);t[e(561)]=t[e(556)]+(t[e(507)]-t[e(556)])*a,a===1&&(t[e(564)]=!1)}t[e(533)]+=r*t[e(593)];const o=t[e(533)]/this[e(597)][e(527)],s=t[e(587)][e(565)];let f,h;if(this[e(597)][e(494)]==="left"?(f=window[e(595)]+s,h=window[e(595)]-f*o):(f=window[e(595)]+s+2,h=-s-1+f*o),o<1){let a="translateX("+h+"px)";t.el.style[e(599)][e(594)](e(549))&&(a+=e(503)),this.config[e(591)]&&t.isFocused&&(a+=e(572)+t[e(561)]+")"),t.el[e(550)][e(520)]=a}else t[e(576)]=!1,t[e(587)][e(550)][e(532)]=e(518),t.img[e(550)][e(520)]="scale(1)",this[e(597)][e(494)]===e(575)?t.el[e(550)][e(520)]=e(513)+window[e(595)]+e(515)+(t.el[e(550)][e(599)][e(594)](e(549))?" translateY(-50%)":""):t.el[e(550)][e(520)]=e(586)+(t[e(534)]+1)+e(515)+(t.el[e(550)].top[e(594)](e(549))?" translateY(-50%)":""),t.img[e(550)][e(566)]=t[e(534)]+"px",t[e(587)][e(550)][e(519)]=t[e(574)]+"px",t.el[e(550)][e(555)]=0,t.isActive=!1,this[e(537)]--,this[e(592)][e(570)](t[e(555)]),t[e(555)]=0,this[e(562)][e(570)](t),this.startNextImage()}}),requestAnimationFrame(this[n(508)].bind(this))}}const _=T(F);try{_(l(581),flyingImagesConfig)}catch{_("dm-flying-images")}m.startFlyingImages=_,Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})}); |
{ | ||
"name": "@digitalmoves/flying-images", | ||
"private": false, | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "dist/main.js", | ||
@@ -6,0 +6,0 @@ "files": [ |
# Flying images Squarespace plugin ✨ | ||
Create an infinite loop of your favourite images, flying across the screen. | ||
> [Demo](https://flying-images.squarespace.com/?password=digitalmoves) • Get this Squarespace plugin 👉 [Digital Moves plugin store](https://www.digitalmoves.com.au/plugins/p/flying-images) | ||
@@ -4,0 +6,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13374
13
44