var FBPublication="object"==typeof FBPublication?FBPublication:{};FBPublication.embed=function(e){var t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,(function(t){return e[t]}).bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=2)}([function(e,t){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(n){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){"use strict";i.r(t),(function(e){function i(e){return(i="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 n(t){this._navigator=t||(e.navigator?e.navigator:window?window.navigator:void 0),this.browser=this._getBrowser(),this.flash=this._getFlash(),this.os=this._getOS(),this.device=this._getDevice(),this.locales=this._getLocales(),this.locale=this.locales?this.locales[0]:void 0}n.prototype.constructor=n,n.prototype._getBrowser=function(){var e,t=void 0!==this._navigator?this._navigator.userAgent.toLowerCase():"",i=function(e){var i=t.match(e);return i&&i.length>1&&i[1]||""},n=/CrOS/.test(t),o=i(/edge?\/(\d+(\.\d+)?)/i),s=o?o>=80?"chromiumEdge":"msedge":null,r=i(/version\/(\d+(\.\d+)?)/i),l=!1;return/opera|opr/i.test(t)?e={name:"Opera",opera:!0,version:r||i(/(?:opera|opr)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(t)?e={name:"Yandex Browser",yandexbrowser:!0,version:r||i(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/windows phone/i.test(t)?(l=!0,e={name:"Windows Phone IE",ie:!0},o?(e[s]=!0,e.version=o):(e.msie=!0,e.version=i(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(t)?(e={name:"Internet Explorer",msie:!0,ie:!0,version:i(/(?:msie |rv:)(\d+(\.\d+)?)/i)},/trident/i.test(t)&&("7.0"===e.version&&"4.0"===i(/(?:trident\/)(\d+(\.\d+)?)/i)&&(e.version="8.0"),"7.0"===e.version&&"5.0"===i(/(?:trident\/)(\d+(\.\d+)?)/i)&&(e.version="9.0"))):/silk/i.test(t)?e={name:"Amazon Silk",silk:!0,version:i(/silk\/(\d+(\.\d+)?)/i)}:n?e={name:"Chrome",chrome:!0,version:i(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/chrome.+? edge?/i.test(t)?((e={name:"Microsoft Edge",version:o})[s]=!0,e.ie="msedge"===s):/chrome|crios|crmo/i.test(t)?(e={name:"Chrome",chrome:!0,version:i(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)},/SamsungBrowser/i.test(t)&&(e.name="Samsung Browser",e.samsung=!0,e.version=i(/SamsungBrowser\/(\d+(\.\d+)?)/i))):e=/seamonkey\//i.test(t)?{name:"SeaMonkey",seamonkey:!0,version:i(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel/i.test(t)?{name:"Firefox",firefox:!0,version:i(/(?:firefox|iceweasel)[ \/](\d+(\.\d+)?)/i)}:/phantom/i.test(t)?{name:"PhantomJS",phantom:!0,version:i(/phantomjs\/(\d+(\.\d+)?)/i)}:/safari/i.test(t)?{name:"Safari",safari:!0,version:r}:{other:!0},/FBAN|FBIOS|FB_IAB|FBAV/i.test(t)&&(e.name="Facebook In-App",e.facebook=!0,e.inApp=!0),/\bFB[\w_]+\/(Messenger|MESSENGER)/i.test(t)&&(e.name="Messenger In-App",e.messenger=!0,e.inApp=!0),/\bTwitter/i.test(t)&&(e.name="Twitter In-App",e.twitter=!0,e.inApp=!0),/\bLine\//i.test(t)&&(e.name="Line In-App",e.line=!0,e.inApp=!0),/\bMicroMessenger\//i.test(t)&&(e.name="Wechat In-App",e.wechat=!0,e.inApp=!0),/\bInstagram/i.test(t)&&(e.name="Instagram In-App",e.instagram=!0,e.inApp=!0),l||e.msie||e.msedge||e.chromiumEdge||!/(apple)?webkit/i.test(t)?!e.opera&&/gecko\//i.test(t)&&(e.name=e.name||"Gecko",e.gecko=!0,e.version=e.version||i(/gecko\/(\d+(\.\d+)?)/i)):(e.name=e.name||"Webkit",e.webkit=!0,!e.version&&r&&(e.version=r)),e.name||(e.name="Other"),-1!==t.toLowerCase().indexOf("publisher")&&(e.publisher=!0),e},n.prototype._getFlash=function(){var t="Shockwave Flash",n="ShockwaveFlash.ShockwaveFlash",o="application/x-shockwave-flash",s=null;if(void 0!==this._navigator.plugins&&"object"===i(this._navigator.plugins[t])){var r=this._navigator.plugins[t].description;!r||void 0!==this._navigator.mimeTypes&&this._navigator.mimeTypes[o]&&!this._navigator.mimeTypes[o].enabledPlugin||(r=r.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),s=[parseInt(r.replace(/^(.*)\..*$/,"$1"),10),parseInt(r.replace(/^.*\.(.*)\s.*$/,"$1"),10),/[a-zA-Z]/.test(r)?parseInt(r.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0])}else if(void 0!==e.ActiveXObject)try{var l=new e.ActiveXObject(n);if(l){var a=l.GetVariable("$version");a&&(a=a.split(" ")[1].split(","),s=[parseInt(a[0],10),parseInt(a[1],10),parseInt(a[2],10)])}}catch(h){}return s},n.prototype._getOS=function(){var e=void 0!==this._navigator?this._navigator.userAgent.toLowerCase():"",t=function(t){var i=e.match(t);return i&&i.length>1&&i[1]||""},i={name:"Other",other:!0},n=t(/(ipod|iphone|ipad)/i).toLowerCase(),o="ontouchstart"in document.documentElement&&/macintosh/i.test(e),s=!/like android/i.test(e)&&/android/i.test(e),r=t(/version\/(\d+(\.\d+)?)/i);return n&&!o?i={name:"iOS",version:t(/os\s(\d+_*\d*_*\d*)/).split("_").join("."),ios:!0}:o?i={name:"iPadOS",version:t(/version\/(\d+.?\d*.?\d*)\s/i),ios:!0,ipados:!0}:s?i={name:"Android",version:t(/android\s(\d+\.*\d*\.*\d*)/),android:!0}:/mac os/.test(e)?i={name:"Mac OS",mac:!0}:/windows/i.test(e)?i={name:"Windows",windows:!0}:/playbook|blackberry|\bbb\d+/i.test(e)||/rim\stablet/i.test(e)?i={name:"Blackberry",blackberry:!0,version:r||t(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:/(web|hpw)os/i.test(e)?(i={name:"WebOS",webos:!0,version:r||t(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(e)&&(i.touchpad=!0)):/bada/i.test(e)?i={name:"Bada",bada:!0,version:t(/dolfin\/(\d+(\.\d+)?)/i)}:/tizen/i.test(e)?i={name:"Tizen",tizen:!0,version:t(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||r}:/sailfish/i.test(e)?i={name:"Sailfish",sailfish:!0,version:t(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel/i.test(e)&&/\((mobile|tablet);[^)]*rv:[\d.]+\)/i.test(e)&&(i={name:"Firefox OS",firefoxos:!0}),i},n.prototype._getDevice=function(){var e=void 0!==this._navigator?this._navigator.userAgent.toLowerCase():"",t={},i=!/like android/i.test(e)&&/android/i.test(e),n=/cros/.test(e);return t.name=e.match(/ipad/)||this.os.ipados?"ipad":e.match(/ipod/)?"ipod":e.match(/iphone/)?"iphone":i?"android":e.match(/windows phone/)?"wphone":e.match(/mobile/)?"mobile":e.match(/mac|win|linux/)||n?"desktop":"other",t[t.name]=!0,t},n.prototype._getLocales=function(){if(void 0!==this._navigator){if(this._navigator.languages&&this._navigator.languages.length>0){for(var e,t=[],i=0;i0?"&":"")+"page="+g,f+=h):(f.lastIndexOf("/")!==f.length-1&&(f+="/"),f+=g+"/"+h):f+=h,"no"===d&&"fbo"===PRODUCT_CODE&&(f+=-1===f.indexOf("?")?"?noview=true":"&noview=true");var _=f;v.length>0&&(_+="#"+v);for(var k=e.document.createElement("div"),E=0,L=t.attributes.length;E0?W.src=this._getPublicationThumbLink(x):W.src=this._getSelfhostPublicationThumbLink(x,p,h),W.onload=function(){var e=W.naturalWidth,t=W.naturalHeight,i=P.getBoundingClientRect(),n=i.width/i.height,o=e/t;e>0&&t>0&&i.height>0&&i.width>0&&(W.style.height=n>o?i.height:t*i.width/e,W.style.width=n>o?e*i.height/t:i.width)},B.appendChild(W);var T=e.document.createElement("div");T.style.width="60px",T.style.height="60px",T.style.position="absolute",T.style.top="0",T.style.left="0",T.style.right="0",T.style.bottom="0",T.style.margin="auto",T.style.backgroundImage="url('"+this._getPublicationThumbIcon()+"')",T.style.backgroundPosition="center",T.style.transition="all .3s",T.style.transform="scale(0.9)",T.style["will-change"]="transform",T.style.borderRadius="100%",T.style.backgroundColor="rgba(0,0,0,0.7)",T.style.opacity="0.8";var H=function(){T.style.transform="scale(1)",T.style.backgroundColor="rgba(0,0,0,0.66)",T.style.opacity="1"};this._addEvent(W,"mouseenter",H),this._addEvent(T,"mouseenter",H);var N=function(){T.style.transform="scale(0.9)",T.style.opacity="0.8",T.style.backgroundColor="rgba(0,0,0,0.7)"};if(this._addEvent(W,"mouseleave",N),this._addEvent(T,"mouseleave",N),B.appendChild(T),n||(n=this._getEmbedDefaultWidth()+"px"),s||(s=this._getEmbedDefaultHeight()+"px"),R){var z=l.split(":");O=z[0]/z[1]}R&&O&&(S=(100/O).toFixed(2)+"%",t.style.position="relative"),t.style.width||(t.style.width=n+(r(n)?"px":"")),t.style.height||(t.style.height=s+(r(s)?"px":"")),"auto"===s&&(t.style.minHeight=this._getPayloadMinHeight()+"px")}"fbc"===PRODUCT_CODE&&this.PROTECTION_API_URL?this._ajax(this.PROTECTION_API_URL,(function(n,s){if(200===s.status){var r=JSON.parse(n);if(r.d)if(null===r.d.Errors){var l=r.d.Success;"mobile"===i.version&&l?P.addEventListener("click",(function(e){e.preventDefault(),i.openMobileLightbox(a)})):new o.default(P,(function(){var e=.8*i._getWindowWidth()>i._getPayloadMinWidth()&&.8*i._getWindowHeight()>i._getPayloadMinHeight(),n="no"!==t.getAttribute("data-"+PRODUCT_CODE+"-lightbox");return e&&!0===i.userAgentDetector.device.desktop&&n}),(function(e){i.embeds[a].lightboxWindow=e.contentWindow}));var h=e.document.createElement("div");t.appendChild(h),i.storeEmbed({elementId:a,element:t,embedPublicationUrl:f,linkElement:P,image:W,method:u,analytics:d,isProtected:l,wheel:c,urlHash:v,thumbnailUrl:p,ratioPadding:S})}else console.log(r.d.Errors)}else console.log(s.status,s.statusText)}),'{"url": "'+x+'"}',5e3):"fbo"===PRODUCT_CODE&&this.PROTECTION_API_URL?this._ajax(this.PROTECTION_API_URL+x,(function(n,s){if(200===s.status){var r=JSON.parse(n);if("boolean"==typeof r){"mobile"===i.version&&r?P.addEventListener("click",(function(e){e.preventDefault(),i.openMobileLightbox(a)})):new o.default(P,(function(){var e=.8*i._getWindowWidth()>i._getPayloadMinWidth()&&.8*i._getWindowHeight()>i._getPayloadMinHeight(),n="no"!==t.getAttribute("data-"+PRODUCT_CODE+"-lightbox");return e&&!0===i.userAgentDetector.device.desktop&&n}),(function(e){i.embeds[a].lightboxWindow=e.contentWindow}));var l=e.document.createElement("div");t.appendChild(l),i.storeEmbed({elementId:a,element:t,embedPublicationUrl:f,linkElement:P,image:W,method:u,analytics:d,isProtected:r,wheel:c,urlHash:v,thumbnailUrl:p,ratioPadding:S})}else console.log("Protection check error")}else console.log(s.status,s.statusText)}),null,5e3):(new o.default(P,(function(){var e=.8*i._getWindowWidth()>i._getPayloadMinWidth()&&.8*i._getWindowHeight()>i._getPayloadMinHeight(),n="no"!==t.getAttribute("data-"+PRODUCT_CODE+"-lightbox");return e&&!0===i.userAgentDetector.device.desktop&&n}),(function(e){i.embeds[a].lightboxWindow=e.contentWindow})),this.storeEmbed({elementId:a,element:t,embedPublicationUrl:f,linkElement:P,image:W,method:u,analytics:d,isProtected:!1,wheel:c,urlHash:v,thumbnailUrl:p,ratioPadding:S}))},l.prototype.storeEmbed=function(t){var i=this,n=e.document.createElement("div");t.element.appendChild(n),this.embeds[t.elementId]={id:t.elementId,url:t.embedPublicationUrl,element:t.element,container:n,link:t.linkElement,image:t.image,isProtected:t.isProtected,wheel:t.wheel,urlHash:t.urlHash,thumbnailUrl:t.thumbnailUrl,ratioPadding:t.ratioPadding},this._resizeEmbed({element:t.element,payloadContainer:n,linkElement:t.linkElement,publicationUrl:t.embedPublicationUrl,embedId:t.elementId,ratioPadding:t.ratioPadding}),this._addEvent(e,"resize",(function(){i.embeds[t.elementId]&&i._resizeEmbed({element:t.element,payloadContainer:n,linkElement:t.linkElement,publicationUrl:t.embedPublicationUrl,embedId:t.elementId,ratioPadding:t.ratioPadding})})),this._doResize=function(){i.embeds[t.elementId]&&i._resizeEmbed({element:t.element,payloadContainer:n,linkElement:t.linkElement,publicationUrl:t.embedPublicationUrl,embedId:t.elementId,ratioPadding:t.ratioPadding})},this.API_URL.length>0&&"no"!==t.analytics&&this._sendAnalytics(this.API_URL,t.embedPublicationUrl,t.method)},l.prototype.setEmbedPropertyById=function(e,t){if(!this.embeds.hasOwnProperty(e))return!1;var i=this.embeds[e];for(var n in t)t.hasOwnProperty(n)&&i.element.hasAttribute("data-"+PRODUCT_CODE+"-"+n)&&("lightbox"===n&&"boolean"==typeof t[n]&&(t[n]=t[n]?"yes":"no"),i.element.setAttribute("data-"+PRODUCT_CODE+"-"+n,t[n]),"width"!==n&&"height"!==n||(i.element.style[n]=t[n]));this._resizeEmbed({element:i.element,payloadContainer:i.container,linkElement:i.link,publicationUrl:i.url,embedId:e,ratioPadding:i.ratioPadding})},l.prototype._getPublicationThumbLink=function(e){return this.THUMBNAIL_URL+encodeURIComponent(e)+"&size=400"},l.prototype._getSelfhostPublicationThumbLink=function(e,t,i){var n=e.split("#")[0].split("?")[0];return i&&(n=e.split(i)[0]),n.lastIndexOf("/")===n.length-1&&(n=n.slice(0,n.length-1)),n+"/"+(t||("fbs"===PRODUCT_CODE?"files/cover300.jpg":"files/assets/cover300.jpg"))},l.prototype._sendAnalytics=function(t,i,n){this._ajax(t,(function(e,t){200!==t.status&&console.log(t)}),'{"RecordOnly":true,"Url":"'+i+'","EmbedDomain":"'+e.location.hostname+'"'+(n?',"EmbedMethod":"'+n+'"':"")+"}")},l.prototype._ajax=function(e,t,i,n){var o=new XMLHttpRequest;try{o.open(i?"POST":"GET",e,1),o.setRequestHeader("X-Requested-With","XMLHttpRequest"),o.setRequestHeader("Content-type","application/json"),n&&(o.timeout=n),o.onreadystatechange=function(){o.readyState>3&&t&&t(o.responseText,o)},o.send(i)}catch(s){window.console&&console.error(s)}},l.prototype._receiveMessage=function(e){var t=e.data;if(t&&t.fbPublicationUrl&&-1!==t.fbPublicationUrl.indexOf(e.origin))for(var i in this.embeds)if(this.embeds.hasOwnProperty(i)&&(this.embeds[i].contentWindow===e.source||this.embeds[i].lightboxWindow===e.source))if("openMobileLightbox"===t.action)this.openMobileLightbox(i);else if("closeLightbox"===t.action)this.closeMobileLightbox(i);else{var n=this.embeds[i].contentWindow,o=this.embeds[i].lightboxWindow;n&&n.postMessage("auth",this.embeds[i].url),o&&o.postMessage("auth",this.embeds[i].url)}},l.prototype.openMobileLightbox=function(t){var i=this,n=this.embeds[t].url+(-1===this.embeds[t].url.indexOf("?")?"?lightbox=true":"&lightbox=true");this.embeds[t].urlHash&&(n+="#"+this.embeds[t].urlHash),this.lightbox=e.document.createElement("div"),this.lightbox.style.position="fixed",this.lightbox.style.zIndex="9999",this.lightbox.style.top="0",this.lightbox.style.left="0",this.lightbox.style.width="100%",this.lightbox.style.height="100%",this.lightbox.style.opacity="0",this.lightbox.style.backgroundColor="#aaaaaa",this.lightbox.style.transition="opacity .5s ease-in-out",this.iframe=e.document.createElement("iframe"),this.iframe.style.width="100%",this.iframe.style.height="100%",this.iframe.setAttribute("type","text/html"),this.iframe.setAttribute("scrolling","no"),this.iframe.setAttribute("frameborder","0"),this.iframe.setAttribute("allowfullscreen","allowfullscreen"),this.iframe.setAttribute("allow","accelerometer; autoplay; encrypted-media; fullscreen *; gyroscope; picture-in-picture;"),this.iframe.setAttribute("src",n),this.setViewport(!1),this.lightbox.appendChild(this.iframe),setTimeout((function(){i.embeds[t].lightboxWindow=i.iframe.contentWindow}),10),e.document.body.appendChild(this.lightbox),e.scrollTo(0,-1),setTimeout((function(){var n=e.document.body.clientWidth/window.innerWidth;1!==n?(i.scale=n,e.scrollTo(0,-1),setTimeout((function(){e.scrollTo(0,-1),setTimeout((function(){i.lightbox.style.transformOrigin="top left",i.lightbox.style.transform="scale("+1/n+","+1/n+")",i.lightbox.style.height=e.innerHeight*n+"px",i.lightbox.style.width=e.innerWidth*n+"px",i.lightbox.style.opacity="1"}),100)}),200)):(i.lightbox.style.opacity="1",i.lightbox.style.height=e.innerHeight+"px",i.lightbox.style.width=e.innerWidth+"px"),i.mobileLightboxOpened=!0,e.addEventListener("resize",i.onMobileResizeBound),i.currentLigtboxId=t,e.history&&e.history.pushState&&(e.history.pushState({lightbox:!0},null,e.location.href),addEventListener("popstate",i.closeMobileLightboxBound))}),500)},l.prototype.closeMobileLightbox=function(t){t=t||this.currentLigtboxId;var i=this;e.history&&e.history.pushState&&removeEventListener("popstate",this.closeMobileLightboxBound),this.mobileLightboxOpened=!1,this.lightbox&&(i.setViewport(!0),setTimeout((function(){i.lightbox.style.opacity="0",setTimeout((function(){e.document.body.removeChild(i.lightbox),e.removeEventListener("resize",this.onMobileResizeBound),delete i.lightbox,delete i.iframe,delete i.currentLigtboxId,i.embeds[t].lightboxWindow=null,i.mobileLightboxOpened=!1}),1e3)}),0))},l.prototype.setViewport=function(e){var t=document.querySelector('meta[name="viewport"]');if(t)e||(this.savedViewport=t.content);else{if(!document.head||e)return;(t=document.createElement("meta")).name="viewport",document.head.appendChild(t)}e?this.savedViewport?t.setAttribute("content",this.savedViewport):t&&document.head.removeChild(t):t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, viewport-fit=cover")},l.prototype.onMobileResize=function(){if(this.mobileLightboxOpened){var t=this,i=this.userAgentDetector.os.ios&&(736===e.innerWidth||414===e.innerWidth);this.lightbox.style.width="100%",this.lightbox.style.height=e.innerHeight+"px",clearTimeout(this.resizeTimer),e.scrollTo(0,-1),this.resizeTimer=setTimeout((function(){var n=e.document.body.clientWidth/window.innerWidth;1!==t.scale||1!==n?(t.scale=n,t.lightbox.style.transformOrigin="top left",t.lightbox.style.transform="scale("+1/n+","+1/n+")",t.lightbox.style.height=e.innerHeight*n+"px",t.lightbox.style.width=e.innerWidth*n+"px"):(i&&e.scrollTo(0,-1),t.lightbox.style.height=e.innerHeight+"px",t.lightbox.style.width=e.innerWidth+"px",t.lightbox.style.transform="initial",t.lightbox.style.transformOrigin="initial")}),500)}},l.prototype._runPayload=function(t,i,n){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(i+=-1===i.indexOf("?")?"?embed=true":"&embed=true",this.embeds[n].isProtected&&(i+="&protected=true"),"true"!==this.embeds[n].wheel&&"yes"!==this.embeds[n].wheel||(i+="&wheel=true"),this.embeds[n].urlHash&&(i+="#"+this.embeds[n].urlHash),this._shouldShowPayload()&&!t.hasChildNodes()){var s=e.document.createElement("iframe");s.style.width="100%",s.style.height="100%",o&&(s.style.position="absolute",s.style.top=0,s.style.left=0),s.setAttribute("type","text/html"),s.setAttribute("scrolling","no"),s.setAttribute("frameborder","0"),s.setAttribute("allowfullscreen","allowfullscreen"),s.setAttribute("allow","accelerometer; autoplay; encrypted-media; fullscreen *; gyroscope; picture-in-picture;"),s.setAttribute("src",i),t.appendChild(s),this.embeds[n].contentWindow=s.contentWindow,this.embeds[n].iframe=s}},l.prototype._removePayload=function(e){for(var t=e.firstChild;t;)e.removeChild(t),t=e.firstChild;window.removeEventListener("message",this._receiveMessage,!1)},l.prototype._resizeEmbed=function(e){var t=e.element,i=e.payloadContainer,n=e.linkElement,o=e.publicationUrl,s=e.embedId,r=e.ratioPadding,l=this,a=this._getBoundingClientRect(t);if(0!==a.width&&0!==a.height){if(i.style.width=n.style.width=a.width+"px",i.style.height=n.style.height=a.height+"px",a.width>=this._getPayloadMinWidth()&&a.height>=this._getPayloadMinHeight()&&this._shouldShowPayload()){if(this.mobileLightboxOpened)return;this._runPayload(i,o,s,!!r),r?(i.style.position="relative",i.style.display="inline-block",i.style.paddingTop=r,i.style.height=0):i.style.display="inline",n.style.display="none"}else if(this._removePayload(i,s),t.style.minHeight=null,i.style.display="none",r?(n.style.position="relative",n.style.display="inline-block",n.style.paddingTop=r,n.style.height=0):n.style.display="block",this.embeds[s].image){var h=this.embeds[s].image,d=h.naturalWidth,u=h.naturalHeight,c=n.getBoundingClientRect(),g=c.width/c.height,p=d/u;d>0&&u>0&&c.height>0&&c.width>0&&(h.style.height=g>p?c.height:u*c.width/d,h.style.width=g>p?d*c.height/u:c.width)}}else setTimeout((function(){l._resizeEmbed({element:t,payloadContainer:i,linkElement:n,publicationUrl:o,embedId:s,ratioPadding:r})}),200)},l.prototype._getPayloadMinWidth=function(){return 400},l.prototype._getPayloadMinHeight=function(){return 200},l.prototype._getEmbedDefaultWidth=function(){return 250},l.prototype._getEmbedDefaultHeight=function(){return 150},l.prototype._shouldShowPayload=function(){return!!this.version},l.prototype._getPublicationThumbIcon=function(){return"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIxLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNp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V8iIGNsYXNzPSJzdDEiIGQ9Ik0xNCw2LjZ2MTkuOGwxMC01VjEuNkwxNCw2LjZ6Ii8+CgkJCQk8L2c+CgkJCTwvZz4KCQk8L2c+Cgk8L2c+CjwvZz4KPC9zdmc+Cg=="},l.prototype._getWindowWidth=function(){return e.innerWidth||e.document.documentElement.clientWidth||e.document.body.clientWidth},l.prototype._getWindowHeight=function(){return e.innerHeight||e.document.documentElement.clientHeight||e.document.body.clientHeight},l.prototype._getBoundingClientRect=function(e){var t=e.getBoundingClientRect();return{width:t.width||t.right-t.left,height:t.height||t.bottom-t.top,left:t.left,right:t.right,top:t.top,bottom:t.bottom}},l.prototype._getElementsByClass=function(t,i){if(void 0===i&&(i=e.document),"function"==typeof i.getElementsByClassName)return i.getElementsByClassName(t);var n=[],o=i.getElementsByTagName("*");for(var r in o)if(Object.prototype.hasOwnProperty.call(o,r)&&"object"===s(o[r])){var l=Object.prototype.hasOwnProperty.call(o[r],"className")?o[r].className:o[r].getAttribute("className"),a=null===l?[]:l.split(" ");-1!==this._indexOf(a,t)&&n.push(o[r])}return n},l.prototype._indexOf=function(e,t){if(null===e)return-1;for(var i=e.length,n=0;nn[s]?1:-1}return i.length!==n.length?-1:0}i.r(t),n.prototype.constructor=n,n.prototype.getSupportedVersions=function(){var e=[];if(this.userAgentInfo.device.desktop){if(this.userAgentInfo.browser.ie)(this.userAgentInfo.browser.version||"7.0").split(".")[0]>10&&e.push("html");else e.push("html")}else{var t=this.userAgentInfo.os.ios,i=this.userAgentInfo.os.ipados,n=this.userAgentInfo.os.android&&(parseInt(this.userAgentInfo.os.version.split(".")[0],10)>4||4===parseInt(this.userAgentInfo.os.version.split(".")[0],10)&&parseInt(this.userAgentInfo.os.version.split(".")[1],10)>=1);if(t||i||n)if((i||t&&parseInt(this.userAgentInfo.os.version.split(".")[0],10)>=10||n&&parseInt(this.userAgentInfo.os.version.split(".")[0],10)>=6)&&!this.userAgentInfo.browser.firefox)e.push("mobile");else{var s=navigator.userAgent.indexOf("Mozilla/5.0")>-1&&navigator.userAgent.indexOf("Android ")>-1&&navigator.userAgent.indexOf("AppleWebKit")>-1&&-1===navigator.userAgent.indexOf("Chrome");(t&&o(this.userAgentInfo.os.version,"9")>=0||n&&1===o(this.userAgentInfo.os.version,"4.2")&&!s)&&e.push("mobile-old")}}return e},n.prototype.mainVersion=function(){var e=this.getSupportedVersions();if(this.priorities){for(var t=0;t0)return e[0];return null},n.prototype.isRenderable=function(){return!0},t.default=n},function(e,t,i){"use strict";i.r(t),(function(e){var n=i(1),o=function(t,i){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=100,s=e.innerWidth-o,r=e.innerHeight-o,l=s/r,a=t/i,h=l>a?t*r/i:s,d=l>a?r:i*s/t;return n&&(h>t||d>i)?(h=t,d=i,s+=o,r+=o,o=0):(h=Math.round(h),d=Math.round(d)),{width:h,height:d,paddingTop:(r+o-d)/2,paddingLeft:(s+o-h)/2}};function s(e,t,i,n){var o=this;this.onClick=function(e){var s=!0;t&&(s=s&&t(e)),s&&(e.preventDefault(),o.render(e.currentTarget,i,n))},e.addEventListener("click",this.onClick),this._sizingBound=this.sizing.bind(this),this._closeBound=this.close.bind(this),this._receiveMessageBound=this._receiveMessage.bind(this),this._keyListenerBound=this._keyListener.bind(this)}s.prototype.render=function(e,t,i){this.blackout=document.createElement("div"),this.lightbox=document.createElement("div"),this.closeButton=document.createElement("button"),this.lightbox.setAttribute("role","dialog"),this.lightbox.style.position="absolute",this.lightbox.style.display="block",this.lightbox.style.margin="50px auto",this.lightbox.style.minWidth="200px",this.lightbox.style.minHeight="150px",this.lightbox.style.maxWidth="90%",this.lightbox.style.backgroundColor="#fff",this.lightbox.style.padding="10px",this.lightbox.style.borderRadius="5px",this.closeButton.style.width="30px",this.closeButton.style.height="30px",this.closeButton.style.top="-15px",this.closeButton.style.right="-15px",this.closeButton.style.position="absolute",this.closeButton.style.padding="0",this.closeButton.style.border="none",this.closeButton.style.background="transparent url("+this._getCloseIcon()+")",this.closeButton.style.cursor="pointer",this.blackout.style.width="100%",this.blackout.style.height="100%",this.blackout.style.backgroundColor="rgba(0, 0, 0, 0.7)",this.blackout.style.position="fixed",this.blackout.style.top="0px",this.blackout.style.left="0px",this.blackout.style.zIndex="12147483646",this.lightbox.appendChild(this.closeButton),this.blackout.appendChild(this.lightbox);var o=this;if(e.getAttribute("data-img")){var s=document.createElement("img");this.sizing(100,100,!0),s.onload=function(){o.width=s.width,o.height=s.height,o.sizing(s.width,s.height,!0),s.style.width="100%",s.style.height="100%",o.lightbox.appendChild(s)},s.src=e.getAttribute("data-img"),this._sizingBound=this.sizing.bind(this,this.width,this.height,!0)}else if(e.getAttribute("href")){var r=document.createElement("iframe"),l=e.getAttribute("href"),a=l.split("#");l=a[0],l+=-1===l.indexOf("?")?"?embed=true":"&embed=true",l+="&lightbox=true",l+=a[1]?"#"+a[1]:"",r.src=l,r.width="100%",r.height="100%",r.setAttribute("type","text/html"),r.setAttribute("scrolling","no"),r.setAttribute("frameborder","0"),r.setAttribute("allowfullscreen","allowfullscreen"),r.setAttribute("allow","accelerometer; autoplay; encrypted-media; fullscreen; gyroscope; picture-in-picture;"),this.width=e.getAttribute("data-width")||600,this.height=i?this.width/i:e.getAttribute("data-height")||400,this.sizing();var h=(new n.default).browser,d=h.ie?500:h.chrome?100:0;this.lightbox.appendChild(r),setTimeout((function(){t(r)}),10),setTimeout((function(){r.contentWindow.focus()}),d)}this.addCloseListeners(),document.body.appendChild(this.blackout),this.lightbox.addEventListener("wheel",this._preventer,{passive:!1}),this.blackout.addEventListener("wheel",this._preventer,{passive:!1})},s.prototype._preventer=function(e){e.preventDefault()},s.prototype._getCloseIcon=function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAEAUlEQVR42oWVbWwUZRDH/+3e9l5h2yu9tsddX+hRWnupR2uFQK8hMWnrGcRCCKGKcJQ0aKgmJh4mJFWspmArYgiQGtvqN0MipOIXPyARRSIagYgJIRI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/cD1wcfkMpjCOEHt64OMofQzpA5CNbnjhx3PYjdcwbBg1jGHMMFo8zF+72epnrxvaAMwbvZA4mwb4OOxpbEE/drD2Ywt/+dnawF599Ob9XxhhRRmH1KIRXg5vY/XxWyNbqthj1XPNw1mVHYgcYoYFVk0tMLNFVFbMxvyPFBXQAvIP9TCL+Lre4wwAAAAASUVORK5CYII="},s.prototype.sizing=function(e,t,i){e=e||this.width,t=t||this.height;var n=o(e,t,i=i||!1);this.lightbox.style.width=n.width+"px",this.lightbox.style.height=n.height+"px",this.lightbox.style.top=n.paddingTop+"px",this.lightbox.style.left=n.paddingLeft+"px",this.lightbox.style.margin="0"},s.prototype.close=function(t){t.stopPropagation(),this.blackout.parentNode.removeChild(this.blackout),e.history&&e.history.pushState&&window.removeEventListener("popstate",this._closeBound),window.removeEventListener("resize",this._sizingBound),window.removeEventListener("message",this._receiveMessageBound,!1),window.removeEventListener("keyup",this._keyListenerBound),this.closeButton.removeEventListener("click",this._closeBound),this.blackout.removeEventListener("click",this._closeBound)},s.prototype._receiveMessage=function(e){var t=e.data;t&&t.fbPublicationUrl&&-1!==t.fbPublicationUrl.indexOf(e.origin)&&"closeLightbox"===t.action&&this.close(e)},s.prototype._keyListener=function(e){27===e.keyCode&&this.close(e)},s.prototype.addCloseListeners=function(){e.history&&e.history.pushState&&(e.history.pushState({lightbox:!0},null,e.location.href),window.addEventListener("popstate",this._closeBound)),window.addEventListener("resize",this._sizingBound),window.addEventListener("message",this._receiveMessageBound,!1),window.addEventListener("keyup",this._keyListenerBound),this.closeButton.addEventListener("click",this._closeBound),this.blackout.addEventListener("click",this._closeBound)},t.default=s}).call(this,i(0))}]);