!/*! License details at fancyapps.com/license */function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).window=e.window||{})}(this,function(e){"use strict";let t={iframeAttr:{allow:"autoplay; fullscreen",scrolling:"auto",credentialless:""}};e.Html=()=>{let e;function i(e,t){let i=t.src;if("string"!=typeof i)return;let a=t.type;if(!a){if(!a&&("#"===i.charAt(0)?a="inline":i.match(/(^data:image\/[a-z0-9+\/=]*,)|(\.((a)?png|avif|gif|jp(g|eg)|pjp(eg)?|jfif|svg|webp|bmp|ico|tif(f)?)((\?|#).*)?$)/i)?a="image":i.match(/\.(pdf)((\?|#).*)?$/i)?a="pdf":i.match(/\.(html|php)((\?|#).*)?$/i)&&(a="iframe")),!a){let e=i.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:(?:(?:maps\/(?:place\/(?:.*)\/)?\@(.*),(\d+.?\d+?)z))|(?:\?ll=))(.*)?/i);e&&(i=`https://maps.google.${e[1]}/?ll=${(e[2]?e[2]+"&z="+Math.floor(parseFloat(e[3]))+(e[4]?e[4].replace(/^\//,"&"):""):e[4]+"").replace(/\?/,"&")}&output=${e[4]&&e[4].indexOf("layer=c")>0?"svembed":"embed"}`,a="gmap")}if(!a){let e=i.match(/(?:maps\.)?google\.([a-z]{2,3}(?:\.[a-z]{2})?)\/(?:maps\/search\/)(.*)/i);e&&(i=`https://maps.google.${e[1]}/maps?q=${e[2].replace("query=","q=").replace("api=1","")}&output=embed`,a="gmap")}t.src=i,t.type=a}}function a(i,a){("iframe"===a.type||"pdf"===a.type||"gmap"===a.type)&&function(i){if(!e||!i.el||!i.src)return;let a=document.createElement("iframe");for(let[i,l]of(a.classList.add("f-iframe"),Object.entries(function(){let i=e?.getOptions().Html;return"object"==typeof i&&null!==i&&i.constructor===Object&&"[object Object]"===Object.prototype.toString.call(i)?{...t,...i}:t}().iframeAttr||{})))a.setAttribute(i,l);a.onerror=()=>{e&&1===e.getState()&&e.showError(i,"{{IFRAME_ERROR}}")},a.src=i.src;let l=document.createElement("div");if(l.classList.add("f-html"),l.append(a),i.width){let e=`${i.width}`;e.match(/^\d+$/)&&(e+="px"),l.style.maxWidth=`${e}`}if(i.height){let e=`${i.height}`;e.match(/^\d+$/)&&(e+="px"),l.style.maxHeight=`${e}`}if(i.aspectRatio){let e=i.el.getBoundingClientRect();l.style.aspectRatio=`${i.aspectRatio}`,l.style[e.width>e.height?"width":"height"]="auto",l.style[e.width>e.height?"maxWidth":"maxHeight"]="none"}i.contentEl=a,i.htmlEl=l,i.el.classList.add("has-html"),i.el.classList.add("has-iframe"),i.el.classList.add(`has-${i.type}`),i.el.prepend(l),e.emit("contentReady",i)}(a)}function l(t,i){("iframe"===i.type||"pdf"===i.type||"gmap"===i.type)&&(e?.hideError(i),i.contentEl?.remove(),i.contentEl=void 0,i.htmlEl?.remove(),i.htmlEl=void 0)}return{init:function(t){(e=t).on("addSlide",i),e.on("attachSlideEl",a),e.on("detachSlideEl",l)},destroy:function(){e?.off("addSlide",i),e?.off("attachSlideEl",a),e?.off("detachSlideEl",l),e=void 0}}}});