PageSourceSearch

https://ainsdalemedicalcentre.nhs.uk/js/nhsuk-9.6.1.min.js

js ainsdalemedicalcentre.nhs.uk collected 2026-10-05 22:51:43 UTC 20,240 bytes, 2 lines download raw bytes

1!function(){var e={848:function(e){e.exports={toggleAttribute:function(e,t){if(e&&t){var n="true"===e.getAttribute(t)?"false":"true";e.setAttribute(t,n)}},toggleConditionalInput:function(e,t){if(e&&t){var n=e.getAttribute("aria-controls");if(n){var i=document.getElementById(n);i&&(e.checked?(i.classList.remove(t),e.setAttribute("aria-expanded","true")):(i.classList.add(t),e.setAttribute("aria-expanded","false")))}}},generateUniqueID:function(){var e=(new Date).getTime();return void 0!==window.performance&&"function"==typeof window.performance.now&&(e+=window.performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))},setFocus:function(e,t){void 0===t&&(t={});var n=e.getAttribute("tabindex");function i(){e.removeEventListener("blur",i),t.onBlur&&t.onBlur.call(e),n||e.removeAttribute("tabindex")}n||e.setAttribute("tabindex","-1"),e.addEventListener("focus",(function t(){e.removeEventListener("focus",t),e.addEventListener("blur",i)})),t.onBeforeFocus&&t.onBeforeFocus.call(e),e.focus()}}},807:function(e){var t=function(){function e(e){if(!e)return this;this.$module=e,this.debounceFormSubmitTimer=null,this.$module.addEventListener("keydown",this.handleKeyDown.bind(this)),this.$module.addEventListener("click",this.debounce.bind(this))}var t=e.prototype;return t.handleKeyDown=function(e){var t=e.target;"button"===t.getAttribute("role")&&32===e.keyCode&&(e.preventDefault(),t.click())},t.debounce=function(e){var t=this;if("true"===e.target.getAttribute("data-prevent-double-click"))return this.debounceFormSubmitTimer?(e.preventDefault(),!1):void(this.debounceFormSubmitTimer=setTimeout((function(){t.debounceFormSubmitTimer=null}),1e3))},e}();e.exports=function(e){var n=(void 0===e?{}:e).scope;(void 0===n?document:n).querySelectorAll('[data-module="nhsuk-button"]').forEach((function(e){new t(e)}))}},997:function(e){var t=function(){function e(t){if(!t)return this;var n=t.querySelector(".nhsuk-js-character-count");if(!n)return this;this.$module=t,this.$textarea=n,this.$visibleCountMessage=null,this.$screenReaderCountMessage=null,this.lastInputTimestamp=null;var i=document.getElementById(this.$textarea.id+"-info");this.$textarea.insertAdjacentElement("afterend",i);var s=document.createElement("div");s.className="nhsuk-character-count__sr-status nhsuk-u-visually-hidden",s.setAttribute("aria-live","polite"),this.$screenReaderCountMessage=s,i.insertAdjacentElement("afterend",s);var o=document.createElement("div");o.className=i.className,o.classList.add("nhsuk-character-count__status"),o.setAttribute("aria-hidden","true"),this.$visibleCountMessage=o,i.insertAdjacentElement("afterend",o),i.classList.add("nhsuk-u-visually-hidden"),this.options=e.getDataset(this.$module);var a=this.defaults.characterCountAttribute;this.options.maxwords&&(a=this.defaults.wordCountAttribute),this.maxLength=this.$module.getAttribute(a),this.maxLength&&(this.$textarea.removeAttribute("maxlength"),this.bindChangeEvents(),"onpageshow"in window?window.addEventListener("pageshow",this.updateCountMessage.bind(this)):window.addEventListener("DOMContentLoaded",this.updateCountMessage.bind(this)),this.updateCountMessage())}e.getDataset=function(e){var t={},n=e.attributes;if(n)for(var i=0;i<n.length;i++){var s=n[i],o=s.name.match(/^data-(.+)/);o&&(t[o[1]]=s.value)}return t};var t=e.prototype;return t.count=function(e){var t;this.options.maxwords?t=(e.match(/\S+/g)||[]).length:t=e.length;return t},t.bindChangeEvents=function(){var e=this.$textarea;e.addEventListener("keyup",this.handleKeyUp.bind(this)),e.addEventListener("focus",this.handleFocus.bind(this)),e.addEventListener("blur",this.handleBlur.bind(this))},t.checkIfValueChanged=function(){this.$textarea.oldValue||(this.$textarea.oldValue=""),this.$textarea.value!==this.$textarea.oldValue&&(this.$textarea.oldValue=this.$textarea.value,this.updateCountMessage())},t.updateCountMessage=function(){this.updateVisibleCountMessage(),this.updateScreenReaderCountMessage()},t.updateVisibleCountMessage=function(){var e=this.$textarea,t=this.$visibleCountMessage,n=this.maxLength-this.count(e.value);
1this.isOverThreshold()?t.classList.remove("nhsuk-character-count__message--disabled"):t.classList.add("nhsuk-character-count__message--disabled"),n<0?(e.classList.add("nhsuk-textarea--error"),t.classList.remove("nhsuk-hint"),t.classList.add("nhsuk-error-message")):(e.classList.remove("nhsuk-textarea--error"),t.classList.remove("nhsuk-error-message"),t.classList.add("nhsuk-hint")),t.innerHTML=this.formattedUpdateMessage()},t.updateScreenReaderCountMessage=function(){var e=this.$screenReaderCountMessage;this.isOverThreshold()?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",!0),e.innerHTML=this.formattedUpdateMessage()},t.formattedUpdateMessage=function(){var e,t=this.$textarea,n=this.options,i=this.maxLength-this.count(t.value),s="character";return n.maxwords&&(s="word"),s+=-1===i||1===i?"":"s",e=i<0?"too many":"remaining","You have "+Math.abs(i)+" "+s+" "+e},t.isOverThreshold=function(){var e=this.$textarea,t=this.options,n=this.count(e.value);return this.maxLength*(t.threshold?t.threshold:0)/100<=n},t.handleKeyUp=function(){this.updateVisibleCountMessage(),this.lastInputTimestamp=Date.now()},t.handleFocus=function(){var e=this;this.valueChecker=setInterval((function(){(!e.lastInputTimestamp||Date.now()-500>=e.lastInputTimestamp)&&e.checkIfValueChanged()}),1e3)},t.handleBlur=function(){clearInterval(this.valueChecker)},e}();t.prototype.defaults={characterCountAttribute:"data-maxlength",wordCountAttribute:"data-maxwords"},e.exports=function(e){var n=(void 0===e?{}:e).scope;(void 0===n?document:n).querySelectorAll('[data-module="nhsuk-character-count"]').forEach((function(e){new t(e)}))}},305:function(e,t,n){var i=n(848).toggleConditionalInput,s=function(e){e.form.querySelectorAll('input[type="checkbox"]').forEach((function(e){return i(e,"nhsuk-checkboxes__conditional--hidden")}))};e.exports=function(e){var t=(void 0===e?{}:e).scope,n=(void 0===t?document:t).querySelectorAll(".nhsuk-checkboxes .nhsuk-checkboxes__input"),o=function(e){var t;(i(e.target,"nhsuk-checkboxes__conditional--hidden"),e.target.checked)&&(e.target.hasAttribute("data-checkbox-exclusive")?((t=e.target).form.querySelectorAll('input[type="checkbox"][data-checkbox-exclusive-group="'+t.getAttribute("data-checkbox-exclusive-group")+'"]').forEach((function(e){t.form===e.form&&e!==t&&(e.checked=!1)})),s(t)):function(e){e.form.querySelectorAll('input[type="checkbox"][data-checkbox-exclusive][data-checkbox-exclusive-group="'+e.getAttribute("data-checkbox-exclusive-group")+'"]').forEach((function(t){e.form===t.form&&(t.checked=!1)})),s(e)}(e.target))};"onpageshow"in window?window.addEventListener("pageshow",(function(){return n.forEach((function(e){return s(e)}))})):window.addEventListener("DOMContentLoaded",(function(){return n.forEach((function(e){return s(e)}))})),n.forEach((function(e){return s(e)})),n.forEach((function(e){e.addEventListener("change",o)}))}},277:function(e,t,n){var i=n(848),s=i.generateUniqueID,o=i.toggleAttribute;e.exports=function(e){var t=(void 0===e?{}:e).scope,n=(void 0===t?document:t).querySelectorAll("details");n.forEach((function(e){"HTMLDetailsElement"in window&&e instanceof HTMLDetailsElement||e.hasAttribute("nhsuk-polyfilled")||function(e){e.setAttribute("nhsuk-polyfilled","true");var t=e.querySelector(".nhsuk-details__text");t.id||t.setAttribute("id","details-content-"+s());var n=e.querySelector(".nhsuk-details__summary");n.setAttribute("role","button"),n.setAttribute("aria-controls",t.id),n.setAttribute("tabIndex","0"),!0==(null!==e.getAttribute("open"))?(n.setAttribute("aria-expanded","true"),t.setAttribute("aria-hidden","false")):(n.setAttribute("aria-expanded","false"),t.setAttribute("aria-hidden","true"),t.style.display="none"),n.addEventListener("click",(function(){o(n,"aria-expanded"),o(t,"aria-hidden"),t.style.display="true"===t.getAttribute("aria-hidden")?"none":"",e.hasAttribute("open")?e.removeAttribute("open"):e.setAttribute("open","open")})),n.addEventListener("keydown",(function(e){13!==e.keyCode&&32!==e.keyCode||(e.preventDefault(),n.click())}))}(e)}))}},673:function(e){function t(e){if("A"!==e.tagName||!1===e.href)return!1;var t=document.querySelector(e.hash);if(!t)return!1;var n=function(e){var t=e.closest("fieldset");if(t){var n=t.getElementsByTagName("legend");if(n.length){var i=n[0];if("checkbox"===e.type||"radio"===e.type)return i;var s=i.getBoundingClientRect().top,o=e.getBoundingClientRect();if(o.height&&window.innerHeight&&o.top+o.height-s<window.innerHeight/2)return i}}return document.querySelector("label[for='"+e.getAttribute("id")+"']")||e.closest("label")}(t);return!!n&&(n.scrollIntoView(),t.focus({preventScroll:!0}),!0)}function n(e){t(e.target)&&e.preventDefault()}
1e.exports=function(e){var t=void 0===e?{}:e,i=t.focusOnPageLoad,s=void 0===i||i,o=t.scope,a=(void 0===o?document:o).querySelector(".nhsuk-error-summary");a&&(s&&a.focus(),a.addEventListener("click",n))}},649:function(e){var t=function(){function e(e){return e?(this.$module=e,this.navigationList=this.$module.querySelector(".nhsuk-header__navigation-list"),this.navigationItems=this.$module.querySelectorAll(".nhsuk-header__navigation-item"),this.mobileMenuToggleButton=this.$module.querySelector(".nhsuk-header__menu-toggle"),this.mobileMenuContainer=this.$module.querySelector(".nhsuk-mobile-menu-container"),this.navigationList&&this.navigationItems&&this.navigationItems.length&&this.mobileMenuToggleButton&&this.mobileMenuContainer?(this.mobileMenu=document.createElement("ul"),this.menuIsEnabled=!1,this.menuIsOpen=!1,this.handleEscapeKey=this.onEscapeKey.bind(this),this.handleUpdateNavigation=this.debounce(this.updateNavigation),this.handleToggleMobileMenu=this.toggleMobileMenu.bind(this),this.setupNavigation(),void this.updateNavigation()):this):this}var t=e.prototype;return t.debounce=function(e,t){var n,i=this;return void 0===t&&(t=100),function(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];clearTimeout(n),n=setTimeout((function(){e.apply(i,o)}),t)}},t.resetNavigation=function(){var e=this,t=0;this.breakpoints.forEach((function(n){e.navigationList.insertBefore(n.element,e.mobileMenuContainer),t+=n.element.offsetWidth,n.right=t})),this.width=this.navigationList.offsetWidth},t.setupNavigation=function(){var e=this;this.breakpoints=[],this.navigationItems.forEach((function(t){e.breakpoints.push({element:t,right:0})})),window.addEventListener("resize",this.handleUpdateNavigation)},t.setupMobileMenu=function(){this.mobileMenu.parentElement||(this.mobileMenuContainer.appendChild(this.mobileMenu),this.mobileMenu.classList.add("nhsuk-header__drop-down","nhsuk-header__drop-down--hidden"))},t.enableMobileMenu=function(){this.menuIsEnabled||(this.menuIsEnabled=!0,this.mobileMenuToggleButton.classList.add("nhsuk-header__menu-toggle--visible"),this.mobileMenuContainer.classList.add("nhsuk-mobile-menu-container--visible"),this.mobileMenuToggleButton.addEventListener("click",this.handleToggleMobileMenu))},t.disableMobileMenu=function(){this.menuIsEnabled&&(this.closeMobileMenu(),this.menuIsEnabled=!1,this.mobileMenuToggleButton.classList.remove("nhsuk-header__menu-toggle--visible"),this.mobileMenuContainer.classList.remove("nhsuk-mobile-menu-container--visible"),this.mobileMenuToggleButton.removeEventListener("click",this.handleToggleMobileMenu))},t.closeMobileMenu=function(){this.menuIsEnabled&&this.menuIsOpen&&(this.menuIsOpen=!1,this.mobileMenu.classList.add("nhsuk-header__drop-down--hidden"),this.$module.style.marginBottom=0,this.mobileMenuToggleButton.setAttribute("aria-expanded","false"),document.removeEventListener("keydown",this.handleEscapeKey))},t.onEscapeKey=function(e){"Escape"===e.key&&this.closeMobileMenu()},t.openMobileMenu=function(){if(this.menuIsEnabled&&!this.menuIsOpen){this.menuIsOpen=!0,this.mobileMenu.classList.remove("nhsuk-header__drop-down--hidden");var e=this.mobileMenu.offsetHeight;this.$module.style.marginBottom=e+"px",this.mobileMenuToggleButton.setAttribute("aria-expanded","true"),document.addEventListener("keydown",this.handleEscapeKey)}},t.toggleMobileMenu=function(){this.menuIsEnabled&&(this.menuIsOpen?this.closeMobileMenu():this.openMobileMenu())},t.updateNavigation=function(){var e=this;this.resetNavigation(),this.breakpoints.filter((function(t){return t.right>e.width})).length?(this.setupMobileMenu(),this.enableMobileMenu(),this.width-=this.mobileMenuContainer.offsetWidth,this.breakpoints.forEach((function(t){t.right>e.width&&e.mobileMenu.insertAdjacentElement("beforeend",t.element)}))):this.disableMobileMenu()},e}();e.exports=function(e){void 0===e&&(e={});var n=(e.scope||document).querySelector(".nhsuk-navigation");new t(n)}},551:function(e,t,n){var i=n(848).toggleConditionalInput;e.exports=function(e){var t=(void 0===e?{}:e).scope,n=(void 0===t?document:t).querySelectorAll(".nhsuk-radios--conditional .nhsuk-radios__input"),s=function(){n.forEac
1h((function(e){return i(e,"nhsuk-radios__conditional--hidden")}))};"onpageshow"in window?window.addEventListener("pageshow",s):window.addEventListener("DOMContentLoaded",s),s(),n.forEach((function(e){e.addEventListener("change",s)}))}},829:function(e,t,n){var i=n(848).setFocus;e.exports=function(e){void 0===e&&(e={});var t=(e.scope||document).querySelector(".nhsuk-skip-link");if(t&&t instanceof HTMLAnchorElement){var n=t.hash.split("#").pop(),s=n?document.getElementById(n):null;s&&t.addEventListener("click",(function(){return i(s,{onBeforeFocus:function(){s.classList.add("nhsuk-skip-link-focused-element")},onBlur:function(){s.classList.remove("nhsuk-skip-link-focused-element")}})}))}}},303:function(e){var t=function(){function e(e){this.$module=e,this.$tabs=e.querySelectorAll(".nhsuk-tabs__tab"),this.keys={down:40,left:37,right:39,up:38},this.jsHiddenClass="nhsuk-tabs__panel--hidden",this.showEvent=new CustomEvent("tab.show"),this.hideEvent=new CustomEvent("tab.hide"),"function"==typeof window.matchMedia?this.setupResponsiveChecks():this.setup()}var t=e.prototype;return t.setupResponsiveChecks=function(){this.mql=window.matchMedia("(min-width: 641px)"),"addEventListener"in this.mql?this.mql.addEventListener("change",this.checkMode.bind(this)):this.mql.addListener(this.checkMode.bind(this)),this.checkMode()},t.checkMode=function(){this.mql.matches?this.setup():this.teardown()},t.setup=function(){var e=this,t=this.$module,n=this.$tabs,i=t.querySelector(".nhsuk-tabs__list"),s=t.querySelectorAll(".nhsuk-tabs__list-item");if(n&&i&&s){i.setAttribute("role","tablist"),s.forEach((function(e){e.setAttribute("role","presentation")})),n.forEach((function(t){e.setAttributes(t),t.boundTabClick=e.onTabClick.bind(e),t.boundTabKeydown=e.onTabKeydown.bind(e),t.addEventListener("click",t.boundTabClick,!0),t.addEventListener("keydown",t.boundTabKeydown,!0),e.hideTab(t)}));var o=this.getTab(window.location.hash)||this.$tabs[0];this.showTab(o),t.boundOnHashChange=this.onHashChange.bind(this),window.addEventListener("hashchange",t.boundOnHashChange,!0)}},t.teardown=function(){var e=this,t=this.$module,n=this.$tabs,i=t.querySelector(".nhsuk-tabs__list"),s=t.querySelectorAll(".nhsuk-tabs__list-item");n&&i&&s&&(i.removeAttribute("role"),s.forEach((function(e){e.removeAttribute("role","presentation")})),n.forEach((function(t){t.removeEventListener("click",t.boundTabClick,!0),t.removeEventListener("keydown",t.boundTabKeydown,!0),e.unsetAttributes(t)})),window.removeEventListener("hashchange",t.boundOnHashChange,!0))},t.onHashChange=function(){var e=window.location.hash,t=this.getTab(e);if(t)if(this.changingHash)this.changingHash=!1;else{var n=this.getCurrentTab();this.hideTab(n),this.showTab(t),t.focus()}},t.hideTab=function(e){this.unhighlightTab(e),this.hidePanel(e)},t.showTab=function(e){this.highlightTab(e),this.showPanel(e)},t.getTab=function(e){return this.$module.querySelector('.nhsuk-tabs__tab[href="'+e+'"]')},t.setAttributes=function(t){var n=e.getHref(t).slice(1);t.setAttribute("id","tab_"+n),t.setAttribute("role","tab"),t.setAttribute("aria-controls",n),t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1");var i=this.getPanel(t);i.setAttribute("role","tabpanel"),i.setAttribute("aria-labelledby",t.id),i.classList.add(this.jsHiddenClass)},t.unsetAttributes=function(e){e.removeAttribute("id"),e.removeAttribute("role"),e.removeAttribute("aria-controls"),e.removeAttribute("aria-selected"),e.removeAttribute("tabindex");var t=this.getPanel(e);t.removeAttribute("role"),t.removeAttribute("aria-labelledby"),t.removeAttribute("tabindex"),t.classList.remove(this.jsHiddenClass)},t.onTabClick=function(e){e.target.classList.contains("nhsuk-tabs__tab")||(e.stopPropagation(),e.preventDefault()),e.preventDefault();var t=e.target,n=this.getCurrentTab();this.hideTab(n),this.showTab(t),this.createHistoryEntry(t)},t.createHistoryEntry=function(t){var n=this.getPanel(t),i=n.id;n.id="",this.changingHash=!0,window.location.hash=e.getHref(t).slice(1),n.id=i},t.onTabKeydown=function(e){switch(e.keyCode){case this.keys.left:case this.keys.up:this.activatePreviousTab(),e.preventDefault();break;case this.keys.right:case this.keys.down:this.activateNextTab(),e.preventDefault()}},t.activateNextTab=function(){var e,t=this.getCurrentTab(),n=t.parentNode.nextElementSibling;n&&(e=n.querySelector(".nhsuk-tabs__tab")),e&&(this.hideTab(t),this.showTab(e),e.focus(),this.createHistoryEntry(e))},t.activatePreviousTab=function(){var e,t=this.getCurrentTab(),n=t.parentNode.previousElementSibling;n&&(e=n.querySelector(".nhsuk-tabs__tab")),e&&(this.hideTab(t),this.showTab(e),e.focus(),this.createHistoryEntry(e))},t.getPanel=function(t){return this.$module.querySelector(e.getHref(t))},t.showPanel=function(e){var t=this.getPanel(e);t.classList.remove(this.jsHiddenClass),t.dispatchEvent(this.showEvent)},t.hidePanel=function(e){var t=this.getPanel(e);t.classList.add(this.jsHiddenClass),t.dispatchEvent(this.hideEvent)},t.unhighlightTab=function(e){e.setAttribute("aria-selected","false"),e.parentNode.classList.remove("nhsuk-tabs__list-item--selected"),e.setAttribute("tabindex","-1")},t.highlightTab=function(e){e.setAttribute("aria-selected","true"),e.parentNode.classList.add("nhsuk-tabs__list-item--selected"),e.setAttribute("tabindex","0")},t.getCurrentTab=function(){return this.$module.querySelector(".nhsuk-tabs__list-item--selected .nhsuk-tabs__tab")},e.getHref=function(e){var t=e.getAttribute("href");return t.slice(t.indexOf("#"),t.length)},e}();e.exports=function(e){var n=(void 0===e?{}:e).scope;(void 0===n?document:n).querySelectorAll('[data-module="nhsuk-tabs"]').forEach((function(e){new t(e)}))}},849:function(e,t,n){var i=n(807),s=n(997),o=n(305),a=n(277),r=n(673),u=n(649),h=n(551),d=n(829),l=n(303);n(621),e.exports={initButton:i,initCharacterCount:s,initCheckboxes:o,initDetails:a,initErrorSummary:r,initHeader:u,initRadios:h,initSkipLink:d,initTabs:l,initAll:function(e){u({scope:e}),d({scope:e}),i({scope:e}),s({scope:e}),o({scope:e}),a({scope:e}),r({scope:e}),h({scope:e}),l({scope:e})}}}
1,621:function(){NodeList.prototype.forEach||(NodeList.prototype.forEach=Array.prototype.forEach),Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{enumerable:!1,value:function(e){return this.filter((function(t){return t===e})).length>0}}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(Element.prototype.matches.call(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}),"function"!=typeof window.CustomEvent&&(window.CustomEvent=function(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n})}},t={};var n=function n(i){var s=t[i];if(void 0!==s)return s.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}(849),i=n.initAll;document.addEventListener("DOMContentLoaded",(function(){return i(document)}))}();//# sourceMappingURL=nhsuk.min.js.map
2//# sourceMappingURL=nhsuk-9.6.1.min.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.