{"scripts":["(function() {\r\n  // Google Tag Manager script with id=\"gtm-script\"\r\n  (function(w,d,s,l,i) {\r\n    w[l] = w[l] || [];\r\n    w[l].push({'gtm.start': new Date().getTime(), event: 'gtm.js'});\r\n    var f = d.getElementsByTagName(s)[0],\r\n        j = d.createElement(s),\r\n        dl = l != 'dataLayer' ? '&l=' + l : '';\r\n    j.async = true;\r\n    j.id = 'gtm-script';\r\n    j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;\r\n    f.parentNode.insertBefore(j, f);\r\n  })(window, document, 'script', 'dataLayer', '${gtmId}');\r\n\r\n  // Noscript iframe for GTM\r\n  var iframe = document.createElement('iframe');\r\n  iframe.src = 'https://www.googletagmanager.com/ns.html?id=${gtmId}';\r\n  iframe.height = '0';\r\n  iframe.width = '0';\r\n  iframe.style.display = 'none';\r\n  iframe.style.visibility = 'hidden';\r\n  document.body.appendChild(iframe);\r\n})();","(function() {\r\n    var script = document.createElement('script');\r\n    script.src = 'https://api.search.gov.sg/v1/searchconfig.js?clientId=${searchSgClientId}';\r\n    script.defer = true;\r\n    document.head.appendChild(script);\r\n})();\r\n(function() {\r\n    if (window.location.pathname === '/search-results') {\r\n        var script = document.createElement('script');\r\n        script.src = 'https://api.search.gov.sg/v1/searchconfig.js?clientId=${searchSgClientId}&page=result';\r\n        script.defer = true;\r\n        document.head.appendChild(script);\r\n    }\r\n})();\r\n(function() {\r\n    document.head.insertAdjacentHTML('beforeend',`\r\n        <style id=\"search-custom-style\">\r\n           #view-all-result-btn > span > h5 {\r\n             font-family: inherit !important;\r\n             font-size: inherit !important;\r\n             font-weight: inherit !important;\r\n             line-height: inherit !important;\r\n             color: inherit !important;\r\n           }\r\n        </style>\r\n    `);\r\n})();","(function () {\r\n    if (\r\n        window.location.pathname === '/parking/applying-for-season-parking/apply-for-season-parking' ||\r\n        window.location.pathname === '/parking/renewing-season-parking/renew-season-parking' ||\r\n        window.location.pathname === '/parking/transferring-season-parking/transfer-season-parking'\r\n    ) {\r\n        var script = document.createElement('script');\r\n        script.id = 'ze-snippet';\r\n        script.src = 'https://static.zdassets.com/ekr/snippet.js?key=e6f7d121-8e95-4169-9f5c-c6f099dae343';\r\n        script.async = false;\r\n        document.head.insertBefore(script, document.head.firstChild);\r\n\r\n        window.zESettings = {\r\n            webWidget: {\r\n                launcher: {\r\n                    chatLabel: {\r\n                        '*': 'Live Chat'\r\n                    }\r\n                },\r\n                offset: {\r\n                    vertical: '200px',\r\n                    mobile: {\r\n                        vertical: '55px',\r\n                    }\r\n                }\r\n            }\r\n        };\r\n\r\n        (function (w, t, c, p, s, e) {\r\n            p = new Promise(function (r) {\r\n            w[c] = {\r\n                client: function () {\r\n                    if (!s) {\r\n                        s = document.createElement(t); s.src = 'https://js.cobrowse.io/CobrowseIO.js'; s.async = 1;\r\n                        e = document.getElementsByTagName(t)[0]; e.parentNode.insertBefore(s, e); s.onload = function () { r(w[c]); };\r\n                    } return p;\r\n                }\r\n            };\r\n            });\r\n        })(window, 'script', 'CobrowseIO');\r\n        CobrowseIO.license = \"H4AMY_l12D1ybQ\";\r\n        CobrowseIO.client().then(function () {\r\n            CobrowseIO.ignoredViews = ['[data-product=web_widget]'];\r\n            CobrowseIO.start();\r\n        });\r\n\r\n  }\r\n\r\n    document.head.insertAdjacentHTML('beforeend', `\r\n<style>\r\n    #launcher {\r\n        right: auto !important;\r\n        left: 0px !important;\r\n        margin: 0px -122px !important;\r\n        transform: rotate(90deg) !important;\r\n        transform-origin: right;\r\n        z-index: 2147483647 !important;\r\n    }\r\n    @media (max-width: 760px) {\r\n        #launcher {\r\n           margin: 0px 0px !important;\r\n\t   transform: rotate(-90deg) !important;\r\n        }\r\n    }\r\n    #webWidget {\r\n\tleft: 0 !important;\r\n\tright: auto !important;\r\n        bottom: 0 !important;\r\n        margin-top: 0 !important;\r\n        z-index: 2147483647 !important;\r\n    }\r\n</style>\r\n`);\r\n})();","(function() {\r\n  // Webchat script with id=\"webchat\"\r\n  var url = window.location.href.toLowerCase();\r\n  var query = window.location.search.toLowerCase();\r\n\r\n// var isSitecorePreview = \r\n//   query.indexOf(\"sc_mode=preview\") > -1 ||\r\n//   query.indexOf(\"sc_mode=edit\") > -1 ||\r\n//   url.indexOf(\"sc_mode=preview\") > -1 ||\r\n//   url.indexOf(\"sc_mode=edit\") > -1 ||\r\n//   document.body.classList.contains(\"scEnabledChrome\");\r\n\r\n    var isCM = \r\n    window.location.hostname.indexOf(\"wcms-portal\") > -1 ||\r\n    query.indexOf(\"sc_mode=preview\") > -1 ||\r\n    query.indexOf(\"sc_mode=edit\") > -1 ||\r\n    url.indexOf(\"sc_mode=preview\") > -1 ||\r\n    url.indexOf(\"sc_mode=edit\") > -1 ||\r\n    document.body.classList.contains(\"scEnabledChrome\");\r\n\r\n  if (isCM) {\r\n    return;\r\n  }\r\n\r\n  var webchatScript = document.createElement('script');\r\n  // webchatScript.id = \"webchat\";\r\n  webchatScript.src = 'https://webchat.vica.gov.sg/static/js/chat.js';\r\n  webchatScript.async = true;\r\n\r\n  webchatScript.onload = function () {\r\n  };\r\n\r\n  webchatScript.onerror = function () {\r\n    console.error(\"[Webchat] Failed to load VICA webchat script\");\r\n  };\r\n\r\n  document.head.appendChild(webchatScript);\r\n})();\r\n\r\n(function() {\r\n  var url = window.location.href.toLowerCase();\r\n  var query = window.location.search.toLowerCase();\r\n\r\n  var isSitecorePreview = \r\n    query.indexOf(\"sc_mode=preview\") > -1 ||\r\n    query.indexOf(\"sc_mode=edit\") > -1 ||\r\n    url.indexOf(\"sc_mode=preview\") > -1 ||\r\n    url.indexOf(\"sc_mode=edit\") > -1\r\n    document.body.classList.contains(\"scEnabledChrome\");\r\n\r\n  if (isSitecorePreview) {\r\n    return;\r\n  }\r\n\r\n    document.head.insertAdjacentHTML(\r\n  \"beforeend\", \r\n  `\r\n<style>\r\n    :root {\r\n        --vica-app-position-right: 32px !important;\r\n        --vica-app-position-bottom: 96px !important;\r\n    }\r\n\r\n    #CONVERSATION_HISTORY * {\r\n        line-height: 24px !important;\r\n    }\r\n\r\n    #CONVERSATION_HISTORY \r\n  div:nth-child(1)\r\n  > div:nth-child(2)\r\n  > div:nth-child(1)\r\n  > div:nth-child(1)\r\n  > div:nth-child(2)\r\n  > div:nth-child(1)\r\n  > div\r\n  > div\r\n  > div\r\n  > div:nth-child(2)\r\n  > div\r\n  > span {\r\n        line-height: normal !important;\r\n    }\r\n\r\n    #CONVERSATION_HISTORY p {\r\n        font-weight: inherit !important;\r\n    font-size: inherit !important;\r\n    }\r\n\r\n    #CONVERSATION_HISTORY\r\n      div:nth-child(1)\r\n      > div:nth-child(1)\r\n      > div:nth-child(2)\r\n      > div {\r\n        font-weight: bold !important;\r\n        font-size: 18px !important;\r\n        line-height: normal !important;\r\n    }\r\n</style>\r\n`\r\n);\r\n\r\nfunction applyMobileLauncherPosition() {\r\n  if (window.innerWidth > 767) return;\r\n\r\n  var host = document.querySelector(\"#webchat\");\r\n  var root = host && host.shadowRoot;\r\n  var img = root && root.querySelector('[data-testid=\"expand-chat-logo\"]');\r\n  var launcher = img && img.parentElement;\r\n\r\n  if (!launcher) return;\r\n\r\n  var styles = {\r\n    left: \"auto\",\r\n    top: \"auto\",\r\n    right: \"32px\",\r\n    bottom: \"96px\"\r\n  };\r\n\r\n  Object.keys(styles).forEach(function (property) {\r\n    if (launcher.style.getPropertyValue(property) !== styles[property] ||\r\n        launcher.style.getPropertyPriority(property) !== \"important\") {\r\n      launcher.style.setProperty(property, styles[property], \"important\");\r\n    }\r\n  });\r\n}\r\n\r\nfunction watchLauncher() {\r\n  var hostObserver = new MutationObserver(function () {\r\n    var host = document.querySelector(\"#webchat\");\r\n\r\n    if (!host || !host.shadowRoot) return;\r\n\r\n    applyMobileLauncherPosition();\r\n\r\n    if (hostObserver) hostObserver.disconnect();\r\n\r\n    var shadowObserver = new MutationObserver(applyMobileLauncherPosition);\r\n    shadowObserver.observe(host.shadowRoot, {\r\n      subtree: true,\r\n      childList: true,\r\n      attributes: true,\r\n      attributeFilter: [\"style\"]\r\n    });\r\n  });\r\n\r\n  hostObserver.observe(document.body, {\r\n    childList: true,\r\n    subtree: true\r\n  });\r\n\r\n  applyMobileLauncherPosition();\r\n}\r\n\r\nwatchLauncher();\r\n})();","(function() {\r\n  var script = document.createElement('script');\r\n  script.src = 'https://assets.wogaa.sg/scripts/wogaa.js';\r\n  document.head.appendChild(script);\r\n})();\r\n"]}