<!doctype html>
<html lang="en" class="js flexbox flexboxlegacy canvas canvastext webgl no-touch geolocation postmessage websqldatabase indexeddb hashchange history draganddrop websockets rgba hsla multiplebgs backgroundsize borderimage borderradius boxshadow textshadow opacity cssanimations csscolumns cssgradients cssreflections csstransforms no-csstransforms3d csstransitions fontface no-generatedcontent video audio localstorage sessionstorage webworkers applicationcache svg inlinesvg smil svgclippaths desktop landscape windows windows7 windows7_0 64bit chrome chrome40 chrome40_0 webkit en-us silverlight flash java ng-scope" lang="" ng-cloak>
<head>
    <base href="/cl-gateway/">
    <!--[if IE]><script type="text/javascript">
        // Fix for IE ignoring relative base tags.
        // See http://stackoverflow.com/questions/3926197/html-base-tag-and-local-folder-path-with-internet-explorer
        (function() {
            var baseTag = document.getElementsByTagName('base')[0];
            baseTag.href = baseTag.href;
        })();
    </script><![endif]-->
    <title>ADP - CandidateLink</title>
    <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
    <meta charset="utf-8"/>
    <meta content="width=device-width, initial-scale=1, minimum-scale=1.0" name="viewport"/>
    <meta content="text/html;charset=UTF-8" http-equiv="content-type"/>
    <meta content="deny" http-equiv="X-Frame-Options"/>
    <meta context="yes" name="apple-mobile-web-app-capable"/>
    <meta context="black" name="apple-mobile-web-app-status-bar-style"/>

    <link href="css/ng-revit/ng-revit-bootstrap1.min.css" rel="stylesheet">
    <link href="css/ng-revit/ng-revit-bootstrap2.min.css" rel="stylesheet">
    <link href="css/ng-revit/ng-revit-bootstrap3.min.css" rel="stylesheet">

    <style type="text/css">
        /*[ng\:cloak], [ng-cloak], .ng-cloak {
                display: none !important;
            }*/

        @charset "UTF-8";
        [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak, .ng-hide:not
		(.ng-hide-animate ) {
            display: none !important;
        }

        ng\:form {
            display: block;
        }
    </style>

    <script>
        function getCookie(name) {
            var value = "; " + document.cookie;
            var parts = value.split("; " + name + "=");
            if (parts.length == 2) return parts.pop().split(";").shift();
        }

        window.onload = function() {
            // accessibility fixes
            var lang = getCookie('ADPLangLocaleCookie');
            if (lang) {
                document.documentElement.lang = lang;
            }
            var textAngEle = document.getElementById("textAngular-editableFix-010203040506070809");
            if (textAngEle) {
                textAngEle.setAttribute("aria-label", "Text Angular Editor");
                textAngEle.setAttribute("tabindex", "-1");
            }
        }

        function reloadOnce() { // DE195292: reload to ensure client has session cookie to be sent with login request
            console.log('in window.onload');
            if (!window.location.hash) {
                window.location = window.location + '#loaded';
                window.location.reload();
            }
        }

        function get_browser() {
            var ua = navigator.userAgent, tem,
                M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
            if (/trident/i.test(M[1])) {
                tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
                return 'IE ' + (tem[1] || '');
            }
            if (M[1] === 'Chrome') {
                tem = ua.match(/\bOPR\/(\d+)/)
                if (tem != null) {
                    return 'Opera ' + tem[1];
                }
            }
            M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];
            if ((tem = ua.match(/version\/(\d+)/i)) != null) {
                M.splice(1, 1, tem[1]);
            }
            return M[0];
        }

        function get_browser_version() {
            var ua = navigator.userAgent, tem,
                M = ua.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
            if (/trident/i.test(M[1])) {
                tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
                return 'IE ' + (tem[1] || '');
            }
            if (M[1] === 'Chrome') {
                tem = ua.match(/\bOPR\/(\d+)/)
                if (tem != null) {
                    return 'Opera ' + tem[1];
                }
            }
            M = M[2] ? [M[1], M[2]] : [navigator.appName, navigator.appVersion, '-?'];
            if ((tem = ua.match(/version\/(\d+)/i)) != null) {
                M.splice(1, 1, tem[1]);
            }
            return M[1];
        }

        function browserCheck() {
            var browser = get_browser();
            var browser_version = get_browser_version();
            browser = browser.toUpperCase();

            if (browser === "MSIE") {
                if (!(browser_version === "10")) {
                    var url = window.location.protocol + "//" + window.location.host + "/cl-gateway/app/layout/legacyBrowser.html";
                    window.location.replace(url);
                } else {
                    window.onload = reloadOnce;
                }
            } else if (browser === 'IE 11') {
                window.onload = reloadOnce;
            }

        }

        browserCheck();

    </script>
  <script type="module" crossorigin src="/cl-gateway/assets/index-pzJvp73_.js"></script>
  <link rel="modulepreload" crossorigin href="/cl-gateway/assets/ui-select-open-on-focus.directive-Dag9_JnP.js">
  <link rel="stylesheet" crossorigin href="/cl-gateway/assets/index-kR7Du2oC.css">
</head>

<body class="ng-cloak" ng-cloak ng-controller="GlobalController as global">
<div class="login" id="login" ng-class="!global.hasAltStyle() ? 'standard-style' : 'alt-style'">

    <div ng-include="'app/layout/header.html'"></div>

    <div class="login-view" ui-view></div>

    <div ng-include="'app/layout/footer.html'"></div>
</div>
<script>
  // Start session initialization as early as possible
  window.__sessionInit = (function() {
    function getParam(name) {
      var match = window.location.search.match(new RegExp('[?&]' + name + '=([^&]+)'));
      return match ? encodeURIComponent(decodeURIComponent(match[1])) : '';
    }

    console.log('Session init: Current URL:', window.location.href);
    console.log('Session init: Search params:', window.location.search);

    var params = ['custSnippet', 'authToken', 'custNum', 'clType']
      .map(function(p) {
        var v = getParam(p);
        console.log('Session init: Found param', p, '=', v);
        return v ? p + '=' + v : '';
      })
      .filter(Boolean)
      .join('&');

    var initUrl = '/cl-gateway/resource/session/init';
    if (params) {
      initUrl += '?' + params;
    }

    console.log('Session init: Calling:', initUrl);

    return fetch(initUrl, { credentials: 'include' })
      .then(function(response) {
        console.log('Session init response:', response.status, response.statusText);
        if (!response.ok) throw new Error('Session init failed');
        // Inject client.css (no params)
        var link = document.createElement('link');
        link.rel = 'stylesheet';
        link.href = '/cl-gateway/resource/config/client.css';
        document.head.appendChild(link);
      })
      .catch(function(error) {
        console.error('Session init failed:', error);
        throw error;
      });
  })();
</script>
<!-- Vite will inject the correct script in production; keep this static -->
<script src="js/webcomponentsjs/lite.js" type="text/javascript"></script>
<script src="js/ng-revit/ng-revit-bootstrap.min.js" type="text/javascript"></script>
<script>
  // Wait for session init before bootstrapping AngularJS
  window.__sessionInit
    .then(function() {
      angular.element(document).ready(function() {
        angular.bootstrap(document, ['cl.gateway']);
      });
    })
    .catch(function() {
      document.body.innerHTML = '<div style="color:red;text-align:center;margin-top:2em;">Session initialization failed. Please refresh or contact support.</div>';
    });
</script>
</body>
</html>