﻿(function() { var c = function(e) { (typeof console != "undefined") && console.debug(e) }, d = function(e, f) { return Object.prototype.hasOwnProperty.call(e, f) }, b = function(g, f) { for (var e in f) { if (d(f, e) && !d(g, e)) { g[e] = f[e] } } return g }, a; if (window.chaordic) { c("[WARN] Chaordic loader already present."); return } window.chaordic = { setup: function(f) { f = b({}, f); if (!f.API_KEY) { c('[ERROR] No apiKey present. Please define the "API_KEY" property'); return } if (!f.ENVIRONMENT) { c('[ERROR] No environment present. Please define the "ENVIRONMENT" property') } chaordic.Config = f; var j = { PROTOCOL: ("https:" == location.protocol) ? "https://" : "http://", ENVIRONMENT: "HOMOLOGATION", DYNAMIC_CONTEXT: "/raas/", STATIC_CONTEXT: "/static/" + f.API_KEY + "/", VERSION: "0-0-0R0" }, i = { PRODUCTION: { DYNAMIC_HOST: f.API_KEY + "-raas.chaordicsystems.com", STATIC_HOST: "static.chaordicsystems.com" }, HOMOLOGATION: { DYNAMIC_HOST: "mirror-raas.chaordicsystems.com", STATIC_HOST: "mirror-raas.chaordicsystems.com", LOG: true }, DEVELOPMENT: { DYNAMIC_HOST: location.host, STATIC_HOST: location.hostname, LOG: true }, RESEARCH: { DYNAMIC_HOST: location.host, STATIC_HOST: location.hostname, SHOW_INSPECTION_DATA: true, LOG: true} }, g = document.getElementsByTagName("body")[0] || document.documentElement, h = new Date().getTime(), e = document.createElement("script"); if (a) { c("[WARN] chaordic.setup() already called."); return } a = true; b(f, j); if (!d(i, f.ENVIRONMENT)) { c('[WARN] Unknown environment "' + f.ENVIROMNENT + '", using default: ' + j.ENVIRONMENT); f.ENVIRONMENT = j.ENVIRONMENT } b(f, i[f.ENVIRONMENT]); e.setAttribute("charset", "UTF-8"); e.src = f.PROTOCOL + f.STATIC_HOST + f.STATIC_CONTEXT + "current.js?t=" + h; g.insertBefore(e, g.firstChild) } } })();

var config = {
    API_KEY: "pontofrio",
    ENVIRONMENT: "PRODUCTION"
};
chaordic.setup(config);
