From fcb740cfac99f857a4a0e18cbe3534a51378dbe0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 20 Jun 2024 14:50:20 +0100 Subject: [PATCH] chore(deps): bump @artalk/plugin-lightbox from 0.2.0 to 0.2.1 (#1301) Co-authored-by: GitHub --- assets/lib/artalk/artalk-plugin-lightbox.js | 2 +- dependencies.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/lib/artalk/artalk-plugin-lightbox.js b/assets/lib/artalk/artalk-plugin-lightbox.js index 9da55d2bf..3d10bf14c 100644 --- a/assets/lib/artalk/artalk-plugin-lightbox.js +++ b/assets/lib/artalk/artalk-plugin-lightbox.js @@ -1 +1 @@ -(function(e,t){typeof exports=="object"&&typeof module!="undefined"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["artalk-plugin-lightbox"]=e["artalk-plugin-lightbox"]||{}))})(this,function(e){"use strict";var S=Object.defineProperty;var x=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable;var P=(e,t,n)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,k=(e,t)=>{for(var n in t||(t={}))T.call(t,n)&&P(e,n,t[n]);if(x)for(var n of x(t))v.call(t,n)&&P(e,n,t[n]);return e};var w=(e,t,n)=>new Promise((b,a)=>{var y=c=>{try{p(n.next(c))}catch(l){a(l)}},g=c=>{try{p(n.throw(c))}catch(l){a(l)}},p=c=>c.done?b(c.value):Promise.resolve(c.value).then(y,g);p((n=n.apply(e,t)).next())});var L;const t="modulepreload",n=function(d){return"/"+d},b={},a=function(h,_,m){return Promise.resolve().then(()=>h()).catch(f=>{const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=f,window.dispatchEvent(i),!i.defaultPrevented)throw f})};function y(){return w(this,null,function*(){if(typeof window!="undefined"&&typeof window.lightGallery!="undefined")return window.lightGallery;try{return require("lightgallery")}catch(d){return(yield a(()=>import("lightgallery"),void 0)).default}})}function g(){return w(this,null,function*(){if(typeof window!="undefined"&&typeof window.lightbox!="undefined")return window.lightbox;try{return require("lightbox2")}catch(d){return(yield a(()=>import("lightbox2"),void 0)).default}})}function p(){return w(this,null,function*(){if(typeof window!="undefined"&&typeof window.Fancybox!="undefined")return window.Fancybox;try{return require("fancybox")}catch(d){return(yield a(()=>import("fancybox"),void 0)).default}})}function c(){return w(this,null,function*(){if(typeof window!="undefined"&&typeof window.PhotoSwipeLightbox!="undefined")return window.PhotoSwipeLightbox;try{return require("photoswipe")}catch(d){return(yield a(()=>import("photoswipe"),void 0)).default}})}const l=d=>{const h="atk-lightbox-loaded",_="atk-lightbox-img",m=`.${_}`;d.on("list-loaded",()=>{const u=[],f=new Set;d.getCommentNodes().forEach(i=>{const o=i.getRender().$content;o.querySelectorAll(`img:not([atk-emoticon]):not([${h}])`).forEach(r=>{r.setAttribute(h,"");const s=document.createElement("a");s.setAttribute("class",_),s.setAttribute("href",r.src),s.setAttribute("data-src",r.src),s.append(r.cloneNode()),r.replaceWith(s),u.push(s)}),f.add(o)}),y().then(i=>{f.forEach(o=>{i(o,k({selector:m},window.ATK_LIGHTBOX_CONF||{}))})}).catch(),g().then(i=>{u.forEach(o=>{window.$(o).attr("data-title",window.$(o).find("img").attr("alt")),window.$(o).attr("rel","lightbox"),o.onclick=r=>{r.preventDefault(),i.start(window.$(o))}})}).catch(),c().then(i=>{if(!i)return;const o=[],r=new i(k({dataSource:o},window.ATK_LIGHTBOX_CONF||{}));u.forEach(s=>{const E=s.querySelector("img");o.push({src:E.src}),s.onclick=A=>{A.preventDefault(),r.loadAndOpen(0)}}),r.init()}).catch()}),p().then(u=>{u.bind(`.artalk .atk-list ${m}`,window.ATK_LIGHTBOX_CONF)}).catch()};typeof window!="undefined"&&(!window.ArtalkPlugins&&(window.ArtalkPlugins={}),window.ArtalkPlugins.ArtalkLightboxPlugin=l,(L=window.Artalk)==null||L.use(l)),e.ArtalkLightboxPlugin=l,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}); +(function(n,e){typeof exports=="object"&&typeof module!="undefined"?e(exports):typeof define=="function"&&define.amd?define(["exports"],e):(n=typeof globalThis!="undefined"?globalThis:n||self,e(n["artalk-plugin-lightbox"]=n["artalk-plugin-lightbox"]||{}))})(this,function(n){"use strict";var S=Object.defineProperty;var A=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var x=(n,e,t)=>e in n?S(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,y=(n,e)=>{for(var t in e||(e={}))_.call(e,t)&&x(n,t,e[t]);if(A)for(var t of A(e))m.call(e,t)&&x(n,t,e[t]);return n};var k=(n,e,t)=>new Promise((b,h)=>{var g=o=>{try{s(t.next(o))}catch(l){h(l)}},p=o=>{try{s(t.throw(o))}catch(l){h(l)}},s=o=>o.done?b(o.value):Promise.resolve(o.value).then(g,p);s((t=t.apply(n,e)).next())});var o;const e={lightGallery:"lightGallery",lightBox:"lightbox",fancyBox:"Fancybox",photoSwipe:"PhotoSwipeLightbox"};let t;function b(l){return k(this,null,function*(){var w,u;if(t)return t;t={};for(const r in e)try{if(typeof window!="undefined"&&window[e[r]]?t[r]=window[e[r]]:t[r]=yield(u=(w=l==null?void 0:l[r])==null?void 0:w.lib)==null?void 0:u.call(w),t[r])return t}catch(a){}return t})}const h="atk-lightbox-loaded",g="atk-lightbox-img",p=`.${g}`,s=(l,w)=>{l.on("list-loaded",()=>k(this,null,function*(){const u=[],r=new Set;l.getCommentNodes().forEach(i=>{const f=i.getRender().$content;f.querySelectorAll(`img:not([atk-emoticon]):not([${h}])`).forEach(c=>{c.setAttribute(h,"");const d=document.createElement("a");d.setAttribute("class",g),d.setAttribute("href",c.src),d.setAttribute("data-src",c.src),d.append(c.cloneNode()),c.replaceWith(d),u.push(d)}),r.add(f)});const a=yield b(w);if(a.lightGallery&&r.forEach(i=>{a.lightGallery(i,y({selector:p},window.ATK_LIGHTBOX_CONF||{}))}),a.lightBox&&u.forEach(i=>{window.$(i).attr("data-title",window.$(i).find("img").attr("alt")),window.$(i).attr("rel","lightbox"),i.onclick=f=>{f.preventDefault(),a.lightBox.start(window.$(i))}}),a.photoSwipe){const i=[],f=new a.photoSwipe(y({dataSource:i},window.ATK_LIGHTBOX_CONF||{}));u.forEach(c=>{const d=c.querySelector("img");i.push({src:d.src}),c.onclick=L=>{L.preventDefault(),f.loadAndOpen(0)}}),f.init()}a.fancyBox&&a.fancyBox.then(({FancyBox:i})=>{i&&i.bind(`.artalk .atk-list ${p}`,window.ATK_LIGHTBOX_CONF)})}))};typeof window!="undefined"&&(!window.ArtalkPlugins&&(window.ArtalkPlugins={}),window.ArtalkPlugins.ArtalkLightboxPlugin=s,(o=window.Artalk)==null||o.use(s)),n.ArtalkLightboxPlugin=s,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})}); diff --git a/dependencies.json b/dependencies.json index 04705ec4e..a187cb2a7 100644 --- a/dependencies.json +++ b/dependencies.json @@ -103,7 +103,7 @@ }, { "name": "@artalk/plugin-lightbox", - "version": "0.2.0", + "version": "0.2.1", "files": [ { "remote": "dist/artalk-plugin-lightbox.js",