ghost-theme-sd.ai/assets/built/source.js
2023-10-17 14:59:28 +01:00

29 lines
76 KiB
JavaScript

function dropdown(){const o=window.matchMedia("(max-width: 767px)"),i=document.querySelector(".gh-navigation"),r=i.querySelector(".gh-navigation-menu"),a=r?.querySelector(".nav");if(a){const e=document.querySelector(".gh-navigation-logo"),t=a.innerHTML;o.matches&&a.querySelectorAll("li").forEach(function(e,t){e.style.transitionDelay=.03*(t+1)+"s"});const n=function(){if(!o.matches){for(var e=[];a.offsetWidth+64>r.offsetWidth&&a.lastElementChild;)e.unshift(a.lastElementChild),a.lastElementChild.remove();if(e.length){const t=document.createElement("button"),n=(t.setAttribute("class","gh-more-toggle gh-icon-button"),t.setAttribute("aria-label","More"),t.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="currentColor"><path d="M21.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0zM13.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0zM5.333 16c0-1.473 1.194-2.667 2.667-2.667v0c1.473 0 2.667 1.194 2.667 2.667v0c0 1.473-1.194 2.667-2.667 2.667v0c-1.473 0-2.667-1.194-2.667-2.667v0z"></path></svg>',document.createElement("div"));n.setAttribute("class","gh-dropdown"),10<=e.length?(i.classList.add("is-dropdown-mega"),n.style.gridTemplateRows=`repeat(${Math.ceil(e.length/2)}, 1fr)`):i.classList.remove("is-dropdown-mega"),e.forEach(function(e){n.appendChild(e)}),t.appendChild(n),a.appendChild(t),i.classList.add("is-dropdown-loaded"),window.addEventListener("click",function(e){i.classList.contains("is-dropdown-open")?i.classList.remove("is-dropdown-open"):t.contains(e.target)&&i.classList.add("is-dropdown-open")})}else i.classList.add("is-dropdown-loaded")}};imagesLoaded(e,function(){n()}),window.addEventListener("load",function(){e||n()}),window.addEventListener("resize",function(){setTimeout(()=>{a.innerHTML=t,n()},1)})}}function lightbox(e){document.querySelectorAll(e).forEach(function(e){e.addEventListener("click",function(e){var t=e;t.preventDefault();for(var n,o=[],i=0,r=t.target.closest(".kg-card").previousElementSibling;r&&(r.classList.contains("kg-image-card")||r.classList.contains("kg-gallery-card"));){var a=[];r.querySelectorAll("img").forEach(function(e){a.push({src:e.getAttribute("src"),msrc:e.getAttribute("src"),w:e.getAttribute("width"),h:e.getAttribute("height"),el:e}),i+=1}),r=r.previousElementSibling,o=a.concat(o)}t.target.classList.contains("kg-image")?o.push({src:t.target.getAttribute("src"),msrc:t.target.getAttribute("src"),w:t.target.getAttribute("width"),h:t.target.getAttribute("height"),el:t.target}):(n=!1,t.target.closest(".kg-gallery-card").querySelectorAll("img").forEach(function(e){o.push({src:e.getAttribute("src"),msrc:e.getAttribute("src"),w:e.getAttribute("width"),h:e.getAttribute("height"),el:e}),n||e===t.target?n=!0:i+=1}));for(var l=t.target.closest(".kg-card").nextElementSibling;l&&(l.classList.contains("kg-image-card")||l.classList.contains("kg-gallery-card"));)l.querySelectorAll("img").forEach(function(e){o.push({src:e.getAttribute("src"),msrc:e.getAttribute("src"),w:e.getAttribute("width"),h:e.getAttribute("height"),el:e})}),l=l.nextElementSibling;e=document.querySelectorAll(".pswp")[0];new PhotoSwipe(e,PhotoSwipeUI_Default,o,{bgOpacity:.9,closeOnScroll:!0,fullscreenEl:!1,history:!1,index:i,shareEl:!1,zoomEl:!1,getThumbBoundsFn:function(e){var e=o[e].el,t=window.pageYOffset||document.documentElement.scrollTop,e=e.getBoundingClientRect();return{x:e.left,y:e.top+t,w:e.width}}}).init()})})}!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){var n;if(e&&t)return-1==(n=(n=this._events=this._events||{})[e]=n[e]||[]).indexOf(t)&&n.push(t),this},t.once=function(e,t){var n;if(e&&t)return this.on(e,t),((n=this._onceEvents=this._onceEvents||{})[e]=n[e]||{})[t]=!0,this},t.off=function(e,t){e=this._events&&this._events[e];if(e&&e.length)return-1!=(t=e.indexOf(t))&&e.splice(t,1),this},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];for(var o=this._onceEvents&&this._onceEvents[e],i=0;i<n.length;i++){var r=n[i];o&&o[r]&&(this.off(e,r),delete o[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(t,n){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(e){return n(t,e)}):"object"==typeof module&&module.exports?module.exports=n(t,require("ev-emitter")):t.imagesLoaded=n(t,t.EvEmitter)}("undefined"!=typeof window?window:this,function(t,e){function r(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t,n){var o,i;return this instanceof a?(o="string"==typeof(o=e)?document.querySelectorAll(e):o)?(this.elements=(i=o,Array.isArray(i)?i:"object"==typeof i&&"number"==typeof i.length?c.call(i):[i]),this.options=r({},this.options),"function"==typeof t?n=t:r(this.options,t),n&&this.on("always",n),this.getImages(),l&&(this.jqDeferred=new l.Deferred),void setTimeout(this.check.bind(this))):void s.error("Bad element for imagesLoaded "+(o||e)):new a(e,t,n)}function n(e){this.img=e}function o(e,t){this.url=e,this.element=t,this.img=new Image}var l=t.jQuery,s=t.console,c=Array.prototype.slice,u=((a.prototype=Object.create(e.prototype)).options={},a.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},a.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),!0===this.options.background&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var n=e.querySelectorAll("img"),o=0;o<n.length;o++){var i=n[o];this.addImage(i)}if("string"==typeof this.options.background)for(var r=e.querySelectorAll(this.options.background),o=0;o<r.length;o++){var a=r[o];this.addElementBackgroundImages(a)}}},{1:!0,9:!0,11:!0});return a.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var n=/url\((['"])?(.*?)\1\)/gi,o=n.exec(t.backgroundImage);null!==o;){var i=o&&o[2];i&&this.addBackground(i,e),o=n.exec(t.backgroundImage)}},a.prototype.addImage=function(e){e=new n(e);this.images.push(e)},a.prototype.addBackground=function(e,t){e=new o(e,t);this.images.push(e)},a.prototype.check=function(){function t(e,t,n){setTimeout(function(){o.progress(e,t,n)})}var o=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(e){e.once("progress",t),e.check()}):void this.complete()},a.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&s&&s.log("progress: "+n,e,t)},a.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred&&(e=this.hasAnyBroken?"reject":"resolve",this.jqDeferred[e](this))},(n.prototype=Object.create(e.prototype)).check=function(){return this.getIsImageComplete()?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},n.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},n.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},n.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},n.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},n.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},n.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},(o.prototype=Object.create(n.prototype)).check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},o.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},o.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},(a.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&((l=e).fn.imagesLoaded=function(e,t){return new a(this,e,t).jqDeferred.promise(l(this))})})(),a}),function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipeUI_Default=t()}(this,function(){"use strict";return function(o,l){function e(e){if(A)return!0;e=e||window.event,S.timeToIdle&&S.mouseUsed&&!w&&s();for(var t,n,o=(e.target||e.srcElement).getAttribute("class")||"",i=0;i<R.length;i++)(t=R[i]).onTap&&-1<o.indexOf("pswp__"+t.name)&&(t.onTap(),n=!0);n&&(e.stopPropagation&&e.stopPropagation(),A=!0,e=l.features.isOldAndroid?600:30,setTimeout(function(){A=!1},e))}function n(){var e=1===S.getNumItemsFn();e!==C&&(M(p,"ui--one-slide",e),C=e)}function a(){M(y,"share-modal--hidden",L)}function i(){if((L=!L)?(l.removeClass(y,"pswp__share-modal--fade-in"),setTimeout(function(){L&&a()},300)):(a(),setTimeout(function(){L||l.addClass(y,"pswp__share-modal--fade-in")},30)),!L){for(var e,t,n,o,i="",r=0;r<S.shareButtons.length;r++)e=S.shareButtons[r],t=S.getImageURLForShare(e),n=S.getPageURLForShare(e),o=S.getTextForShare(e),i+='<a href="'+e.url.replace("{{url}}",encodeURIComponent(n)).replace("{{image_url}}",encodeURIComponent(t)).replace("{{raw_image_url}}",t).replace("{{text}}",encodeURIComponent(o))+'" target="_blank" class="pswp__share--'+e.id+'"'+(e.download?"download":"")+">"+e.label+"</a>",S.parseShareButtonOut&&(i=S.parseShareButtonOut(e,i));y.children[0].innerHTML=i,y.children[0].onclick=z}}function r(e){for(var t=0;t<S.closeElClasses.length;t++)if(l.hasClass(e,"pswp__"+S.closeElClasses[t]))return!0}function s(){clearTimeout(k),N=0,w&&_.setIdle(!1)}function c(e){(e=(e=e||window.event).relatedTarget||e.toElement)&&"HTML"!==e.nodeName||(clearTimeout(k),k=setTimeout(function(){_.setIdle(!0)},S.timeToIdleOutside))}function u(e){E!==e&&(M(x,"preloader--active",!e),E=e)}function d(e){var t,n=e.vGap;!o.likelyTouchDevice||S.mouseUsed||screen.width>S.fitControlsWidth?(t=S.barsSize,S.captionEl&&"auto"===t.bottom?(h||((h=l.createEl("pswp__caption pswp__caption--fake")).appendChild(l.createEl("pswp__caption__center")),p.insertBefore(h,f),l.addClass(p,"pswp__ui--fit")),S.addCaptionHTMLFn(e,h,!0)?(e=h.clientHeight,n.bottom=parseInt(e,10)||44):n.bottom=t.top):n.bottom="auto"===t.bottom?0:t.bottom,n.top=t.top):n.top=n.bottom=0}function F(){function e(e){if(e)for(var t=e.length,n=0;n<t;n++){i=e[n],r=i.className;for(var o=0;o<R.length;o++)a=R[o],-1<r.indexOf("pswp__"+a.name)&&(S[a.option]?(l.removeClass(i,"pswp__element--disabled"),a.onInit&&a.onInit(i)):l.addClass(i,"pswp__element--disabled"))}}e(p.children);var i,r,a,t=l.getChildByClass(p,"pswp__top-bar");t&&e(t.children)}var m,p,f,h,t,g,y,v,w,b,x,E,T,C,S,A,I,k,_=this,D=!1,O=!0,L=!0,P={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(e,t){return e.title?(t.children[0].innerHTML=e.title,!0):(t.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return o.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return o.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},M=function(e,t,n){l[(n?"add":"remove")+"Class"](e,"pswp__"+t)},z=function(e){var t=(e=e||window.event).target||e.srcElement;return o.shout("shareLinkClick",e,t),!(!t.href||!t.hasAttribute("download")&&(window.open(t.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),L||i(),1))},N=0,R=[{name:"caption",option:"captionEl",onInit:function(e){f=e}},{name:"share-modal",option:"shareEl",onInit:function(e){y=e},onTap:function(){i()}},{name:"button--share",option:"shareEl",onInit:function(e){g=e},onTap:function(){i()}},{name:"button--zoom",option:"zoomEl",onTap:o.toggleDesktopZoom},{name:"counter",option:"counterEl",onInit:function(e){t=e}},{name:"button--close",option:"closeEl",onTap:o.close},{name:"button--arrow--left",option:"arrowEl",onTap:o.prev},{name:"button--arrow--right",option:"arrowEl",onTap:o.next},{name:"button--fs",option:"fullscreenEl",onTap:function(){m.isFullscreen()?m.exit():m.enter()}},{name:"preloader",option:"preloaderEl",onInit:function(e){x=e}}];_.init=function(){var t;l.extend(o.options,P,!0),S=o.options,p=l.getChildByClass(o.scrollWrap,"pswp__ui"),(b=o.listen)("onVerticalDrag",function(e){O&&e<.95?_.hideControls():!O&&.95<=e&&_.showControls()}),b("onPinchClose",function(e){O&&e<.9?(_.hideControls(),t=!0):t&&!O&&.9<e&&_.showControls()}),b("zoomGestureEnded",function(){(t=!1)&&!O&&_.showControls()}),b("beforeChange",_.update),b("doubleTap",function(e){var t=o.currItem.initialZoomLevel;o.getZoomLevel()!==t?o.zoomTo(t,e,333):o.zoomTo(S.getDoubleTapZoom(!1,o.currItem),e,333)}),b("preventDragEvent",function(e,t,n){var o=e.target||e.srcElement;o&&o.getAttribute("class")&&-1<e.type.indexOf("mouse")&&(0<o.getAttribute("class").indexOf("__caption")||/(SMALL|STRONG|EM)/i.test(o.tagName))&&(n.prevent=!1)}),b("bindEvents",function(){l.bind(p,"pswpTap click",e),l.bind(o.scrollWrap,"pswpTap",_.onGlobalTap),o.likelyTouchDevice||l.bind(o.scrollWrap,"mouseover",_.onMouseOver)}),b("unbindEvents",function(){L||i(),I&&clearInterval(I),l.unbind(document,"mouseout",c),l.unbind(document,"mousemove",s),l.unbind(p,"pswpTap click",e),l.unbind(o.scrollWrap,"pswpTap",_.onGlobalTap),l.unbind(o.scrollWrap,"mouseover",_.onMouseOver),m&&(l.unbind(document,m.eventK,_.updateFullscreen),m.isFullscreen()&&(S.hideAnimationDuration=0,m.exit()),m=null)}),b("destroy",function(){S.captionEl&&(h&&p.removeChild(h),l.removeClass(f,"pswp__caption--empty")),y&&(y.children[0].onclick=null),l.removeClass(p,"pswp__ui--over-close"),l.addClass(p,"pswp__ui--hidden"),_.setIdle(!1)}),S.showAnimationDuration||l.removeClass(p,"pswp__ui--hidden"),b("initialZoomIn",function(){S.showAnimationDuration&&l.removeClass(p,"pswp__ui--hidden")}),b("initialZoomOut",function(){l.addClass(p,"pswp__ui--hidden")}),b("parseVerticalMargin",d),F(),S.shareEl&&g&&y&&(L=!0),n(),S.timeToIdle&&b("mouseUsed",function(){l.bind(document,"mousemove",s),l.bind(document,"mouseout",c),I=setInterval(function(){2===++N&&_.setIdle(!0)},S.timeToIdle/2)}),S.fullscreenEl&&!l.features.isOldAndroid&&((m=m||_.getFullscreenAPI())?(l.bind(document,m.eventK,_.updateFullscreen),_.updateFullscreen(),l.addClass(o.template,"pswp--supports-fs")):l.removeClass(o.template,"pswp--supports-fs")),S.preloaderEl&&(u(!0),b("beforeChange",function(){clearTimeout(T),T=setTimeout(function(){o.currItem&&o.currItem.loading?o.allowProgressiveImg()&&(!o.currItem.img||o.currItem.img.naturalWidth)||u(!1):u(!0)},S.loadingIndicatorDelay)}),b("imageLoadComplete",function(e,t){o.currItem===t&&u(!0)}))},_.setIdle=function(e){M(p,"ui--idle",w=e)},_.update=function(){D=!(!O||!o.currItem||(_.updateIndexIndicator(),S.captionEl&&(S.addCaptionHTMLFn(o.currItem,f),M(f,"caption--empty",!o.currItem.title)),0)),L||i(),n()},_.updateFullscreen=function(e){e&&setTimeout(function(){o.setScrollOffset(0,l.getScrollY())},50),l[(m.isFullscreen()?"add":"remove")+"Class"](o.template,"pswp--fs")},_.updateIndexIndicator=function(){S.counterEl&&(t.innerHTML=o.getCurrentIndex()+1+S.indexIndicatorSep+S.getNumItemsFn())},_.onGlobalTap=function(e){var t=(e=e||window.event).target||e.srcElement;if(!A)if(e.detail&&"mouse"===e.detail.pointerType)r(t)?o.close():l.hasClass(t,"pswp__img")&&(1===o.getZoomLevel()&&o.getZoomLevel()<=o.currItem.fitRatio?S.clickToCloseNonZoomable&&o.close():o.toggleDesktopZoom(e.detail.releasePoint));else if(S.tapToToggleControls&&(O?_.hideControls():_.showControls()),S.tapToClose&&(l.hasClass(t,"pswp__img")||r(t)))return void o.close()},_.onMouseOver=function(e){e=(e=e||window.event).target||e.srcElement;M(p,"ui--over-close",r(e))},_.hideControls=function(){l.addClass(p,"pswp__ui--hidden"),O=!1},_.showControls=function(){O=!0,D||_.update(),l.removeClass(p,"pswp__ui--hidden")},_.supportsFullscreen=function(){var e=document;return!!(e.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.msExitFullscreen)},_.getFullscreenAPI=function(){var e,t=document.documentElement,n="fullscreenchange";return t.requestFullscreen?e={enterK:"requestFullscreen",exitK:"exitFullscreen",elementK:"fullscreenElement",eventK:n}:t.mozRequestFullScreen?e={enterK:"mozRequestFullScreen",exitK:"mozCancelFullScreen",elementK:"mozFullScreenElement",eventK:"moz"+n}:t.webkitRequestFullscreen?e={enterK:"webkitRequestFullscreen",exitK:"webkitExitFullscreen",elementK:"webkitFullscreenElement",eventK:"webkit"+n}:t.msRequestFullscreen&&(e={enterK:"msRequestFullscreen",exitK:"msExitFullscreen",elementK:"msFullscreenElement",eventK:"MSFullscreenChange"}),e&&(e.enter=function(){return v=S.closeOnScroll,S.closeOnScroll=!1,"webkitRequestFullscreen"!==this.enterK?o.template[this.enterK]():void o.template[this.enterK](Element.ALLOW_KEYBOARD_INPUT)},e.exit=function(){return S.closeOnScroll=v,document[this.exitK]()},e.isFullscreen=function(){return document[this.elementK]}),e}}}),function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipe=t()}(this,function(){"use strict";return function(m,P,t,z){var p={features:null,bind:function(e,t,n,o){var i=(o?"remove":"add")+"EventListener";t=t.split(" ");for(var r=0;r<t.length;r++)t[r]&&e[i](t[r],n,!1)},isArray:function(e){return e instanceof Array},createEl:function(e,t){t=document.createElement(t||"div");return e&&(t.className=e),t},getScrollY:function(){var e=window.pageYOffset;return void 0!==e?e:document.documentElement.scrollTop},unbind:function(e,t,n){p.bind(e,t,n,!0)},removeClass:function(e,t){t=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(t," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(e,t){p.hasClass(e,t)||(e.className+=(e.className?" ":"")+t)},hasClass:function(e,t){return e.className&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},getChildByClass:function(e,t){for(var n=e.firstChild;n;){if(p.hasClass(n,t))return n;n=n.nextSibling}},arraySearch:function(e,t,n){for(var o=e.length;o--;)if(e[o][n]===t)return o;return-1},extend:function(e,t,n){for(var o in t)if(t.hasOwnProperty(o)){if(n&&e.hasOwnProperty(o))continue;e[o]=t[o]}},easing:{sine:{out:function(e){return Math.sin(e*(Math.PI/2))},inOut:function(e){return-(Math.cos(Math.PI*e)-1)/2}},cubic:{out:function(e){return--e*e*e+1}}},detectFeatures:function(){if(p.features)return p.features;var e,t,n=p.createEl().style,o="",i={};i.oldIE=document.all&&!document.addEventListener,i.touch="ontouchstart"in window,window.requestAnimationFrame&&(i.raf=window.requestAnimationFrame,i.caf=window.cancelAnimationFrame),i.pointerEvent=!!window.PointerEvent||navigator.msPointerEnabled,i.pointerEvent||(e=navigator.userAgent,/iP(hone|od)/.test(navigator.platform)&&(t=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/))&&0<t.length&&1<=(t=parseInt(t[1],10))&&t<8&&(i.isOldIOSPhone=!0),t=(t=e.match(/Android\s([0-9\.]*)/))?t[1]:0,1<=(t=parseFloat(t))&&(t<4.4&&(i.isOldAndroid=!0),i.androidVersion=t),i.isMobileOpera=/opera mini|opera mobi/i.test(e));for(var r,a,l,s=["transform","perspective","animationName"],c=["","webkit","Moz","ms","O"],u=0;u<4;u++){for(var o=c[u],d=0;d<3;d++)r=s[d],a=o+(o?r.charAt(0).toUpperCase()+r.slice(1):r),!i[r]&&a in n&&(i[r]=a);o&&!i.raf&&(o=o.toLowerCase(),i.raf=window[o+"RequestAnimationFrame"],i.raf)&&(i.caf=window[o+"CancelAnimationFrame"]||window[o+"CancelRequestAnimationFrame"])}return i.raf||(l=0,i.raf=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-l)),o=window.setTimeout(function(){e(t+n)},n);return l=t+n,o},i.caf=function(e){clearTimeout(e)}),i.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,p.features=i}},f=(p.detectFeatures(),p.features.oldIE&&(p.bind=function(e,t,n,o){t=t.split(" ");for(var i,r=(o?"detach":"attach")+"Event",a=function(){n.handleEvent.call(n)},l=0;l<t.length;l++)if(i=t[l])if("object"==typeof n&&n.handleEvent){if(o){if(!n["oldIE"+i])return!1}else n["oldIE"+i]=a;e[r]("on"+i,n["oldIE"+i])}else e[r]("on"+i,n)}),this),H=25,h={allowPanToNext:!0,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(e){return"A"===e.tagName},getDoubleTapZoom:function(e,t){return e||t.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"};p.extend(h,z);function e(){return{x:0,y:0}}function U(e,t){p.extend(f,t.publicMethods),We.push(e)}function B(e){var t=M();return t-1<e?e-t:e<0?t+e:e}function r(e,t){return $e[e]||($e[e]=[]),$e[e].push(t)}function Z(e,t,n,o){o===f.currItem.initialZoomLevel?n[e]=f.currItem.initialPosition[e]:(n[e]=Je(e,o),n[e]>t.min[e]?n[e]=t.min[e]:n[e]<t.max[e]&&(n[e]=t.max[e]))}function q(e){var t="";h.escKey&&27===e.keyCode?t="close":h.arrowKeys&&(37===e.keyCode?t="prev":39===e.keyCode&&(t="next")),!t||e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||(e.preventDefault?e.preventDefault():e.returnValue=!1,f[t]())}function j(e){e&&(_e||ke||v||Se)&&(e.preventDefault(),e.stopPropagation())}function W(){f.setScrollOffset(0,p.getScrollY())}function G(e){var t;"mousedown"===e.type&&0<e.button||(Jt?e.preventDefault():Ae&&"mousedown"===e.type||(Ot(e,!0)&&e.preventDefault(),T("pointerDown"),pe&&((t=p.arraySearch(ht,e.pointerId,"id"))<0&&(t=ht.length),ht[t]={x:e.pageX,y:e.pageY,id:e.pointerId}),e=(t=Ht(e)).length,c=null,ct(),s&&1!==e||(s=Re=!0,p.bind(window,ee,f),Ce=ze=Fe=Se=Oe=_e=Ie=ke=!1,Ne=null,T("firstTouchStart",t),I(Be,w),Ue.x=Ue.y=0,I(O,t[0]),I(ft,O),gt.x=x.x*Ze,yt=[{x:O.x,y:O.y}],Ee=xe=C(),ot(y,!0),At(),It()),!u&&1<e&&!v&&!Oe&&(ne=y,u=Ie=!(ke=!1),Ue.y=Ue.x=0,I(Be,w),I(_,t[0]),I(pt,t[1]),Mt(_,pt,Tt),Et.x=Math.abs(Tt.x)-w.x,Et.y=Math.abs(Tt.y)-w.y,Le=St(_,pt))))}function K(e){var t;e.preventDefault(),pe&&-1<(t=p.arraySearch(ht,e.pointerId,"id"))&&((t=ht[t]).x=e.pageX,t.y=e.pageY),s&&(t=Ht(e),Ne||_e||u?c=t:L.x!==x.x*Ze?Ne="h":(e=Math.abs(t[0].x-O.x)-Math.abs(t[0].y-O.y),Math.abs(e)>=mt&&(Ne=0<e?"h":"v",c=t)))}function $(e){if(l.isOldAndroid){if(Ae&&"mouseup"===e.type)return;-1<e.type.indexOf("touch")&&(clearTimeout(Ae),Ae=setTimeout(function(){Ae=0},600))}var t;T("pointerUp"),Ot(e,!1)&&e.preventDefault(),pe&&-1<(r=p.arraySearch(ht,e.pointerId,"id"))&&(t=ht.splice(r,1)[0],navigator.msPointerEnabled&&(t.type={4:"mouse",2:"touch",3:"pen"}[e.pointerType],t.type)||(t.type=e.pointerType||"mouse"));var n=(r=Ht(e)).length;if(2===(n="mouseup"===e.type?0:n))return!(c=null);1===n&&I(ft,r[0]),0!==n||Ne||v||(t||("mouseup"===e.type?t={x:e.pageX,y:e.pageY,type:"mouse"}:e.changedTouches&&e.changedTouches[0]&&(t={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:"touch"})),T("touchRelease",e,t));var o,i,r=-1;if(0===n&&(s=!1,p.unbind(window,ee,f),At(),u?r=0:-1!==xt&&(r=C()-xt)),xt=1===n?C():-1,e=-1!==r&&r<150?"zoom":"swipe",u&&n<2&&(u=!1,1===n&&(e="zoomPointerUp"),T("zoomGestureEnded")),c=null,_e||ke||v||Se)if(ct(),(Te=Te||Zt()).calculateSwipeSpeed("x"),Se)Rt()<h.verticalDragRange?f.close():(o=w.y,i=Pe,ut("verticalDrag",0,1,300,p.easing.cubic.out,function(e){w.y=(f.currItem.initialPosition.y-o)*e+o,S((1-i)*e+i),A()}),T("onVerticalDrag",1));else{if((Oe||v)&&0===n){if(jt(e,Te))return;e="zoomPointerUp"}if(!v)return"swipe"!==e?void Gt():void(!Oe&&y>f.currItem.fitRatio&&qt(Te))}}var Y,V,X,g,Q,J,ee,te,o,y,ne,oe,ie,re,ae,a,le,se,ce,ue,de,me,pe,i,fe,he,ge,ye,ve,we,l,be,xe,Ee,Te,Ce,Se,Ae,s,Ie,ke,_e,De,Oe,c,u,Le,d,Me,v,Ne,Re,Fe,Pe,ze,He,Ue=e(),Be=e(),w=e(),b={},Ze=0,qe={},x=e(),E=0,je=!0,We=[],Ge={},Ke=!1,$e={},T=function(e){var t=$e[e];if(t){var n=Array.prototype.slice.call(arguments);n.shift();for(var o=0;o<t.length;o++)t[o].apply(f,n)}},C=function(){return(new Date).getTime()},S=function(e){Pe=e,f.bg.style.opacity=e*h.bgOpacity},Ye=function(e,t,n,o,i){(!Ke||i&&i!==f.currItem)&&(o/=(i||f.currItem).fitRatio),e[me]=oe+t+"px, "+n+"px"+ie+" scale("+o+")"},A=function(e){Me&&(e&&(y>f.currItem.fitRatio?Ke||(cn(f.currItem,!1,!0),Ke=!0):Ke&&(cn(f.currItem),Ke=!1)),Ye(Me,w.x,w.y,y))},Ve=function(e){e.container&&Ye(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},Xe=function(e,t){t[me]=oe+e+"px, 0px"+ie},Qe=function(e,t){var n;!h.loop&&t&&(t=g+(x.x*Ze-e)/x.x,n=Math.round(e-L.x),t<0&&0<n||t>=M()-1&&n<0)&&(e=L.x+n*h.mainScrollEndFriction),L.x=e,Xe(e,Q)},Je=function(e,t){var n=Et[e]-qe[e];return Be[e]+Ue[e]+n-t/ne*n},I=function(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)},et=function(e){e.x=Math.round(e.x),e.y=Math.round(e.y)},tt=null,nt=function(){tt&&(p.unbind(document,"mousemove",nt),p.addClass(m,"pswp--has_mouse"),h.mouseUsed=!0,T("mouseUsed")),tt=setTimeout(function(){tt=null},100)},ot=function(e,t){e=ln(f.currItem,b,e);return t&&(d=e),e},it=function(e){return(e=e||f.currItem).initialZoomLevel},rt=function(e){return 0<(e=e||f.currItem).w?h.maxSpreadZoom:1},k={},at=0,lt=function(e){k[e]&&(k[e].raf&&he(k[e].raf),at--,delete k[e])},st=function(e){k[e]&&lt(e),k[e]||(at++,k[e]={})},ct=function(){for(var e in k)k.hasOwnProperty(e)&&lt(e)},ut=function(e,t,n,o,i,r,a){function l(){k[e]&&(s=C()-c,o<=s?(lt(e),r(n),a&&a()):(r((n-t)*i(s/o)+t),k[e].raf=fe(l)))}var s,c=C();st(e);l()},z={shout:T,listen:r,viewportSize:b,options:h,isMainScrollAnimating:function(){return v},getZoomLevel:function(){return y},getCurrentIndex:function(){return g},isDragging:function(){return s},isZooming:function(){return u},setScrollOffset:function(e,t){qe.x=e,we=qe.y=t,T("updateScrollOffset",qe)},applyZoomPan:function(e,t,n,o){w.x=t,w.y=n,y=e,A(o)},init:function(){if(!Y&&!V){f.framework=p,f.template=m,f.bg=p.getChildByClass(m,"pswp__bg"),ge=m.className,Y=!0,l=p.detectFeatures(),fe=l.raf,he=l.caf,me=l.transform,ve=l.oldIE,f.scrollWrap=p.getChildByClass(m,"pswp__scroll-wrap"),f.container=p.getChildByClass(f.scrollWrap,"pswp__container"),Q=f.container.style,f.itemHolders=a=[{el:f.container.children[0],wrap:0,index:-1},{el:f.container.children[1],wrap:0,index:-1},{el:f.container.children[2],wrap:0,index:-1}],a[0].el.style.display=a[2].el.style.display="none",me?(t=l.perspective&&!i,oe="translate"+(t?"3d(":"("),ie=l.perspective?", 0px)":")"):(me="left",p.addClass(m,"pswp--ie"),Xe=function(e,t){t.left=e+"px"},Ve=function(e){var t=1<e.fitRatio?1:e.fitRatio,n=e.container.style,o=t*e.w,t=t*e.h;n.width=o+"px",n.height=t+"px",n.left=e.initialPosition.x+"px",n.top=e.initialPosition.y+"px"},A=function(){var e,t,n,o;Me&&(e=Me,n=(o=1<(t=f.currItem).fitRatio?1:t.fitRatio)*t.w,o=o*t.h,e.width=n+"px",e.height=o+"px",e.left=w.x+"px",e.top=w.y+"px")}),o={resize:f.updateSize,orientationchange:function(){clearTimeout(be),be=setTimeout(function(){b.x!==f.scrollWrap.clientWidth&&f.updateSize()},500)},scroll:W,keydown:q,click:j};var e,t=l.isOldIOSPhone||l.isOldAndroid||l.isMobileOpera;for(l.animationName&&l.transform&&!t||(h.showAnimationDuration=h.hideAnimationDuration=0),e=0;e<We.length;e++)f["init"+We[e]]();P&&(f.ui=new P(f,p)).init(),T("firstUpdate"),g=g||h.index||0,(isNaN(g)||g<0||g>=M())&&(g=0),f.currItem=en(g),(l.isOldIOSPhone||l.isOldAndroid)&&(je=!1),m.setAttribute("aria-hidden","false"),h.modal&&(je?m.style.position="fixed":(m.style.position="absolute",m.style.top=p.getScrollY()+"px")),void 0===we&&(T("initialLayout"),we=ye=p.getScrollY());var n="pswp--open ";for(h.mainClass&&(n+=h.mainClass+" "),h.showHideOpacity&&(n+="pswp--animate_opacity "),n=(n=(n+=i?"pswp--touch":"pswp--notouch")+(l.animationName?" pswp--css_animation":""))+(l.svg?" pswp--svg":""),p.addClass(m,n),f.updateSize(),J=-1,E=null,e=0;e<3;e++)Xe((e+J)*x.x,a[e].el.style);ve||p.bind(f.scrollWrap,te,f),r("initialZoomInEnd",function(){f.setContent(a[0],g-1),f.setContent(a[2],g+1),a[0].el.style.display=a[2].el.style.display="block",h.focus&&m.focus(),p.bind(document,"keydown",f),l.transform&&p.bind(f.scrollWrap,"click",f),h.mouseUsed||p.bind(document,"mousemove",nt),p.bind(window,"resize scroll orientationchange",f),T("bindEvents")}),f.setContent(a[1],g),f.updateCurrItem(),T("afterInit"),je||(re=setInterval(function(){at||s||u||y!==f.currItem.initialZoomLevel||f.updateSize()},1e3)),p.addClass(m,"pswp--visible")}var t},close:function(){Y&&(V=!(Y=!1),T("close"),p.unbind(window,"resize scroll orientationchange",f),p.unbind(window,"scroll",o.scroll),p.unbind(document,"keydown",f),p.unbind(document,"mousemove",nt),l.transform&&p.unbind(f.scrollWrap,"click",f),s&&p.unbind(window,ee,f),clearTimeout(be),T("unbindEvents"),tn(f.currItem,null,!0,f.destroy))},destroy:function(){T("destroy"),Vt&&clearTimeout(Vt),m.setAttribute("aria-hidden","true"),m.className=ge,re&&clearInterval(re),p.unbind(f.scrollWrap,te,f),p.unbind(window,"scroll",f),At(),ct(),$e=null},panTo:function(e,t,n){n||(e>d.min.x?e=d.min.x:e<d.max.x&&(e=d.max.x),t>d.min.y?t=d.min.y:t<d.max.y&&(t=d.max.y)),w.x=e,w.y=t,A()},handleEvent:function(e){e=e||window.event,o[e.type]&&o[e.type](e)},goTo:function(e){var t=(e=B(e))-g;E=t,g=e,f.currItem=en(g),Ze-=t,Qe(x.x*Ze),ct(),v=!1,f.updateCurrItem()},next:function(){f.goTo(g+1)},prev:function(){f.goTo(g-1)},updateCurrZoomItem:function(e){var t;e&&T("beforeChange",0),Me=a[1].el.children.length&&(t=a[1].el.children[0],p.hasClass(t,"pswp__zoom-wrap"))?t.style:null,d=f.currItem.bounds,ne=y=f.currItem.initialZoomLevel,w.x=d.center.x,w.y=d.center.y,e&&T("afterChange")},invalidateCurrItems:function(){ae=!0;for(var e=0;e<3;e++)a[e].item&&(a[e].item.needsUpdate=!0)},updateCurrItem:function(e){if(0!==E){var t,n=Math.abs(E);if(!(e&&n<2)){f.currItem=en(g),Ke=!1,T("beforeChange",E),3<=n&&(J+=E+(0<E?-3:3),n=3);for(var o=0;o<n;o++)0<E?(t=a.shift(),a[2]=t,Xe((++J+2)*x.x,t.el.style),f.setContent(t,g-n+o+1+1)):(t=a.pop(),a.unshift(t),Xe(--J*x.x,t.el.style),f.setContent(t,g+n-o-1-1));Me&&1===Math.abs(E)&&(e=en(le)).initialZoomLevel!==y&&(ln(e,b),cn(e),Ve(e)),E=0,f.updateCurrZoomItem(),le=g,T("afterChange")}}},updateSize:function(e){if(!je&&h.modal){var t=p.getScrollY();if(we!==t&&(m.style.top=t+"px",we=t),!e&&Ge.x===window.innerWidth&&Ge.y===window.innerHeight)return;Ge.x=window.innerWidth,Ge.y=window.innerHeight,m.style.height=Ge.y+"px"}if(b.x=f.scrollWrap.clientWidth,b.y=f.scrollWrap.clientHeight,W(),x.x=b.x+Math.round(b.x*h.spacing),x.y=b.y,Qe(x.x*Ze),T("beforeResize"),void 0!==J){for(var n,o,i,r=0;r<3;r++)n=a[r],Xe((r+J)*x.x,n.el.style),i=g+r-1,h.loop&&2<M()&&(i=B(i)),(o=en(i))&&(ae||o.needsUpdate||!o.bounds)?(f.cleanSlide(o),f.setContent(n,i),1===r&&(f.currItem=o,f.updateCurrZoomItem(!0)),o.needsUpdate=!1):-1===n.index&&0<=i&&f.setContent(n,i),o&&o.container&&(ln(o,b),cn(o),Ve(o));ae=!1}ne=y=f.currItem.initialZoomLevel,(d=f.currItem.bounds)&&(w.x=d.center.x,w.y=d.center.y,A(!0)),T("resize")},zoomTo:function(t,e,n,o,i){e&&(ne=y,Et.x=Math.abs(e.x)-w.x,Et.y=Math.abs(e.y)-w.y,I(Be,w));function r(e){1===e?(y=t,w.x=a.x,w.y=a.y):(y=(t-l)*e+l,w.x=(a.x-s.x)*e+s.x,w.y=(a.y-s.y)*e+s.y),i&&i(e),A(1===e)}var e=ot(t,!1),a={},l=(Z("x",e,a,t),Z("y",e,a,t),y),s={x:w.x,y:w.y};et(a);n?ut("customZoomTo",0,1,n,o||p.easing.sine.inOut,r):r(1)}},dt=30,mt=10,_={},pt={},D={},O={},ft={},ht=[],gt={},yt=[],vt={},wt=0,bt=e(),xt=0,L=e(),Et=e(),Tt=e(),Ct=function(e,t){return e.x===t.x&&e.y===t.y},St=function(e,t){return vt.x=Math.abs(e.x-t.x),vt.y=Math.abs(e.y-t.y),Math.sqrt(vt.x*vt.x+vt.y*vt.y)},At=function(){De&&(he(De),De=null)},It=function(){s&&(De=fe(It),Bt())},kt=function(){return!("fit"===h.scaleMode&&y===f.currItem.initialZoomLevel)},_t=function(e,t){return!(!e||e===document)&&!(e.getAttribute("class")&&-1<e.getAttribute("class").indexOf("pswp__scroll-wrap"))&&(t(e)?e:_t(e.parentNode,t))},Dt={},Ot=function(e,t){return Dt.prevent=!_t(e.target,h.isClickableElement),T("preventDragEvent",e,t,Dt),Dt.prevent},Lt=function(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t},Mt=function(e,t,n){n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y)},Nt=function(e,t,n){var o;50<e-Ee&&((o=2<yt.length?yt.shift():{}).x=t,o.y=n,yt.push(o),Ee=e)},Rt=function(){var e=w.y-f.currItem.initialPosition.y;return 1-Math.abs(e/(b.y/2))},Ft={},Pt={},zt=[],Ht=function(e){for(;0<zt.length;)zt.pop();return pe?(He=0,ht.forEach(function(e){0===He?zt[0]=e:1===He&&(zt[1]=e),He++})):-1<e.type.indexOf("touch")?e.touches&&0<e.touches.length&&(zt[0]=Lt(e.touches[0],Ft),1<e.touches.length)&&(zt[1]=Lt(e.touches[1],Pt)):(Ft.x=e.pageX,Ft.y=e.pageY,Ft.id="",zt[0]=Ft),zt},Ut=function(e,t){var n,o,i,r=w[e]+t[e],a=0<t[e],l=L.x+t.x,s=L.x-gt.x,c=r>d.min[e]||r<d.max[e]?h.panEndFriction:1,r=w[e]+t[e]*c;return!h.allowPanToNext&&y!==f.currItem.initialZoomLevel||(Me?"h"!==Ne||"x"!==e||ke||(a?(r>d.min[e]&&(c=h.panEndFriction,d.min[e],n=d.min[e]-Be[e]),(n<=0||s<0)&&1<M()?(i=l,s<0&&l>gt.x&&(i=gt.x)):d.min.x!==d.max.x&&(o=r)):(r<d.max[e]&&(c=h.panEndFriction,d.max[e],n=Be[e]-d.max[e]),(n<=0||0<s)&&1<M()?(i=l,0<s&&l<gt.x&&(i=gt.x)):d.min.x!==d.max.x&&(o=r))):i=l,"x"!==e)?void(v||Oe||y>f.currItem.fitRatio&&(w[e]+=t[e]*c)):(void 0!==i&&(Qe(i,!0),Oe=i!==gt.x),d.min.x!==d.max.x&&(void 0!==o?w.x=o:Oe||(w.x+=t.x*c)),void 0!==i)},Bt=function(){var e,t,n,o,i,r;c&&0!==(e=c.length)&&(I(_,c[0]),D.x=_.x-O.x,D.y=_.y-O.y,u&&1<e?(O.x=_.x,O.y=_.y,!D.x&&!D.y&&Ct(c[1],pt)||(I(pt,c[1]),ke||(ke=!0,T("zoomGestureStarted")),e=St(_,pt),(t=Wt(e))>f.currItem.initialZoomLevel+f.currItem.initialZoomLevel/15&&(ze=!0),n=1,o=it(),i=rt(),t<o?h.pinchToClose&&!ze&&ne<=f.currItem.initialZoomLevel?(S(r=1-(o-t)/(o/1.2)),T("onPinchClose",r),Fe=!0):t=o-(n=1<(n=(o-t)/o)?1:n)*(o/3):i<t&&(t=i+(n=1<(n=(t-i)/(6*o))?1:n)*o),n<0&&(n=0),Mt(_,pt,bt),Ue.x+=bt.x-Tt.x,Ue.y+=bt.y-Tt.y,I(Tt,bt),w.x=Je("x",t),w.y=Je("y",t),Ce=y<t,y=t,A())):Ne&&(Re&&(Re=!1,Math.abs(D.x)>=mt&&(D.x-=c[0].x-ft.x),Math.abs(D.y)>=mt)&&(D.y-=c[0].y-ft.y),O.x=_.x,O.y=_.y,0===D.x&&0===D.y||("v"===Ne&&h.closeOnVerticalDrag&&!kt()?(Ue.y+=D.y,w.y+=D.y,r=Rt(),Se=!0,T("onVerticalDrag",r),S(r),A()):(Nt(C(),_.x,_.y),_e=!0,d=f.currItem.bounds,Ut("x",D)||(Ut("y",D),et(w),A())))))},Zt=function(){var t,n,o={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(e){n=(1<yt.length?(t=C()-Ee+50,yt[yt.length-2]):(t=C()-xe,ft))[e],o.lastFlickOffset[e]=O[e]-n,o.lastFlickDist[e]=Math.abs(o.lastFlickOffset[e]),20<o.lastFlickDist[e]?o.lastFlickSpeed[e]=o.lastFlickOffset[e]/t:o.lastFlickSpeed[e]=0,Math.abs(o.lastFlickSpeed[e])<.1&&(o.lastFlickSpeed[e]=0),o.slowDownRatio[e]=.95,o.slowDownRatioReverse[e]=1-o.slowDownRatio[e],o.speedDecelerationRatio[e]=1},calculateOverBoundsAnimOffset:function(t,e){o.backAnimStarted[t]||(w[t]>d.min[t]?o.backAnimDestination[t]=d.min[t]:w[t]<d.max[t]&&(o.backAnimDestination[t]=d.max[t]),void 0!==o.backAnimDestination[t]&&(o.slowDownRatio[t]=.7,o.slowDownRatioReverse[t]=1-o.slowDownRatio[t],o.speedDecelerationRatioAbs[t]<.05)&&(o.lastFlickSpeed[t]=0,o.backAnimStarted[t]=!0,ut("bounceZoomPan"+t,w[t],o.backAnimDestination[t],e||300,p.easing.sine.out,function(e){w[t]=e,A()})))},calculateAnimOffset:function(e){o.backAnimStarted[e]||(o.speedDecelerationRatio[e]=o.speedDecelerationRatio[e]*(o.slowDownRatio[e]+o.slowDownRatioReverse[e]-o.slowDownRatioReverse[e]*o.timeDiff/10),o.speedDecelerationRatioAbs[e]=Math.abs(o.lastFlickSpeed[e]*o.speedDecelerationRatio[e]),o.distanceOffset[e]=o.lastFlickSpeed[e]*o.speedDecelerationRatio[e]*o.timeDiff,w[e]+=o.distanceOffset[e])},panAnimLoop:function(){k.zoomPan&&(k.zoomPan.raf=fe(o.panAnimLoop),o.now=C(),o.timeDiff=o.now-o.lastNow,o.lastNow=o.now,o.calculateAnimOffset("x"),o.calculateAnimOffset("y"),A(),o.calculateOverBoundsAnimOffset("x"),o.calculateOverBoundsAnimOffset("y"),o.speedDecelerationRatioAbs.x<.05)&&o.speedDecelerationRatioAbs.y<.05&&(w.x=Math.round(w.x),w.y=Math.round(w.y),A(),lt("zoomPan"))}};return o},qt=function(e){return e.calculateSwipeSpeed("y"),d=f.currItem.bounds,e.backAnimDestination={},e.backAnimStarted={},Math.abs(e.lastFlickSpeed.x)<=.05&&Math.abs(e.lastFlickSpeed.y)<=.05?(e.speedDecelerationRatioAbs.x=e.speedDecelerationRatioAbs.y=0,e.calculateOverBoundsAnimOffset("x"),e.calculateOverBoundsAnimOffset("y"),!0):(st("zoomPan"),e.lastNow=C(),void e.panAnimLoop())},jt=function(e,t){var n,o,i;v||(wt=g),"swipe"===e&&(e=O.x-ft.x,r=t.lastFlickDist.x<10,dt<e&&(r||20<t.lastFlickOffset.x)?o=-1:e<-dt&&(r||t.lastFlickOffset.x<-20)&&(o=1)),o&&((g+=o)<0?(g=h.loop?M()-1:0,i=!0):g>=M()&&(g=h.loop?0:M()-1,i=!0),i&&!h.loop||(E+=o,Ze-=o,n=!0));var e=x.x*Ze,r=Math.abs(e-L.x),a=n||e>L.x==0<t.lastFlickSpeed.x?(a=0<Math.abs(t.lastFlickSpeed.x)?r/Math.abs(t.lastFlickSpeed.x):333,a=Math.min(a,400),Math.max(a,250)):333;return wt===g&&(n=!1),v=!0,T("mainScrollAnimStart"),ut("mainScroll",L.x,e,a,p.easing.cubic.out,Qe,function(){ct(),v=!1,wt=-1,!n&&wt===g||f.updateCurrItem(),T("mainScrollAnimComplete")}),n&&f.updateCurrItem(!0),n},Wt=function(e){return 1/Le*e*ne},Gt=function(){var e=y,t=it(),n=rt();y<t?e=t:n<y&&(e=n);var o,i=Pe;return Fe&&!Ce&&!ze&&y<t?f.close():(Fe&&(o=function(e){S((1-i)*e+i)}),f.zoomTo(e,0,200,p.easing.cubic.out,o)),!0};U("Gestures",{publicMethods:{initGestures:function(){function e(e,t,n,o,i){se=e+t,ce=e+n,ue=e+o,de=i?e+i:""}(pe=l.pointerEvent)&&l.touch&&(l.touch=!1),pe?navigator.msPointerEnabled?e("MSPointer","Down","Move","Up","Cancel"):e("pointer","down","move","up","cancel"):l.touch?(e("touch","start","move","end","cancel"),i=!0):e("mouse","down","move","up"),ee=ce+" "+ue+" "+de,te=se,pe&&!i&&(i=1<navigator.maxTouchPoints||1<navigator.msMaxTouchPoints),f.likelyTouchDevice=i,o[se]=G,o[ce]=K,o[ue]=$,de&&(o[de]=o[ue]),l.touch&&(te+=" mousedown",ee+=" mousemove mouseup",o.mousedown=o[se],o.mousemove=o[ce],o.mouseup=o[ue]),i||(h.allowPanToNext=!1)}}});function Kt(e){function t(){e.loading=!1,e.loaded=!0,e.loadComplete?e.loadComplete(e):e.img=null,n.onload=n.onerror=null,n=null}e.loading=!0,e.loaded=!1;var n=e.img=p.createEl("pswp__img","img");n.onload=t,n.onerror=function(){e.loadError=!0,t()},n.src=e.src}function $t(e,t){return e.src&&e.loadError&&e.container&&(t&&(e.container.innerHTML=""),e.container.innerHTML=h.errorMsg.replace("%url%",e.src),1)}function Yt(){if(nn.length){for(var e,t=0;t<nn.length;t++)(e=nn[t]).holder.index===e.index&&sn(e.index,e.item,e.baseDiv,e.img,!1,e.clearPlaceholder);nn=[]}}var Vt,Xt,Qt,Jt,en,M,tn=function(r,e,a,t){function l(){lt("initialZoom"),a?(f.template.removeAttribute("style"),f.bg.removeAttribute("style")):(S(1),e&&(e.style.display="block"),p.addClass(m,"pswp--animated-in"),T("initialZoom"+(a?"OutEnd":"InEnd"))),t&&t(),Jt=!1}Vt&&clearTimeout(Vt),Qt=Jt=!0,r.initialLayout?(s=r.initialLayout,r.initialLayout=null):s=h.getThumbBoundsFn&&h.getThumbBoundsFn(g);var s,c,u,d=a?h.hideAnimationDuration:h.showAnimationDuration;d&&s&&void 0!==s.x?(c=X,u=!f.currItem.src||f.currItem.loadError||h.showHideOpacity,r.miniImg&&(r.miniImg.style.webkitBackfaceVisibility="hidden"),a||(y=s.w/r.w,w.x=s.x,w.y=s.y-ye,f[u?"template":"bg"].style.opacity=.001,A()),st("initialZoom"),a&&!c&&p.removeClass(m,"pswp--animated-in"),u&&(a?p[(c?"remove":"add")+"Class"](m,"pswp--animate_opacity"):setTimeout(function(){p.addClass(m,"pswp--animate_opacity")},30)),Vt=setTimeout(function(){var t,n,o,i,e;T("initialZoom"+(a?"Out":"In")),a?(t=s.w/r.w,n={x:w.x,y:w.y},o=y,i=Pe,e=function(e){1===e?(y=t,w.x=s.x,w.y=s.y-we):(y=(t-o)*e+o,w.x=(s.x-n.x)*e+n.x,w.y=(s.y-we-n.y)*e+n.y),A(),u?m.style.opacity=1-e:S(i-e*i)},c?ut("initialZoom",0,1,d,p.easing.cubic.out,e,l):(e(1),Vt=setTimeout(l,d+20))):(y=r.initialZoomLevel,I(w,r.initialPosition),A(),S(1),u?m.style.opacity=1:S(1),Vt=setTimeout(l,d+20))},a?25:90)):(T("initialZoom"+(a?"Out":"In")),y=r.initialZoomLevel,I(w,r.initialPosition),A(),m.style.opacity=a?0:1,S(1),d?setTimeout(function(){l()},d):l())},N={},nn=[],on={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Xt.length}},rn=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},an=function(e,t,n){var o=e.bounds;o.center.x=Math.round((N.x-t)/2),o.center.y=Math.round((N.y-n)/2)+e.vGap.top,o.max.x=t>N.x?Math.round(N.x-t):o.center.x,o.max.y=n>N.y?Math.round(N.y-n)+e.vGap.top:o.center.y,o.min.x=t>N.x?0:o.center.x,o.min.y=n>N.y?e.vGap.top:o.center.y},ln=function(e,t,n){var o,i;return e.src&&!e.loadError?((o=!n)&&(e.vGap||(e.vGap={top:0,bottom:0}),T("parseVerticalMargin",e)),N.x=t.x,N.y=t.y-e.vGap.top-e.vGap.bottom,o&&(t=N.x/e.w,i=N.y/e.h,e.fitRatio=t<i?t:i,"orig"===(t=h.scaleMode)?n=1:"fit"===t&&(n=e.fitRatio),e.initialZoomLevel=n=1<n?1:n,e.bounds||(e.bounds=rn())),n?(an(e,e.w*n,e.h*n),o&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds):void 0):(e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds=rn(),e.initialPosition=e.bounds.center,e.bounds)},sn=function(e,t,n,o,i,r){t.loadError||o&&(t.imageAppended=!0,cn(t,o,t===f.currItem&&Ke),n.appendChild(o),r)&&setTimeout(function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)},500)},cn=function(e,t,n){var o;e.src&&(t=t||e.container.lastChild,o=n?e.w:Math.round(e.w*e.fitRatio),n=n?e.h:Math.round(e.h*e.fitRatio),e.placeholder&&!e.loaded&&(e.placeholder.style.width=o+"px",e.placeholder.style.height=n+"px"),t.style.width=o+"px",t.style.height=n+"px")};U("Controller",{publicMethods:{lazyLoadItem:function(e){e=B(e);var t=en(e);t&&(!t.loaded&&!t.loading||ae)&&(T("gettingData",e,t),t.src)&&Kt(t)},initController:function(){p.extend(h,on,!0),f.items=Xt=t,en=f.getItemAt,M=h.getNumItemsFn,h.loop,M()<3&&(h.loop=!1),r("beforeChange",function(e){for(var t=h.preload,n=null===e||0<=e,o=Math.min(t[0],M()),i=Math.min(t[1],M()),r=1;r<=(n?i:o);r++)f.lazyLoadItem(g+r);for(r=1;r<=(n?o:i);r++)f.lazyLoadItem(g-r)}),r("initialLayout",function(){f.currItem.initialLayout=h.getThumbBoundsFn&&h.getThumbBoundsFn(g)}),r("mainScrollAnimComplete",Yt),r("initialZoomInEnd",Yt),r("destroy",function(){for(var e,t=0;t<Xt.length;t++)(e=Xt[t]).container&&(e.container=null),e.placeholder&&(e.placeholder=null),e.img&&(e.img=null),e.preloader&&(e.preloader=null),e.loadError&&(e.loaded=e.loadError=!1);nn=null})},getItemAt:function(e){return 0<=e&&void 0!==Xt[e]&&Xt[e]},allowProgressiveImg:function(){return h.forceProgressiveLoading||!i||h.mouseUsed||1200<screen.width},setContent:function(t,n){h.loop&&(n=B(n));var e=f.getItemAt(t.index);e&&(e.container=null);var o,i,r,e=f.getItemAt(n);e?(T("gettingData",n,e),t.index=n,i=(t.item=e).container=p.createEl("pswp__zoom-wrap"),!e.src&&e.html&&(e.html.tagName?i.appendChild(e.html):i.innerHTML=e.html),$t(e),ln(e,b),!e.src||e.loadError||e.loaded?e.src&&!e.loadError&&((o=p.createEl("pswp__img","img")).style.opacity=1,o.src=e.src,cn(e,o),sn(n,e,i,o,!0)):(e.loadComplete=function(e){if(Y){if(t&&t.index===n){if($t(e,!0))return e.loadComplete=e.img=null,ln(e,b),Ve(e),void(t.index===g&&f.updateCurrZoomItem());e.imageAppended?!Jt&&e.placeholder&&(e.placeholder.style.display="none",e.placeholder=null):l.transform&&(v||Jt)?nn.push({item:e,baseDiv:i,img:e.img,index:n,holder:t,clearPlaceholder:!0}):sn(n,e,i,e.img,v||Jt,!0)}e.loadComplete=null,e.img=null,T("imageLoadComplete",n,e)}},p.features.transform&&(r="pswp__img pswp__img--placeholder",r+=e.msrc?"":" pswp__img--placeholder--blank",r=p.createEl(r,e.msrc?"img":""),e.msrc&&(r.src=e.msrc),cn(e,r),i.appendChild(r),e.placeholder=r),e.loading||Kt(e),f.allowProgressiveImg()&&(!Qt&&l.transform?nn.push({item:e,baseDiv:i,img:e.img,index:n,holder:t}):sn(n,e,i,e.img,!0,!0))),Qt||n!==g?Ve(e):(Me=i.style,tn(e,o||e.img)),t.el.innerHTML="",t.el.appendChild(i)):t.el.innerHTML=""},cleanSlide:function(e){e.img&&(e.img.onload=e.img.onerror=null),e.loaded=e.loading=e.img=e.imageAppended=!1}}});function un(e,t,n){var o=document.createEvent("CustomEvent"),t={origEvent:e,target:e.target,releasePoint:t,pointerType:n||"touch"};o.initCustomEvent("pswpTap",!0,!0,t),e.target.dispatchEvent(o)}var dn,R,mn={};U("Tap",{publicMethods:{initTap:function(){r("firstTouchStart",f.onTapStart),r("touchRelease",f.onTapRelease),r("destroy",function(){mn={},dn=null})},onTapStart:function(e){1<e.length&&(clearTimeout(dn),dn=null)},onTapRelease:function(e,t){var n,o,i;!t||_e||Ie||at||(n=t,dn&&(clearTimeout(dn),dn=null,o=n,i=mn,Math.abs(o.x-i.x)<H)&&Math.abs(o.y-i.y)<H?T("doubleTap",n):"mouse"===t.type?un(e,t,"mouse"):"BUTTON"===e.target.tagName.toUpperCase()||p.hasClass(e.target,"pswp__single-tap")?un(e,t):(I(mn,n),dn=setTimeout(function(){un(e,t),dn=null},300)))}}}),U("DesktopZoom",{publicMethods:{initDesktopZoom:function(){ve||(i?r("mouseUsed",function(){f.setupDesktopZoom()}):f.setupDesktopZoom(!0))},setupDesktopZoom:function(e){R={};var t="wheel mousewheel DOMMouseScroll";r("bindEvents",function(){p.bind(m,t,f.handleMouseWheel)}),r("unbindEvents",function(){R&&p.unbind(m,t,f.handleMouseWheel)}),f.mouseZoomedIn=!1;function n(){f.mouseZoomedIn&&(p.removeClass(m,"pswp--zoomed-in"),f.mouseZoomedIn=!1),y<1?p.addClass(m,"pswp--zoom-allowed"):p.removeClass(m,"pswp--zoom-allowed"),i()}var o,i=function(){o&&(p.removeClass(m,"pswp--dragging"),o=!1)};r("resize",n),r("afterChange",n),r("pointerDown",function(){f.mouseZoomedIn&&(o=!0,p.addClass(m,"pswp--dragging"))}),r("pointerUp",i),e||n()},handleMouseWheel:function(e){if(y<=f.currItem.fitRatio)return h.modal&&(!h.closeOnScroll||at||s?e.preventDefault():me&&2<Math.abs(e.deltaY)&&(X=!0,f.close())),!0;if(e.stopPropagation(),R.x=0,"deltaX"in e)1===e.deltaMode?(R.x=18*e.deltaX,R.y=18*e.deltaY):(R.x=e.deltaX,R.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(R.x=-.16*e.wheelDeltaX),e.wheelDeltaY?R.y=-.16*e.wheelDeltaY:R.y=-.16*e.wheelDelta;else{if(!("detail"in e))return;R.y=e.detail}ot(y,!0);var t=w.x-R.x,n=w.y-R.y;(h.modal||t<=d.min.x&&t>=d.max.x&&n<=d.min.y&&n>=d.max.y)&&e.preventDefault(),f.panTo(t,n)},toggleDesktopZoom:function(e){e=e||{x:b.x/2+qe.x,y:b.y/2+qe.y};var t=h.getDoubleTapZoom(!0,f.currItem),n=y===t;f.mouseZoomedIn=!n,f.zoomTo(n?f.currItem.initialZoomLevel:t,e,333),p[(n?"remove":"add")+"Class"](m,"pswp--zoomed-in")}}});function pn(){hn&&clearTimeout(hn),yn&&clearTimeout(yn)}function fn(){var e=An(),t={};if(!(e.length<5)){var n,o=e.split("&");for(r=0;r<o.length;r++)!o[r]||(n=o[r].split("=")).length<2||(t[n[0]]=n[1]);if(h.galleryPIDs){for(var i=t.pid,r=t.pid=0;r<Xt.length;r++)if(Xt[r].pid===i){t.pid=r;break}}else t.pid=parseInt(t.pid,10)-1;t.pid<0&&(t.pid=0)}return t}var hn,gn,yn,vn,wn,bn,n,xn,En,Tn,F,Cn,Sn={history:!0,galleryUID:1},An=function(){return F.hash.substring(1)},In=function(){var e,t;yn&&clearTimeout(yn),at||s?yn=setTimeout(In,500):(vn?clearTimeout(gn):vn=!0,t=g+1,(e=en(g)).hasOwnProperty("pid")&&(t=e.pid),e=n+"&gid="+h.galleryUID+"&pid="+t,xn||-1===F.hash.indexOf(e)&&(Tn=!0),t=F.href.split("#")[0]+"#"+e,Cn?"#"+e!==window.location.hash&&history[xn?"replaceState":"pushState"]("",document.title,t):xn?F.replace(t):F.hash=e,xn=!0,gn=setTimeout(function(){vn=!1},60))};U("History",{publicMethods:{initHistory:function(){var e,t;p.extend(h,Sn,!0),h.history&&(F=window.location,xn=En=Tn=!1,n=An(),Cn="pushState"in history,-1<n.indexOf("gid=")&&(n=(n=n.split("&gid=")[0]).split("?gid=")[0]),r("afterChange",f.updateURL),r("unbindEvents",function(){p.unbind(window,"hashchange",f.onHashChange)}),e=function(){bn=!0,En||(Tn?history.back():n?F.hash=n:Cn?history.pushState("",document.title,F.pathname+F.search):F.hash=""),pn()},r("unbindEvents",function(){X&&e()}),r("destroy",function(){bn||e()}),r("firstUpdate",function(){g=fn().pid}),-1<(t=n.indexOf("pid="))&&"&"===(n=n.substring(0,t)).slice(-1)&&(n=n.slice(0,-1)),setTimeout(function(){Y&&p.bind(window,"hashchange",f.onHashChange)},40))},onHashChange:function(){return An()===n?(En=!0,void f.close()):void(vn||(wn=!0,f.goTo(fn().pid),wn=!1))},updateURL:function(){pn(),wn||(xn?hn=setTimeout(In,800):In())}}}),p.extend(f,z)}}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DOMPurify=t()}(this,function(){"use strict";function Ue(e){return(Ue="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})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e,t,n){return(o=function(){if("undefined"!=typeof Reflect&&Reflect.construct&&!Reflect.construct.sham){if("function"==typeof Proxy)return 1;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),1}catch(e){}}}()?Reflect.construct:function(e,t,n){var o=[null],t=(o.push.apply(o,t),new(Function.bind.apply(e,o)));return n&&i(t,n.prototype),t}).apply(null,arguments)}function Be(e){return function(e){if(Array.isArray(e))return n(e)}(e)||function(){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}()||function(e){var t;if(e)return"string"==typeof e?n(e,void 0):"Map"===(t="Object"===(t=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?n(e,void 0):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function Ze(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return m(r,t)}var r,a=Object.hasOwnProperty,l=Object.setPrototypeOf,s=Object.isFrozen,c=Object.getPrototypeOf,u=Object.getOwnPropertyDescriptor,qe=Object.freeze,e=Object.seal,f=Object.create,t="undefined"!=typeof Reflect&&Reflect,d=(d=t.apply)||function(e,t,n){return e.apply(t,n)},qe=qe||function(e){return e},e=e||function(e){return e},m=(m=t.construct)||function(e,t){return o(e,Be(t))},st=p(Array.prototype.forEach),je=p(Array.prototype.pop),We=p(Array.prototype.push),Ge=p(String.prototype.toLowerCase),Ke=p(String.prototype.toString),ct=p(String.prototype.match),$e=p(String.prototype.replace),ut=p(String.prototype.indexOf),dt=p(String.prototype.trim),Ye=p(RegExp.prototype.test);r=TypeError;function p(i){return function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return d(i,e,n)}}function Ve(e,t,n){n=n||Ge,l&&l(e,null);for(var o=t.length;o--;){var i,r=t[o];"string"==typeof r&&(i=n(r))!==r&&(s(t)||(t[o]=i),r=i),e[r]=!0}return e}function Xe(e){var t,n=f(null);for(t in e)d(a,e,[t])&&(n[t]=e[t]);return n}function Qe(e,t){for(;null!==e;){var n=u(e,t);if(n){if(n.get)return p(n.get);if("function"==typeof n.value)return p(n.value)}e=c(e)}return function(e){return console.warn("fallback value for",e),null}}var Je=qe(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),et=qe(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),tt=qe(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),mt=qe(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),nt=qe(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),pt=qe(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),ot=qe(["#text"]),it=qe(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),rt=qe(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),at=qe(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),lt=qe(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),ft=e(/\{\{[\w\W]*|[\w\W]*\}\}/gm),ht=e(/<%[\w\W]*|[\w\W]*%>/gm),gt=e(/\${[\w\W]*}/gm),yt=e(/^data-[\-\w.\u00B7-\uFFFF]/),vt=e(/^aria-[\-\w]+$/),wt=e(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),bt=e(/^(?:\w+script|data):/i),xt=e(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Et=e(/^html$/i);return function R(){var l=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"undefined"==typeof window?null:window,c=function(e){return R(e)};if(c.version="2.4.1",c.removed=[],l&&l.document&&9===l.document.nodeType){var s=l.document,i=l.document,F=l.DocumentFragment,e=l.HTMLTemplateElement,u=l.Node,P=l.Element,t=l.NodeFilter,n=l.NamedNodeMap,z=void 0===n?l.NamedNodeMap||l.MozNamedAttrMap:n,H=l.HTMLFormElement,U=l.DOMParser,d=l.trustedTypes,n=P.prototype,B=Qe(n,"cloneNode"),Z=Qe(n,"nextSibling"),q=Qe(n,"childNodes"),m=Qe(n,"parentNode"),p=("function"==typeof e&&(n=i.createElement("template")).content&&n.content.ownerDocument&&(i=n.content.ownerDocument),function(e,t){if("object"!==Ue(e)||"function"!=typeof e.createPolicy)return null;var n=null,o="data-tt-policy-suffix",t="dompurify"+((n=t.currentScript&&t.currentScript.hasAttribute(o)?t.currentScript.getAttribute(o):n)?"#"+n:"");try{return e.createPolicy(t,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+t+" could not be created."),null}}(d,s)),j=p?p.createHTML(""):"",e=i,W=e.implementation,G=e.createNodeIterator,K=e.createDocumentFragment,$=e.getElementsByTagName,Y=s.importNode,n={};try{n=Xe(i).documentMode?i.documentMode:{}}catch(e){}var o={};c.isSupported="function"==typeof m&&W&&void 0!==W.createHTMLDocument&&9!==n;var f,h,V,X=ft,Q=ht,J=gt,ee=yt,te=vt,ne=bt,oe=xt,ie=wt,g=null,re=Ve({},[].concat(Be(Je),Be(et),Be(tt),Be(nt),Be(ot))),y=null,ae=Ve({},[].concat(Be(it),Be(rt),Be(at),Be(lt))),v=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),w=null,le=null,se=!0,ce=!0,ue=!1,b=!1,x=!1,de=!1,me=!1,E=!1,T=!1,C=!1,pe=!0,fe=!1,he="user-content-",ge=!0,S=!1,r={},A=null,ye=Ve({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ve=null,we=Ve({},["audio","video","img","source","image","track"]),be=null,xe=Ve({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),I="http://www.w3.org/1998/Math/MathML",k="http://www.w3.org/2000/svg",_="http://www.w3.org/1999/xhtml",D=_,Ee=null,Te=Ve({},[I,k,_],Ke),Ce=["application/xhtml+xml","text/html"],a=null,Se=i.createElement("form"),Ae=function(e){return e instanceof RegExp||e instanceof Function},Ie=function(e){a&&a===e||(e=Xe(e=e&&"object"===Ue(e)?e:{}),f=-1===Ce.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,h="application/xhtml+xml"===f?Ke:Ge,g="ALLOWED_TAGS"in e?Ve({},e.ALLOWED_TAGS,h):re,y="ALLOWED_ATTR"in e?Ve({},e.ALLOWED_ATTR,h):ae,Ee="ALLOWED_NAMESPACES"in e?Ve({},e.ALLOWED_NAMESPACES,Ke):Te,be="ADD_URI_SAFE_ATTR"in e?Ve(Xe(xe),e.ADD_URI_SAFE_ATTR,h):xe,ve="ADD_DATA_URI_TAGS"in e?Ve(Xe(we),e.ADD_DATA_URI_TAGS,h):we,A="FORBID_CONTENTS"in e?Ve({},e.FORBID_CONTENTS,h):ye,w="FORBID_TAGS"in e?Ve({},e.FORBID_TAGS,h):{},le="FORBID_ATTR"in e?Ve({},e.FORBID_ATTR,h):{},r="USE_PROFILES"in e&&e.USE_PROFILES,se=!1!==e.ALLOW_ARIA_ATTR,ce=!1!==e.ALLOW_DATA_ATTR,ue=e.ALLOW_UNKNOWN_PROTOCOLS||!1,b=e.SAFE_FOR_TEMPLATES||!1,x=e.WHOLE_DOCUMENT||!1,E=e.RETURN_DOM||!1,T=e.RETURN_DOM_FRAGMENT||!1,C=e.RETURN_TRUSTED_TYPE||!1,me=e.FORCE_BODY||!1,pe=!1!==e.SANITIZE_DOM,fe=e.SANITIZE_NAMED_PROPS||!1,ge=!1!==e.KEEP_CONTENT,S=e.IN_PLACE||!1,ie=e.ALLOWED_URI_REGEXP||ie,D=e.NAMESPACE||_,e.CUSTOM_ELEMENT_HANDLING&&Ae(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(v.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&Ae(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(v.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(v.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),b&&(ce=!1),T&&(E=!0),r&&(g=Ve({},Be(ot)),y=[],!0===r.html&&(Ve(g,Je),Ve(y,it)),!0===r.svg&&(Ve(g,et),Ve(y,rt),Ve(y,lt)),!0===r.svgFilters&&(Ve(g,tt),Ve(y,rt),Ve(y,lt)),!0===r.mathMl)&&(Ve(g,nt),Ve(y,at),Ve(y,lt)),e.ADD_TAGS&&Ve(g=g===re?Xe(g):g,e.ADD_TAGS,h),e.ADD_ATTR&&Ve(y=y===ae?Xe(y):y,e.ADD_ATTR,h),e.ADD_URI_SAFE_ATTR&&Ve(be,e.ADD_URI_SAFE_ATTR,h),e.FORBID_CONTENTS&&Ve(A=A===ye?Xe(A):A,e.FORBID_CONTENTS,h),ge&&(g["#text"]=!0),x&&Ve(g,["html","head","body"]),g.table&&(Ve(g,["tbody"]),delete w.tbody),qe&&qe(e),a=e)},ke=Ve({},["mi","mo","mn","ms","mtext"]),_e=Ve({},["foreignobject","desc","title","annotation-xml"]),De=Ve({},["title","style","font","a","script"]),O=Ve({},et),Oe=(Ve(O,tt),Ve(O,mt),Ve({},nt)),L=(Ve(Oe,pt),function(t){We(c.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=j}catch(e){t.remove()}}}),Le=function(e,t){try{We(c.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){We(c.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!y[e])if(E||T)try{L(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Me=function(e){me?e="<remove></remove>"+e:n=(n=ct(e,/^[\r\n\t ]+/))&&n[0],"application/xhtml+xml"===f&&D===_&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var t,n,o=p?p.createHTML(e):e;if(D===_)try{t=(new U).parseFromString(o,f)}catch(e){}if(!t||!t.documentElement){t=W.createDocument(D,"template",null);try{t.documentElement.innerHTML=V?"":o}catch(e){}}o=t.body||t.documentElement;return e&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),D===_?$.call(t,x?"html":"body")[0]:x?t.documentElement:o},Ne=function(e){return G.call(e.ownerDocument||e,e,t.SHOW_ELEMENT|t.SHOW_COMMENT|t.SHOW_TEXT,null,!1)},M=function(e){return"object"===Ue(u)?e instanceof u:e&&"object"===Ue(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},N=function(e,t,n){o[e]&&st(o[e],function(e){e.call(c,t,n,a)})},Re=function(e){if(N("beforeSanitizeElements",e,null),(!((r=e)instanceof H)||"string"==typeof r.nodeName&&"string"==typeof r.textContent&&"function"==typeof r.removeChild&&r.attributes instanceof z&&"function"==typeof r.removeAttribute&&"function"==typeof r.setAttribute&&"string"==typeof r.namespaceURI&&"function"==typeof r.insertBefore&&"function"==typeof r.hasChildNodes)&&!Ye(/[\u0080-\uFFFF]/,e.nodeName)){var t,n,o,i,r=h(e.nodeName);if(N("uponSanitizeElement",e,{tagName:r,allowedTags:g}),(!e.hasChildNodes()||M(e.firstElementChild)||M(e.content)&&M(e.content.firstElementChild)||!Ye(/<[/\w]/g,e.innerHTML)||!Ye(/<[/\w]/g,e.textContent))&&("select"!==r||!Ye(/<template/i,e.innerHTML))){if(g[r]&&!w[r])return(!(e instanceof P)||((n=m(t=e))&&n.tagName||(n={namespaceURI:D,tagName:"template"}),o=Ge(t.tagName),i=Ge(n.tagName),Ee[t.namespaceURI]&&(t.namespaceURI===k?n.namespaceURI===_?"svg"===o:n.namespaceURI===I?"svg"===o&&("annotation-xml"===i||ke[i]):Boolean(O[o]):t.namespaceURI===I?n.namespaceURI===_?"math"===o:n.namespaceURI===k?"math"===o&&_e[i]:Boolean(Oe[o]):t.namespaceURI===_?!(n.namespaceURI===k&&!_e[i]||n.namespaceURI===I&&!ke[i]||Oe[o]||!De[o]&&O[o]):"application/xhtml+xml"===f&&Ee[t.namespaceURI])))&&("noscript"!==r&&"noembed"!==r||!Ye(/<\/no(script|embed)/i,e.innerHTML))?(b&&3===e.nodeType&&(n=e.textContent,n=$e(n,X," "),n=$e(n,Q," "),n=$e(n,J," "),e.textContent!==n)&&(We(c.removed,{element:e.cloneNode()}),e.textContent=n),N("afterSanitizeElements",e,null),!1):(L(e),!0);if(!w[r]&&Pe(r)){if(v.tagNameCheck instanceof RegExp&&Ye(v.tagNameCheck,r))return!1;if(v.tagNameCheck instanceof Function&&v.tagNameCheck(r))return!1}if(ge&&!A[r]){var a=m(e)||e.parentNode,l=q(e)||e.childNodes;if(l&&a)for(var s=l.length-1;0<=s;--s)a.insertBefore(B(l[s],!0),Z(e))}}}return L(e),!0},Fe=function(e,t,n){if(pe&&("id"===t||"name"===t)&&(n in i||n in Se))return!1;if((!ce||le[t]||!Ye(ee,t))&&(!se||!Ye(te,t)))if(!y[t]||le[t]){if(!(Pe(e)&&(v.tagNameCheck instanceof RegExp&&Ye(v.tagNameCheck,e)||v.tagNameCheck instanceof Function&&v.tagNameCheck(e))&&(v.attributeNameCheck instanceof RegExp&&Ye(v.attributeNameCheck,t)||v.attributeNameCheck instanceof Function&&v.attributeNameCheck(t))||"is"===t&&v.allowCustomizedBuiltInElements&&(v.tagNameCheck instanceof RegExp&&Ye(v.tagNameCheck,n)||v.tagNameCheck instanceof Function&&v.tagNameCheck(n))))return!1}else if(!be[t]&&!Ye(ie,$e(n,oe,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==ut(n,"data:")||!ve[e])&&(!ue||Ye(ne,$e(n,oe,"")))&&n)return!1;return!0},Pe=function(e){return 0<e.indexOf("-")},ze=function(e){N("beforeSanitizeAttributes",e,null);var t=e.attributes;if(t){for(var n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:y},o=t.length;o--;){l=t[o];var i=l.name,r=l.namespaceURI,a="value"===i?l.value:dt(l.value),l=h(i);if(n.attrName=l,n.attrValue=a,n.keepAttr=!0,n.forceKeepAttr=void 0,N("uponSanitizeAttribute",e,n),a=n.attrValue,!n.forceKeepAttr&&(Le(i,e),n.keepAttr))if(Ye(/\/>/i,a))Le(i,e);else{b&&(a=$e(a,X," "),a=$e(a,Q," "),a=$e(a,J," "));var s=h(e.nodeName);if(Fe(s,l,a)){if(!fe||"id"!==l&&"name"!==l||(Le(i,e),a=he+a),p&&"object"===Ue(d)&&"function"==typeof d.getAttributeType&&!r)switch(d.getAttributeType(s,l)){case"TrustedHTML":a=p.createHTML(a);break;case"TrustedScriptURL":a=p.createScriptURL(a)}try{r?e.setAttributeNS(r,i,a):e.setAttribute(i,a),je(c.removed)}catch(e){}}}}N("afterSanitizeAttributes",e,null)}},He=function e(t){var n,o=Ne(t);for(N("beforeSanitizeShadowDOM",t,null);n=o.nextNode();)N("uponSanitizeShadowNode",n,null),Re(n)||(n.content instanceof F&&e(n.content),ze(n));N("afterSanitizeShadowDOM",t,null)};c.sanitize=function(e){var t,n,o,i,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof(e=(V=!e)?"\x3c!--\x3e":e)&&!M(e)){if("function"!=typeof e.toString)throw Ze("toString is not a function");if("string"!=typeof(e=e.toString()))throw Ze("dirty is not a string, aborting")}if(!c.isSupported){if("object"===Ue(l.toStaticHTML)||"function"==typeof l.toStaticHTML){if("string"==typeof e)return l.toStaticHTML(e);if(M(e))return l.toStaticHTML(e.outerHTML)}return e}if(de||Ie(r),c.removed=[],S="string"==typeof e?!1:S){if(e.nodeName){var r=h(e.nodeName);if(!g[r]||w[r])throw Ze("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof u)1===(r=(t=Me("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===r.nodeName||"HTML"===r.nodeName?t=r:t.appendChild(r);else{if(!E&&!b&&!x&&-1===e.indexOf("<"))return p&&C?p.createHTML(e):e;if(!(t=Me(e)))return E?null:C?j:""}t&&me&&L(t.firstChild);for(var a=Ne(S?e:t);n=a.nextNode();)3===n.nodeType&&n===o||Re(n)||(n.content instanceof F&&He(n.content),ze(n),o=n);if(o=null,S)return e;if(E){if(T)for(i=K.call(t.ownerDocument);t.firstChild;)i.appendChild(t.firstChild);else i=t;return i=y.shadowroot?Y.call(s,i,!0):i}r=x?t.outerHTML:t.innerHTML;return x&&g["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&Ye(Et,t.ownerDocument.doctype.name)&&(r="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+r),b&&(r=$e(r,X," "),r=$e(r,Q," "),r=$e(r,J," ")),p&&C?p.createHTML(r):r},c.setConfig=function(e){Ie(e),de=!0},c.clearConfig=function(){a=null,de=!1},c.isValidAttribute=function(e,t,n){a||Ie({});e=h(e),t=h(t);return Fe(e,t,n)},c.addHook=function(e,t){"function"==typeof t&&(o[e]=o[e]||[],We(o[e],t))},c.removeHook=function(e){if(o[e])return je(o[e])},c.removeHooks=function(e){o[e]&&(o[e]=[])},c.removeAllHooks=function(){o={}}}else c.isSupported=!1;return c}()}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).reframe=t()}(this,function(){"use strict";function t(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var o=Array(e),i=0,t=0;t<n;t++)for(var r=arguments[t],a=0,l=r.length;a<l;a++,i++)o[i]=r[a];return o}return function(e,i){return void 0===i&&(i="js-reframe"),("string"==typeof e?t(document.querySelectorAll(e)):"length"in e?t(e):[e]).forEach(function(e){var t,n,o;-1!==e.className.split(" ").indexOf(i)||-1<e.style.width.indexOf("%")||(t=e.getAttribute("height")||e.offsetHeight,n=e.getAttribute("width")||e.offsetWidth,t=("string"==typeof t?parseInt(t):t)/("string"==typeof n?parseInt(n):n)*100,(n=document.createElement("div")).className=i,(o=n.style).position="relative",o.width="100%",o.paddingTop=t+"%",(o=e.style).position="absolute",o.width="100%",o.height="100%",o.left="0",o.top="0",null!=(t=e.parentNode)&&t.insertBefore(n,e),null!=(o=e.parentNode)&&o.removeChild(e),n.appendChild(e))})}}),function(){const e=document.querySelector(".gh-navigation");var t=e.querySelector(".gh-burger");t&&t.addEventListener("click",function(){e.classList.contains("is-open")?e.classList.remove("is-open"):e.classList.add("is-open")})}(),lightbox(".kg-image-card > .kg-image[width][height], .kg-gallery-image > img"),reframe(document.querySelectorAll(['.gh-content iframe[src*="youtube.com"]','.gh-content iframe[src*="youtube-nocookie.com"]','.gh-content iframe[src*="player.vimeo.com"]','.gh-content iframe[src*="kickstarter.com"][src*="video.html"]',".gh-content object",".gh-content embed"].join(","))),dropdown(),document.body.classList.contains("post-template")||pagination();const MASTODON_ACCOUNT_ID="109285376472065471",MASTODON_HOST="social.sd.ai";async function copyElementTextToClipboard(e){var t=e.textContent;await navigator.clipboard.writeText(t),e.classList.add("tootClick"),setTimeout(()=>{e.classList.remove("tootClick")},600)}function escapeHtml(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function renderMastodonContent(e,t,n){if(t.innerHTML="",Array.isArray(e)&&0!==e.length){for(const i of e)if(!i.sensitive){i.account.display_name=escapeHtml(i.account.display_name),i.account.emojis.forEach(e=>{i.account.display_name=i.account.display_name.replace(`:${e.shortcode}:`,`<img src="${escapeHtml(e.static_url)}" alt="Emoji ${e.shortcode}" class="mastodon-emoji" />`)}),i.emojis.forEach(e=>{i.content=i.content.replace(`:${e.shortcode}:`,`<img src="${escapeHtml(e.static_url)}" alt="Emoji ${e.shortcode}" class="mastodon-emoji" />`)});var o=`<div class="mastodon-comment">
<div class="mastodon-avatar">
<img src="${escapeHtml(i.account.avatar_static)}" height=60 width=60 alt="${escapeHtml(i.account.display_name)}'s avatar">
</div>
<div class="mastodon-body">
<div class="mastodon-meta">
<div class="mastodon-author">
<div class="mastodon-author-link">
<a href="${i.account.url}" rel="nofollow">
<span>${i.account.display_name}</span>
</a>
<br/>
<span class="mastodon-author-uid">(@${escapeHtml("s"===i.account.acct?"s@sd.ai":i.account.acct)})</span>
</div>
</div>
<div class="toot-link">
<a class="date" href="${i.uri}" rel="nofollow" target="_blank">
${i.created_at.substring(0,10)}
</a>
<br/>
</div>
</div>
<div class="mastodon-comment-content">
${i.content}
<span class="tootlink" ${n?"":'style="display: none;"'}>${i.uri}</span>
</div>
</div>
</div>`,o=DOMPurify.sanitize(o,{RETURN_DOM_FRAGMENT:!0});for(const r of o.querySelectorAll(".tootlink"))r.onclick=function(){return copyElementTextToClipboard(this)};t.appendChild(o)}}else document.getElementById("mastodon-comments-list").innerHTML="<div class='mastodon-comment'>No comments (yet)!</div>"}let MASTODON_POST_ID;function pagination(e=!0,l,s=!1){const c=document.querySelector(".gh-feed");if(!c)return;let t=!1;async function n(){var t=document.querySelector("link[rel=next]");if(t)try{var e=await(await fetch(t.href)).text(),n=(new DOMParser).parseFromString(e,"text/html"),o=n.querySelectorAll(".gh-feed:not(.gh-featured):not(.gh-related) > *");const r=document.createDocumentFragment(),a=[];o.forEach(function(e){e=document.importNode(e,!0);s&&(e.style.visibility="hidden"),r.appendChild(e),a.push(e)}),c.appendChild(r),l&&l(a,d);var i=n.querySelector("link[rel=next]");i&&i.href?t.href=i.href:(t.remove(),u&&u.remove())}catch(e){throw t.remove(),e}}const o=c.nextElementSibling||document.querySelector(".gh-footer"),u=document.querySelector(".gh-loadmore"),d=(!document.querySelector("link[rel=next]")&&u&&u.remove(),async function(){o.getBoundingClientRect().top<=window.innerHeight&&document.querySelector("link[rel=next]")&&await n()});const i=new IntersectionObserver(async function(e){if(!t){if(t=!0,e[0].isIntersecting)if(s)await n();else for(;o.getBoundingClientRect().top<=window.innerHeight&&document.querySelector("link[rel=next]");)await n();t=!1,document.querySelector("link[rel=next]")||i.disconnect()}});e?i.observe(o):u.addEventListener("click",n)}document.addEventListener("DOMContentLoaded",async e=>{let t,n;var o=/bot|google|baidu|bing|msn|teoma|slurp|yandex/i.test(navigator.userAgent),o=(0<document.getElementsByClassName("gh-sidebar").length&&(t=`https://${MASTODON_HOST}/api/v1/accounts/${MASTODON_ACCOUNT_ID}/statuses?exclude_replies=true&exclude_reblogs=true`),MASTODON_POST_ID&&!o&&(t=`https://${MASTODON_HOST}/api/v1/statuses/${MASTODON_POST_ID}/context`,n=!0),document.getElementById("mastodon-comments-list"));if(t&&o){var i=document.getElementById("toot-link-top"),r=document.getElementById("toot-link-clip"),a=`https://${MASTODON_HOST}/@s/`+MASTODON_POST_ID;i&&(i.href=a),r&&(r.innerText=a);let e=await(await fetch(t)).json();n&&(e=e.descendants);i=document.getElementById("mastodon-comments-header");return i&&(i.style.display=""),renderMastodonContent(e,o,n)}});const isOSLight=window.matchMedia("(prefers-color-scheme: light)").matches,localTheme=window.localStorage&&window.localStorage.getItem("lightTheme"),themeToggle=document.querySelector(".theme-toggle");function changeFavicon(){var e=document.documentElement.classList.contains("dark-theme")?"/assets/images/favicon-dark.png":"/assets/images/favicon.png",t=document.createElement("link"),n=document.getElementById("dynamic-favicon");t.id="dynamic-favicon",t.rel="shortcut icon",t.href=e,n&&document.head.removeChild(n),document.head.appendChild(t)}function changeTheme(e){document.documentElement.classList.remove("light-theme","dark-theme","has-light-text","has-dark-text"),e?document.documentElement.classList.add("light-theme","has-dark-text"):document.documentElement.classList.add("dark-theme","has-light-text"),window.localStorage&&window.localStorage.setItem("lightTheme",e?"light":"dark"),changeFavicon()}themeToggle.addEventListener("click",()=>{changeTheme(document.documentElement.classList.contains("dark-theme"))}),"light"===localTheme?changeTheme(!0):changeTheme(isOSLight);
//# sourceMappingURL=source.js.map