  <script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script>
  <script>
    var cubeeVars = {"api_key":"qTh5TYUI41gn4dZjCWFNFEY4pJ6gUKdR","language":""};
    var cartURL = "https:\/\/print.biocraftlab.at\/index.php\/cart\/";
    var currencyCode = "EUR";
    window.addEventListener('message', event => {
      event.stopPropagation()
      // * If this is the handshake, then send the apikey
      // if (!event.origin.startsWith('https://ondemand.cubee3d.com')) {
      if (event.origin.startsWith('https://ondemand.staging.cubee3d.com') || event.origin.startsWith('https://ondemand.cubee3d.com')) {
      // if (event.origin.startsWith('http://localhost')) {
        if (event.data.handshake) {
          document.querySelector('iframe').contentWindow.postMessage({
            handshake: {
              apiKey: cubeeVars.api_key,
              lang: cubeeVars.language,
              currencyCode
            }
          }, '*')
          // * In production, use real ondemand url
          // }, 'https://ondemand.staging.cubee3d.com')
          // }, 'https://ondemand.cubee3d.com')
          // * !

          // * if this is the submit button, initiate the add to cart
        } else if (event.data.onAddToCart) {
          document.querySelector('iframe').contentWindow.postMessage({
            isLoading: true
          }, '*')
          jQuery(document).ready(function($) {})
          const models = event.data.onAddToCart.models
          const numOfProducts = models.length
          const checkAndRedirect = (currentIDX) => {
            if (currentIDX + 1 === numOfProducts) window.location.href = cartURL
          }
          models.forEach((model, idx) => {
            setTimeout(() => {
              res = jQuery.ajax({
                // url: "../../wpsite/wp-admin/admin-ajax.php",
                url: "../../wp-admin/admin-ajax.php",
                data: {
                  'action': 'data',
                  'fileName': model.fileName,
                  'material': model.material,
                  'color': model.color,
                  'layerHeight': model.layerHeight,
                  'infill': model.infill,
                  'isVase': model.isVase,
                  'isSupports': model.isSupports,
                  'printTime': model.printTime,
                  'fileId': model.fileId,
                  'copies': model.copies,
                  'price': model.price,
                  'weight': model.weight,
                  'dimensions': `${model.dimensions.width}x${model.dimensions.length}x${model.dimensions.height}`,
                  'downloadURL': model.downloadURL,
                },
                success: function() {
                  checkAndRedirect(idx)
                }
              })
            }, 2000 * idx)
          });
        }
      } else {
        // ! This event is not from us, unauthorized!
      }
    });
  </script>
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://print.biocraftlab.at/wp-sitemap.xsl" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://print.biocraftlab.at/index.php/product/hoodie-with-logo/</loc></url><url><loc>https://print.biocraftlab.at/index.php/product/circle-50mm-stl/</loc></url><url><loc>https://print.biocraftlab.at/index.php/product/circle-50mm-stl-2/</loc></url><url><loc>https://print.biocraftlab.at/index.php/product/titanium-4-stl/</loc></url></urlset>
