From 90c35b5840e924988a160be39a7de6982e8445a5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 14:03:05 +0100 Subject: [PATCH] chore(deps): bump @artalk/plugin-lightbox from 0.1.2 to 0.2.0 (#1295) 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 018ed9b65..9da55d2bf 100644 --- a/assets/lib/artalk/artalk-plugin-lightbox.js +++ b/assets/lib/artalk/artalk-plugin-lightbox.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(require("artalk")):"function"==typeof define&&define.amd?define(["artalk"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Artalk)}(this,(function(t){"use strict";var e=Object.defineProperty,o=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,i=(t,o,r)=>o in t?e(t,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[o]=r;t.use((t=>{const e="atk-lightbox-loaded",a="atk-lightbox-img",l=`.${a}`,c=window.ATK_LIGHTBOX_TYPE,d=t=>!c&&window[t]||(c||"").toLowerCase()===t.toLowerCase();t.on("list-loaded",(()=>{const c=[];t.get("list").getCommentNodes().forEach((t=>{const s=t.getRender().$content;s.querySelectorAll(`img:not([atk-emoticon]):not([${e}])`).forEach((t=>{t.setAttribute(e,"");const o=document.createElement("a");o.setAttribute("class",a),o.setAttribute("href",t.src),o.setAttribute("data-src",t.src),o.append(t.cloneNode()),t.replaceWith(o),c.push(o)})),d("lightGallery")&&window.lightGallery(s,((t,e)=>{for(var a in e||(e={}))r.call(e,a)&&i(t,a,e[a]);if(o)for(var a of o(e))n.call(e,a)&&i(t,a,e[a]);return t})({selector:l},window.ATK_LIGHTBOX_CONF||{}))})),d("lightbox")&&c.forEach((t=>{window.$(t).attr("data-title",window.$(t).find("img").attr("alt")),window.$(t).attr("rel","lightbox"),t.onclick=e=>{e.preventDefault(),window.lightbox.start(window.$(t))}}))})),d("Fancybox")&&window.Fancybox.bind(`.artalk .atk-list ${l}`,window.ATK_LIGHTBOX_CONF)}))})); +(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"})}); diff --git a/dependencies.json b/dependencies.json index df5b55208..eb1edd250 100644 --- a/dependencies.json +++ b/dependencies.json @@ -103,7 +103,7 @@ }, { "name": "@artalk/plugin-lightbox", - "version": "0.1.2", + "version": "0.2.0", "files": [ { "remote": "dist/artalk-plugin-lightbox.js",