( function() {  var mapping = [{"appname":"", "appid":"CSP_APPS_SAM_RH71_FLEXCOM_SPI_EEPROM_READ_WRITE", "path":"GUID-3A4D1EF4-3DCD-469F-9CD8-1815D8836FC5.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_FLEXCOM_USART_INTERRUPT", "path":"GUID-0C993160-4114-4B35-92DF-A78D251F2380.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_FLEXCOM_USART_RING_BUFFER", "path":"GUID-ABCFC2EA-66EB-411A-AAD3-08F2DBF3EE33.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_HEFC_FLASH_READ_WRIT", "path":"GUID-03ACE04F-23FB-45D8-B9B2-417D9A55E238.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_HSDRAMC_READ_WRITE", "path":"GUID-CB14B2C6-CD14-44F0-9819-B3BB971DC7D9.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_MCAN_BLOCKING", "path":"GUID-5510EE1F-1D06-4E58-9B58-3097DE5F51D8.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_MPU_CACHE_COHERENCY", "path":"GUID-FC4731AC-128B-4B93-9A8B-A2D16441BA5C.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_RTT_PERIODIC_INTERRUPT", "path":"GUID-CE558676-A181-4AF1-92A4-2D342A209085.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_SYSTICK_PERIODIC_INTERRUPT", "path":"GUID-4A28E9BC-0423-422B-A1F3-F7E574312ED8.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_TC_CAPTURE_MODE", "path":"GUID-09A76672-4C34-4A59-A5B9-4F9736016511.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_TC_COMPARE_MODE", "path":"GUID-D2F83CEE-B10E-4C9D-A045-88BD1173A15D.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_TCM_CACHE_COHERENCY", "path":"GUID-CC627BBC-C3C8-4371-A46D-E686E5CD887E.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_XDMAC_MEMORY_TRANSFER", "path":"GUID-B96FBEDA-A7C7-44D7-9FF1-DCF6FDB5F15C.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_RTC_ALARM_INTERRUPT", "path":"GUID-F429B3EE-DE1A-4B3A-968F-E06C2DF0D3E7.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_PWM_GENERATION", "path":"GUID-606F1069-5A01-4D3C-973C-D83D113D3306.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_PIO_POLLING", "path":"GUID-56D09090-A360-4599-8883-C9CE4C6EEBD0.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_PIO_INTERRUPT", "path":"GUID-8C4AB3E5-1469-470A-890C-97A3EE557A8B.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_MCAN_FD_INTERRUPT", "path":"GUID-31244D3C-EDAF-46B4-BF10-EEFBA4740369.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_MCAN_FD_BLOCKING", "path":"GUID-3978DD4F-B38A-49E1-AAA1-97354FCC574E.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_FLEXCOM_USART_BLOCKING", "path":"GUID-0A648EE7-99E9-4D35-8FE7-611BA96AA583.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_FLEXCOM_TWI_I2C_EEPROM", "path":"GUID-338354D7-4210-4CA7-A141-C154D7DB5F6F.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_CLOCK_CONFIGURATION", "path":"GUID-868B60F0-7A28-4E57-8B9C-A3C7FB19419D.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_CACHE_MAINTENANCE", "path":"GUID-FEC1DFEC-C1A3-4967-8879-D02DE309C3AF.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_INTRODUCTION", "path":"GUID-938073CA-4626-477A-8909-9C17D6AC1A14.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_TRNG_RANDOM_NUMBER", "path":"GUID-897B7878-DDB4-416F-9741-2F82567F734F.html"},{"appname":"", "appid":"CSP_APPS_SAM_RH71_TC_TIMER_MODE", "path":"GUID-76C69F03-B207-4121-A2B0-CE897833BB7D.html"}];
            var mchp = (function (mchp) {
                var mchp = mchp || {};
                var mapping = [];
        
                mchp.utils = {};
        
                mchp.utils.getQueryParam = function (name, url = window.location.href) {
                  name = name.replace(/[\[\]]/g, "\\$&");
                  var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
                    results = regex.exec(url);
                  if (!results) return null;
                  if (!results[2]) return "";
                  return decodeURIComponent(results[2].replace(/\+/g, " "));
                };

                mchp.utils.isFirefox = typeof InstallTrigger !== 'undefined';
        
                mchp.init = function (options) {
                  mchp.mapping = options.mapping || [];
                  mchp.bindEvents();
                };
        
                mchp.bindEvents = function () {
                    if (mchp.utils.isFirefox) {
                      window.onload = mchp.checkRedirect;
                    } else {
                      document.onreadystatechange = mchp.checkRedirect;
                    }
                };

                mchp.checkRedirect = function() {
                  var contextId = mchp.utils.getQueryParam("contextId") || "";
                  if (contextId && contextId != undefined) {
                    var record = mchp.mapping.find(function(x){
                      return x.appid && x.appid.toLowerCase() == contextId.toLowerCase();
                    });
                    if (record && record.path) {
                      window.stop();
                      window.location = record.path;
                    }
                  }
                };
        
                return {
                  init: mchp.init,
                };
              })();
        
              mchp.init({
                mapping: mapping
              });

        })();