* the script element above uses the SPU in the query string to identify the store.
* it's also important that the script element has id="upserve-olo-script"
* secondly, clickable elements to open up the OLO widget should have class "upserve-olo-opener"
# @author: upserve.com
* @version: 0.1.0
*/
!function(e,t,n){var s={},o="https://app.upserve.com/s/",r={idTag:"Upserve Widget: please check the script element that was copied--it should include id='upserve-olo-script'.",spu:"Upserve Widget: unable to determine store. Please check the code snippet copied from the Breadcrumb Online Ordering settings.",targets:"Upserve Widget: unable to find click targets. Make sure links or buttons have 'upserve-olo-opener' as a class."};try{var i=function(t){if(t.preventDefault(),e.screen.width<400||!s.cssLoaded){var n=e.open();return n.opener=null,n.location=o+s.spu,!1}l(t)},l=function(){s&&s.container||(s.container=c()),s.container.style.visibility="visible",s.container.style.display="flex",setTimeout(function(){s.section.classList.add("slide-in"),s.overlay.classList.add("fade-in")},10)},a=function(){s.closer.classList.add("fade-out"),s.section.classList.add("slide-out"),s.section.classList.remove("slide-in"),s.overlay.classList.remove("fade-in"),setTimeout(function(){s.container.style.visibility="hidden",s.container.style.display="none",s.section.classList.remove("slide-out"),s.closer.classList.remove("fade-out")},350)},c=function(){return s.container=t.createElement("div"),s.container.className="up-olo-container",s.overlay=t.createElement("div"),s.overlay.className="up-olo-overlay",s.section=t.createElement("section"),s.section.className="up-olo-section",s.iframe=t.createElement("iframe"),s.iframe.className="up-olo-iframe",s.iframe.setAttribute("frameborder",0),s.closer=t.createElement("div"),s.closer.className="up-olo-closer",s.closer.innerHTML="×",s.closer.setAttribute("role","button"),s.closer.setAttribute("aria-label","Close online ordering widget"),s.closer.addEventListener("click",a),s.spinner=t.createElement("div"),s.spinner.className="up-olo-spinner",s.spinnerLogo=t.createElement("div"),s.spinnerLogo.className="up-olo-logo",s.spinner.appendChild(s.spinnerLogo),s.section.appendChild(s.iframe),s.section.appendChild(s.spinner),s.container.appendChild(s.overlay),s.container.appendChild(s.section),s.container.appendChild(s.closer),s.iframe.src=o+s.spu,s.iframe.onload=function(e){s.spinner.classList.add("fade-out"),setTimeout(function(){s.spinner.style.visibility="hidden",s.spinner.style.display="none"},450)},t.body.appendChild(s.container),s.container},d=t.getElementById("upserve-olo-script");if(!d)throw new Error(r.idTag);if(s.spu=d.getAttribute("src")&&d.getAttribute("src").split("?")[1],!s.spu||s.spu.length<3)throw new Error(r.spu);s.style=t.createElement("link"),s.style.rel="stylesheet",s.style.media="all",s.style.crossOrigin="anonymous";var p=new URL(d.getAttribute("src")).origin;s.style.href=p+"/platform/a70c0869ce3903e419b0/olo-widget.a70c0869ce3903e419b0.css",d.parentNode.appendChild(s.style);var u=0,f=setInterval(function(){s.style.sheet&&s.style.sheet.cssRules&&(s.cssLoaded=!0,clearInterval(f)),u>300&&clearInterval(f),u+=1},50),m=t.querySelectorAll(".upserve-olo-opener");if(m.length<1)throw new Error(r.targets);m.forEach(function(e){e.addEventListener("click",i)})}catch(t){e.console&&e.console.warn(t)}}(window,document)},"./styles/olo-widget.css":function(e,t){},1:function(e,t,n){n("./src/olo-widget.js"),e.exports=n("./styles/olo-widget.css")}});